OXYGENHUB
# 4bae285c6ed8 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
1
// Generated by `cargo run -p hub-api --bin hub-api-typescript`; do not edit.
2
// Types of the OxygenHub JSON API (hub spec §12.1).
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;
36
  note?: string | null;
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 Via = {
52
  expires_ms?: number | null;
53
  key: string;
54
  name: string;
55
  revoked: boolean;
56
  scope: string;
57
};
58
59
export type ChangeSummary = {
60
  author: Author;
61
  deps: string[];
62
  hash: string;
63
  head: boolean;
64
  message: string;
65
  signature: Signature;
66
  via?: Via | null;
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
82
export type Label = {
83
  colour: string;
84
  description: string;
85
  name: string;
86
};
87
88
export type Landed = {
89
  by: string;
90
  via: string;
91
  when_ms: number;
92
};
93
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;
117
  labels?: Label[];
118
  landable: boolean;
119
  landed?: Landed | null;
120
  number: number;
121
  projected_heads: string[];
122
  projected_state?: string | null;
123
  repository_url: string;
124
  requested_reviewers?: string[];
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
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
175
export type Atom = {
176
  change: string;
177
  index: number;
178
};
179
180
export type Comment = {
181
  anchor?: Atom | unknown;
182
  author: string;
183
  body: string;
184
  created_ms: number;
185
  id: number;
186
  path?: string | null;
187
  resolved: boolean;
188
};
189
190
export type ProposalFile = {
191
  added: number;
192
  from?: string | null;
193
  kind: string;
194
  path: string;
195
  removed: number;
196
};
197
198
export type Notification = {
199
  actor: string;
200
  at_ms: number;
201
  id: number;
202
  kind: string;
203
  read: boolean;
204
  title: string;
205
  url: string;
206
};
207
208
export type Inbox = {
209
  items: Notification[];
210
  unread: number;
211
};
212
213
export type Review = {
214
  author: string;
215
  body: string;
216
  created_ms: number;
217
  id: number;
218
  sealed: boolean;
219
  verdict: string;
220
  via?: string;
221
};
222
223
export type TreeEntry = {
224
  conflicted: boolean;
225
  exec: boolean;
226
  kind: string;
227
  name: string;
228
  path: string;
229
  size?: number | null;
230
};
231
232
export type BlameLine = {
233
  author: string;
234
  change: string;
235
  index: number;
236
  line: number;
237
  text: string;
238
  when_ms: number;
239
};
240
241
export type FileChange = {
242
  added: number;
243
  from?: string | null;
244
  kind: string;
245
  path: string;
246
  removed: number;
247
};
248
249
export type ChangeDetail = {
250
  body: string;
251
  change: ChangeSummary;
252
  dependents: string[];
253
  files: FileChange[];
254
  in_bookmarks: string[];
255
  in_tags: string[];
256
};
257
258
export type History = {
259
  changes: ChangeSummary[];
260
  heads: string[];
261
  offset: number;
262
  reference: string;
263
  total: number;
264
};
265
266
export type Conflict = {
267
  bookmark: string;
268
  contributors: string[];
269
  kind: string;
270
  path: string;
271
};
272
273
export type Push = {
274
  at_ms: number;
275
  changes: number;
276
  heads: number;
277
  new_state: string;
278
  ok: boolean;
279
  old_state: string;
280
  pusher: string;
281
  reason: string;
282
  reference: string;
283
};
284
285
export type Policy = {
286
  expires_ms: number;
287
  root_threshold: number;
288
  roots: string[];
289
  rules: Rule[];
290
  serial: number;
291
};
292
293
export type Rule = {
294
  allow_conflicts: boolean;
295
  keys: string[];
296
  pattern: string;
297
  require: string;
298
  threshold: number;
299
};
300
301
export type Trust = {
302
  hub_key: string;
303
  invalid: string[];
304
  policy?: Policy | unknown;
305
  sealed: number;
306
  signed: number;
307
  unsigned: number;
308
};
309
310
export type Hook = {
311
  active: boolean;
312
  created_ms: number;
313
  events: string;
314
  id: number;
315
  url: string;
316
};
317
318
export type NewHook = {
319
  events?: string;
320
  secret: string;
321
  url: string;
322
};
323
324
export type CheckStatus = "queued" | "running" | "passed" | "failed" | "cancelled" | "skipped";
325
326
export type Check = {
327
  finished_ms?: number | null;
328
  name: string;
329
  reporter: string;
330
  seal?: string | null;
331
  started_ms: number;
332
  state: string;
333
  status: CheckStatus;
334
  summary: string;
335
  url: string;
336
};
337
338
export type NewCheck = {
339
  name: string;
340
  seal?: string | null;
341
  state: string;
342
  status: CheckStatus;
343
  summary?: string;
344
  url?: string;
345
};
346
347
export type User = {
348
  created_ms: number;
349
  display_name: string;
350
  is_admin: boolean;
351
  keys: string[];
352
  username: string;
353
};
354
355
export type Organisation = {
356
  description: string;
357
  display_name: string;
358
  members: string[];
359
  name: string;
360
};
361
362
export type NewRepository = {
363
  description?: string;
364
  name: string;
365
  owner: string;
366
  visibility?: Visibility;
367
};
368
369
export type NewIssue = {
370
  assignees?: string[];
371
  body?: string;
372
  labels?: string[];
373
  milestone?: string | null;
374
  title: string;
375
};
376
377
export type IssueEdit = {
378
  assignees?: string[] | null;
379
  body?: string | null;
380
  labels?: string[] | null;
381
  milestone?: string | null;
382
  title?: string | null;
383
};
384
385
export type ReleaseEdit = {
386
  notes?: string | null;
387
  prerelease?: boolean | null;
388
  title?: string | null;
389
};
390
391
export type ProposalEdit = {
392
  body?: string | null;
393
  labels?: string[] | null;
394
  title?: string | null;
395
};
396
397
export type NewLabel = {
398
  colour?: string | null;
399
  description?: string;
400
  name: string;
401
};
402
403
export type RequiredChecks = {
404
  names: string[];
405
};
406
407
export type Project = {
408
  closed: boolean;
409
  description: string;
410
  number: number;
411
  owner: string;
412
  public: boolean;
413
  title: string;
414
  updated_ms: number;
415
  url: string;
416
};
417
418
export type ProjectCard = {
419
  id: number;
420
  kind: string;
421
  reference: string;
422
  state: string;
423
  title: string;
424
};
425
426
export type ProjectColumn = {
427
  cards: ProjectCard[];
428
  id: number;
429
  name: string;
430
};
431
432
export type Board = {
433
  columns: ProjectColumn[];
434
  project: Project;
435
};
436
437
export type NewProject = {
438
  description?: string;
439
  private?: boolean;
440
  title: string;
441
};
442
443
export type ProjectEdit = {
444
  closed?: boolean | null;
445
  description?: string | null;
446
  private?: boolean | null;
447
  title?: string | null;
448
};
449
450
export type NewCard = {
451
  column?: string | null;
452
  note?: string;
453
  reference?: string;
454
};
455
456
export type CardMove = {
457
  column: string;
458
};
459
460
export type NewComment = {
461
  body: string;
462
  line?: number | null;
463
  path?: string | null;
464
};
465
466
export type NewProposal = {
467
  body?: string;
468
  draft?: boolean;
469
  source: string;
470
  target: string;
471
  title: string;
472
};
473
474
export type NewReview = {
475
  body?: string;
476
  verdict: string;
477
};
478
479
export type IssueStateChange = {
480
  reason?: string;
481
  state: string;
482
};
483
484
export type WebhookEnvelope = {
485
  actor: string;
486
  at_ms: number;
487
  data: unknown;
488
  delivery: string;
489
  event: string;
490
  repository?: Repository | unknown;
491
};
492
493
export type ProposalEvent = {
494
  check?: Check | unknown;
495
  kind: string;
496
  number: number;
497
};
498
499
export type AssetBuild = {
500
  artifact: string;
501
  job: string;
502
  receipt?: string | null;
503
  receipt_url?: string | null;
504
  run: number;
505
  run_url: string;
506
  signer?: string | null;
507
};
508
509
export type ReleaseAsset = {
510
  built_by?: AssetBuild | null;
511
  content_type: string;
512
  downloads: number;
513
  hash: string;
514
  name: string;
515
  size: number;
516
  url: string;
517
};
518
519
export type Release = {
520
  archives: string[];
521
  assets: ReleaseAsset[];
522
  author: string;
523
  created_ms: number;
524
  heads: string[];
525
  latest: boolean;
526
  notes: string;
527
  prerelease: boolean;
528
  signer?: string | null;
529
  tag: string;
530
  title: string;
531
  url: string;
532
};
533
534
export type FlowJob = {
535
  depends_on: string[];
536
  error: string;
537
  exit_code?: number | null;
538
  finished_ms?: number | null;
539
  log_lines: number;
540
  name: string;
541
  runner: string;
542
  started_ms?: number | null;
543
  status: string;
544
  waiting?: string;
545
};
546
547
export type FlowRun = {
548
  actor: string;
549
  bookmark: string;
550
  created_ms: number;
551
  error: string;
552
  finished_ms?: number | null;
553
  heads: string[];
554
  jobs?: FlowJob[];
555
  number: number;
556
  pipeline_hash: string;
557
  queue_position?: number | null;
558
  state: string;
559
  status: string;
560
  trigger: string;
561
  url: string;
562
};
563
564
export type FlowLogLine = {
565
  seq: number;
566
  stream: string;
567
  t: number;
568
  text: string;
569
};
570
571
export type NewRelease = {
572
  notes?: string | null;
573
  prerelease?: boolean;
574
  tag: string;
575
  title: string;
576
};
577