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