| 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 |
channels?: string[]; |
| 19 |
delegation_expires?: number | null; |
| 20 |
disabled: boolean; |
| 21 |
display: string; |
| 22 |
key: string; |
| 23 |
kind: string; |
| 24 |
name: string; |
| 25 |
owner: string; |
| 26 |
presence: string; |
| 27 |
project: string; |
| 28 |
state?: string; |
| 29 |
status?: string | null; |
| 30 |
}; |
| 31 |
|
| 32 |
export type Project = { |
| 33 |
agents?: string[]; |
| 34 |
depended_on_by: string[]; |
| 35 |
depends_on: string[]; |
| 36 |
description?: string; |
| 37 |
name: string; |
| 38 |
path?: string | null; |
| 39 |
url?: string | null; |
| 40 |
}; |
| 41 |
|
| 42 |
export type Channel = { |
| 43 |
display: string; |
| 44 |
id: string; |
| 45 |
kind: string; |
| 46 |
messages: number; |
| 47 |
name: string; |
| 48 |
purpose?: string | null; |
| 49 |
}; |
| 50 |
|
| 51 |
export type Message = { |
| 52 |
at_ms: number; |
| 53 |
author: string; |
| 54 |
author_display: string; |
| 55 |
body: string; |
| 56 |
channel: string; |
| 57 |
id: string; |
| 58 |
kind: string; |
| 59 |
mentions: string[]; |
| 60 |
redacted: boolean; |
| 61 |
refs: string[]; |
| 62 |
replies: number; |
| 63 |
reply_to?: string | null; |
| 64 |
}; |
| 65 |
|
| 66 |
export type Messages = { |
| 67 |
channel: string; |
| 68 |
items: Message[]; |
| 69 |
next?: string | null; |
| 70 |
}; |
| 71 |
|
| 72 |
export type NewMessage = { |
| 73 |
body: string; |
| 74 |
kind?: string | null; |
| 75 |
reply_to?: string | null; |
| 76 |
}; |
| 77 |
|
| 78 |
export type Posted = { |
| 79 |
channel: string; |
| 80 |
duplicate: boolean; |
| 81 |
id: string; |
| 82 |
}; |
| 83 |
|
| 84 |
export type InboxItem = { |
| 85 |
at_ms: number; |
| 86 |
channel: string; |
| 87 |
from: string; |
| 88 |
from_display?: string; |
| 89 |
id: string; |
| 90 |
kind: string; |
| 91 |
summary: string; |
| 92 |
}; |
| 93 |
|
| 94 |
export type Ack = { |
| 95 |
ids: string[]; |
| 96 |
reaction?: string | null; |
| 97 |
}; |
| 98 |
|
| 99 |
export type Hit = { |
| 100 |
at_ms: number; |
| 101 |
author: string; |
| 102 |
author_display?: string; |
| 103 |
channel: string; |
| 104 |
id: string; |
| 105 |
snippet: string; |
| 106 |
thread?: string | null; |
| 107 |
}; |
| 108 |
|
| 109 |
export type ProjectBrief = { |
| 110 |
project: string; |
| 111 |
text: string; |
| 112 |
}; |
| 113 |
|
| 114 |
export type Briefs = { |
| 115 |
overall?: string | null; |
| 116 |
projects: ProjectBrief[]; |
| 117 |
}; |
| 118 |
|
| 119 |
export type SetBrief = { |
| 120 |
project?: string | null; |
| 121 |
text: string; |
| 122 |
}; |
| 123 |
|
| 124 |
export type EventSummary = { |
| 125 |
actor: string; |
| 126 |
assurance: number; |
| 127 |
at_ms: number; |
| 128 |
hash: string; |
| 129 |
id: string; |
| 130 |
kind: string; |
| 131 |
method: string; |
| 132 |
seq: number; |
| 133 |
subject?: string | null; |
| 134 |
}; |
| 135 |
|
| 136 |
export type Events = { |
| 137 |
items: EventSummary[]; |
| 138 |
next?: number | null; |
| 139 |
}; |
| 140 |
|
| 141 |
export type Brief = { |
| 142 |
actor: string; |
| 143 |
agents: Agent[]; |
| 144 |
head: number; |
| 145 |
inbox: InboxItem[]; |
| 146 |
project?: string | null; |
| 147 |
rules_version: string; |
| 148 |
unread: number; |
| 149 |
you: string; |
| 150 |
}; |
| 151 |
|