OXYGENHUB
◆ close-proposal-140 oxygenhub / crates / hub-api / ts / index.d.ts
9.6 KiB · last changed Close and reopen a proposal through the API and oh 23 days 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;
71e65fcf Andy McCall ↶ 395
  state?: string | null;
76f262e1 Andy McCall ↶ 396
  title?: string | null;
397
};
398
399
export type NewLabel = {
400
  colour?: string | null;
401
  description?: string;
402
  name: string;
b64e2537 Andy McCall ↶ 403
};
404
961c10be Andy McCall ↶ 405
export type RequiredChecks = {
406
  names: string[];
407
};
408
ef20fdc1 Andy McCall ↶ 409
export type Project = {
410
  closed: boolean;
411
  description: string;
412
  number: number;
413
  owner: string;
414
  public: boolean;
415
  title: string;
416
  updated_ms: number;
417
  url: string;
418
};
419
420
export type ProjectCard = {
421
  id: number;
422
  kind: string;
423
  reference: string;
424
  state: string;
425
  title: string;
426
};
427
428
export type ProjectColumn = {
429
  cards: ProjectCard[];
430
  id: number;
431
  name: string;
432
};
433
434
export type Board = {
435
  columns: ProjectColumn[];
436
  project: Project;
437
};
438
439
export type NewProject = {
440
  description?: string;
441
  private?: boolean;
442
  title: string;
443
};
444
445
export type ProjectEdit = {
446
  closed?: boolean | null;
447
  description?: string | null;
71e65fcf Andy McCall ↶ 448
  owner?: string | null;
ef20fdc1 Andy McCall ↶ 449
  private?: boolean | null;
450
  title?: string | null;
451
};
452
453
export type NewCard = {
454
  column?: string | null;
455
  note?: string;
456
  reference?: string;
457
};
458
459
export type CardMove = {
460
  column: string;
461
};
462
b64e2537 Andy McCall ↶ 463
export type NewComment = {
464
  body: string;
3f4b0ea6 Andy McCall ↶ 465
  line?: number | null;
466
  path?: string | null;
b64e2537 Andy McCall ↶ 467
};
468
469
export type NewProposal = {
470
  body?: string;
471
  draft?: boolean;
472
  source: string;
473
  target: string;
474
  title: string;
475
};
476
477
export type NewReview = {
478
  body?: string;
479
  verdict: string;
480
};
481
482
export type IssueStateChange = {
483
  reason?: string;
484
  state: string;
485
};
486
487
export type WebhookEnvelope = {
488
  actor: string;
489
  at_ms: number;
490
  data: unknown;
491
  delivery: string;
492
  event: string;
9bc6b472 Andy McCall ↶ 493
  repository?: Repository | null;
b64e2537 Andy McCall ↶ 494
};
495
496
export type ProposalEvent = {
9bc6b472 Andy McCall ↶ 497
  check?: Check | null;
b64e2537 Andy McCall ↶ 498
  kind: string;
499
  number: number;
bf1ab345 Andy McCall ↶ 500
};
501
502
export type AssetBuild = {
503
  artifact: string;
504
  job: string;
505
  receipt?: string | null;
506
  receipt_url?: string | null;
507
  run: number;
508
  run_url: string;
509
  signer?: string | null;
b64e2537 Andy McCall ↶ 510
};
511
3f4b0ea6 Andy McCall ↶ 512
export type ReleaseAsset = {
bf1ab345 Andy McCall ↶ 513
  built_by?: AssetBuild | null;
3f4b0ea6 Andy McCall ↶ 514
  content_type: string;
515
  downloads: number;
516
  hash: string;
517
  name: string;
518
  size: number;
519
  url: string;
520
};
521
522
export type Release = {
523
  archives: string[];
524
  assets: ReleaseAsset[];
525
  author: string;
526
  created_ms: number;
527
  heads: string[];
528
  latest: boolean;
529
  notes: string;
530
  prerelease: boolean;
531
  signer?: string | null;
532
  tag: string;
533
  title: string;
bf1ab345 Andy McCall ↶ 534
  url: string;
535
};
536
537
export type FlowJob = {
538
  depends_on: string[];
539
  error: string;
540
  exit_code?: number | null;
541
  finished_ms?: number | null;
542
  log_lines: number;
543
  name: string;
71e65fcf Andy McCall ↶ 544
  placed?: string;
bf1ab345 Andy McCall ↶ 545
  runner: string;
546
  started_ms?: number | null;
547
  status: string;
4d2e44d7 Andy McCall ↶ 548
  waiting?: string;
bf1ab345 Andy McCall ↶ 549
};
550
551
export type FlowRun = {
552
  actor: string;
553
  bookmark: string;
554
  created_ms: number;
555
  error: string;
556
  finished_ms?: number | null;
557
  heads: string[];
558
  jobs?: FlowJob[];
559
  number: number;
560
  pipeline_hash: string;
561
  queue_position?: number | null;
562
  state: string;
563
  status: string;
564
  trigger: string;
3f4b0ea6 Andy McCall ↶ 565
  url: string;
bf1ab345 Andy McCall ↶ 566
};
567
568
export type FlowLogLine = {
569
  seq: number;
570
  stream: string;
571
  t: number;
572
  text: string;
3f4b0ea6 Andy McCall ↶ 573
};
574
575
export type NewRelease = {
576
  notes?: string | null;
577
  prerelease?: boolean;
578
  tag: string;
579
  title: string;
580
};
581