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