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