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