| 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 |
body?: string; |
| 338 |
title: string; |
| 339 |
}; |
| 340 |
|
| 341 |
export type NewComment = { |
| 342 |
body: string; |
| 343 |
line?: number | null; |
| 344 |
path?: string | null; |
| 345 |
}; |
| 346 |
|
| 347 |
export type NewProposal = { |
| 348 |
body?: string; |
| 349 |
draft?: boolean; |
| 350 |
source: string; |
| 351 |
target: string; |
| 352 |
title: string; |
| 353 |
}; |
| 354 |
|
| 355 |
export type NewReview = { |
| 356 |
body?: string; |
| 357 |
verdict: string; |
| 358 |
}; |
| 359 |
|
| 360 |
export type IssueStateChange = { |
| 361 |
reason?: string; |
| 362 |
state: string; |
| 363 |
}; |
| 364 |
|
| 365 |
export type WebhookEnvelope = { |
| 366 |
actor: string; |
| 367 |
at_ms: number; |
| 368 |
data: unknown; |
| 369 |
delivery: string; |
| 370 |
event: string; |
| 371 |
repository?: Repository | unknown; |
| 372 |
}; |
| 373 |
|
| 374 |
export type ProposalEvent = { |
| 375 |
check?: Check | unknown; |
| 376 |
kind: string; |
| 377 |
number: number; |
| 378 |
}; |
| 379 |
|
| 380 |
export type ReleaseAsset = { |
| 381 |
content_type: string; |
| 382 |
downloads: number; |
| 383 |
hash: string; |
| 384 |
name: string; |
| 385 |
size: number; |
| 386 |
url: string; |
| 387 |
}; |
| 388 |
|
| 389 |
export type Release = { |
| 390 |
archives: string[]; |
| 391 |
assets: ReleaseAsset[]; |
| 392 |
author: string; |
| 393 |
created_ms: number; |
| 394 |
heads: string[]; |
| 395 |
latest: boolean; |
| 396 |
notes: string; |
| 397 |
prerelease: boolean; |
| 398 |
signer?: string | null; |
| 399 |
tag: string; |
| 400 |
title: string; |
| 401 |
url: string; |
| 402 |
}; |
| 403 |
|
| 404 |
export type NewRelease = { |
| 405 |
notes?: string | null; |
| 406 |
prerelease?: boolean; |
| 407 |
tag: string; |
| 408 |
title: string; |
| 409 |
}; |
| 410 |
|