| 1 |
// Generated by `cargo run -p spectra-api --bin spectra-api-typescript`; do not edit. |
| 2 |
// Types of the Spectra JSON API (spec §18). |
| 3 |
|
| 4 |
export type Problem = { |
| 5 |
detail?: string | null; |
| 6 |
status: number; |
| 7 |
title: string; |
| 8 |
type: string; |
| 9 |
}; |
| 10 |
|
| 11 |
export type Version = { |
| 12 |
ledger_format: number; |
| 13 |
mcp_protocol_versions: string[]; |
| 14 |
version: string; |
| 15 |
}; |
| 16 |
|
| 17 |
export type Agent = { |
| 18 |
delegation_expires?: number | null; |
| 19 |
disabled: boolean; |
| 20 |
display: string; |
| 21 |
key: string; |
| 22 |
kind: string; |
| 23 |
name: string; |
| 24 |
owner: string; |
| 25 |
presence: string; |
| 26 |
project: string; |
| 27 |
state?: string; |
| 28 |
status?: string | null; |
| 29 |
}; |
| 30 |
|
| 31 |
export type Project = { |
| 32 |
agents?: string[]; |
| 33 |
depended_on_by: string[]; |
| 34 |
depends_on: string[]; |
| 35 |
description?: string; |
| 36 |
name: string; |
| 37 |
path?: string | null; |
| 38 |
url?: string | null; |
| 39 |
}; |
| 40 |
|
| 41 |
export type Channel = { |
| 42 |
display: string; |
| 43 |
id: string; |
| 44 |
kind: string; |
| 45 |
messages: number; |
| 46 |
name: string; |
| 47 |
purpose?: string | null; |
| 48 |
}; |
| 49 |
|
| 50 |
export type Message = { |
| 51 |
at_ms: number; |
| 52 |
author: string; |
| 53 |
author_display: string; |
| 54 |
body: string; |
| 55 |
channel: string; |
| 56 |
id: string; |
| 57 |
kind: string; |
| 58 |
mentions: string[]; |
| 59 |
redacted: boolean; |
| 60 |
refs: string[]; |
| 61 |
replies: number; |
| 62 |
reply_to?: string | null; |
| 63 |
}; |
| 64 |
|
| 65 |
export type Messages = { |
| 66 |
channel: string; |
| 67 |
items: Message[]; |
| 68 |
next?: string | null; |
| 69 |
}; |
| 70 |
|
| 71 |
export type NewMessage = { |
| 72 |
body: string; |
| 73 |
kind?: string | null; |
| 74 |
reply_to?: string | null; |
| 75 |
}; |
| 76 |
|
| 77 |
export type Posted = { |
| 78 |
channel: string; |
| 79 |
duplicate: boolean; |
| 80 |
id: string; |
| 81 |
}; |
| 82 |
|
| 83 |
export type InboxItem = { |
| 84 |
at_ms: number; |
| 85 |
channel: string; |
| 86 |
from: string; |
| 87 |
from_display?: string; |
| 88 |
id: string; |
| 89 |
kind: string; |
| 90 |
summary: string; |
| 91 |
}; |
| 92 |
|
| 93 |
export type Ack = { |
| 94 |
ids: string[]; |
| 95 |
reaction?: string | null; |
| 96 |
}; |
| 97 |
|
| 98 |
export type Hit = { |
| 99 |
at_ms: number; |
| 100 |
author: string; |
| 101 |
author_display?: string; |
| 102 |
channel: string; |
| 103 |
id: string; |
| 104 |
snippet: string; |
| 105 |
thread?: string | null; |
| 106 |
}; |
| 107 |
|
| 108 |
export type ProjectBrief = { |
| 109 |
project: string; |
| 110 |
text: string; |
| 111 |
}; |
| 112 |
|
| 113 |
export type Briefs = { |
| 114 |
overall?: string | null; |
| 115 |
projects: ProjectBrief[]; |
| 116 |
}; |
| 117 |
|
| 118 |
export type SetBrief = { |
| 119 |
project?: string | null; |
| 120 |
text: string; |
| 121 |
}; |
| 122 |
|
| 123 |
export type EventSummary = { |
| 124 |
actor: string; |
| 125 |
assurance: number; |
| 126 |
at_ms: number; |
| 127 |
hash: string; |
| 128 |
id: string; |
| 129 |
kind: string; |
| 130 |
method: string; |
| 131 |
seq: number; |
| 132 |
subject?: string | null; |
| 133 |
}; |
| 134 |
|
| 135 |
export type Events = { |
| 136 |
items: EventSummary[]; |
| 137 |
next?: number | null; |
| 138 |
}; |
| 139 |
|
| 140 |
export type Brief = { |
| 141 |
actor: string; |
| 142 |
agents: Agent[]; |
| 143 |
head: number; |
| 144 |
inbox: InboxItem[]; |
| 145 |
project?: string | null; |
| 146 |
rules_version: string; |
| 147 |
unread: number; |
| 148 |
you: string; |
| 149 |
}; |
| 150 |
|