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