@signalcore/ui 1.0.0-beta.0 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/AgentAbout.js +7 -4
- package/dist/AgentAbout.js.map +1 -1
- package/dist/AgentChat.js +10 -2
- package/dist/AgentChat.js.map +1 -1
- package/dist/AgentTasks.js +2 -1
- package/dist/AgentTasks.js.map +1 -1
- package/dist/VoiceCall.js +1 -1
- package/dist/VoiceCall.js.map +1 -1
- package/dist/about.d.ts +34 -144
- package/dist/about.js +6 -8
- package/dist/about.js.map +1 -1
- package/dist/automation/cron.d.ts +1 -1
- package/dist/automation/cron.js.map +1 -1
- package/dist/automation/marks.js +7 -3
- package/dist/automation/marks.js.map +1 -1
- package/dist/automation/messages.d.ts +2 -0
- package/dist/automation/messages.js +2 -0
- package/dist/automation/messages.js.map +1 -1
- package/dist/automation/types.d.ts +25 -128
- package/dist/automation/types.js +36 -0
- package/dist/automation/types.js.map +1 -0
- package/dist/automation/when.d.ts +1 -1
- package/dist/automation/when.js +5 -1
- package/dist/automation/when.js.map +1 -1
- package/dist/blocks.d.ts +23 -1
- package/dist/browser.js +2 -2
- package/dist/browser.js.map +1 -1
- package/dist/call.d.ts +1 -1
- package/dist/call.js.map +1 -1
- package/dist/contract.d.ts +262 -0
- package/dist/credentials.js.map +1 -1
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/es.js +9 -1
- package/dist/es.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -1
- package/dist/kit/AudioPlayer.js +1 -1
- package/dist/kit/AudioPlayer.js.map +1 -1
- package/dist/kit/Choices.js +1 -1
- package/dist/kit/Choices.js.map +1 -1
- package/dist/kit/FileField.js +1 -1
- package/dist/kit/FileField.js.map +1 -1
- package/dist/kit/Popover.js.map +1 -1
- package/dist/kit/Tile.d.ts +1 -1
- package/dist/kit/Tile.js +1 -1
- package/dist/kit/Tile.js.map +1 -1
- package/dist/kit/messages.d.ts +13 -0
- package/dist/kit/messages.js +7 -1
- package/dist/kit/messages.js.map +1 -1
- package/dist/kit/uploads.d.ts +2 -1
- package/dist/kit/uploads.js +1 -1
- package/dist/kit/uploads.js.map +1 -1
- package/dist/kit/waveform.js.map +1 -1
- package/dist/markdown.js.map +1 -1
- package/dist/marks.js +2 -3
- package/dist/marks.js.map +1 -1
- package/dist/surface/Markdown.js +1 -1
- package/dist/surface/Markdown.js.map +1 -1
- package/dist/surface/Surface.js +43 -4
- package/dist/surface/Surface.js.map +1 -1
- package/dist/surface/scope.d.ts +1 -1
- package/dist/surface/scope.js.map +1 -1
- package/dist/surface/values.js +1 -1
- package/dist/surface/values.js.map +1 -1
- package/dist/tint.d.ts +1 -1
- package/dist/tint.js +1 -1
- package/dist/tint.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/types.js.map +1 -1
- package/dist/usePolled.js +1 -1
- package/dist/usePolled.js.map +1 -1
- package/dist/voice/webgl.js +1 -1
- package/dist/voice/webgl.js.map +1 -1
- package/dist/widget.js +14 -14
- package/package.json +1 -1
- package/src/AgentAbout.tsx +10 -3
- package/src/AgentChat.tsx +20 -3
- package/src/AgentTasks.tsx +2 -2
- package/src/VoiceCall.tsx +1 -1
- package/src/about.ts +42 -144
- package/src/automation/cron.ts +1 -1
- package/src/automation/marks.tsx +6 -2
- package/src/automation/messages.ts +4 -0
- package/src/automation/types.ts +58 -118
- package/src/automation/when.ts +3 -1
- package/src/blocks.ts +25 -0
- package/src/browser.ts +4 -4
- package/src/call.ts +1 -1
- package/src/contract.ts +1720 -0
- package/src/credentials.ts +2 -2
- package/src/dev.ts +1 -1
- package/src/es.ts +8 -0
- package/src/index.ts +2 -0
- package/src/kit/AudioPlayer.tsx +1 -1
- package/src/kit/Choices.tsx +1 -1
- package/src/kit/FileField.tsx +1 -1
- package/src/kit/Popover.tsx +1 -1
- package/src/kit/Tile.tsx +1 -1
- package/src/kit/messages.ts +20 -0
- package/src/kit/uploads.ts +2 -2
- package/src/kit/waveform.ts +1 -1
- package/src/markdown.ts +1 -1
- package/src/marks.tsx +3 -123
- package/src/styles.css +24 -0
- package/src/surface/Markdown.tsx +1 -1
- package/src/surface/Surface.tsx +53 -4
- package/src/surface/scope.ts +3 -1
- package/src/surface/values.ts +5 -5
- package/src/tint.ts +1 -1
- package/src/types.ts +8 -0
- package/src/usePolled.ts +2 -2
- package/src/voice/webgl.ts +1 -1
package/src/contract.ts
ADDED
|
@@ -0,0 +1,1720 @@
|
|
|
1
|
+
// The contract's schemas as types. Generated by v3/clients/generate.py from v3/api/openapi.json. Do not edit.
|
|
2
|
+
|
|
3
|
+
/** What the agent says about itself. */
|
|
4
|
+
export interface About {
|
|
5
|
+
summary: string;
|
|
6
|
+
does: Array<Does>;
|
|
7
|
+
asks: Array<string>;
|
|
8
|
+
icon?: "sparkle" | "calendar" | "headset" | "message" | "phone" | "mail" | "cart" | "card" | "chart" | "megaphone" | "wrench" | "briefcase" | "heart" | "user" | "search" | "file" | "globe" | "code" | "map" | null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Qué puede: the agent's own words (None until written) and the facts they rest on. */
|
|
12
|
+
export interface AboutOut {
|
|
13
|
+
about: About | null;
|
|
14
|
+
about_at: string | null;
|
|
15
|
+
facts: Facts;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ActionCount {
|
|
19
|
+
name: string;
|
|
20
|
+
count: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** One action as an agent has it: where it comes from, whether it is on and asks first. */
|
|
24
|
+
export interface ActionRowOut {
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
destructive: boolean;
|
|
28
|
+
input_schema?: Record<string, unknown>;
|
|
29
|
+
source: "default" | "library" | "own";
|
|
30
|
+
on: boolean;
|
|
31
|
+
needs_approval: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ActivityOut {
|
|
35
|
+
kind?: "conversation";
|
|
36
|
+
conversation_id: string;
|
|
37
|
+
agent_id: string;
|
|
38
|
+
title: string | null;
|
|
39
|
+
last: LastSaid | null;
|
|
40
|
+
origin: "person" | "automation";
|
|
41
|
+
automation: AutomationGlance | null;
|
|
42
|
+
channel?: ChannelGlance | null;
|
|
43
|
+
contact?: ContactGlance | null;
|
|
44
|
+
test?: boolean;
|
|
45
|
+
started_at: string;
|
|
46
|
+
last_at: string;
|
|
47
|
+
outcome: "running" | "done" | "failed" | "waiting" | "handed" | "ignored";
|
|
48
|
+
error: string | null;
|
|
49
|
+
actions: Array<ActionCount>;
|
|
50
|
+
handover?: HandoverOut | null;
|
|
51
|
+
decision?: SchemasDecisionOut | null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface ActivityPage {
|
|
55
|
+
items: Array<ActivityOut | RunEntryOut>;
|
|
56
|
+
next: string | null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** An automation with its agent, as the agents' page draws it. */
|
|
60
|
+
export interface AgentAutomationOut {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
kind: "schedule" | "webhook" | "event" | "platform";
|
|
64
|
+
title: string;
|
|
65
|
+
summary: string;
|
|
66
|
+
schedule: string | null;
|
|
67
|
+
timezone: string | null;
|
|
68
|
+
app: string | null;
|
|
69
|
+
event: string | null;
|
|
70
|
+
config: Record<string, unknown>;
|
|
71
|
+
url: string | null;
|
|
72
|
+
say: string;
|
|
73
|
+
on: boolean;
|
|
74
|
+
last_run_at: string | null;
|
|
75
|
+
next_run_at: string | null;
|
|
76
|
+
agent_id: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** What an agent is up to, at a glance: what the agents' page draws on its lane. */
|
|
80
|
+
export interface AgentGlance {
|
|
81
|
+
agent_id: string;
|
|
82
|
+
automations: number;
|
|
83
|
+
paused: number;
|
|
84
|
+
next_run_at: string | null;
|
|
85
|
+
apps: Array<AppGlance>;
|
|
86
|
+
tables: number;
|
|
87
|
+
keys: number;
|
|
88
|
+
files: number;
|
|
89
|
+
conversations_today: number;
|
|
90
|
+
with_person: number;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface AgentIn {
|
|
94
|
+
name: string;
|
|
95
|
+
role?: string;
|
|
96
|
+
description?: string;
|
|
97
|
+
instructions?: string;
|
|
98
|
+
model?: string | null;
|
|
99
|
+
icon?: "sparkle" | "calendar" | "headset" | "message" | "phone" | "mail" | "cart" | "card" | "chart" | "megaphone" | "wrench" | "briefcase" | "heart" | "user" | "search" | "file" | "globe" | "code" | "map" | null;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface AgentOut {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
role: string;
|
|
106
|
+
description: string;
|
|
107
|
+
instructions: string;
|
|
108
|
+
model: string;
|
|
109
|
+
actions: Array<string>;
|
|
110
|
+
needs_approval: Array<string>;
|
|
111
|
+
approvals?: Record<string, "never" | "person" | "business">;
|
|
112
|
+
access: Record<string, unknown>;
|
|
113
|
+
icon: "sparkle" | "calendar" | "headset" | "message" | "phone" | "mail" | "cart" | "card" | "chart" | "megaphone" | "wrench" | "briefcase" | "heart" | "user" | "search" | "file" | "globe" | "code" | "map" | null;
|
|
114
|
+
about_at: string | null;
|
|
115
|
+
is_builder: boolean;
|
|
116
|
+
voice: Voice;
|
|
117
|
+
timezone: string;
|
|
118
|
+
packages: Packages;
|
|
119
|
+
connects?: Connects;
|
|
120
|
+
switches?: Array<Switchable>;
|
|
121
|
+
template_id?: string | null;
|
|
122
|
+
template_version?: number | null;
|
|
123
|
+
managed?: Array<string>;
|
|
124
|
+
created_at: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Only what is sent changes. */
|
|
128
|
+
export interface AgentPatchIn {
|
|
129
|
+
name?: string | null;
|
|
130
|
+
role?: string | null;
|
|
131
|
+
description?: string | null;
|
|
132
|
+
instructions?: string | null;
|
|
133
|
+
model?: string | null;
|
|
134
|
+
icon?: "sparkle" | "calendar" | "headset" | "message" | "phone" | "mail" | "cart" | "card" | "chart" | "megaphone" | "wrench" | "briefcase" | "heart" | "user" | "search" | "file" | "globe" | "code" | "map" | null;
|
|
135
|
+
actions?: Array<string> | null;
|
|
136
|
+
needs_approval?: Array<string> | null;
|
|
137
|
+
approvals?: Record<string, unknown> | null;
|
|
138
|
+
access?: Record<string, unknown> | null;
|
|
139
|
+
voice?: VoicePatch | null;
|
|
140
|
+
timezone?: string | null;
|
|
141
|
+
packages?: Packages | null;
|
|
142
|
+
connects?: Connects | null;
|
|
143
|
+
switches?: Array<Switchable> | null;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface ApiOut {
|
|
147
|
+
source: string | null;
|
|
148
|
+
title: string;
|
|
149
|
+
servers: Array<string>;
|
|
150
|
+
base_url: string | null;
|
|
151
|
+
header: string | null;
|
|
152
|
+
operations: Array<OperationOut>;
|
|
153
|
+
skipped: Array<string>;
|
|
154
|
+
secret?: string | null;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** Only what is sent changes: the operations picked (each one a tool, the rest none), the base URL, and the header secret (`null`: the signature alone). */
|
|
158
|
+
export interface ApiPatchIn {
|
|
159
|
+
picked?: Array<string> | null;
|
|
160
|
+
base_url?: string | null;
|
|
161
|
+
header?: HeaderIn | null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** An app an agent uses, as a map draws it. */
|
|
165
|
+
export interface AppGlance {
|
|
166
|
+
name: string;
|
|
167
|
+
provider: string;
|
|
168
|
+
toolkit: string;
|
|
169
|
+
title: string;
|
|
170
|
+
status: string;
|
|
171
|
+
icon: string | null;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** How the widget looks: each unset field keeps the widget's own default (the page's type and ink, neutral greys). Colours are `#rrggbb`; sizes are pixels within what reads well. */
|
|
175
|
+
export interface Appearance {
|
|
176
|
+
accent?: string | null;
|
|
177
|
+
accent_fg?: string | null;
|
|
178
|
+
font?: "Inter" | "Manrope" | "DM Sans" | "Plus Jakarta Sans" | "Poppins" | "Nunito" | "Lora" | "Playfair Display" | null;
|
|
179
|
+
radius?: number | null;
|
|
180
|
+
theme?: "auto" | "light" | "dark";
|
|
181
|
+
position?: "right" | "left";
|
|
182
|
+
launcher_size?: number | null;
|
|
183
|
+
panel_width?: number | null;
|
|
184
|
+
panel_height?: number | null;
|
|
185
|
+
header?: boolean;
|
|
186
|
+
css?: string | null;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface AuthorizeIn {
|
|
190
|
+
return_url?: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** One of an agent's automations, drawn as the platform has it: its trigger, its steps and what each uses, how it stands, its newest runs. Read-only: the owner switches it on the agent's page, or with a button beside it. */
|
|
194
|
+
export interface AutomationBlock {
|
|
195
|
+
type: "automation";
|
|
196
|
+
agent: string;
|
|
197
|
+
name: string;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export interface AutomationDetailOut {
|
|
201
|
+
id: string;
|
|
202
|
+
agent_id: string;
|
|
203
|
+
name: string;
|
|
204
|
+
title: string;
|
|
205
|
+
summary: string;
|
|
206
|
+
trigger: TriggerView;
|
|
207
|
+
on: boolean;
|
|
208
|
+
next_run_at: string | null;
|
|
209
|
+
steps: Array<Step>;
|
|
210
|
+
board: Board | null;
|
|
211
|
+
state: "active" | "paused" | "failing";
|
|
212
|
+
last_run: RunOut | null;
|
|
213
|
+
runs: Array<RunOut>;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** The automation that started a conversation, as its entry draws it. */
|
|
217
|
+
export interface AutomationGlance {
|
|
218
|
+
id: string;
|
|
219
|
+
kind: string;
|
|
220
|
+
title: string;
|
|
221
|
+
app: string | null;
|
|
222
|
+
provider: string | null;
|
|
223
|
+
icon: string | null;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface AutomationOut {
|
|
227
|
+
id: string;
|
|
228
|
+
agent_id: string;
|
|
229
|
+
name: string;
|
|
230
|
+
title: string;
|
|
231
|
+
summary: string;
|
|
232
|
+
trigger: TriggerView;
|
|
233
|
+
on: boolean;
|
|
234
|
+
next_run_at: string | null;
|
|
235
|
+
steps: Array<Step>;
|
|
236
|
+
board: Board | null;
|
|
237
|
+
state: "active" | "paused" | "failing";
|
|
238
|
+
last_run: RunOut | null;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** What the automation moves: its table's rows counted by the value of one field. */
|
|
242
|
+
export interface Board {
|
|
243
|
+
table: string;
|
|
244
|
+
title: string;
|
|
245
|
+
field: string;
|
|
246
|
+
counts: Array<Count>;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/** One thing the person can do: pressing it sends `action`, or, with `url`, opens the page (a payment, a document). Two buttons that do different things carry different action names: the name is the whole of what comes back. */
|
|
250
|
+
export interface Button {
|
|
251
|
+
type: "button";
|
|
252
|
+
label: string;
|
|
253
|
+
action?: string | null;
|
|
254
|
+
url?: string | null;
|
|
255
|
+
tone?: "primary" | "neutral" | "danger";
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/** The call a conversation is (VOICE.md): the owner's in the browser or a phone call, when the worker took it and when it ended, why and how long. */
|
|
259
|
+
export interface CallGlance {
|
|
260
|
+
id: string;
|
|
261
|
+
kind: "browser" | "phone";
|
|
262
|
+
reason: string | null;
|
|
263
|
+
seconds: number | null;
|
|
264
|
+
started_at: string | null;
|
|
265
|
+
ended_at: string | null;
|
|
266
|
+
recording?: boolean;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/** What the browser joins the call with: LiveKit's address, its token for the room, and the call and conversation (whose live socket shows what is said). */
|
|
270
|
+
export interface CallTokenOut {
|
|
271
|
+
url: string;
|
|
272
|
+
token: string;
|
|
273
|
+
room: string;
|
|
274
|
+
call_id: string;
|
|
275
|
+
conversation_id: string;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/** Blocks under a title: one thing, set apart. With `image`, its head starts with it: an app's logo, a product's picture. */
|
|
279
|
+
export interface Card {
|
|
280
|
+
type: "card";
|
|
281
|
+
title?: string | null;
|
|
282
|
+
subtitle?: string | null;
|
|
283
|
+
image?: string | null;
|
|
284
|
+
children: Array<Card | Stack | Divider | Text | Fields | Table | Listing | Stat | Chart | Note | Image | Button | Choice | Form | AutomationBlock | FileBlock>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/** A page of the apps a search finds. */
|
|
288
|
+
export interface CatalogOut {
|
|
289
|
+
items: Array<HitOut>;
|
|
290
|
+
total: number;
|
|
291
|
+
kinds: Array<KindOut>;
|
|
292
|
+
provider: string;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/** The channel a conversation is on, as a list draws it. */
|
|
296
|
+
export interface ChannelGlance {
|
|
297
|
+
id: string;
|
|
298
|
+
kind: string;
|
|
299
|
+
name: string;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface ChannelOut {
|
|
303
|
+
id: string;
|
|
304
|
+
agent_id: string;
|
|
305
|
+
kind: "whatsapp" | "instagram" | "sms" | "phone" | "web";
|
|
306
|
+
provider: string;
|
|
307
|
+
name: string;
|
|
308
|
+
external_id: string;
|
|
309
|
+
address: string | null;
|
|
310
|
+
outbound: boolean;
|
|
311
|
+
status: "pending" | "active" | "error" | "disconnected";
|
|
312
|
+
detail: string | null;
|
|
313
|
+
settings: Settings;
|
|
314
|
+
web?: WebOut | null;
|
|
315
|
+
created_at: string;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export interface ChannelPatchIn {
|
|
319
|
+
agent_id?: string | null;
|
|
320
|
+
settings?: SettingsPatch | null;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export interface ChannelUsageOut {
|
|
324
|
+
channel: "whatsapp" | "instagram" | "sms";
|
|
325
|
+
received: number;
|
|
326
|
+
sent: number;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/** Figures over a few labels: bars to compare them (by state, by who), a line to follow them in time (by day, by week), the labels in their order. */
|
|
330
|
+
export interface Chart {
|
|
331
|
+
type: "chart";
|
|
332
|
+
kind?: "bar" | "line";
|
|
333
|
+
points: Array<Point>;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export interface ChartPiece {
|
|
337
|
+
type: "chart";
|
|
338
|
+
title: string;
|
|
339
|
+
kind?: "bar" | "line";
|
|
340
|
+
query: Measure;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** Pick one of a few, at once: picking sends `action` with `{"option": id}`. With `other`, a last row takes an answer in the person's own words instead: `{"text": words}`. */
|
|
344
|
+
export interface Choice {
|
|
345
|
+
type: "choice";
|
|
346
|
+
options: Array<Option>;
|
|
347
|
+
action: string;
|
|
348
|
+
other?: boolean;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export interface CodePreview {
|
|
352
|
+
kind: "code";
|
|
353
|
+
text: string;
|
|
354
|
+
truncated: boolean;
|
|
355
|
+
language: string;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export interface Column {
|
|
359
|
+
field: string;
|
|
360
|
+
label: string;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export interface ConnectIn {
|
|
364
|
+
name: string;
|
|
365
|
+
provider?: "arcade" | "composio" | null;
|
|
366
|
+
toolkit: string;
|
|
367
|
+
return_url?: string;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export interface ConnectedOut {
|
|
371
|
+
channel: ChannelOut;
|
|
372
|
+
warnings: Array<string>;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface ConnectionOut {
|
|
376
|
+
id: string;
|
|
377
|
+
name: string;
|
|
378
|
+
provider: string;
|
|
379
|
+
toolkit: string;
|
|
380
|
+
title: string;
|
|
381
|
+
status: string;
|
|
382
|
+
created_at: string;
|
|
383
|
+
url?: string | null;
|
|
384
|
+
icon?: string | null;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/** One thing the app can do, as the owner picks which to give an agent; its input as the provider describes it (JSON Schema), for the technical view. */
|
|
388
|
+
export interface ConnectionsActionOut {
|
|
389
|
+
name: string;
|
|
390
|
+
description: string;
|
|
391
|
+
read_only: boolean;
|
|
392
|
+
input_schema?: Record<string, unknown>;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/** The apps an agent may connect itself, from a conversation (`connect_app`), as its owner limits them: which (of these kinds, or these apps of the catalog), whose (the person it talks with, their own account; the team's, the organization's; or either), what it gets of one once it is connected (every action, those that only read, or none), who gives the yes for the actions that change something (`writes`) and where the person lands once they authorized it (`return_url`). Nothing named, it connects none. */
|
|
396
|
+
export interface Connects {
|
|
397
|
+
kinds?: Array<string>;
|
|
398
|
+
toolkits?: Array<string>;
|
|
399
|
+
whose?: "person" | "team" | "both";
|
|
400
|
+
gets?: "all" | "reads" | "none";
|
|
401
|
+
writes?: "never" | "person" | "business";
|
|
402
|
+
return_url?: string | null;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/** The person a conversation on a channel is with, or a person of a host's page (on no channel). */
|
|
406
|
+
export interface ContactGlance {
|
|
407
|
+
id: string;
|
|
408
|
+
name: string | null;
|
|
409
|
+
address: string;
|
|
410
|
+
muted?: boolean;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export interface ContactOut {
|
|
414
|
+
id: string;
|
|
415
|
+
name: string | null;
|
|
416
|
+
muted: boolean;
|
|
417
|
+
opted_out: boolean;
|
|
418
|
+
created_at: string;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/** The owner marks a contact the agent doesn't answer, or takes the mark away. */
|
|
422
|
+
export interface ContactPatchIn {
|
|
423
|
+
muted: boolean;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export interface ConversationDetailOut {
|
|
427
|
+
id: string;
|
|
428
|
+
agent_id: string;
|
|
429
|
+
trigger_id: string | null;
|
|
430
|
+
run_id?: string | null;
|
|
431
|
+
handled_by: "agent" | "person" | "nobody";
|
|
432
|
+
handover?: HandoverOut | null;
|
|
433
|
+
pending: boolean;
|
|
434
|
+
test: boolean;
|
|
435
|
+
about_agent_id?: string | null;
|
|
436
|
+
created_at: string;
|
|
437
|
+
title?: string | null;
|
|
438
|
+
channel?: ChannelGlance | null;
|
|
439
|
+
contact?: ContactGlance | null;
|
|
440
|
+
reply_due_at?: string | null;
|
|
441
|
+
last_inbound_at?: string | null;
|
|
442
|
+
call?: CallGlance | null;
|
|
443
|
+
person?: PersonOut | null;
|
|
444
|
+
messages: Array<MessageOut>;
|
|
445
|
+
handovers?: Array<HandoverOut>;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export interface ConversationFileOut {
|
|
449
|
+
id: string;
|
|
450
|
+
name: string;
|
|
451
|
+
media_type: string;
|
|
452
|
+
size: number;
|
|
453
|
+
conversation_id: string;
|
|
454
|
+
created_at: string;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/** A new conversation; `test` when the owner tries the agent out, which no customer sees and is never its activity. With the builder, `about` names the agent it is about (its id): the builder works on that agent alone in it; without, it is a general one until the builder makes or changes an agent in it, which it is then about. */
|
|
458
|
+
export interface ConversationIn {
|
|
459
|
+
test?: boolean;
|
|
460
|
+
about?: string | null;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export interface ConversationOut {
|
|
464
|
+
id: string;
|
|
465
|
+
agent_id: string;
|
|
466
|
+
trigger_id: string | null;
|
|
467
|
+
run_id?: string | null;
|
|
468
|
+
handled_by: "agent" | "person" | "nobody";
|
|
469
|
+
handover?: HandoverOut | null;
|
|
470
|
+
pending: boolean;
|
|
471
|
+
test: boolean;
|
|
472
|
+
about_agent_id?: string | null;
|
|
473
|
+
created_at: string;
|
|
474
|
+
title?: string | null;
|
|
475
|
+
channel?: ChannelGlance | null;
|
|
476
|
+
contact?: ContactGlance | null;
|
|
477
|
+
reply_due_at?: string | null;
|
|
478
|
+
last_inbound_at?: string | null;
|
|
479
|
+
call?: CallGlance | null;
|
|
480
|
+
person?: PersonOut | null;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/** A conversation for its technical view: how its last turn ended, and every message raw. */
|
|
484
|
+
export interface ConversationRawOut {
|
|
485
|
+
id: string;
|
|
486
|
+
agent_id: string;
|
|
487
|
+
trigger_id: string | null;
|
|
488
|
+
run_id?: string | null;
|
|
489
|
+
handled_by: "agent" | "person" | "nobody";
|
|
490
|
+
handover?: HandoverOut | null;
|
|
491
|
+
pending: boolean;
|
|
492
|
+
test: boolean;
|
|
493
|
+
about_agent_id?: string | null;
|
|
494
|
+
created_at: string;
|
|
495
|
+
title?: string | null;
|
|
496
|
+
channel?: ChannelGlance | null;
|
|
497
|
+
contact?: ContactGlance | null;
|
|
498
|
+
reply_due_at?: string | null;
|
|
499
|
+
last_inbound_at?: string | null;
|
|
500
|
+
call?: CallGlance | null;
|
|
501
|
+
person?: PersonOut | null;
|
|
502
|
+
outcome: "done" | "failed" | null;
|
|
503
|
+
error: string | null;
|
|
504
|
+
last_at: string;
|
|
505
|
+
messages: Array<RawMessageOut>;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export interface Count {
|
|
509
|
+
value: string;
|
|
510
|
+
count: number;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export interface DashboardOut {
|
|
514
|
+
id: string;
|
|
515
|
+
name: string;
|
|
516
|
+
title: string;
|
|
517
|
+
blocks: Array<StatPiece | ChartPiece | TablePiece | ListPiece | NotePiece>;
|
|
518
|
+
created_at: string;
|
|
519
|
+
updated_at: string;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/** A dashboard rendered: its blocks as the kit draws them, filled from the rows now. */
|
|
523
|
+
export interface DashboardView {
|
|
524
|
+
id: string;
|
|
525
|
+
title: string;
|
|
526
|
+
blocks: Array<Card | Stack | Divider | Text | Fields | Table | Listing | Stat | Chart | Note | Image | Button | Choice | Form | AutomationBlock | FileBlock>;
|
|
527
|
+
rendered_at: string;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/** The business's yes (`approve`) or no on the call a conversation waits on for it. */
|
|
531
|
+
export interface DecisionIn {
|
|
532
|
+
request: string;
|
|
533
|
+
approve: boolean;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/** A tool as it is declared; `secret`, the organization's tool secret, when this declaration made it (its first server tool): shown here, never again. */
|
|
537
|
+
export interface DeclaredOut {
|
|
538
|
+
name: string;
|
|
539
|
+
description: string;
|
|
540
|
+
input_schema: Record<string, unknown>;
|
|
541
|
+
mode: "server" | "client" | "api";
|
|
542
|
+
url: string | null;
|
|
543
|
+
method: string | null;
|
|
544
|
+
path: string | null;
|
|
545
|
+
asks_first: boolean;
|
|
546
|
+
declared_in: "code" | "app";
|
|
547
|
+
created_at: string;
|
|
548
|
+
updated_at: string;
|
|
549
|
+
secret: string | null;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/** What an automation is: its name (its file's), title, whom it serves, its trigger's kind and what an instance gives it, by name and type. */
|
|
553
|
+
export interface DefinitionOut {
|
|
554
|
+
id: string;
|
|
555
|
+
name: string;
|
|
556
|
+
title: string;
|
|
557
|
+
audience: "business" | "contact";
|
|
558
|
+
kind: "schedule" | "webhook" | "event" | "platform" | "instruction";
|
|
559
|
+
inputs: Record<string, string>;
|
|
560
|
+
created_at: string;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/** One event told to one endpoint, and how its tries went: `queued` (not tried yet), `delivered`, `retrying` (its last try failed; it is tried again later), `dead` (given up). */
|
|
564
|
+
export interface DeliveryOut {
|
|
565
|
+
id: string;
|
|
566
|
+
event_id: string;
|
|
567
|
+
type: "message.created" | "conversation.holder_changed" | "inbox.item_created" | "run.finished" | "run.failed" | "call.ended" | "channel.status_changed" | "approval.requested";
|
|
568
|
+
status: "queued" | "delivered" | "retrying" | "dead";
|
|
569
|
+
attempts: number;
|
|
570
|
+
response_code: number | null;
|
|
571
|
+
error: string | null;
|
|
572
|
+
created_at: string;
|
|
573
|
+
delivered_at: string | null;
|
|
574
|
+
event: Record<string, unknown>;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/** A host's deploy: the fields of the agent's spec it owns, as they are now (`spec`, any of `spec.AgentSpec`'s: its files and tools whole, each one named then owned); with none, the agent is published as it is. */
|
|
578
|
+
export interface DeployIn {
|
|
579
|
+
spec?: Record<string, unknown> | null;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export interface Divider {
|
|
583
|
+
type: "divider";
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
export interface DocumentPreview {
|
|
587
|
+
kind: "document";
|
|
588
|
+
html: string;
|
|
589
|
+
truncated: boolean;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/** One automation, as the owner reads it. */
|
|
593
|
+
export interface Does {
|
|
594
|
+
automation: string;
|
|
595
|
+
text: string;
|
|
596
|
+
when: string;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
export interface Entry {
|
|
600
|
+
id: string;
|
|
601
|
+
title: string;
|
|
602
|
+
subtitle?: string | null;
|
|
603
|
+
meta?: string | null;
|
|
604
|
+
image?: string | null;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/** Something that can happen in a connected app, that an automation can start an agent on. */
|
|
608
|
+
export interface EventTypeOut {
|
|
609
|
+
name: string;
|
|
610
|
+
title: string;
|
|
611
|
+
description: string;
|
|
612
|
+
config: Record<string, unknown>;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/** An agent as a person's page shows it: who it is, its mark, and whether it takes calls. */
|
|
616
|
+
export interface FaceOut {
|
|
617
|
+
id: string;
|
|
618
|
+
name: string;
|
|
619
|
+
role: string;
|
|
620
|
+
icon: "sparkle" | "calendar" | "headset" | "message" | "phone" | "mail" | "cart" | "card" | "chart" | "megaphone" | "wrench" | "briefcase" | "heart" | "user" | "search" | "file" | "globe" | "code" | "map" | null;
|
|
621
|
+
voice: FaceVoiceOut;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
export interface FaceVoiceOut {
|
|
625
|
+
enabled: boolean;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export interface FactAsk {
|
|
629
|
+
agent_id: string;
|
|
630
|
+
name: string;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/** An automation; one on an app's event also with its app's provider, name and mark, which the others leave out, as they always have. */
|
|
634
|
+
export interface FactAutomation {
|
|
635
|
+
id: string;
|
|
636
|
+
name: string;
|
|
637
|
+
kind: "schedule" | "webhook" | "event" | "platform";
|
|
638
|
+
title: string;
|
|
639
|
+
summary: string;
|
|
640
|
+
schedule: string | null;
|
|
641
|
+
timezone: string | null;
|
|
642
|
+
app: string | null;
|
|
643
|
+
event: string | null;
|
|
644
|
+
config: Record<string, unknown>;
|
|
645
|
+
url: string | null;
|
|
646
|
+
say: string;
|
|
647
|
+
on: boolean;
|
|
648
|
+
last_run_at: string | null;
|
|
649
|
+
next_run_at: string | null;
|
|
650
|
+
provider?: string | null;
|
|
651
|
+
app_title?: string | null;
|
|
652
|
+
icon?: string | null;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
export interface FactChannel {
|
|
656
|
+
kind: "whatsapp" | "instagram" | "sms" | "phone" | "web";
|
|
657
|
+
name: string;
|
|
658
|
+
status: string;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/** An app it was given: the app's name and mark, and its tools, with their names for people (`titles`) and as the model calls them (`called`: `gmail__Gmail_SendEmail`), each by the tool's own. */
|
|
662
|
+
export interface FactConnection {
|
|
663
|
+
name: string;
|
|
664
|
+
provider: "composio" | "arcade";
|
|
665
|
+
toolkit: string;
|
|
666
|
+
title: string;
|
|
667
|
+
status: string;
|
|
668
|
+
actions: Array<string>;
|
|
669
|
+
titles: Record<string, string>;
|
|
670
|
+
called: Record<string, string>;
|
|
671
|
+
icon: string | null;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
export interface FactDevice {
|
|
675
|
+
kind: "extension" | "installer";
|
|
676
|
+
name: string;
|
|
677
|
+
status: string;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export interface FactFile {
|
|
681
|
+
path: string;
|
|
682
|
+
size: number;
|
|
683
|
+
searchable: boolean;
|
|
684
|
+
shared: boolean;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
export interface FactKey {
|
|
688
|
+
name: string;
|
|
689
|
+
hosts: Array<string>;
|
|
690
|
+
shared: boolean;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export interface FactTable {
|
|
694
|
+
table: string;
|
|
695
|
+
can: Array<string>;
|
|
696
|
+
title: string | null;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/** What the agent has, as the app draws it. Every list is here from day one; the ones whose phase hasn't come are empty, and their shape is fixed so the renderer never changes. */
|
|
700
|
+
export interface Facts {
|
|
701
|
+
actions: Array<ActionRowOut>;
|
|
702
|
+
automations: Array<FactAutomation>;
|
|
703
|
+
connections: Array<FactConnection>;
|
|
704
|
+
channels: Array<FactChannel>;
|
|
705
|
+
files: Array<FactFile>;
|
|
706
|
+
memories: Array<MemoryOut>;
|
|
707
|
+
vault: Array<FactKey>;
|
|
708
|
+
data: Array<FactTable>;
|
|
709
|
+
asks: Array<FactAsk>;
|
|
710
|
+
devices: Array<FactDevice>;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
export interface FieldDef {
|
|
714
|
+
name: string;
|
|
715
|
+
type: "text" | "number" | "boolean" | "date" | "datetime" | "money" | "choice" | "contact";
|
|
716
|
+
required?: boolean;
|
|
717
|
+
options?: Array<string> | null;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export interface FieldOut {
|
|
721
|
+
name: string;
|
|
722
|
+
type: "text" | "number" | "boolean" | "date" | "datetime" | "money" | "choice" | "contact";
|
|
723
|
+
required?: boolean;
|
|
724
|
+
options?: Array<string> | null;
|
|
725
|
+
read_only?: boolean;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/** Label and value pairs: a summary a person reads at a glance. */
|
|
729
|
+
export interface Fields {
|
|
730
|
+
type: "fields";
|
|
731
|
+
items: Array<Item>;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/** A file put in front of the person as it is: a document, a sheet, a deck, a picture, a video, a PDF, to open and to save. The agent names one it may read: one of its files or the organization's by its path, or one of the conversation's by its id (`cvf_…`). Showing it puts it in the conversation (`shown.py`), and the API fills in `file`, that file of the conversation's, before the surface is shown or kept. */
|
|
735
|
+
export interface FileBlock {
|
|
736
|
+
type: "file";
|
|
737
|
+
path: string;
|
|
738
|
+
title?: string | null;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
export interface FileContentOut {
|
|
742
|
+
path: string;
|
|
743
|
+
size: number;
|
|
744
|
+
updated_at: string | null;
|
|
745
|
+
content: string;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
export interface FileIn {
|
|
749
|
+
content: string;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/** Where a file of a conversation plays from, until `expires_at`: a path under the API's root, as a client prefixes its own. */
|
|
753
|
+
export interface FileLinkOut {
|
|
754
|
+
path: string;
|
|
755
|
+
expires_at: string;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/** A file of the conversation as a message shows it; its bytes are at `GET /conversations/{id}/files/{file_id}`. */
|
|
759
|
+
export interface FileRef {
|
|
760
|
+
id: string;
|
|
761
|
+
name: string;
|
|
762
|
+
media_type: string;
|
|
763
|
+
size: number;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
export interface FilesFileOut {
|
|
767
|
+
id: string;
|
|
768
|
+
path: string;
|
|
769
|
+
media_type: string;
|
|
770
|
+
size: number;
|
|
771
|
+
searchable: boolean;
|
|
772
|
+
index: IndexOut | null;
|
|
773
|
+
created_at: string;
|
|
774
|
+
updated_at: string;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
export interface FolderFileOut {
|
|
778
|
+
path: string;
|
|
779
|
+
size: number;
|
|
780
|
+
updated_at: string | null;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/** Fields to fill; sending them sends `action` with the values by field name: words, a number, true or false, a date as "YYYY-MM-DD", a time as "HH:MM", a moment as "YYYY-MM-DDTHH:MM", a list of option ids for a `multiselect`, the files picked for a `file` (which the agent then sees). */
|
|
784
|
+
export interface Form {
|
|
785
|
+
type: "form";
|
|
786
|
+
fields: Array<FormField>;
|
|
787
|
+
submit?: string | null;
|
|
788
|
+
action: string;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/** One thing to fill: its name (what its value comes back under), its label, its control. */
|
|
792
|
+
export interface FormField {
|
|
793
|
+
kind: "text" | "textarea" | "email" | "phone" | "url" | "number" | "date" | "time" | "datetime" | "select" | "multiselect" | "checkbox" | "range" | "rating" | "secret" | "file";
|
|
794
|
+
placeholder?: string | null;
|
|
795
|
+
help?: string | null;
|
|
796
|
+
options?: Array<Option> | null;
|
|
797
|
+
min?: number | null;
|
|
798
|
+
max?: number | null;
|
|
799
|
+
step?: number | null;
|
|
800
|
+
unit?: string | null;
|
|
801
|
+
dates?: Array<string> | null;
|
|
802
|
+
earliest?: string | null;
|
|
803
|
+
latest?: string | null;
|
|
804
|
+
times?: Array<string> | null;
|
|
805
|
+
accept?: Array<string> | null;
|
|
806
|
+
multiple?: boolean | null;
|
|
807
|
+
max_mb?: number | null;
|
|
808
|
+
name: string;
|
|
809
|
+
label?: string | null;
|
|
810
|
+
required?: boolean;
|
|
811
|
+
value?: string | number | boolean | Array<string> | null;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export interface HTTPValidationError {
|
|
815
|
+
detail?: Array<ValidationError>;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/** A change of who answers a conversation: to whom, why, who set it and when. */
|
|
819
|
+
export interface HandoverOut {
|
|
820
|
+
holder: "agent" | "person" | "nobody";
|
|
821
|
+
reason: string;
|
|
822
|
+
by: string;
|
|
823
|
+
title: string | null;
|
|
824
|
+
at: string;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/** A static secret every call carries, in the header the host reads it from. */
|
|
828
|
+
export interface HeaderIn {
|
|
829
|
+
name: string;
|
|
830
|
+
value: string;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
/** A passage found: its file, where it is in it (in words, and as its parts: first and last page, sheet, first and last row, section) and its text. */
|
|
834
|
+
export interface Hit {
|
|
835
|
+
path: string;
|
|
836
|
+
location: string;
|
|
837
|
+
text: string;
|
|
838
|
+
pages: Array<number> | null;
|
|
839
|
+
sheet: string | null;
|
|
840
|
+
rows: Array<number> | null;
|
|
841
|
+
section: string | null;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/** An app of the catalog, as a person picking one reads it. */
|
|
845
|
+
export interface HitOut {
|
|
846
|
+
toolkit: string;
|
|
847
|
+
name: string;
|
|
848
|
+
description: string;
|
|
849
|
+
events: boolean;
|
|
850
|
+
icon: string | null;
|
|
851
|
+
kind: string | null;
|
|
852
|
+
tools: number | null;
|
|
853
|
+
connected: string | null;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
/** The owner says who answers a conversation now: the agent (given back), a person of the business (the agent paused there) or nobody (ignored), and why. */
|
|
857
|
+
export interface HolderIn {
|
|
858
|
+
holder: "agent" | "person" | "nobody";
|
|
859
|
+
reason?: string;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
/** The week, in the agent's time zone: each day's stretches, in order and apart; a day left out, or empty, is closed. */
|
|
863
|
+
export interface Hours {
|
|
864
|
+
mon?: Array<Span>;
|
|
865
|
+
tue?: Array<Span>;
|
|
866
|
+
wed?: Array<Span>;
|
|
867
|
+
thu?: Array<Span>;
|
|
868
|
+
fri?: Array<Span>;
|
|
869
|
+
sat?: Array<Span>;
|
|
870
|
+
sun?: Array<Span>;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
export interface Image {
|
|
874
|
+
type: "image";
|
|
875
|
+
url: string;
|
|
876
|
+
alt: string;
|
|
877
|
+
caption?: string | null;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/** The document, by its URL or pasted; the base URL its calls go to, when not the first of its `servers`. */
|
|
881
|
+
export interface ImportIn {
|
|
882
|
+
url?: string | null;
|
|
883
|
+
document?: string | null;
|
|
884
|
+
base_url?: string | null;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/** How far a searchable file's index is: `indexing`, `ready` or `failed`; what to know of it (why it failed, what of it can't be searched); how many of its pages had no text and were read by the model. */
|
|
888
|
+
export interface IndexOut {
|
|
889
|
+
state: "indexing" | "ready" | "failed";
|
|
890
|
+
detail: string | null;
|
|
891
|
+
scanned: number;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/** What Instagram's login sent the person back with, and the page it sent them to. */
|
|
895
|
+
export interface InstagramIn {
|
|
896
|
+
agent_id: string;
|
|
897
|
+
code: string;
|
|
898
|
+
redirect_uri: string;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
export interface Item {
|
|
902
|
+
label: string;
|
|
903
|
+
value: string;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
export interface ItemOut {
|
|
907
|
+
id: string;
|
|
908
|
+
kind: "notice" | "handoff" | "failed" | "waiting" | "unanswered";
|
|
909
|
+
agent_id: string;
|
|
910
|
+
agent_name: string;
|
|
911
|
+
conversation_id: string | null;
|
|
912
|
+
run_id?: string | null;
|
|
913
|
+
text: string;
|
|
914
|
+
title?: string | null;
|
|
915
|
+
read: boolean;
|
|
916
|
+
created_at: string;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
export interface KindOut {
|
|
920
|
+
id: string;
|
|
921
|
+
count: number;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/** A conversation's newest words, on one line, and who said them. */
|
|
925
|
+
export interface LastSaid {
|
|
926
|
+
text: string;
|
|
927
|
+
by: "person" | "agent";
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
export interface ListPiece {
|
|
931
|
+
type: "list";
|
|
932
|
+
title: string;
|
|
933
|
+
item: string;
|
|
934
|
+
subtitle?: string | null;
|
|
935
|
+
meta?: string | null;
|
|
936
|
+
query: Rows;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/** Things in a column, each a title with a line under it, maybe a picture and a detail at its right. With `action`, picking one sends it with `{"item": id}`. */
|
|
940
|
+
export interface Listing {
|
|
941
|
+
type: "list";
|
|
942
|
+
items: Array<Entry>;
|
|
943
|
+
action?: string | null;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/** An agent made from the template, in one of the organizations it manages. */
|
|
947
|
+
export interface MadeOut {
|
|
948
|
+
org_id: string;
|
|
949
|
+
org_name: string;
|
|
950
|
+
agent_id: string;
|
|
951
|
+
version: number;
|
|
952
|
+
overrides: Array<string>;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
/** An endpoint as it is made: the only time `secret` is shown. */
|
|
956
|
+
export interface MadeWebhookOut {
|
|
957
|
+
id: string;
|
|
958
|
+
url: string;
|
|
959
|
+
events: Array<"message.created" | "conversation.holder_changed" | "inbox.item_created" | "run.finished" | "run.failed" | "call.ended" | "channel.status_changed" | "approval.requested">;
|
|
960
|
+
created_at: string;
|
|
961
|
+
secret: string;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
export interface ManagedOrgIn {
|
|
965
|
+
name: string;
|
|
966
|
+
templates?: Array<string>;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
export interface ManagedOrgOut {
|
|
970
|
+
id: string;
|
|
971
|
+
name: string;
|
|
972
|
+
kind: "agency" | "business" | "developer";
|
|
973
|
+
parent_org_id?: string | null;
|
|
974
|
+
slug?: string | null;
|
|
975
|
+
created_at: string;
|
|
976
|
+
agents?: Array<AgentOut>;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
/** A figure over the rows that pass `where`: their count, or the sum, average, least or most of one field (`of`); with `by`, one figure per value of that field, or per day, week or month of it with `every` (a date, or `created_at`). */
|
|
980
|
+
export interface Measure {
|
|
981
|
+
table: string;
|
|
982
|
+
where?: Array<Where>;
|
|
983
|
+
measure?: "count" | "sum" | "average" | "min" | "max";
|
|
984
|
+
of?: string | null;
|
|
985
|
+
by?: string | null;
|
|
986
|
+
every?: "day" | "week" | "month" | null;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
export interface MediaPreview {
|
|
990
|
+
kind: "image" | "video" | "audio";
|
|
991
|
+
media_type: string;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
/** A line about them, and the agent of the organization it is kept by. */
|
|
995
|
+
export interface MemoryIn {
|
|
996
|
+
text: string;
|
|
997
|
+
agent_id: string;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
export interface MemoryOut {
|
|
1001
|
+
id: string;
|
|
1002
|
+
agent_id: string;
|
|
1003
|
+
contact_id?: string | null;
|
|
1004
|
+
text: string;
|
|
1005
|
+
created_at: string;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/** Words in a conversation, files of it (`POST /conversations/{id}/files` first) by id, or both; `wait` to be answered when the turn ends, with the agent's reply. */
|
|
1009
|
+
export interface MessageIn {
|
|
1010
|
+
text?: string;
|
|
1011
|
+
files?: Array<string>;
|
|
1012
|
+
wait?: boolean;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
export interface MessageOut {
|
|
1016
|
+
id: string;
|
|
1017
|
+
role: "user" | "assistant";
|
|
1018
|
+
text: string;
|
|
1019
|
+
action: Record<string, unknown> | null;
|
|
1020
|
+
steps: Array<StepOut>;
|
|
1021
|
+
files?: Array<FileRef>;
|
|
1022
|
+
author?: "contact" | "agent" | "operator" | null;
|
|
1023
|
+
delivery?: "queued" | "sent" | "delivered" | "read" | "failed" | null;
|
|
1024
|
+
delivery_error?: string | null;
|
|
1025
|
+
pieces?: Array<string> | null;
|
|
1026
|
+
sent_parts?: number | null;
|
|
1027
|
+
voice?: FileRef | null;
|
|
1028
|
+
heard?: string | null;
|
|
1029
|
+
decision?: SchemasDecisionOut | null;
|
|
1030
|
+
created_at: string;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export interface ModelOut {
|
|
1034
|
+
id: string;
|
|
1035
|
+
label: string;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
/** A line that stands out: what the person should notice. */
|
|
1039
|
+
export interface Note {
|
|
1040
|
+
type: "note";
|
|
1041
|
+
tone: "info" | "success" | "warning" | "danger";
|
|
1042
|
+
text: string;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
export interface NotePiece {
|
|
1046
|
+
type: "note";
|
|
1047
|
+
tone?: "info" | "success" | "warning" | "danger";
|
|
1048
|
+
text: string;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
export interface OperationOut {
|
|
1052
|
+
id: string;
|
|
1053
|
+
method: string;
|
|
1054
|
+
path: string;
|
|
1055
|
+
tag: string | null;
|
|
1056
|
+
summary: string;
|
|
1057
|
+
input_schema: Record<string, unknown>;
|
|
1058
|
+
tool: string | null;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
/** A person of the business writes in a conversation on a channel: words, files of the conversation (`POST /conversations/{id}/files` first) by id, or both. */
|
|
1062
|
+
export interface OperatorIn {
|
|
1063
|
+
text?: string;
|
|
1064
|
+
files?: Array<string>;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
export interface Option {
|
|
1068
|
+
id: string;
|
|
1069
|
+
label: string;
|
|
1070
|
+
hint?: string | null;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
/** What changes of the organization: its name, its kind (not a customer's: always a business). */
|
|
1074
|
+
export interface OrgChange {
|
|
1075
|
+
name?: string | null;
|
|
1076
|
+
kind?: "agency" | "business" | "developer" | null;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
export interface OrgOut {
|
|
1080
|
+
id: string;
|
|
1081
|
+
name: string;
|
|
1082
|
+
kind: "agency" | "business" | "developer";
|
|
1083
|
+
parent_org_id?: string | null;
|
|
1084
|
+
slug?: string | null;
|
|
1085
|
+
created_at: string;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
export interface OriginsIn {
|
|
1089
|
+
origins: Array<string>;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
/** The number's SIP login at its provider (Zadarma's panel, its SIP connection), for the agent's calls out; the provider's SIP host, Zadarma's unless told. */
|
|
1093
|
+
export interface OutboundIn {
|
|
1094
|
+
username: string;
|
|
1095
|
+
password: string;
|
|
1096
|
+
host?: string;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
/** What an agent's own code needs besides the platform, installed exactly as declared (`environments.py`): Debian packages (`apt`: ffmpeg, poppler-utils) and Python requirements (`pip`: openpyxl==3.1.5, pinned so a new release never changes what runs). The manifest checks each (`manifest.read_packages`). */
|
|
1100
|
+
export interface Packages {
|
|
1101
|
+
apt?: Array<string>;
|
|
1102
|
+
pip?: Array<string>;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
export interface PdfPreview {
|
|
1106
|
+
kind: "pdf";
|
|
1107
|
+
pages: number | null;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/** Who a conversation is with (`people`). */
|
|
1111
|
+
export interface PersonOut {
|
|
1112
|
+
kind: "host_person" | "visitor" | "contact" | "owner";
|
|
1113
|
+
external_id: string;
|
|
1114
|
+
name: string | null;
|
|
1115
|
+
email: string | null;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
/** The business's number, kept at its provider (Zadarma, its own Twilio, a PBX), in international form. */
|
|
1119
|
+
export interface PhoneIn {
|
|
1120
|
+
agent_id: string;
|
|
1121
|
+
number: string;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
export interface Point {
|
|
1125
|
+
label: string;
|
|
1126
|
+
value: number;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
export interface PreviewSheet {
|
|
1130
|
+
name: string;
|
|
1131
|
+
columns: Array<string> | null;
|
|
1132
|
+
rows: Array<Array<string>>;
|
|
1133
|
+
total_rows: number;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
export interface PreviewSlide {
|
|
1137
|
+
title: string | null;
|
|
1138
|
+
text: string;
|
|
1139
|
+
notes: string | null;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
/** A message as it was stored: its blocks as the model saw or said them (a file's bytes and a thinking block's signature left out), and what the model reported the reply cost. */
|
|
1143
|
+
export interface RawMessageOut {
|
|
1144
|
+
id: string;
|
|
1145
|
+
seq: number;
|
|
1146
|
+
role: "user" | "assistant";
|
|
1147
|
+
content: Array<Record<string, unknown>>;
|
|
1148
|
+
usage: Record<string, unknown> | null;
|
|
1149
|
+
created_at: string;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
/** What was said, as stored, and how the turn stands: `running` (it hasn't ended yet: read the conversation later), `done`, `waiting` (on `waiting`) or `failed` (`error`); `replies`, what the agent said since; `waiting`, every call the conversation waits on (a yes the business gives may wait while the turn is done). */
|
|
1153
|
+
export interface ReplyOut {
|
|
1154
|
+
conversation_id: string;
|
|
1155
|
+
message: MessageOut;
|
|
1156
|
+
status: "running" | "done" | "waiting" | "failed";
|
|
1157
|
+
replies: Array<MessageOut>;
|
|
1158
|
+
waiting: Array<WaitOut>;
|
|
1159
|
+
error: TurnErrorOut | null;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
export interface RowIn {
|
|
1163
|
+
values: Record<string, unknown>;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
export interface RowOut {
|
|
1167
|
+
id: string;
|
|
1168
|
+
values: Record<string, unknown>;
|
|
1169
|
+
created_at: string;
|
|
1170
|
+
updated_at: string;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/** The rows that pass `where`, the newest first unless `order` says another field. */
|
|
1174
|
+
export interface Rows {
|
|
1175
|
+
table: string;
|
|
1176
|
+
where?: Array<Where>;
|
|
1177
|
+
order?: string | null;
|
|
1178
|
+
descending?: boolean;
|
|
1179
|
+
limit?: number;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
export interface RunDetailOut {
|
|
1183
|
+
id: string;
|
|
1184
|
+
agent_id: string;
|
|
1185
|
+
automation: string;
|
|
1186
|
+
title: string;
|
|
1187
|
+
by: "schedule" | "webhook" | "event" | "platform" | "agent" | "test";
|
|
1188
|
+
conversation_id: string | null;
|
|
1189
|
+
status: "running" | "waiting" | "done" | "failed" | "skipped";
|
|
1190
|
+
summary: string | null;
|
|
1191
|
+
error: string | null;
|
|
1192
|
+
dry: boolean;
|
|
1193
|
+
started_at: string;
|
|
1194
|
+
ended_at: string | null;
|
|
1195
|
+
tokens_in: number;
|
|
1196
|
+
tokens_out: number;
|
|
1197
|
+
opened: Array<string>;
|
|
1198
|
+
decision?: RunsDecisionOut | null;
|
|
1199
|
+
steps: Array<RunStepOut>;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/** A run of an automation, as the activity lists it. */
|
|
1203
|
+
export interface RunEntryOut {
|
|
1204
|
+
id: string;
|
|
1205
|
+
agent_id: string;
|
|
1206
|
+
automation: string;
|
|
1207
|
+
title: string;
|
|
1208
|
+
by: "schedule" | "webhook" | "event" | "platform" | "agent" | "test";
|
|
1209
|
+
conversation_id: string | null;
|
|
1210
|
+
status: "running" | "waiting" | "done" | "failed" | "skipped";
|
|
1211
|
+
summary: string | null;
|
|
1212
|
+
error: string | null;
|
|
1213
|
+
dry: boolean;
|
|
1214
|
+
started_at: string;
|
|
1215
|
+
ended_at: string | null;
|
|
1216
|
+
tokens_in: number;
|
|
1217
|
+
tokens_out: number;
|
|
1218
|
+
opened: Array<string>;
|
|
1219
|
+
decision?: RunsDecisionOut | null;
|
|
1220
|
+
kind?: "run";
|
|
1221
|
+
last_at: string;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
export interface RunOut {
|
|
1225
|
+
id: string;
|
|
1226
|
+
agent_id: string;
|
|
1227
|
+
automation: string;
|
|
1228
|
+
title: string;
|
|
1229
|
+
by: "schedule" | "webhook" | "event" | "platform" | "agent" | "test";
|
|
1230
|
+
conversation_id: string | null;
|
|
1231
|
+
status: "running" | "waiting" | "done" | "failed" | "skipped";
|
|
1232
|
+
summary: string | null;
|
|
1233
|
+
error: string | null;
|
|
1234
|
+
dry: boolean;
|
|
1235
|
+
started_at: string;
|
|
1236
|
+
ended_at: string | null;
|
|
1237
|
+
tokens_in: number;
|
|
1238
|
+
tokens_out: number;
|
|
1239
|
+
opened: Array<string>;
|
|
1240
|
+
decision?: RunsDecisionOut | null;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
export interface RunStepOut {
|
|
1244
|
+
seq: number;
|
|
1245
|
+
step: string | null;
|
|
1246
|
+
call: string;
|
|
1247
|
+
input: unknown;
|
|
1248
|
+
output: unknown;
|
|
1249
|
+
error: string | null;
|
|
1250
|
+
ms: number;
|
|
1251
|
+
at: string;
|
|
1252
|
+
would: boolean;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
/** What a handler decided of a message (`sc.answer`, `sc.hold`, `sc.ignore`). */
|
|
1256
|
+
export interface RunsDecisionOut {
|
|
1257
|
+
kind: "answer" | "hold" | "ignore";
|
|
1258
|
+
reason: string;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/** One of the actions the platform ships, as the app lists them; its input as the model gets it (JSON Schema), for the technical view. */
|
|
1262
|
+
export interface SchemasActionOut {
|
|
1263
|
+
name: string;
|
|
1264
|
+
description: string;
|
|
1265
|
+
destructive: boolean;
|
|
1266
|
+
input_schema?: Record<string, unknown>;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
/** What was decided of a contact's message (`handlers`): by the channel's filter, the agent answers it or not this time (`skip`); by the agent's own handlers (`@sc.on`), it answers, or the conversation goes to a person (`hold`) or to nobody (`ignore`); `deciding` while they go. */
|
|
1270
|
+
export interface SchemasDecisionOut {
|
|
1271
|
+
kind: "deciding" | "answer" | "skip" | "hold" | "ignore";
|
|
1272
|
+
reason: string | null;
|
|
1273
|
+
automation: string | null;
|
|
1274
|
+
title: string | null;
|
|
1275
|
+
run_id: string | null;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
export interface SecretIn {
|
|
1279
|
+
value: string;
|
|
1280
|
+
hosts?: Array<string>;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
export interface SecretOut {
|
|
1284
|
+
name: string;
|
|
1285
|
+
hosts: Array<string>;
|
|
1286
|
+
created_at: string;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
export interface Settings {
|
|
1290
|
+
answers?: boolean;
|
|
1291
|
+
filter?: string | null;
|
|
1292
|
+
filter_keywords?: Array<string>;
|
|
1293
|
+
hours?: Hours | null;
|
|
1294
|
+
answers_when?: "in_hours" | "out_of_hours";
|
|
1295
|
+
away_message?: string | null;
|
|
1296
|
+
groups?: boolean;
|
|
1297
|
+
auto_release_after_h?: number | null;
|
|
1298
|
+
instructions?: string | null;
|
|
1299
|
+
reply_delay_s?: number;
|
|
1300
|
+
split?: boolean;
|
|
1301
|
+
typing?: boolean;
|
|
1302
|
+
window_template?: string | null;
|
|
1303
|
+
voice_replies?: "never" | "when_voice" | "always";
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
/** Only what is sent changes; `null` clears what may be none (`filter`, `hours`, `away_message`, `auto_release_after_h`, `instructions`, `window_template`). */
|
|
1307
|
+
export interface SettingsPatch {
|
|
1308
|
+
answers?: boolean | null;
|
|
1309
|
+
filter?: string | null;
|
|
1310
|
+
filter_keywords?: Array<string> | null;
|
|
1311
|
+
hours?: Hours | null;
|
|
1312
|
+
answers_when?: "in_hours" | "out_of_hours" | null;
|
|
1313
|
+
away_message?: string | null;
|
|
1314
|
+
groups?: boolean | null;
|
|
1315
|
+
auto_release_after_h?: number | null;
|
|
1316
|
+
instructions?: string | null;
|
|
1317
|
+
reply_delay_s?: number | null;
|
|
1318
|
+
split?: boolean | null;
|
|
1319
|
+
typing?: boolean | null;
|
|
1320
|
+
window_template?: string | null;
|
|
1321
|
+
voice_replies?: "never" | "when_voice" | "always" | null;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
/** What the browser needs to start each channel's flow on this server; None where the server doesn't have it. */
|
|
1325
|
+
export interface SetupOut {
|
|
1326
|
+
whatsapp: Record<string, string> | null;
|
|
1327
|
+
instagram: Record<string, string> | null;
|
|
1328
|
+
sms: boolean;
|
|
1329
|
+
phone: boolean;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
export interface SheetPreview {
|
|
1333
|
+
kind: "sheet";
|
|
1334
|
+
sheets: Array<PreviewSheet>;
|
|
1335
|
+
truncated: boolean;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
export interface SlidesPreview {
|
|
1339
|
+
kind: "slides";
|
|
1340
|
+
slides: Array<PreviewSlide>;
|
|
1341
|
+
truncated: boolean;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
/** A stretch of a day, from one time to a later one; `24:00` ends it at midnight. */
|
|
1345
|
+
export interface Span {
|
|
1346
|
+
start: string;
|
|
1347
|
+
end: string;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
/** Blocks laid out together: down, or across (wrapping on a narrow screen; stats, cards and buttons side by side). */
|
|
1351
|
+
export interface Stack {
|
|
1352
|
+
type: "stack";
|
|
1353
|
+
direction?: "column" | "row";
|
|
1354
|
+
children: Array<Card | Stack | Divider | Text | Fields | Table | Listing | Stat | Chart | Note | Image | Button | Choice | Form | AutomationBlock | FileBlock>;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
/** One number that matters, under its label, with a line of context (a change, a goal). */
|
|
1358
|
+
export interface Stat {
|
|
1359
|
+
type: "stat";
|
|
1360
|
+
label: string;
|
|
1361
|
+
value: string;
|
|
1362
|
+
hint?: string | null;
|
|
1363
|
+
tone?: "info" | "success" | "warning" | "danger" | null;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
export interface StatPiece {
|
|
1367
|
+
type: "stat";
|
|
1368
|
+
label: string;
|
|
1369
|
+
query: Measure;
|
|
1370
|
+
hint?: string | null;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
export interface Step {
|
|
1374
|
+
name: string;
|
|
1375
|
+
uses: Array<Use>;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
/** The connected app an action belongs to, as its step shows it: its name and its logo (an https address; none when the provider has none). */
|
|
1379
|
+
export interface StepApp {
|
|
1380
|
+
name: string;
|
|
1381
|
+
icon?: string | null;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
/** An action a reply called: what, how it went, and what it drew. */
|
|
1385
|
+
export interface StepOut {
|
|
1386
|
+
id: string;
|
|
1387
|
+
action: string;
|
|
1388
|
+
state: "running" | "waiting" | "done" | "failed";
|
|
1389
|
+
output: string | null;
|
|
1390
|
+
surface: Record<string, unknown> | null;
|
|
1391
|
+
awaits: boolean;
|
|
1392
|
+
request: Record<string, unknown> | null;
|
|
1393
|
+
app?: StepApp | null;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
export interface SwitchIn {
|
|
1397
|
+
on: boolean;
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
/** An automation of the organization's an agent may turn on or off in a conversation (`switch_automation`): one of its own, or of the agent it names. */
|
|
1401
|
+
export interface Switchable {
|
|
1402
|
+
agent?: string | null;
|
|
1403
|
+
automation: string;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/** Rows under named columns; a row's cells come in the columns' order. */
|
|
1407
|
+
export interface Table {
|
|
1408
|
+
type: "table";
|
|
1409
|
+
columns: Array<string>;
|
|
1410
|
+
rows: Array<Array<string>>;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
export interface TableIn {
|
|
1414
|
+
name: string;
|
|
1415
|
+
title: string;
|
|
1416
|
+
fields: Array<FieldDef>;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
export interface TableOut {
|
|
1420
|
+
name: string;
|
|
1421
|
+
title: string;
|
|
1422
|
+
fields: Array<FieldOut>;
|
|
1423
|
+
id: string;
|
|
1424
|
+
system: boolean;
|
|
1425
|
+
rows: number;
|
|
1426
|
+
created_at: string;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
export interface TablePiece {
|
|
1430
|
+
type: "table";
|
|
1431
|
+
title: string;
|
|
1432
|
+
columns: Array<Column>;
|
|
1433
|
+
query: Rows;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
/** A contact's subscription: an instance of a definition (`automation`: the business's automation for contacts, by name; None for an instruction), what it gives it (`inputs`: an instruction's words are `inputs.instruction`), when (`schedule`, a cron line in `timezone`, or once at `next_run_at`), whether it is on, its contact, the conversation it runs about and its newest runs. It read as an automation before: those fields stay, deprecated. */
|
|
1437
|
+
export interface TaskOut {
|
|
1438
|
+
id: string;
|
|
1439
|
+
agent_id: string;
|
|
1440
|
+
automation: string | null;
|
|
1441
|
+
title: string;
|
|
1442
|
+
inputs: Record<string, unknown>;
|
|
1443
|
+
schedule: string | null;
|
|
1444
|
+
timezone: string | null;
|
|
1445
|
+
on: boolean;
|
|
1446
|
+
next_run_at: string | null;
|
|
1447
|
+
last_run_at: string | null;
|
|
1448
|
+
contact_id: string;
|
|
1449
|
+
conversation_id: string | null;
|
|
1450
|
+
runs: Array<RunOut>;
|
|
1451
|
+
created_at: string;
|
|
1452
|
+
/** @deprecated Kept for the clients that read it. */
|
|
1453
|
+
name: string;
|
|
1454
|
+
/** @deprecated Kept for the clients that read it. */
|
|
1455
|
+
summary: string;
|
|
1456
|
+
/** @deprecated Kept for the clients that read it. */
|
|
1457
|
+
trigger: TriggerView;
|
|
1458
|
+
/** @deprecated Kept for the clients that read it. */
|
|
1459
|
+
steps: Array<Step>;
|
|
1460
|
+
/** @deprecated Kept for the clients that read it. */
|
|
1461
|
+
board: Board | null;
|
|
1462
|
+
/** @deprecated Kept for the clients that read it. */
|
|
1463
|
+
state: "active" | "paused" | "failing";
|
|
1464
|
+
/** @deprecated Kept for the clients that read it. */
|
|
1465
|
+
last_run: RunOut | null;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
export interface TeachIn {
|
|
1469
|
+
text: string;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
export interface TemplateDetailOut {
|
|
1473
|
+
agent_id: string;
|
|
1474
|
+
version: number;
|
|
1475
|
+
managed: Array<string>;
|
|
1476
|
+
organizations: number;
|
|
1477
|
+
changed: boolean;
|
|
1478
|
+
updated_at: string;
|
|
1479
|
+
agents: Array<MadeOut>;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
/** A template to make: its name in the owner's words (`Recordatorio de cita`), what kind of message it is, its language, its words with `{{1}}`, `{{2}}`… where values go, and an example for each value, in order. */
|
|
1483
|
+
export interface TemplateIn {
|
|
1484
|
+
name: string;
|
|
1485
|
+
category?: "utility" | "marketing";
|
|
1486
|
+
language?: string;
|
|
1487
|
+
body: string;
|
|
1488
|
+
examples?: Array<string>;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
export interface TemplateOut {
|
|
1492
|
+
agent_id: string;
|
|
1493
|
+
version: number;
|
|
1494
|
+
managed: Array<string>;
|
|
1495
|
+
organizations: number;
|
|
1496
|
+
changed: boolean;
|
|
1497
|
+
updated_at: string;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
/** Words, as Markdown. */
|
|
1501
|
+
export interface Text {
|
|
1502
|
+
type: "text";
|
|
1503
|
+
text: string;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
export interface TextPreview {
|
|
1507
|
+
kind: "markdown" | "text" | "json";
|
|
1508
|
+
text: string;
|
|
1509
|
+
truncated: boolean;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
export interface TokenIn {
|
|
1513
|
+
agents: Array<string>;
|
|
1514
|
+
external_id: string;
|
|
1515
|
+
name: string;
|
|
1516
|
+
email?: string | null;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
export interface TokenOut {
|
|
1520
|
+
token: string;
|
|
1521
|
+
expires_at: string;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
export interface ToolIn {
|
|
1525
|
+
description: string;
|
|
1526
|
+
input_schema: Record<string, unknown>;
|
|
1527
|
+
mode: "server" | "client";
|
|
1528
|
+
url?: string | null;
|
|
1529
|
+
asks_first?: boolean;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
export interface ToolOut {
|
|
1533
|
+
name: string;
|
|
1534
|
+
description: string;
|
|
1535
|
+
input_schema: Record<string, unknown>;
|
|
1536
|
+
mode: "server" | "client" | "api";
|
|
1537
|
+
url: string | null;
|
|
1538
|
+
method: string | null;
|
|
1539
|
+
path: string | null;
|
|
1540
|
+
asks_first: boolean;
|
|
1541
|
+
declared_in: "code" | "app";
|
|
1542
|
+
created_at: string;
|
|
1543
|
+
updated_at: string;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
/** Only what is sent changes: any tool's name, description, input and asking first; how an imported one calls its API stays its document's. */
|
|
1547
|
+
export interface ToolPatchIn {
|
|
1548
|
+
name?: string | null;
|
|
1549
|
+
description?: string | null;
|
|
1550
|
+
input_schema?: Record<string, unknown> | null;
|
|
1551
|
+
asks_first?: boolean | null;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
/** The organization's tool secret, shown once. */
|
|
1555
|
+
export interface ToolSecretOut {
|
|
1556
|
+
secret: string;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
/** An automation's trigger as the agent's page reads it today (`GET /agents/{id}/triggers`); the automation itself is `automations.AutomationOut`. */
|
|
1560
|
+
export interface TriggerOut {
|
|
1561
|
+
id: string;
|
|
1562
|
+
name: string;
|
|
1563
|
+
kind: "schedule" | "webhook" | "event" | "platform";
|
|
1564
|
+
title: string;
|
|
1565
|
+
summary: string;
|
|
1566
|
+
schedule: string | null;
|
|
1567
|
+
timezone: string | null;
|
|
1568
|
+
app: string | null;
|
|
1569
|
+
event: string | null;
|
|
1570
|
+
config: Record<string, unknown>;
|
|
1571
|
+
url: string | null;
|
|
1572
|
+
say: string;
|
|
1573
|
+
on: boolean;
|
|
1574
|
+
last_run_at: string | null;
|
|
1575
|
+
next_run_at: string | null;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
export interface TriggerPatchIn {
|
|
1579
|
+
on: boolean;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
export interface TriggerView {
|
|
1583
|
+
kind: "schedule" | "webhook" | "event" | "platform";
|
|
1584
|
+
schedule: string | null;
|
|
1585
|
+
timezone: string | null;
|
|
1586
|
+
url: string | null;
|
|
1587
|
+
app: string | null;
|
|
1588
|
+
app_title: string | null;
|
|
1589
|
+
event: string | null;
|
|
1590
|
+
event_title: string | null;
|
|
1591
|
+
icon: string | null;
|
|
1592
|
+
decides?: boolean;
|
|
1593
|
+
channels?: Array<string>;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
export interface TurnErrorOut {
|
|
1597
|
+
code: string;
|
|
1598
|
+
detail: string;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
export interface UnknownPreview {
|
|
1602
|
+
kind: "unknown";
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
export interface UsageOut {
|
|
1606
|
+
org_id: string;
|
|
1607
|
+
from: string;
|
|
1608
|
+
to: string;
|
|
1609
|
+
cost: number;
|
|
1610
|
+
used: Array<UsedOut>;
|
|
1611
|
+
messages: Array<ChannelUsageOut>;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
export interface Use {
|
|
1615
|
+
kind: "app" | "ai" | "agent" | "notify" | "send" | "data" | "http";
|
|
1616
|
+
app: string | null;
|
|
1617
|
+
title: string | null;
|
|
1618
|
+
icon: string | null;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
export interface UsedOut {
|
|
1622
|
+
kind: string;
|
|
1623
|
+
unit: string;
|
|
1624
|
+
quantity: number;
|
|
1625
|
+
count: number;
|
|
1626
|
+
cost: number;
|
|
1627
|
+
unpriced: number;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
export interface ValidationError {
|
|
1631
|
+
loc: Array<string | number>;
|
|
1632
|
+
msg: string;
|
|
1633
|
+
type: string;
|
|
1634
|
+
input?: unknown;
|
|
1635
|
+
ctx?: Record<string, unknown>;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
/** How an agent talks on a call (VOICE.md). The defaults are the old product's, in Spanish: its ElevenLabs voice (Carolina, from Spain), up to ten minutes, a goodbye ends it. */
|
|
1639
|
+
export interface Voice {
|
|
1640
|
+
language?: string;
|
|
1641
|
+
voice?: VoiceId;
|
|
1642
|
+
first_message?: string;
|
|
1643
|
+
max_duration_s?: number;
|
|
1644
|
+
end_call_phrases?: Array<string>;
|
|
1645
|
+
model?: "claude-haiku-5-5" | "claude-sonnet-5-5";
|
|
1646
|
+
record?: boolean;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
/** Who speaks for the agent: a voice of ElevenLabs (by its id there) or of Cartesia. */
|
|
1650
|
+
export interface VoiceId {
|
|
1651
|
+
provider: "elevenlabs" | "cartesia";
|
|
1652
|
+
id: string;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
/** Only what is sent changes. */
|
|
1656
|
+
export interface VoicePatch {
|
|
1657
|
+
language?: string | null;
|
|
1658
|
+
voice?: VoiceId | null;
|
|
1659
|
+
first_message?: string | null;
|
|
1660
|
+
max_duration_s?: number | null;
|
|
1661
|
+
end_call_phrases?: Array<string> | null;
|
|
1662
|
+
model?: "claude-haiku-5-5" | "claude-sonnet-5-5" | null;
|
|
1663
|
+
record?: boolean | null;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
/** A call the conversation waits on: a question the person answers on what it drew (`ask`), a yes (`approve`, given by the person on the screen or by the business: `decides`), or what a host's client tool returns in the page (`tool`). */
|
|
1667
|
+
export interface WaitOut {
|
|
1668
|
+
id: string;
|
|
1669
|
+
action: string;
|
|
1670
|
+
kind: "ask" | "approve" | "tool";
|
|
1671
|
+
decides: "person" | "business" | null;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
/** The agent the widget talks to, and the sites it may be loaded from. */
|
|
1675
|
+
export interface WebIn {
|
|
1676
|
+
agent_id: string;
|
|
1677
|
+
origins: Array<string>;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
/** A web channel as its panel shows it: the key the snippet carries, the sites, the look. */
|
|
1681
|
+
export interface WebOut {
|
|
1682
|
+
key: string;
|
|
1683
|
+
origins: Array<string>;
|
|
1684
|
+
appearance: Appearance;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
export interface WebhookIn {
|
|
1688
|
+
url: string;
|
|
1689
|
+
events: Array<"message.created" | "conversation.holder_changed" | "inbox.item_created" | "run.finished" | "run.failed" | "call.ended" | "channel.status_changed" | "approval.requested">;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
export interface WebhookOut {
|
|
1693
|
+
id: string;
|
|
1694
|
+
url: string;
|
|
1695
|
+
events: Array<"message.created" | "conversation.holder_changed" | "inbox.item_created" | "run.finished" | "run.failed" | "call.ended" | "channel.status_changed" | "approval.requested">;
|
|
1696
|
+
created_at: string;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
/** What Embedded Signup gave the browser: the code (it lives 30 s) and, when Meta's session event named them, the WhatsApp Business Account and the number; `coexistence` for a number kept on the WhatsApp Business app. */
|
|
1700
|
+
export interface WhatsAppIn {
|
|
1701
|
+
agent_id: string;
|
|
1702
|
+
code: string;
|
|
1703
|
+
waba_id?: string | null;
|
|
1704
|
+
phone_number_id?: string | null;
|
|
1705
|
+
mode?: "cloud_api" | "coexistence";
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
/** One filter: the field compared with `value` by `op`. `last_days` keeps the rows whose date falls in the last `value` days; `contains` looks for words in a text. */
|
|
1709
|
+
export interface Where {
|
|
1710
|
+
field: string;
|
|
1711
|
+
op?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "last_days";
|
|
1712
|
+
value: string | number | boolean;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
/** What the widget reads as it loads: the agent it talks to, and how it looks. */
|
|
1716
|
+
export interface WidgetOut {
|
|
1717
|
+
agent_id: string;
|
|
1718
|
+
agent_name: string;
|
|
1719
|
+
appearance: Appearance;
|
|
1720
|
+
}
|