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