OXYGENHUB
◆ v0.1.0 spectra / crates / spectra-api / ts / index.d.ts
2.2 KiB · last changed Spectra stands alone: its own identities, signatures and CBOR; projects of any kind of work (#26, #27) 1 day ago source blame history raw
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 EventSummary = {
109
  actor: string;
110
  assurance: number;
111
  at_ms: number;
112
  hash: string;
113
  id: string;
114
  kind: string;
115
  method: string;
116
  seq: number;
117
  subject?: string | null;
118
};
119
120
export type Events = {
121
  items: EventSummary[];
122
  next?: number | null;
123
};
124
125
export type Brief = {
126
  actor: string;
127
  agents: Agent[];
128
  head: number;
129
  inbox: InboxItem[];
130
  project?: string | null;
131
  rules_version: string;
132
  unread: number;
133
  you: string;
134
};
135