OXYGENHUB
◆ v0.3.1 oxygenhub / crates / hub-api / ts / index.d.ts
8.9 KiB · last changed Runners: the queue on Admin → Runners, and the runner API (refs #41, part 4) 1 month ago source blame history raw
b64e2537 Andy McCall ↶ 1
// Generated by `cargo run -p hub-api --bin hub-api-typescript`; do not edit.
8d2caf12 Andy McCall ↶ 2
// Types of the OxygenHub JSON API (hub spec §12.1).
b64e2537 Andy McCall ↶ 3
4
export type Visibility = "public" | "internal" | "private";
5
6
export type Repository = {
7
  clone_url: string;
8
  created_ms: number;
9
  default_bookmark: string;
10
  description: string;
11
  name: string;
12
  owner: string;
13
  updated_ms: number;
14
  visibility: Visibility;
15
};
16
17
export type Bookmark = {
18
  changes: number;
19
  default: boolean;
20
  heads: string[];
21
  name: string;
22
};
23
24
export type Tag = {
25
  heads: string[];
26
  message: string;
27
  name: string;
28
  signer?: string | null;
29
};
30
31
export type Author = {
32
  account?: string | null;
33
  email: string;
34
  key: string;
35
  name: string;
bf1ab345 Andy McCall ↶ 36
  note?: string | null;
b64e2537 Andy McCall ↶ 37
};
38
39
export type Signature = {
40
  status: "unsigned";
41
} | {
42
  key: string;
43
  revoked: boolean;
44
  sealed: boolean;
45
  status: "valid";
46
} | {
47
  reason: string;
48
  status: "invalid";
49
};
50
51
export type ChangeSummary = {
52
  author: Author;
53
  deps: string[];
54
  hash: string;
55
  head: boolean;
56
  message: string;
57
  signature: Signature;
58
  when_ms: number;
59
};
60
61
export type Problem = {
62
  detail: string;
63
  status: number;
64
  title: string;
65
};
66
67
export type Approval = {
68
  account: string;
69
  key?: string | null;
70
  sealed: boolean;
71
};
72
b66e70b7 Andy McCall ↶ 73
export type Landed = {
74
  by: string;
75
  via: string;
76
  when_ms: number;
77
};
78
b64e2537 Andy McCall ↶ 79
export type ProposalSource = {
80
  bookmark: string;
81
  kind: "bookmark";
82
} | {
83
  bookmark: string;
84
  kind: "fork";
85
  name: string;
86
  owner: string;
87
} | {
88
  hashes: string[];
89
  kind: "changes";
90
};
91
92
export type ProposalState = "draft" | "open" | "landed" | "closed";
93
94
export type Proposal = {
95
  approvals: Approval[];
96
  author: string;
97
  blockers: string[];
98
  body: string;
99
  changes: ChangeSummary[];
100
  conflicted: boolean;
101
  created_ms: number;
102
  landable: boolean;
b66e70b7 Andy McCall ↶ 103
  landed?: Landed | null;
b64e2537 Andy McCall ↶ 104
  number: number;
105
  projected_heads: string[];
106
  projected_state?: string | null;
107
  repository_url: string;
b66e70b7 Andy McCall ↶ 108
  requested_reviewers?: string[];
b64e2537 Andy McCall ↶ 109
  source: ProposalSource;
110
  source_url?: string | null;
111
  state: ProposalState;
112
  target: string;
113
  title: string;
114
  updated_ms: number;
115
  url: string;
116
};
117
118
export type Label = {
119
  colour: string;
120
  description: string;
121
  name: string;
122
};
123
124
export type Issue = {
125
  assignees: string[];
126
  author: string;
127
  body: string;
128
  closed_ms?: number | null;
129
  comments: number;
130
  created_ms: number;
131
  labels: Label[];
132
  locked: boolean;
133
  milestone?: string | null;
134
  number: number;
135
  pinned: boolean;
136
  reason: string;
137
  state: string;
138
  title: string;
139
  updated_ms: number;
140
  url: string;
141
};
142
143
export type Milestone = {
144
  closed: number;
145
  description: string;
146
  due_ms?: number | null;
147
  open: number;
148
  state: string;
149
  title: string;
150
};
151
152
export type Atom = {
153
  change: string;
154
  index: number;
155
};
156
157
export type Comment = {
9bc6b472 Andy McCall ↶ 158
  anchor?: Atom | null;
b64e2537 Andy McCall ↶ 159
  author: string;
160
  body: string;
161
  created_ms: number;
162
  id: number;
c0fac31d Andy McCall ↶ 163
  line?: number | null;
b64e2537 Andy McCall ↶ 164
  path?: string | null;
165
  resolved: boolean;
166
};
167
3f02e5ea Andy McCall ↶ 168
export type ProposalFile = {
169
  added: number;
170
  from?: string | null;
171
  kind: string;
172
  path: string;
173
  removed: number;
174
};
175
42a0ba4b Andy McCall ↶ 176
export type Notification = {
177
  actor: string;
178
  at_ms: number;
179
  id: number;
180
  kind: string;
181
  read: boolean;
182
  title: string;
183
  url: string;
184
};
185
186
export type Inbox = {
187
  items: Notification[];
188
  unread: number;
189
};
190
b64e2537 Andy McCall ↶ 191
export type Review = {
192
  author: string;
193
  body: string;
194
  created_ms: number;
195
  id: number;
196
  sealed: boolean;
197
  verdict: string;
198
};
199
200
export type TreeEntry = {
201
  conflicted: boolean;
202
  exec: boolean;
203
  kind: string;
204
  name: string;
205
  path: string;
206
  size?: number | null;
207
};
208
209
export type BlameLine = {
210
  author: string;
211
  change: string;
212
  index: number;
213
  line: number;
214
  text: string;
215
  when_ms: number;
216
};
217
218
export type FileChange = {
219
  added: number;
220
  from?: string | null;
221
  kind: string;
222
  path: string;
223
  removed: number;
224
};
225
226
export type ChangeDetail = {
227
  body: string;
228
  change: ChangeSummary;
229
  dependents: string[];
230
  files: FileChange[];
231
  in_bookmarks: string[];
232
  in_tags: string[];
233
};
234
235
export type History = {
236
  changes: ChangeSummary[];
237
  heads: string[];
238
  offset: number;
239
  reference: string;
240
  total: number;
241
};
242
243
export type Conflict = {
244
  bookmark: string;
245
  contributors: string[];
246
  kind: string;
247
  path: string;
248
};
249
250
export type Push = {
251
  at_ms: number;
252
  changes: number;
253
  heads: number;
254
  new_state: string;
255
  ok: boolean;
256
  old_state: string;
257
  pusher: string;
258
  reason: string;
259
  reference: string;
260
};
261
262
export type Policy = {
263
  expires_ms: number;
264
  root_threshold: number;
265
  roots: string[];
266
  rules: Rule[];
267
  serial: number;
268
};
269
270
export type Rule = {
271
  allow_conflicts: boolean;
272
  keys: string[];
273
  pattern: string;
274
  require: string;
275
  threshold: number;
276
};
277
278
export type Trust = {
279
  hub_key: string;
280
  invalid: string[];
9bc6b472 Andy McCall ↶ 281
  policy?: Policy | null;
b64e2537 Andy McCall ↶ 282
  sealed: number;
283
  signed: number;
284
  unsigned: number;
285
};
286
287
export type Hook = {
288
  active: boolean;
289
  created_ms: number;
290
  events: string;
291
  id: number;
292
  url: string;
293
};
294
295
export type NewHook = {
296
  events?: string;
297
  secret: string;
298
  url: string;
299
};
300
301
export type CheckStatus = "queued" | "running" | "passed" | "failed" | "cancelled" | "skipped";
302
303
export type Check = {
304
  finished_ms?: number | null;
305
  name: string;
306
  reporter: string;
307
  seal?: string | null;
308
  started_ms: number;
309
  state: string;
310
  status: CheckStatus;
311
  summary: string;
312
  url: string;
313
};
314
315
export type NewCheck = {
316
  name: string;
317
  seal?: string | null;
318
  state: string;
319
  status: CheckStatus;
320
  summary?: string;
321
  url?: string;
322
};
323
324
export type User = {
325
  created_ms: number;
326
  display_name: string;
327
  is_admin: boolean;
328
  keys: string[];
329
  username: string;
330
};
331
332
export type Organisation = {
333
  description: string;
334
  display_name: string;
335
  members: string[];
336
  name: string;
337
};
338
339
export type NewRepository = {
340
  description?: string;
341
  name: string;
342
  owner: string;
343
  visibility?: Visibility;
344
};
345
346
export type NewIssue = {
76f262e1 Andy McCall ↶ 347
  assignees?: string[];
b64e2537 Andy McCall ↶ 348
  body?: string;
76f262e1 Andy McCall ↶ 349
  labels?: string[];
350
  milestone?: string | null;
b64e2537 Andy McCall ↶ 351
  title: string;
76f262e1 Andy McCall ↶ 352
};
353
354
export type IssueEdit = {
355
  assignees?: string[] | null;
356
  body?: string | null;
357
  labels?: string[] | null;
358
  milestone?: string | null;
359
  title?: string | null;
360
};
361
362
export type NewLabel = {
363
  colour?: string | null;
364
  description?: string;
365
  name: string;
b64e2537 Andy McCall ↶ 366
};
367
961c10be Andy McCall ↶ 368
export type RequiredChecks = {
369
  names: string[];
370
};
371
ef20fdc1 Andy McCall ↶ 372
export type Project = {
373
  closed: boolean;
374
  description: string;
375
  number: number;
376
  owner: string;
377
  public: boolean;
378
  title: string;
379
  updated_ms: number;
380
  url: string;
381
};
382
383
export type ProjectCard = {
384
  id: number;
385
  kind: string;
386
  reference: string;
387
  state: string;
388
  title: string;
389
};
390
391
export type ProjectColumn = {
392
  cards: ProjectCard[];
393
  id: number;
394
  name: string;
395
};
396
397
export type Board = {
398
  columns: ProjectColumn[];
399
  project: Project;
400
};
401
402
export type NewProject = {
403
  description?: string;
404
  private?: boolean;
405
  title: string;
406
};
407
408
export type ProjectEdit = {
409
  closed?: boolean | null;
410
  description?: string | null;
411
  private?: boolean | null;
412
  title?: string | null;
413
};
414
415
export type NewCard = {
416
  column?: string | null;
417
  note?: string;
418
  reference?: string;
419
};
420
421
export type CardMove = {
422
  column: string;
423
};
424
b64e2537 Andy McCall ↶ 425
export type NewComment = {
426
  body: string;
3f4b0ea6 Andy McCall ↶ 427
  line?: number | null;
428
  path?: string | null;
b64e2537 Andy McCall ↶ 429
};
430
431
export type NewProposal = {
432
  body?: string;
433
  draft?: boolean;
434
  source: string;
435
  target: string;
436
  title: string;
437
};
438
439
export type NewReview = {
440
  body?: string;
441
  verdict: string;
442
};
443
444
export type IssueStateChange = {
445
  reason?: string;
446
  state: string;
447
};
448
449
export type WebhookEnvelope = {
450
  actor: string;
451
  at_ms: number;
452
  data: unknown;
453
  delivery: string;
454
  event: string;
9bc6b472 Andy McCall ↶ 455
  repository?: Repository | null;
b64e2537 Andy McCall ↶ 456
};
457
458
export type ProposalEvent = {
9bc6b472 Andy McCall ↶ 459
  check?: Check | null;
b64e2537 Andy McCall ↶ 460
  kind: string;
461
  number: number;
bf1ab345 Andy McCall ↶ 462
};
463
464
export type AssetBuild = {
465
  artifact: string;
466
  job: string;
467
  receipt?: string | null;
468
  receipt_url?: string | null;
469
  run: number;
470
  run_url: string;
471
  signer?: string | null;
b64e2537 Andy McCall ↶ 472
};
473
3f4b0ea6 Andy McCall ↶ 474
export type ReleaseAsset = {
bf1ab345 Andy McCall ↶ 475
  built_by?: AssetBuild | null;
3f4b0ea6 Andy McCall ↶ 476
  content_type: string;
477
  downloads: number;
478
  hash: string;
479
  name: string;
480
  size: number;
481
  url: string;
482
};
483
484
export type Release = {
485
  archives: string[];
486
  assets: ReleaseAsset[];
487
  author: string;
488
  created_ms: number;
489
  heads: string[];
490
  latest: boolean;
491
  notes: string;
492
  prerelease: boolean;
493
  signer?: string | null;
494
  tag: string;
495
  title: string;
bf1ab345 Andy McCall ↶ 496
  url: string;
497
};
498
499
export type FlowJob = {
500
  depends_on: string[];
501
  error: string;
502
  exit_code?: number | null;
503
  finished_ms?: number | null;
504
  log_lines: number;
505
  name: string;
506
  runner: string;
507
  started_ms?: number | null;
508
  status: string;
509
};
510
511
export type FlowRun = {
512
  actor: string;
513
  bookmark: string;
514
  created_ms: number;
515
  error: string;
516
  finished_ms?: number | null;
517
  heads: string[];
518
  jobs?: FlowJob[];
519
  number: number;
520
  pipeline_hash: string;
521
  queue_position?: number | null;
522
  state: string;
523
  status: string;
524
  trigger: string;
3f4b0ea6 Andy McCall ↶ 525
  url: string;
bf1ab345 Andy McCall ↶ 526
};
527
528
export type FlowLogLine = {
529
  seq: number;
530
  stream: string;
531
  t: number;
532
  text: string;
3f4b0ea6 Andy McCall ↶ 533
};
534
535
export type NewRelease = {
536
  notes?: string | null;
537
  prerelease?: boolean;
538
  tag: string;
539
  title: string;
540
};
541