// 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 DiffusionHalf = { title: string; tone: string; word: string; }; export type DiffusionPin = { behind?: number | null; bookmark: string; bump?: number | null; consumer: string; consumer_state: DiffusionHalf; follow: string; path: string; run?: number | null; run_status?: string | null; upstream: string; upstream_state: DiffusionHalf; }; export type Diffusion = { diffuses_to: DiffusionPin[]; takes_from: DiffusionPin[]; }; 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; note?: string | null; }; export type Signature = { status: "unsigned"; } | { key: string; revoked: boolean; sealed: boolean; status: "valid"; } | { reason: string; status: "invalid"; }; export type Via = { expires_ms?: number | null; key: string; name: string; revoked: boolean; scope: string; }; export type ChangeSummary = { author: Author; deps: string[]; hash: string; head: boolean; message: string; signature: Signature; via?: Via | null; when_ms: number; }; export type Problem = { detail: string; status: number; title: string; }; export type Approval = { account: string; key?: string | null; sealed: boolean; }; export type Label = { colour: string; description: string; name: string; }; export type Landed = { by: string; via: string; when_ms: number; }; 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; auto_land?: string | null; blockers: string[]; body: string; changes: ChangeSummary[]; conflicted: boolean; created_ms: number; labels?: Label[]; landable: boolean; landed?: Landed | null; number: number; projected_heads: string[]; projected_state?: string | null; repository_url: string; requested_reviewers?: string[]; source: ProposalSource; source_url?: string | null; state: ProposalState; target: string; title: string; updated_ms: number; url: 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 NewMilestone = { description?: string; due?: string | null; title: string; }; export type MilestoneEdit = { description?: string | null; due?: string | null; state?: string | null; title?: string | null; }; export type Atom = { change: string; index: number; }; export type Comment = { anchor?: Atom | null; author: string; body: string; created_ms: number; id: number; line?: number | null; 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; label?: string | null; read: boolean; reason?: string; repository?: string | null; thread?: string; 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; via?: 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 DiffLine = { kind: string; new?: number | null; old?: number | null; text?: string; }; export type FileChange = { added: number; from?: string | null; kind: string; lines?: DiffLine[]; path: string; removed: number; truncated?: boolean; }; 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 | null; 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 ReleaseEdit = { notes?: string | null; prerelease?: boolean | null; title?: string | null; }; export type ProposalEdit = { body?: string | null; draft?: boolean | null; labels?: string[] | null; state?: string | null; title?: string | null; }; export type NewLabel = { colour?: string | null; description?: string; name: string; }; export type RequiredChecks = { names: string[]; }; export type Project = { closed: boolean; description: string; number: number; owner: string; public: boolean; title: string; updated_ms: number; url: string; }; export type ProjectCard = { archived_ms?: number | null; assignees?: string[]; id: number; kind: string; labels?: string[]; reference: string; state: string; title: string; }; export type ProjectColumn = { cards: ProjectCard[]; id: number; name: string; }; export type Board = { columns: ProjectColumn[]; project: Project; }; export type NewProject = { description?: string; private?: boolean; title: string; }; export type ProjectEdit = { closed?: boolean | null; description?: string | null; owner?: string | null; private?: boolean | null; title?: string | null; }; export type NewCard = { column?: string | null; note?: string; reference?: string; }; export type CardMove = { column: 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 | null; }; export type ProposalEvent = { check?: Check | null; kind: string; number: number; }; export type AssetBuild = { artifact: string; job: string; provenance_url?: string | null; receipt?: string | null; receipt_url?: string | null; run: number; run_url: string; signer?: string | null; }; export type ReleaseAsset = { built_by?: AssetBuild | null; 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 FlowJob = { approval?: string; depends_on: string[]; error: string; exit_code?: number | null; finished_ms?: number | null; log_lines: number; name: string; peak_disk_mib?: number | null; peak_memory_mib?: number | null; phases?: FlowPhase[]; placed?: string; queued_ms?: number | null; ready_ms?: number | null; runner: string; started_ms?: number | null; status: string; waiting?: string; }; export type FlowPhase = { ms: number; name: string; }; export type FlowRun = { actor: string; bookmark: string; created_ms: number; error: string; finished_ms?: number | null; heads: string[]; jobs?: FlowJob[]; number: number; pipeline_hash: string; queue_position?: number | null; state: string; status: string; trigger: string; url: string; }; export type FlowLogLine = { seq: number; stream: string; t: number; text: string; }; export type ReportFile = { path: string; size: number; }; export type ReportMetric = { better: string; fail_above?: number | null; fail_below?: number | null; key: string; unit: string; value: number; }; export type Report = { bookmark: string; bytes: number; context: unknown; created_ms: number; files: number; files_expired_ms?: number | null; id: number; job: string; kind: string; manifest?: ReportFile[]; metrics: ReportMetric[]; name: string; run?: number | null; state: string; summary: string; title: string; url: string; }; export type NewRelease = { notes?: string | null; prerelease?: boolean; tag: string; title: string; }; export type DropFile = { content?: string | null; name: string; raw_url: string; size: number; }; export type Drop = { clone_url: string; created_ms: number; description: string; embed_url?: string; files: DropFile[]; forked_from?: string | null; id: string; owner: string; starred?: boolean; stars?: number; title: string; updated_ms: number; url: string; visibility: string; }; export type DropComment = { author: string; body: string; created_ms: number; id: number; }; export type NewDropComment = { body: string; }; export type DropStars = { starred: boolean; stars: number; }; export type NewDropFile = { content: string; name: string; }; export type NewDrop = { description?: string; files: NewDropFile[]; secret?: boolean; title?: string; }; export type DropFileEdit = { content?: string | null; name: string; }; export type DropEdit = { description?: string | null; files?: DropFileEdit[]; message?: string | null; secret?: boolean | null; title?: string | null; }; export type ProposalBrief = { author: string; conflicted: boolean; number: number; repository: string; state: ProposalState; title: string; updated_ms: number; url: string; }; export type UserProposals = { authored: ProposalBrief[]; landable?: ProposalBrief[]; review: ProposalBrief[]; }; export type StarterAssistant = { from: string; model: string; name: string; }; export type StarterAssistants = { assistants: StarterAssistant[]; }; export type StarterStatus = { assistant?: string; change?: string; error?: string; files?: string[]; status: string; }; export type StarterRequest = { assistant?: string | null; description: string; }; export type TestReport = { bookmark: string; created_ms: number; errors: number; failed: number; id: number; job: string; passed: number; run: number; skipped: number; state: string; tests: number; time_ms: number; url: string; }; export type TestCase = { classname: string; message: string; name: string; output: string; status: string; suite: string; time_ms: number; }; export type TestReportDetail = { cases: TestCase[]; report: TestReport; };