OXYGENHUB
# 5888949525ec oxygenhub-vscode / src / hubapi.d.ts
7.8 KiB · last changed File links keep line ranges and readable state-address permalinks; API types brought up to date; 0.6.2 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;
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 | null;
150
  author: string;
151
  body: string;
152
  created_ms: number;
153
  id: number;
bf73998c Andy McCall ↶ 154
  line?: number | null;
f0b06dea Andy McCall 155
  path?: string | null;
156
  resolved: boolean;
157
};
158
bf73998c Andy McCall ↶ 159
export type ProposalFile = {
160
  added: number;
161
  from?: string | null;
162
  kind: string;
163
  path: string;
164
  removed: number;
165
};
166
b2dd082c Andy McCall ↶ 167
export type Notification = {
168
  actor: string;
169
  at_ms: number;
170
  id: number;
171
  kind: string;
172
  read: boolean;
173
  title: string;
174
  url: string;
175
};
176
177
export type Inbox = {
178
  items: Notification[];
179
  unread: number;
180
};
181
f0b06dea Andy McCall 182
export type Review = {
183
  author: string;
184
  body: string;
185
  created_ms: number;
186
  id: number;
187
  sealed: boolean;
188
  verdict: string;
189
};
190
191
export type TreeEntry = {
192
  conflicted: boolean;
193
  exec: boolean;
194
  kind: string;
195
  name: string;
196
  path: string;
197
  size?: number | null;
198
};
199
200
export type BlameLine = {
201
  author: string;
202
  change: string;
203
  index: number;
204
  line: number;
205
  text: string;
206
  when_ms: number;
207
};
208
209
export type FileChange = {
210
  added: number;
211
  from?: string | null;
212
  kind: string;
213
  path: string;
214
  removed: number;
215
};
216
217
export type ChangeDetail = {
218
  body: string;
219
  change: ChangeSummary;
220
  dependents: string[];
221
  files: FileChange[];
222
  in_bookmarks: string[];
223
  in_tags: string[];
224
};
225
226
export type History = {
227
  changes: ChangeSummary[];
228
  heads: string[];
229
  offset: number;
230
  reference: string;
231
  total: number;
232
};
233
234
export type Conflict = {
235
  bookmark: string;
236
  contributors: string[];
237
  kind: string;
238
  path: string;
239
};
240
241
export type Push = {
242
  at_ms: number;
243
  changes: number;
244
  heads: number;
245
  new_state: string;
246
  ok: boolean;
247
  old_state: string;
248
  pusher: string;
249
  reason: string;
250
  reference: string;
251
};
252
253
export type Policy = {
254
  expires_ms: number;
255
  root_threshold: number;
256
  roots: string[];
257
  rules: Rule[];
258
  serial: number;
259
};
260
261
export type Rule = {
262
  allow_conflicts: boolean;
263
  keys: string[];
264
  pattern: string;
265
  require: string;
266
  threshold: number;
267
};
268
269
export type Trust = {
270
  hub_key: string;
271
  invalid: string[];
272
  policy?: Policy | null;
273
  sealed: number;
274
  signed: number;
275
  unsigned: number;
276
};
277
278
export type Hook = {
279
  active: boolean;
280
  created_ms: number;
281
  events: string;
282
  id: number;
283
  url: string;
284
};
285
286
export type NewHook = {
287
  events?: string;
288
  secret: string;
289
  url: string;
290
};
291
292
export type CheckStatus = "queued" | "running" | "passed" | "failed" | "cancelled" | "skipped";
293
294
export type Check = {
295
  finished_ms?: number | null;
296
  name: string;
297
  reporter: string;
298
  seal?: string | null;
299
  started_ms: number;
300
  state: string;
301
  status: CheckStatus;
302
  summary: string;
303
  url: string;
304
};
305
306
export type NewCheck = {
307
  name: string;
308
  seal?: string | null;
309
  state: string;
310
  status: CheckStatus;
311
  summary?: string;
312
  url?: string;
313
};
314
315
export type User = {
316
  created_ms: number;
317
  display_name: string;
318
  is_admin: boolean;
319
  keys: string[];
320
  username: string;
321
};
322
323
export type Organisation = {
324
  description: string;
325
  display_name: string;
326
  members: string[];
327
  name: string;
328
};
329
330
export type NewRepository = {
331
  description?: string;
332
  name: string;
333
  owner: string;
334
  visibility?: Visibility;
335
};
336
337
export type NewIssue = {
426ddc50 Andy McCall ↶ 338
  assignees?: string[];
f0b06dea Andy McCall 339
  body?: string;
426ddc50 Andy McCall ↶ 340
  labels?: string[];
341
  milestone?: string | null;
342
  title: string;
343
};
344
345
export type IssueEdit = {
346
  assignees?: string[] | null;
347
  body?: string | null;
348
  labels?: string[] | null;
349
  milestone?: string | null;
350
  title?: string | null;
351
};
352
353
export type NewLabel = {
354
  colour?: string | null;
355
  description?: string;
356
  name: string;
357
};
358
359
export type Project = {
360
  closed: boolean;
361
  description: string;
362
  number: number;
363
  owner: string;
364
  public: boolean;
365
  title: string;
366
  updated_ms: number;
367
  url: string;
368
};
369
370
export type ProjectCard = {
371
  id: number;
372
  kind: string;
373
  reference: string;
374
  state: string;
375
  title: string;
376
};
377
378
export type ProjectColumn = {
379
  cards: ProjectCard[];
380
  id: number;
381
  name: string;
382
};
383
384
export type Board = {
385
  columns: ProjectColumn[];
386
  project: Project;
387
};
388
389
export type NewProject = {
390
  description?: string;
391
  private?: boolean;
f0b06dea Andy McCall 392
  title: string;
426ddc50 Andy McCall ↶ 393
};
394
395
export type ProjectEdit = {
396
  closed?: boolean | null;
397
  description?: string | null;
398
  private?: boolean | null;
399
  title?: string | null;
400
};
401
402
export type NewCard = {
403
  column?: string | null;
404
  note?: string;
405
  reference?: string;
406
};
407
408
export type CardMove = {
409
  column: string;
f0b06dea Andy McCall 410
};
411
412
export type NewComment = {
413
  body: string;
486c15b0 Andy McCall ↶ 414
  line?: number | null;
415
  path?: string | null;
f0b06dea Andy McCall 416
};
417
418
export type NewProposal = {
419
  body?: string;
420
  draft?: boolean;
421
  source: string;
422
  target: string;
423
  title: string;
424
};
425
426
export type NewReview = {
427
  body?: string;
428
  verdict: string;
429
};
430
431
export type IssueStateChange = {
432
  reason?: string;
433
  state: string;
434
};
435
436
export type WebhookEnvelope = {
437
  actor: string;
438
  at_ms: number;
439
  data: unknown;
440
  delivery: string;
441
  event: string;
442
  repository?: Repository | null;
443
};
444
445
export type ProposalEvent = {
446
  check?: Check | null;
447
  kind: string;
448
  number: number;
449
};
450
486c15b0 Andy McCall ↶ 451
export type ReleaseAsset = {
452
  content_type: string;
453
  downloads: number;
454
  hash: string;
455
  name: string;
456
  size: number;
457
  url: string;
458
};
459
460
export type Release = {
461
  archives: string[];
462
  assets: ReleaseAsset[];
463
  author: string;
464
  created_ms: number;
465
  heads: string[];
466
  latest: boolean;
467
  notes: string;
468
  prerelease: boolean;
469
  signer?: string | null;
470
  tag: string;
471
  title: string;
472
  url: string;
473
};
474
475
export type NewRelease = {
476
  notes?: string | null;
477
  prerelease?: boolean;
478
  tag: string;
479
  title: string;
480
};
481