// Generated by `cargo run -p hub-api --bin hub-api-typescript`; do not edit. // Types of the OxygenHub JSON API (hub spec ยง12.1). export type Visibility = "public" | "internal" | "private"; export type Repository = { clone_url: string; created_ms: number; default_bookmark: string; description: string; name: string; owner: string; updated_ms: number; visibility: Visibility; }; export type Bookmark = { changes: number; default: boolean; heads: string[]; name: string; }; export type Tag = { heads: string[]; message: string; name: string; signer?: string | null; }; export type Author = { account?: string | null; email: string; key: string; name: string; }; export type Signature = { status: "unsigned"; } | { key: string; revoked: boolean; sealed: boolean; status: "valid"; } | { reason: string; status: "invalid"; }; export type ChangeSummary = { author: Author; deps: string[]; hash: string; head: boolean; message: string; signature: Signature; when_ms: number; }; export type Problem = { detail: string; status: number; title: string; }; export type Approval = { account: string; key?: string | null; sealed: boolean; }; export type ProposalSource = { bookmark: string; kind: "bookmark"; } | { bookmark: string; kind: "fork"; name: string; owner: string; } | { hashes: string[]; kind: "changes"; }; export type ProposalState = "draft" | "open" | "landed" | "closed"; export type Proposal = { approvals: Approval[]; author: string; blockers: string[]; body: string; changes: ChangeSummary[]; conflicted: boolean; created_ms: number; landable: boolean; number: number; projected_heads: string[]; projected_state?: string | null; repository_url: string; source: ProposalSource; source_url?: string | null; state: ProposalState; target: string; title: string; updated_ms: number; url: string; }; export type Label = { colour: string; description: string; name: string; }; export type Issue = { assignees: string[]; author: string; body: string; closed_ms?: number | null; comments: number; created_ms: number; labels: Label[]; locked: boolean; milestone?: string | null; number: number; pinned: boolean; reason: string; state: string; title: string; updated_ms: number; url: string; }; export type Milestone = { closed: number; description: string; due_ms?: number | null; open: number; state: string; title: string; }; export type Atom = { change: string; index: number; }; export type Comment = { anchor?: Atom | unknown; author: string; body: string; created_ms: number; id: number; path?: string | null; resolved: boolean; }; export type ProposalFile = { added: number; from?: string | null; kind: string; path: string; removed: number; }; export type Notification = { actor: string; at_ms: number; id: number; kind: string; read: boolean; title: string; url: string; }; export type Inbox = { items: Notification[]; unread: number; }; export type Review = { author: string; body: string; created_ms: number; id: number; sealed: boolean; verdict: string; }; export type TreeEntry = { conflicted: boolean; exec: boolean; kind: string; name: string; path: string; size?: number | null; }; export type BlameLine = { author: string; change: string; index: number; line: number; text: string; when_ms: number; }; export type FileChange = { added: number; from?: string | null; kind: string; path: string; removed: number; }; export type ChangeDetail = { body: string; change: ChangeSummary; dependents: string[]; files: FileChange[]; in_bookmarks: string[]; in_tags: string[]; }; export type History = { changes: ChangeSummary[]; heads: string[]; offset: number; reference: string; total: number; }; export type Conflict = { bookmark: string; contributors: string[]; kind: string; path: string; }; export type Push = { at_ms: number; changes: number; heads: number; new_state: string; ok: boolean; old_state: string; pusher: string; reason: string; reference: string; }; export type Policy = { expires_ms: number; root_threshold: number; roots: string[]; rules: Rule[]; serial: number; }; export type Rule = { allow_conflicts: boolean; keys: string[]; pattern: string; require: string; threshold: number; }; export type Trust = { hub_key: string; invalid: string[]; policy?: Policy | unknown; sealed: number; signed: number; unsigned: number; }; export type Hook = { active: boolean; created_ms: number; events: string; id: number; url: string; }; export type NewHook = { events?: string; secret: string; url: string; }; export type CheckStatus = "queued" | "running" | "passed" | "failed" | "cancelled" | "skipped"; export type Check = { finished_ms?: number | null; name: string; reporter: string; seal?: string | null; started_ms: number; state: string; status: CheckStatus; summary: string; url: string; }; export type NewCheck = { name: string; seal?: string | null; state: string; status: CheckStatus; summary?: string; url?: string; }; export type User = { created_ms: number; display_name: string; is_admin: boolean; keys: string[]; username: string; }; export type Organisation = { description: string; display_name: string; members: string[]; name: string; }; export type NewRepository = { description?: string; name: string; owner: string; visibility?: Visibility; }; export type NewIssue = { assignees?: string[]; body?: string; labels?: string[]; milestone?: string | null; title: string; }; export type IssueEdit = { assignees?: string[] | null; body?: string | null; labels?: string[] | null; milestone?: string | null; title?: string | null; }; export type NewLabel = { colour?: string | null; description?: string; name: string; }; export type NewComment = { body: string; line?: number | null; path?: string | null; }; export type NewProposal = { body?: string; draft?: boolean; source: string; target: string; title: string; }; export type NewReview = { body?: string; verdict: string; }; export type IssueStateChange = { reason?: string; state: string; }; export type WebhookEnvelope = { actor: string; at_ms: number; data: unknown; delivery: string; event: string; repository?: Repository | unknown; }; export type ProposalEvent = { check?: Check | unknown; kind: string; number: number; }; export type ReleaseAsset = { content_type: string; downloads: number; hash: string; name: string; size: number; url: string; }; export type Release = { archives: string[]; assets: ReleaseAsset[]; author: string; created_ms: number; heads: string[]; latest: boolean; notes: string; prerelease: boolean; signer?: string | null; tag: string; title: string; url: string; }; export type NewRelease = { notes?: string | null; prerelease?: boolean; tag: string; title: string; };