agora-agents 2.12.0 → 3.0.0-alpha.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 +38 -3
- package/dist/cjs/AgoraPoolClient.d.ts +15 -27
- package/dist/cjs/AgoraPoolClient.js +75 -54
- package/dist/cjs/BaseClient.js +3 -2
- package/dist/cjs/agentkit/Agent.d.ts +14 -1
- package/dist/cjs/agentkit/Agent.js +126 -9
- package/dist/cjs/agentkit/AgentSession.d.ts +11 -2
- package/dist/cjs/agentkit/AgentSession.js +134 -22
- package/dist/cjs/agentkit/index.d.ts +4 -1
- package/dist/cjs/agentkit/index.js +12 -2
- package/dist/cjs/agentkit/session-backend.d.ts +25 -0
- package/dist/cjs/agentkit/session-backend.js +197 -0
- package/dist/cjs/agentkit/types.d.ts +27 -4
- package/dist/cjs/agentkit/v3.d.ts +70 -0
- package/dist/cjs/agentkit/v3.js +700 -0
- package/dist/cjs/agentkit/vendors/avatar.d.ts +24 -12
- package/dist/cjs/agentkit/vendors/avatar.js +48 -3
- package/dist/cjs/agentkit/vendors/base.d.ts +8 -0
- package/dist/cjs/agentkit/vendors/base.js +33 -7
- package/dist/cjs/agentkit/vendors/llm.d.ts +7 -7
- package/dist/cjs/agentkit/vendors/llm.js +26 -22
- package/dist/cjs/agentkit/vendors/tts.d.ts +20 -0
- package/dist/cjs/agentkit/vendors/tts.js +5 -2
- package/dist/cjs/core/publicHeaders.d.ts +2 -0
- package/dist/cjs/core/publicHeaders.js +8 -0
- package/dist/cjs/index.d.ts +5 -0
- package/dist/cjs/index.js +14 -1
- package/dist/cjs/v3/campaign-schema.d.ts +1 -0
- package/dist/cjs/v3/campaign-schema.js +18 -0
- package/dist/cjs/v3/campaigns.d.ts +50 -0
- package/dist/cjs/v3/campaigns.js +81 -0
- package/dist/cjs/v3/contract.d.ts +1 -0
- package/dist/cjs/v3/contract.js +9115 -0
- package/dist/cjs/v3/index.d.ts +15 -0
- package/dist/cjs/v3/index.js +56 -0
- package/dist/cjs/v3/resources.d.ts +121 -0
- package/dist/cjs/v3/resources.js +186 -0
- package/dist/cjs/v3/session-lifecycle.d.ts +51 -0
- package/dist/cjs/v3/session-lifecycle.js +127 -0
- package/dist/cjs/v3/session-schema.d.ts +1 -0
- package/dist/cjs/v3/session-schema.js +18 -0
- package/dist/cjs/v3/transport.d.ts +36 -0
- package/dist/cjs/v3/transport.js +161 -0
- package/dist/cjs/v3/types.d.ts +1004 -0
- package/dist/cjs/v3/types.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/AgoraPoolClient.d.mts +15 -27
- package/dist/esm/AgoraPoolClient.mjs +69 -48
- package/dist/esm/BaseClient.mjs +3 -2
- package/dist/esm/agentkit/Agent.d.mts +14 -1
- package/dist/esm/agentkit/Agent.mjs +126 -9
- package/dist/esm/agentkit/AgentSession.d.mts +11 -2
- package/dist/esm/agentkit/AgentSession.mjs +134 -22
- package/dist/esm/agentkit/index.d.mts +4 -1
- package/dist/esm/agentkit/index.mjs +2 -0
- package/dist/esm/agentkit/session-backend.d.mts +25 -0
- package/dist/esm/agentkit/session-backend.mjs +191 -0
- package/dist/esm/agentkit/types.d.mts +27 -4
- package/dist/esm/agentkit/v3.d.mts +70 -0
- package/dist/esm/agentkit/v3.mjs +687 -0
- package/dist/esm/agentkit/vendors/avatar.d.mts +24 -12
- package/dist/esm/agentkit/vendors/avatar.mjs +45 -6
- package/dist/esm/agentkit/vendors/base.d.mts +8 -0
- package/dist/esm/agentkit/vendors/base.mjs +33 -7
- package/dist/esm/agentkit/vendors/llm.d.mts +7 -7
- package/dist/esm/agentkit/vendors/llm.mjs +26 -22
- package/dist/esm/agentkit/vendors/tts.d.mts +20 -0
- package/dist/esm/agentkit/vendors/tts.mjs +5 -2
- package/dist/esm/core/publicHeaders.d.mts +2 -0
- package/dist/esm/core/publicHeaders.mjs +5 -0
- package/dist/esm/index.d.mts +5 -0
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/v3/campaign-schema.d.mts +1 -0
- package/dist/esm/v3/campaign-schema.mjs +2 -0
- package/dist/esm/v3/campaigns.d.mts +50 -0
- package/dist/esm/v3/campaigns.mjs +77 -0
- package/dist/esm/v3/contract.d.mts +1 -0
- package/dist/esm/v3/contract.mjs +9112 -0
- package/dist/esm/v3/index.d.mts +15 -0
- package/dist/esm/v3/index.mjs +15 -0
- package/dist/esm/v3/resources.d.mts +121 -0
- package/dist/esm/v3/resources.mjs +179 -0
- package/dist/esm/v3/session-lifecycle.d.mts +51 -0
- package/dist/esm/v3/session-lifecycle.mjs +121 -0
- package/dist/esm/v3/session-schema.d.mts +1 -0
- package/dist/esm/v3/session-schema.mjs +2 -0
- package/dist/esm/v3/transport.d.mts +36 -0
- package/dist/esm/v3/transport.mjs +151 -0
- package/dist/esm/v3/types.d.mts +1004 -0
- package/dist/esm/v3/types.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/openapi.yaml +8917 -0
- package/package.json +7 -4
- package/reference.md +3 -0
|
@@ -0,0 +1,1004 @@
|
|
|
1
|
+
export type AgentDeleteResponse = {
|
|
2
|
+
deleted: true;
|
|
3
|
+
};
|
|
4
|
+
export type AgentListData = {
|
|
5
|
+
count: number;
|
|
6
|
+
list: Array<AgentListItem>;
|
|
7
|
+
};
|
|
8
|
+
export type AgentListItem = {
|
|
9
|
+
agent_id: string;
|
|
10
|
+
agent_name: string;
|
|
11
|
+
create_ts: number;
|
|
12
|
+
update_ts: number;
|
|
13
|
+
};
|
|
14
|
+
export type AgentListResponse = {
|
|
15
|
+
data: AgentListData;
|
|
16
|
+
has_more: boolean;
|
|
17
|
+
next_cursor: string | null;
|
|
18
|
+
};
|
|
19
|
+
export type AgentResponse = {
|
|
20
|
+
agent_id: string;
|
|
21
|
+
create_ts: number;
|
|
22
|
+
update_ts: number;
|
|
23
|
+
agent_name: string;
|
|
24
|
+
instructions?: string | null;
|
|
25
|
+
messages?: Array<Message> | null;
|
|
26
|
+
greeting?: (TextGreeting | AudioGreeting) | null;
|
|
27
|
+
variables?: {
|
|
28
|
+
[key: string]: VariableDefinition;
|
|
29
|
+
} | null;
|
|
30
|
+
pipeline?: ResolvedCascadedPipeline | null;
|
|
31
|
+
filler_words?: FillerWords | null;
|
|
32
|
+
};
|
|
33
|
+
export type AsrInput = {
|
|
34
|
+
credential?: (ManagedCredential | PublicByokCredential) | null;
|
|
35
|
+
vendor?: string | null;
|
|
36
|
+
params?: JSONObject | null;
|
|
37
|
+
url?: string | null;
|
|
38
|
+
model?: string | null;
|
|
39
|
+
language?: string | null;
|
|
40
|
+
};
|
|
41
|
+
export type AudioGreeting = {
|
|
42
|
+
mode: "audio";
|
|
43
|
+
on?: "each_join" | "first_join";
|
|
44
|
+
delay_ms?: number;
|
|
45
|
+
url: string;
|
|
46
|
+
text: string;
|
|
47
|
+
download_timeout_ms?: number;
|
|
48
|
+
pcm_sample_rate?: number;
|
|
49
|
+
};
|
|
50
|
+
export type AvatarInput = {
|
|
51
|
+
credential?: (ManagedCredential | PublicByokCredential) | null;
|
|
52
|
+
vendor?: AvatarVendor | null;
|
|
53
|
+
params?: JSONObject | null;
|
|
54
|
+
enabled?: boolean | null;
|
|
55
|
+
};
|
|
56
|
+
export type AvatarVendor = "akool" | "liveavatar" | "anam" | "sensetime" | "spatius" | "generic";
|
|
57
|
+
export type CallPolicy = {
|
|
58
|
+
max_ring_duration_ms?: number | null;
|
|
59
|
+
max_call_duration_seconds?: number | null;
|
|
60
|
+
voicemail?: VoicemailPolicy | null;
|
|
61
|
+
max_silence_duration_ms?: number | null;
|
|
62
|
+
end_call?: SessionEndCallPolicy | null;
|
|
63
|
+
transfer?: TransferPolicy | null;
|
|
64
|
+
};
|
|
65
|
+
export type CallingDay = {
|
|
66
|
+
weekday: "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
67
|
+
ranges: Array<TimeRange>;
|
|
68
|
+
};
|
|
69
|
+
export type CampaignCallPolicy = {
|
|
70
|
+
max_ring_duration_ms?: number | null;
|
|
71
|
+
max_call_duration_seconds?: number | null;
|
|
72
|
+
voicemail?: CampaignVoicemailPolicy | null;
|
|
73
|
+
max_silence_duration_ms?: number | null;
|
|
74
|
+
end_call?: CampaignEndCallPolicy | null;
|
|
75
|
+
transfer?: CampaignTransferPolicy | null;
|
|
76
|
+
};
|
|
77
|
+
export type CampaignCounts = {
|
|
78
|
+
contacts: number;
|
|
79
|
+
pending: number;
|
|
80
|
+
calling: number;
|
|
81
|
+
completed: number;
|
|
82
|
+
failed: number;
|
|
83
|
+
canceled: number;
|
|
84
|
+
};
|
|
85
|
+
export type CampaignCreate = {
|
|
86
|
+
name: string;
|
|
87
|
+
agent_id: string;
|
|
88
|
+
transport: CampaignTransport;
|
|
89
|
+
contacts: Array<ContactInput>;
|
|
90
|
+
lifecycle?: CampaignLifecycle;
|
|
91
|
+
pacing?: Pacing;
|
|
92
|
+
schedule: ImmediateSchedule | ScheduledSchedule;
|
|
93
|
+
data_policy?: DataPolicy;
|
|
94
|
+
};
|
|
95
|
+
export type CampaignDeleteResponse = {
|
|
96
|
+
deleted?: true;
|
|
97
|
+
};
|
|
98
|
+
export type CampaignEndCallPolicy = {
|
|
99
|
+
on_conversation_complete?: boolean;
|
|
100
|
+
on_user_request?: boolean;
|
|
101
|
+
on_fax?: boolean;
|
|
102
|
+
on_ai_assistant?: boolean;
|
|
103
|
+
on_voicemail?: boolean;
|
|
104
|
+
};
|
|
105
|
+
export type CampaignFailure = {
|
|
106
|
+
code: string;
|
|
107
|
+
provider?: string | null;
|
|
108
|
+
message: string;
|
|
109
|
+
ts: number;
|
|
110
|
+
};
|
|
111
|
+
export type CampaignLifecycle = {
|
|
112
|
+
idle_timeout_ms?: number;
|
|
113
|
+
max_duration_ms?: number;
|
|
114
|
+
graceful_stop?: GracefulStop;
|
|
115
|
+
};
|
|
116
|
+
export type CampaignListData = {
|
|
117
|
+
count: number;
|
|
118
|
+
list: Array<CampaignResponse>;
|
|
119
|
+
};
|
|
120
|
+
export type CampaignListResponse = {
|
|
121
|
+
data: CampaignListData;
|
|
122
|
+
has_more: boolean;
|
|
123
|
+
next_cursor: string | null;
|
|
124
|
+
};
|
|
125
|
+
export type CampaignPatch = {
|
|
126
|
+
lifecycle?: CampaignLifecycle | null;
|
|
127
|
+
pacing?: PacingPatch | null;
|
|
128
|
+
schedule?: (ImmediateSchedule | ScheduledSchedule) | null;
|
|
129
|
+
transport?: CampaignTransportPatch | null;
|
|
130
|
+
};
|
|
131
|
+
export type CampaignResponse = {
|
|
132
|
+
campaign_id: string;
|
|
133
|
+
name: string;
|
|
134
|
+
status: "scheduled" | "running" | "paused" | "completed" | "canceled" | "failed";
|
|
135
|
+
agent_id: string;
|
|
136
|
+
transport: CampaignTransportResponse;
|
|
137
|
+
lifecycle: CampaignLifecycle;
|
|
138
|
+
schedule: ImmediateSchedule | ScheduledSchedule;
|
|
139
|
+
counts: CampaignCounts;
|
|
140
|
+
create_ts: number;
|
|
141
|
+
start_ts: number | null;
|
|
142
|
+
complete_ts: number | null;
|
|
143
|
+
failure: CampaignFailure | null;
|
|
144
|
+
};
|
|
145
|
+
export type CampaignTransferPolicy = {
|
|
146
|
+
phone_number: string;
|
|
147
|
+
description: string;
|
|
148
|
+
};
|
|
149
|
+
export type CampaignTransport = {
|
|
150
|
+
type: "telephony";
|
|
151
|
+
from: string | Array<string>;
|
|
152
|
+
call_policy?: CampaignCallPolicy | null;
|
|
153
|
+
};
|
|
154
|
+
export type CampaignTransportPatch = {
|
|
155
|
+
call_policy?: CampaignCallPolicy | null;
|
|
156
|
+
};
|
|
157
|
+
export type CampaignTransportResponse = {
|
|
158
|
+
type: "telephony";
|
|
159
|
+
from: Array<string>;
|
|
160
|
+
call_policy?: CampaignCallPolicy | null;
|
|
161
|
+
};
|
|
162
|
+
export type CampaignVoicemailPolicy = {
|
|
163
|
+
mode: "continue" | "hangup";
|
|
164
|
+
};
|
|
165
|
+
export type CascadedPipelineInput = {
|
|
166
|
+
mode: "cascaded";
|
|
167
|
+
avatar?: AvatarInput | null;
|
|
168
|
+
turn_detection?: TurnDetection | null;
|
|
169
|
+
asr?: AsrInput | null;
|
|
170
|
+
tts?: TtsInput | null;
|
|
171
|
+
llm?: LlmInput | null;
|
|
172
|
+
silence_config?: SilenceConfig | null;
|
|
173
|
+
};
|
|
174
|
+
export type ContactInput = {
|
|
175
|
+
phone: string;
|
|
176
|
+
values?: {
|
|
177
|
+
[key: string]: string | number | number | boolean;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
export type DataPolicy = {
|
|
181
|
+
retention?: "30_days" | "none";
|
|
182
|
+
};
|
|
183
|
+
export type DisabledInterruption = {
|
|
184
|
+
mode: "off";
|
|
185
|
+
when_off?: "append" | "ignore";
|
|
186
|
+
};
|
|
187
|
+
export type ErrorReason = "InvalidRequestBody" | "MissingRequiredField" | "InvalidFieldValue" | "InvalidModuleParameter" | "UnknownSecretReference" | "NotImplemented" | "InvalidPermission" | "ServiceNotEnabled" | "AccountSuspended" | "TaskNotFound" | "ResourceNotFound" | "AgentNotFound" | "NumberNotFound" | "NumberAlreadyExists" | "ResourceConflict" | "MethodNotAllowed" | "PayloadTooLarge" | "UnsupportedMediaType" | "TaskConflict" | "CampaignActive" | "CampaignInvalidState" | "CampaignNotEditable" | "IdempotencyKeyConflict" | "SecretSetAlreadyExists" | "SecretSetInUse" | "SecretSetEmpty" | "TaskNotRunning" | "RateLimitExceeded" | "PreconditionFailed" | "PreconditionRequired" | "ResourceQuotaLimitExceeded" | "ConcurrencyLimitExceeded" | "InternalError" | "ServiceUnavailable" | "ResourceAllocationFailed" | "TaskOperationTimeout";
|
|
188
|
+
export type ErrorResponse = {
|
|
189
|
+
detail: string;
|
|
190
|
+
reason: ErrorReason;
|
|
191
|
+
};
|
|
192
|
+
export type FillerTrigger = {
|
|
193
|
+
mode: "fixed_time";
|
|
194
|
+
response_wait_ms: number;
|
|
195
|
+
};
|
|
196
|
+
export type FillerWords = {
|
|
197
|
+
enable?: boolean | null;
|
|
198
|
+
trigger?: FillerTrigger | null;
|
|
199
|
+
content?: (StaticFillerContent | GeneratedFillerContent) | null;
|
|
200
|
+
};
|
|
201
|
+
export type FunctionTool = {
|
|
202
|
+
type: "function";
|
|
203
|
+
name: string;
|
|
204
|
+
description: string;
|
|
205
|
+
parameters: JSONObject;
|
|
206
|
+
execution: ToolExecution;
|
|
207
|
+
server: ToolServer;
|
|
208
|
+
};
|
|
209
|
+
export type GeneratedFillerContent = {
|
|
210
|
+
mode: "generated";
|
|
211
|
+
instructions: string;
|
|
212
|
+
fallback_strategy?: "static" | null;
|
|
213
|
+
};
|
|
214
|
+
export type GracefulStop = {
|
|
215
|
+
enabled?: boolean;
|
|
216
|
+
timeout_ms?: number;
|
|
217
|
+
};
|
|
218
|
+
export type ImmediateSchedule = {
|
|
219
|
+
mode: "immediate";
|
|
220
|
+
timezone?: string;
|
|
221
|
+
days?: Array<CallingDay>;
|
|
222
|
+
};
|
|
223
|
+
export type InboundCallPolicy = {
|
|
224
|
+
max_call_duration_seconds?: number | null;
|
|
225
|
+
max_silence_duration_ms?: number | null;
|
|
226
|
+
end_call?: InboundEndCallPolicy | null;
|
|
227
|
+
transfer?: TransferPolicy | null;
|
|
228
|
+
};
|
|
229
|
+
export type InboundInput = {
|
|
230
|
+
agent: string | null;
|
|
231
|
+
call_policy?: InboundCallPolicy | null;
|
|
232
|
+
};
|
|
233
|
+
export type InboundOutput = {
|
|
234
|
+
agent: string | null;
|
|
235
|
+
call_policy?: InboundCallPolicy | null;
|
|
236
|
+
};
|
|
237
|
+
export type JSONObject = {
|
|
238
|
+
[key: string]: JsonValue;
|
|
239
|
+
};
|
|
240
|
+
export type JsonValue = unknown;
|
|
241
|
+
export type KeywordInterruption = {
|
|
242
|
+
mode: "keywords";
|
|
243
|
+
keywords: Array<string>;
|
|
244
|
+
};
|
|
245
|
+
export type Lifecycle = {
|
|
246
|
+
idle_timeout_ms?: number;
|
|
247
|
+
max_duration_ms?: number;
|
|
248
|
+
graceful_stop?: GracefulStop | null;
|
|
249
|
+
};
|
|
250
|
+
export type LlmInput = {
|
|
251
|
+
mcp_servers?: Array<McpServer> | null;
|
|
252
|
+
tools?: Array<FunctionTool> | null;
|
|
253
|
+
credential?: (ManagedCredential | PublicByokCredential) | null;
|
|
254
|
+
vendor?: string | null;
|
|
255
|
+
params?: JSONObject | null;
|
|
256
|
+
url?: string | null;
|
|
257
|
+
style?: string | null;
|
|
258
|
+
model?: string | null;
|
|
259
|
+
headers?: {
|
|
260
|
+
[key: string]: string;
|
|
261
|
+
} | null;
|
|
262
|
+
input_modalities?: Array<string> | null;
|
|
263
|
+
output_modalities?: Array<string> | null;
|
|
264
|
+
max_history?: number | null;
|
|
265
|
+
failure_message?: string | null;
|
|
266
|
+
};
|
|
267
|
+
export type ManagedCredential = {
|
|
268
|
+
mode: "managed";
|
|
269
|
+
};
|
|
270
|
+
export type ManualTurnBoundary = {
|
|
271
|
+
type: "manual";
|
|
272
|
+
};
|
|
273
|
+
export type McpServer = {
|
|
274
|
+
name: string;
|
|
275
|
+
endpoint: string;
|
|
276
|
+
transport: "streamable_http";
|
|
277
|
+
headers?: {
|
|
278
|
+
[key: string]: string;
|
|
279
|
+
} | null;
|
|
280
|
+
allowed_tools?: Array<string> | null;
|
|
281
|
+
timeout_ms?: number | null;
|
|
282
|
+
};
|
|
283
|
+
export type Message = {
|
|
284
|
+
role: "system" | "user" | "assistant";
|
|
285
|
+
content: string;
|
|
286
|
+
};
|
|
287
|
+
export type NumberCreate = {
|
|
288
|
+
number: string;
|
|
289
|
+
description?: string | null;
|
|
290
|
+
sip_trunk: SipTrunkInput;
|
|
291
|
+
inbound?: InboundInput | null;
|
|
292
|
+
};
|
|
293
|
+
export type NumberDeleteResponse = {
|
|
294
|
+
deleted?: true;
|
|
295
|
+
};
|
|
296
|
+
export type NumberListData = {
|
|
297
|
+
count: number;
|
|
298
|
+
list: Array<NumberResponse>;
|
|
299
|
+
};
|
|
300
|
+
export type NumberListResponse = {
|
|
301
|
+
data: NumberListData;
|
|
302
|
+
has_more: boolean;
|
|
303
|
+
next_cursor: string | null;
|
|
304
|
+
};
|
|
305
|
+
export type NumberPatch = {
|
|
306
|
+
number?: string | null;
|
|
307
|
+
description?: string | null;
|
|
308
|
+
sip_trunk?: SipTrunkInput | null;
|
|
309
|
+
inbound?: InboundInput | null;
|
|
310
|
+
};
|
|
311
|
+
export type NumberResponse = {
|
|
312
|
+
number_id: string;
|
|
313
|
+
number: string;
|
|
314
|
+
description?: string | null;
|
|
315
|
+
sip_trunk?: SipTrunkOutput | null;
|
|
316
|
+
inbound?: InboundOutput | null;
|
|
317
|
+
create_ts: number;
|
|
318
|
+
};
|
|
319
|
+
export type Pacing = {
|
|
320
|
+
max_concurrent?: number;
|
|
321
|
+
max_calls_per_second?: number | null;
|
|
322
|
+
};
|
|
323
|
+
export type PacingPatch = {
|
|
324
|
+
max_concurrent?: number | null;
|
|
325
|
+
max_calls_per_second?: number | null;
|
|
326
|
+
};
|
|
327
|
+
export type PublicAgentInput = {
|
|
328
|
+
instructions?: string | null;
|
|
329
|
+
messages?: Array<Message> | null;
|
|
330
|
+
greeting?: (TextGreeting | AudioGreeting) | null;
|
|
331
|
+
variables?: {
|
|
332
|
+
[key: string]: VariableDefinition;
|
|
333
|
+
} | null;
|
|
334
|
+
pipeline?: CascadedPipelineInput | null;
|
|
335
|
+
filler_words?: FillerWords | null;
|
|
336
|
+
};
|
|
337
|
+
export type PublicByokCredential = {
|
|
338
|
+
mode: "byok";
|
|
339
|
+
fields: {
|
|
340
|
+
[key: string]: string;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
export type PublicEphemeralSessionCreate = {
|
|
344
|
+
agent: PublicAgentInput;
|
|
345
|
+
values?: {
|
|
346
|
+
[key: string]: string | number | number | boolean;
|
|
347
|
+
} | null;
|
|
348
|
+
labels?: {
|
|
349
|
+
[key: string]: string;
|
|
350
|
+
} | null;
|
|
351
|
+
transport: RtcTransport | TelephonyTransport;
|
|
352
|
+
lifecycle?: Lifecycle | null;
|
|
353
|
+
data_policy?: DataPolicy | null;
|
|
354
|
+
};
|
|
355
|
+
export type ResolvedAsr = {
|
|
356
|
+
credential?: ResolvedCredential | null;
|
|
357
|
+
url?: string | null;
|
|
358
|
+
vendor?: string | null;
|
|
359
|
+
model?: string | null;
|
|
360
|
+
language?: string | null;
|
|
361
|
+
params?: {
|
|
362
|
+
[key: string]: JsonValue;
|
|
363
|
+
} | null;
|
|
364
|
+
};
|
|
365
|
+
export type ResolvedAvatar = {
|
|
366
|
+
enabled?: boolean | null;
|
|
367
|
+
credential?: ResolvedCredential | null;
|
|
368
|
+
vendor?: string | null;
|
|
369
|
+
params?: {
|
|
370
|
+
[key: string]: JsonValue;
|
|
371
|
+
} | null;
|
|
372
|
+
};
|
|
373
|
+
export type ResolvedCascadedPipeline = {
|
|
374
|
+
mode: "cascaded";
|
|
375
|
+
avatar?: ResolvedAvatar | null;
|
|
376
|
+
turn_detection?: TurnDetection | null;
|
|
377
|
+
asr?: ResolvedAsr | null;
|
|
378
|
+
tts?: ResolvedTts | null;
|
|
379
|
+
llm?: ResolvedLlm | null;
|
|
380
|
+
silence_config?: SilenceConfig | null;
|
|
381
|
+
};
|
|
382
|
+
export type ResolvedCredential = {
|
|
383
|
+
mode: "managed" | "byok";
|
|
384
|
+
};
|
|
385
|
+
export type ResolvedLlm = {
|
|
386
|
+
credential?: ResolvedCredential | null;
|
|
387
|
+
url?: string | null;
|
|
388
|
+
vendor?: string | null;
|
|
389
|
+
style?: string | null;
|
|
390
|
+
model?: string | null;
|
|
391
|
+
params?: {
|
|
392
|
+
[key: string]: JsonValue;
|
|
393
|
+
} | null;
|
|
394
|
+
input_modalities?: Array<string> | null;
|
|
395
|
+
output_modalities?: Array<string> | null;
|
|
396
|
+
max_history?: number | null;
|
|
397
|
+
failure_message?: string | null;
|
|
398
|
+
mcp_servers?: Array<McpServer> | null;
|
|
399
|
+
tools?: Array<FunctionTool> | null;
|
|
400
|
+
};
|
|
401
|
+
export type ResolvedTts = {
|
|
402
|
+
credential?: ResolvedCredential | null;
|
|
403
|
+
url?: string | null;
|
|
404
|
+
vendor?: string | null;
|
|
405
|
+
model?: string | null;
|
|
406
|
+
params?: {
|
|
407
|
+
[key: string]: JsonValue;
|
|
408
|
+
} | null;
|
|
409
|
+
skip_patterns?: Array<string> | null;
|
|
410
|
+
};
|
|
411
|
+
export type RtcEncryption = {
|
|
412
|
+
mode: "aes_128_xts" | "aes_128_ecb" | "aes_256_xts" | "sm4_128_ecb" | "aes_128_gcm" | "aes_256_gcm" | "aes_128_gcm2" | "aes_256_gcm2";
|
|
413
|
+
key: string;
|
|
414
|
+
salt?: string | null;
|
|
415
|
+
};
|
|
416
|
+
export type RtcTransport = {
|
|
417
|
+
type: "rtc";
|
|
418
|
+
channel: string;
|
|
419
|
+
token?: string | null;
|
|
420
|
+
uid?: string;
|
|
421
|
+
subscribe_uids: Array<string>;
|
|
422
|
+
encryption?: RtcEncryption | null;
|
|
423
|
+
audio_scenario?: "aiserver" | "chorus";
|
|
424
|
+
};
|
|
425
|
+
export type ScheduledSchedule = {
|
|
426
|
+
mode: "scheduled";
|
|
427
|
+
timezone: string;
|
|
428
|
+
start: string;
|
|
429
|
+
end: string;
|
|
430
|
+
days?: Array<CallingDay>;
|
|
431
|
+
};
|
|
432
|
+
export type SecretCreate = {
|
|
433
|
+
name: string;
|
|
434
|
+
secrets: {
|
|
435
|
+
[key: string]: string;
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
export type SecretDeleted = {
|
|
439
|
+
deleted: true;
|
|
440
|
+
};
|
|
441
|
+
export type SecretKey = {
|
|
442
|
+
key: string;
|
|
443
|
+
create_ts?: number;
|
|
444
|
+
update_ts?: number;
|
|
445
|
+
};
|
|
446
|
+
export type SecretKeyWrite = {
|
|
447
|
+
value: string;
|
|
448
|
+
};
|
|
449
|
+
export type SecretList = {
|
|
450
|
+
data: SecretPage;
|
|
451
|
+
has_more: boolean;
|
|
452
|
+
next_cursor: string | null;
|
|
453
|
+
};
|
|
454
|
+
export type SecretPage = {
|
|
455
|
+
count: number;
|
|
456
|
+
list: Array<SecretSet>;
|
|
457
|
+
};
|
|
458
|
+
export type SecretReplace = {
|
|
459
|
+
secrets: {
|
|
460
|
+
[key: string]: string;
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
export type SecretSet = {
|
|
464
|
+
name: string;
|
|
465
|
+
keys: Array<string | SecretKey>;
|
|
466
|
+
create_ts: number;
|
|
467
|
+
update_ts: number;
|
|
468
|
+
};
|
|
469
|
+
export type SecretUpdate = {
|
|
470
|
+
secrets: {
|
|
471
|
+
[key: string]: (string | null) | null;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
export type SemanticTurnEnd = {
|
|
475
|
+
type: "semantic";
|
|
476
|
+
silence_duration_ms?: number | null;
|
|
477
|
+
max_wait_ms?: number | -1 | null;
|
|
478
|
+
pause_state_enabled?: boolean | null;
|
|
479
|
+
};
|
|
480
|
+
export type SemanticTurnStart = {
|
|
481
|
+
type: "semantic";
|
|
482
|
+
speaking_interrupt_duration_ms?: number | null;
|
|
483
|
+
};
|
|
484
|
+
export type SessionAgentOverridesPatch = {
|
|
485
|
+
messages?: Array<Message>;
|
|
486
|
+
pipeline?: SessionPipelinePatch;
|
|
487
|
+
};
|
|
488
|
+
export type SessionAgentPatch = {
|
|
489
|
+
overrides?: SessionAgentOverridesPatch;
|
|
490
|
+
};
|
|
491
|
+
export type SessionCreate = {
|
|
492
|
+
agent_id: string;
|
|
493
|
+
values?: {
|
|
494
|
+
[key: string]: string | number | number | boolean;
|
|
495
|
+
} | null;
|
|
496
|
+
labels?: {
|
|
497
|
+
[key: string]: string;
|
|
498
|
+
} | null;
|
|
499
|
+
transport: RtcTransport | TelephonyTransport;
|
|
500
|
+
lifecycle?: Lifecycle | null;
|
|
501
|
+
data_policy?: DataPolicy | null;
|
|
502
|
+
};
|
|
503
|
+
export type SessionData = {
|
|
504
|
+
count: number;
|
|
505
|
+
list: Array<SessionSummary>;
|
|
506
|
+
};
|
|
507
|
+
export type SessionList = {
|
|
508
|
+
data: SessionData;
|
|
509
|
+
has_more: boolean;
|
|
510
|
+
next_cursor: string | null;
|
|
511
|
+
};
|
|
512
|
+
export type SessionModulePatch = {
|
|
513
|
+
params?: {
|
|
514
|
+
[key: string]: JsonValue;
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
export type SessionPatch = {
|
|
518
|
+
transport?: SessionTransportPatch;
|
|
519
|
+
agent?: SessionAgentPatch;
|
|
520
|
+
};
|
|
521
|
+
export type SessionPipelinePatch = {
|
|
522
|
+
llm?: SessionModulePatch;
|
|
523
|
+
};
|
|
524
|
+
export type SessionResponse = {
|
|
525
|
+
agent_session_id: string;
|
|
526
|
+
agent_name?: string;
|
|
527
|
+
start_ts: number;
|
|
528
|
+
status: "IDLE" | "STARTING" | "RUNNING" | "STOPPING" | "STOPPED" | "FAILED";
|
|
529
|
+
stop_ts?: number | null;
|
|
530
|
+
message?: string | null;
|
|
531
|
+
analysis?: SessionAnalysis | null;
|
|
532
|
+
};
|
|
533
|
+
export type SessionStartResponse = {
|
|
534
|
+
agent_session_id: string;
|
|
535
|
+
create_ts: number;
|
|
536
|
+
status: "STARTING" | "RUNNING";
|
|
537
|
+
};
|
|
538
|
+
export type SessionStopResponse = Record<string, unknown>;
|
|
539
|
+
export type SessionSummary = {
|
|
540
|
+
agent_session_id: string;
|
|
541
|
+
start_ts: number;
|
|
542
|
+
status: "IDLE" | "STARTING" | "RUNNING" | "STOPPING" | "STOPPED" | "FAILED";
|
|
543
|
+
};
|
|
544
|
+
export type SessionTransportPatch = {
|
|
545
|
+
token: string;
|
|
546
|
+
};
|
|
547
|
+
export type SessionUpdateResponse = {
|
|
548
|
+
agent_session_id: string;
|
|
549
|
+
create_ts: number;
|
|
550
|
+
status: "IDLE" | "STARTING" | "RUNNING" | "STOPPING" | "STOPPED" | "FAILED";
|
|
551
|
+
};
|
|
552
|
+
export type SilenceConfig = {
|
|
553
|
+
enabled: boolean;
|
|
554
|
+
timeout_ms: number;
|
|
555
|
+
action: "speak" | "think";
|
|
556
|
+
content: string;
|
|
557
|
+
};
|
|
558
|
+
export type SipAuth = {
|
|
559
|
+
username: string;
|
|
560
|
+
password: string;
|
|
561
|
+
};
|
|
562
|
+
export type SipTrunkInput = {
|
|
563
|
+
name?: string | null;
|
|
564
|
+
hostname: string;
|
|
565
|
+
port?: number | null;
|
|
566
|
+
transport?: "udp" | "tcp" | "tls";
|
|
567
|
+
auth?: SipAuth | null;
|
|
568
|
+
allowed_ips?: Array<string> | null;
|
|
569
|
+
};
|
|
570
|
+
export type SipTrunkOutput = {
|
|
571
|
+
name?: string | null;
|
|
572
|
+
hostname: string;
|
|
573
|
+
port: number;
|
|
574
|
+
transport: "udp" | "tcp" | "tls";
|
|
575
|
+
allowed_ips?: Array<string> | null;
|
|
576
|
+
};
|
|
577
|
+
export type SkipPattern = "fullwidth_parentheses" | "lenticular_brackets" | "parentheses" | "square_brackets" | "curly_braces";
|
|
578
|
+
export type SpeechInterruption = {
|
|
579
|
+
mode: "start_of_speech";
|
|
580
|
+
};
|
|
581
|
+
export type StaticFillerContent = {
|
|
582
|
+
mode: "static";
|
|
583
|
+
phrases: Array<string>;
|
|
584
|
+
selection_rule?: "shuffle" | "round_robin";
|
|
585
|
+
};
|
|
586
|
+
export type TelephonyTransport = {
|
|
587
|
+
type: "telephony";
|
|
588
|
+
from: string;
|
|
589
|
+
to: string;
|
|
590
|
+
call_policy?: CallPolicy | null;
|
|
591
|
+
};
|
|
592
|
+
export type TextGreeting = {
|
|
593
|
+
mode: "text";
|
|
594
|
+
on?: "each_join" | "first_join";
|
|
595
|
+
delay_ms?: number;
|
|
596
|
+
text: string;
|
|
597
|
+
};
|
|
598
|
+
export type TimeRange = {
|
|
599
|
+
start: string;
|
|
600
|
+
end: string;
|
|
601
|
+
};
|
|
602
|
+
export type ToolExecution = {
|
|
603
|
+
mode: "sync";
|
|
604
|
+
};
|
|
605
|
+
export type ToolServer = {
|
|
606
|
+
method: "GET" | "POST";
|
|
607
|
+
url: string;
|
|
608
|
+
headers?: {
|
|
609
|
+
[key: string]: string;
|
|
610
|
+
} | null;
|
|
611
|
+
body?: JSONObject | null;
|
|
612
|
+
timeout_ms?: number | null;
|
|
613
|
+
};
|
|
614
|
+
export type TransferPolicy = {
|
|
615
|
+
phone_number: string;
|
|
616
|
+
description: string;
|
|
617
|
+
};
|
|
618
|
+
export type TtsInput = {
|
|
619
|
+
skip_patterns?: Array<SkipPattern> | null;
|
|
620
|
+
credential?: (ManagedCredential | PublicByokCredential) | null;
|
|
621
|
+
vendor?: string | null;
|
|
622
|
+
params?: JSONObject | null;
|
|
623
|
+
url?: string | null;
|
|
624
|
+
headers?: {
|
|
625
|
+
[key: string]: string;
|
|
626
|
+
} | null;
|
|
627
|
+
};
|
|
628
|
+
export type TurnDetection = {
|
|
629
|
+
speech_threshold?: number | number | null;
|
|
630
|
+
start_of_speech?: (SemanticTurnStart | VadTurnStart | ManualTurnBoundary) | null;
|
|
631
|
+
end_of_speech?: (SemanticTurnEnd | VadTurnEnd | ManualTurnBoundary) | null;
|
|
632
|
+
interruption?: (SpeechInterruption | KeywordInterruption | DisabledInterruption) | null;
|
|
633
|
+
};
|
|
634
|
+
export type VadTurnEnd = {
|
|
635
|
+
type: "vad";
|
|
636
|
+
silence_duration_ms?: number | null;
|
|
637
|
+
};
|
|
638
|
+
export type VadTurnStart = {
|
|
639
|
+
type: "vad";
|
|
640
|
+
interrupt_duration_ms?: number | null;
|
|
641
|
+
speaking_interrupt_duration_ms?: number | null;
|
|
642
|
+
prefix_padding_ms?: number | null;
|
|
643
|
+
};
|
|
644
|
+
export type VariableDefinition = {
|
|
645
|
+
type: "str" | "int" | "float" | "bool" | "date" | "datetime";
|
|
646
|
+
required?: boolean;
|
|
647
|
+
options?: Array<string | number | number | boolean> | null;
|
|
648
|
+
extract?: boolean;
|
|
649
|
+
description?: string | null;
|
|
650
|
+
};
|
|
651
|
+
export type VoicemailPolicy = {
|
|
652
|
+
mode: "continue" | "hangup";
|
|
653
|
+
};
|
|
654
|
+
export type AgentRequest_AgentCreateInput = {
|
|
655
|
+
agent_name: string;
|
|
656
|
+
instructions?: string | null;
|
|
657
|
+
messages?: Array<AgentRequest_Message> | null;
|
|
658
|
+
greeting?: (AgentRequest_TextGreeting | AgentRequest_AudioGreeting) | null;
|
|
659
|
+
variables?: {
|
|
660
|
+
[key: string]: AgentRequest_VariableDefinition;
|
|
661
|
+
} | null;
|
|
662
|
+
pipeline?: AgentRequest_CascadedPipelineInput | null;
|
|
663
|
+
filler_words?: AgentRequest_FillerWords | null;
|
|
664
|
+
};
|
|
665
|
+
export type AgentRequest_AgentPatch = {
|
|
666
|
+
agent_name?: string | null;
|
|
667
|
+
instructions?: string | null;
|
|
668
|
+
messages?: Array<AgentRequest_Message> | null;
|
|
669
|
+
greeting?: AgentRequest_GreetingPatch | null;
|
|
670
|
+
variables?: {
|
|
671
|
+
[key: string]: AgentRequest_VariableDefinitionPatch | null;
|
|
672
|
+
} | null;
|
|
673
|
+
pipeline?: AgentRequest_CascadedPipelinePatch | null;
|
|
674
|
+
filler_words?: AgentRequest_FillerWordsPatch | null;
|
|
675
|
+
};
|
|
676
|
+
export type AgentRequest_AsrInput = {
|
|
677
|
+
credential?: (AgentRequest_ManagedCredential | AgentRequest_PublicByokCredential) | null;
|
|
678
|
+
vendor?: string | null;
|
|
679
|
+
params?: AgentRequest_JSONObject | null;
|
|
680
|
+
url?: string | null;
|
|
681
|
+
model?: string | null;
|
|
682
|
+
language?: string | null;
|
|
683
|
+
};
|
|
684
|
+
export type AgentRequest_AsrPatch = {
|
|
685
|
+
credential?: AgentRequest_PublicCredentialPatch | null;
|
|
686
|
+
vendor?: string | null;
|
|
687
|
+
params?: AgentRequest_JSONObject | null;
|
|
688
|
+
url?: string | null;
|
|
689
|
+
model?: string | null;
|
|
690
|
+
language?: string | null;
|
|
691
|
+
};
|
|
692
|
+
export type AgentRequest_AudioGreeting = {
|
|
693
|
+
mode: "audio";
|
|
694
|
+
on?: "each_join" | "first_join";
|
|
695
|
+
delay_ms?: number;
|
|
696
|
+
url: string;
|
|
697
|
+
text: string;
|
|
698
|
+
download_timeout_ms?: number;
|
|
699
|
+
pcm_sample_rate?: number;
|
|
700
|
+
};
|
|
701
|
+
export type AgentRequest_AvatarInput = {
|
|
702
|
+
credential?: (AgentRequest_ManagedCredential | AgentRequest_PublicByokCredential) | null;
|
|
703
|
+
vendor?: AgentRequest_AvatarVendor | null;
|
|
704
|
+
params?: AgentRequest_JSONObject | null;
|
|
705
|
+
enabled?: boolean | null;
|
|
706
|
+
};
|
|
707
|
+
export type AgentRequest_AvatarPatch = {
|
|
708
|
+
credential?: AgentRequest_PublicCredentialPatch | null;
|
|
709
|
+
vendor?: AgentRequest_AvatarVendor | null;
|
|
710
|
+
params?: AgentRequest_JSONObject | null;
|
|
711
|
+
enabled?: boolean | null;
|
|
712
|
+
};
|
|
713
|
+
export type AgentRequest_AvatarVendor = "akool" | "liveavatar" | "anam" | "sensetime" | "spatius" | "generic";
|
|
714
|
+
export type AgentRequest_CascadedPipelineInput = {
|
|
715
|
+
mode: "cascaded";
|
|
716
|
+
avatar?: AgentRequest_AvatarInput | null;
|
|
717
|
+
turn_detection?: AgentRequest_TurnDetection | null;
|
|
718
|
+
asr?: AgentRequest_AsrInput | null;
|
|
719
|
+
tts?: AgentRequest_TtsInput | null;
|
|
720
|
+
llm?: AgentRequest_LlmInput | null;
|
|
721
|
+
silence_config?: AgentRequest_SilenceConfig | null;
|
|
722
|
+
};
|
|
723
|
+
export type AgentRequest_CascadedPipelinePatch = {
|
|
724
|
+
mode?: "cascaded" | null;
|
|
725
|
+
avatar?: AgentRequest_AvatarPatch | null;
|
|
726
|
+
turn_detection?: AgentRequest_CascadedTurnDetectionPatch | null;
|
|
727
|
+
asr?: AgentRequest_AsrPatch | null;
|
|
728
|
+
tts?: AgentRequest_TtsPatch | null;
|
|
729
|
+
llm?: AgentRequest_LlmPatch | null;
|
|
730
|
+
silence_config?: AgentRequest_SilenceConfigPatch | null;
|
|
731
|
+
};
|
|
732
|
+
export type AgentRequest_CascadedTurnDetectionPatch = {
|
|
733
|
+
speech_threshold?: number | number | null;
|
|
734
|
+
start_of_speech?: AgentRequest_TurnBoundaryPatch | null;
|
|
735
|
+
end_of_speech?: AgentRequest_TurnBoundaryPatch | null;
|
|
736
|
+
interruption?: AgentRequest_InterruptionPatch | null;
|
|
737
|
+
};
|
|
738
|
+
export type AgentRequest_DisabledInterruption = {
|
|
739
|
+
mode: "off";
|
|
740
|
+
when_off?: "append" | "ignore";
|
|
741
|
+
};
|
|
742
|
+
export type AgentRequest_FillerContentPatch = {
|
|
743
|
+
mode?: "static" | "generated" | null;
|
|
744
|
+
phrases?: Array<string> | null;
|
|
745
|
+
selection_rule?: "shuffle" | "round_robin" | null;
|
|
746
|
+
instructions?: string | null;
|
|
747
|
+
fallback_strategy?: "static" | null;
|
|
748
|
+
};
|
|
749
|
+
export type AgentRequest_FillerTrigger = {
|
|
750
|
+
mode: "fixed_time";
|
|
751
|
+
response_wait_ms: number;
|
|
752
|
+
};
|
|
753
|
+
export type AgentRequest_FillerTriggerPatch = {
|
|
754
|
+
mode?: "fixed_time" | null;
|
|
755
|
+
response_wait_ms?: number | null;
|
|
756
|
+
};
|
|
757
|
+
export type AgentRequest_FillerWords = {
|
|
758
|
+
enable?: boolean | null;
|
|
759
|
+
trigger?: AgentRequest_FillerTrigger | null;
|
|
760
|
+
content?: (AgentRequest_StaticFillerContent | AgentRequest_GeneratedFillerContent) | null;
|
|
761
|
+
};
|
|
762
|
+
export type AgentRequest_FillerWordsPatch = {
|
|
763
|
+
enable?: boolean | null;
|
|
764
|
+
trigger?: AgentRequest_FillerTriggerPatch | null;
|
|
765
|
+
content?: AgentRequest_FillerContentPatch | null;
|
|
766
|
+
};
|
|
767
|
+
export type AgentRequest_FunctionTool = {
|
|
768
|
+
type: "function";
|
|
769
|
+
name: string;
|
|
770
|
+
description: string;
|
|
771
|
+
parameters: AgentRequest_JSONObject;
|
|
772
|
+
execution: AgentRequest_ToolExecution;
|
|
773
|
+
server: AgentRequest_ToolServer;
|
|
774
|
+
};
|
|
775
|
+
export type AgentRequest_GeneratedFillerContent = {
|
|
776
|
+
mode: "generated";
|
|
777
|
+
instructions: string;
|
|
778
|
+
fallback_strategy?: "static" | null;
|
|
779
|
+
};
|
|
780
|
+
export type AgentRequest_GreetingPatch = {
|
|
781
|
+
mode?: "text" | "audio" | null;
|
|
782
|
+
on?: "each_join" | "first_join" | null;
|
|
783
|
+
delay_ms?: number | null;
|
|
784
|
+
url?: string | null;
|
|
785
|
+
text?: string | null;
|
|
786
|
+
download_timeout_ms?: number | null;
|
|
787
|
+
pcm_sample_rate?: number | null;
|
|
788
|
+
};
|
|
789
|
+
export type AgentRequest_InterruptionPatch = {
|
|
790
|
+
mode?: "start_of_speech" | "keywords" | "off" | null;
|
|
791
|
+
keywords?: Array<string> | null;
|
|
792
|
+
when_off?: "append" | "ignore" | null;
|
|
793
|
+
};
|
|
794
|
+
export type AgentRequest_JSONObject = {
|
|
795
|
+
[key: string]: AgentRequest_JsonValue;
|
|
796
|
+
};
|
|
797
|
+
export type AgentRequest_JsonValue = unknown;
|
|
798
|
+
export type AgentRequest_KeywordInterruption = {
|
|
799
|
+
mode: "keywords";
|
|
800
|
+
keywords: Array<string>;
|
|
801
|
+
};
|
|
802
|
+
export type AgentRequest_LlmInput = {
|
|
803
|
+
mcp_servers?: Array<AgentRequest_McpServer> | null;
|
|
804
|
+
tools?: Array<AgentRequest_FunctionTool> | null;
|
|
805
|
+
credential?: (AgentRequest_ManagedCredential | AgentRequest_PublicByokCredential) | null;
|
|
806
|
+
vendor?: string | null;
|
|
807
|
+
params?: AgentRequest_JSONObject | null;
|
|
808
|
+
url?: string | null;
|
|
809
|
+
style?: string | null;
|
|
810
|
+
model?: string | null;
|
|
811
|
+
headers?: {
|
|
812
|
+
[key: string]: string;
|
|
813
|
+
} | null;
|
|
814
|
+
input_modalities?: Array<string> | null;
|
|
815
|
+
output_modalities?: Array<string> | null;
|
|
816
|
+
max_history?: number | null;
|
|
817
|
+
failure_message?: string | null;
|
|
818
|
+
};
|
|
819
|
+
export type AgentRequest_LlmPatch = {
|
|
820
|
+
mcp_servers?: Array<AgentRequest_McpServer> | null;
|
|
821
|
+
tools?: Array<AgentRequest_FunctionTool> | null;
|
|
822
|
+
credential?: AgentRequest_PublicCredentialPatch | null;
|
|
823
|
+
vendor?: string | null;
|
|
824
|
+
params?: AgentRequest_JSONObject | null;
|
|
825
|
+
url?: string | null;
|
|
826
|
+
style?: string | null;
|
|
827
|
+
model?: string | null;
|
|
828
|
+
headers?: {
|
|
829
|
+
[key: string]: string;
|
|
830
|
+
} | null;
|
|
831
|
+
input_modalities?: Array<string> | null;
|
|
832
|
+
output_modalities?: Array<string> | null;
|
|
833
|
+
max_history?: number | null;
|
|
834
|
+
failure_message?: string | null;
|
|
835
|
+
};
|
|
836
|
+
export type AgentRequest_ManagedCredential = {
|
|
837
|
+
mode: "managed";
|
|
838
|
+
};
|
|
839
|
+
export type AgentRequest_ManualTurnBoundary = {
|
|
840
|
+
type: "manual";
|
|
841
|
+
};
|
|
842
|
+
export type AgentRequest_McpServer = {
|
|
843
|
+
name: string;
|
|
844
|
+
endpoint: string;
|
|
845
|
+
transport: "streamable_http";
|
|
846
|
+
headers?: {
|
|
847
|
+
[key: string]: string;
|
|
848
|
+
} | null;
|
|
849
|
+
allowed_tools?: Array<string> | null;
|
|
850
|
+
timeout_ms?: number | null;
|
|
851
|
+
};
|
|
852
|
+
export type AgentRequest_Message = {
|
|
853
|
+
role: "system" | "user" | "assistant";
|
|
854
|
+
content: string;
|
|
855
|
+
};
|
|
856
|
+
export type AgentRequest_PublicByokCredential = {
|
|
857
|
+
mode: "byok";
|
|
858
|
+
fields: {
|
|
859
|
+
[key: string]: string;
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
export type AgentRequest_PublicCredentialPatch = {
|
|
863
|
+
mode?: "managed" | "byok" | null;
|
|
864
|
+
fields?: {
|
|
865
|
+
[key: string]: string | null;
|
|
866
|
+
} | null;
|
|
867
|
+
};
|
|
868
|
+
export type AgentRequest_SemanticTurnEnd = {
|
|
869
|
+
type: "semantic";
|
|
870
|
+
silence_duration_ms?: number | null;
|
|
871
|
+
max_wait_ms?: number | -1 | null;
|
|
872
|
+
pause_state_enabled?: boolean | null;
|
|
873
|
+
};
|
|
874
|
+
export type AgentRequest_SemanticTurnStart = {
|
|
875
|
+
type: "semantic";
|
|
876
|
+
speaking_interrupt_duration_ms?: number | null;
|
|
877
|
+
};
|
|
878
|
+
export type AgentRequest_SilenceConfig = {
|
|
879
|
+
enabled: boolean;
|
|
880
|
+
timeout_ms: number;
|
|
881
|
+
action: "speak" | "think";
|
|
882
|
+
content: string;
|
|
883
|
+
};
|
|
884
|
+
export type AgentRequest_SilenceConfigPatch = {
|
|
885
|
+
enabled?: boolean | null;
|
|
886
|
+
timeout_ms?: number | null;
|
|
887
|
+
action?: "speak" | "think" | null;
|
|
888
|
+
content?: string | null;
|
|
889
|
+
};
|
|
890
|
+
export type AgentRequest_SkipPattern = "fullwidth_parentheses" | "lenticular_brackets" | "parentheses" | "square_brackets" | "curly_braces";
|
|
891
|
+
export type AgentRequest_SpeechInterruption = {
|
|
892
|
+
mode: "start_of_speech";
|
|
893
|
+
};
|
|
894
|
+
export type AgentRequest_StaticFillerContent = {
|
|
895
|
+
mode: "static";
|
|
896
|
+
phrases: Array<string>;
|
|
897
|
+
selection_rule?: "shuffle" | "round_robin";
|
|
898
|
+
};
|
|
899
|
+
export type AgentRequest_TextGreeting = {
|
|
900
|
+
mode: "text";
|
|
901
|
+
on?: "each_join" | "first_join";
|
|
902
|
+
delay_ms?: number;
|
|
903
|
+
text: string;
|
|
904
|
+
};
|
|
905
|
+
export type AgentRequest_ToolExecution = {
|
|
906
|
+
mode: "sync";
|
|
907
|
+
};
|
|
908
|
+
export type AgentRequest_ToolServer = {
|
|
909
|
+
method: "GET" | "POST";
|
|
910
|
+
url: string;
|
|
911
|
+
headers?: {
|
|
912
|
+
[key: string]: string;
|
|
913
|
+
} | null;
|
|
914
|
+
body?: AgentRequest_JSONObject | null;
|
|
915
|
+
timeout_ms?: number | null;
|
|
916
|
+
};
|
|
917
|
+
export type AgentRequest_TtsInput = {
|
|
918
|
+
skip_patterns?: Array<AgentRequest_SkipPattern> | null;
|
|
919
|
+
credential?: (AgentRequest_ManagedCredential | AgentRequest_PublicByokCredential) | null;
|
|
920
|
+
vendor?: string | null;
|
|
921
|
+
params?: AgentRequest_JSONObject | null;
|
|
922
|
+
url?: string | null;
|
|
923
|
+
headers?: {
|
|
924
|
+
[key: string]: string;
|
|
925
|
+
} | null;
|
|
926
|
+
};
|
|
927
|
+
export type AgentRequest_TtsPatch = {
|
|
928
|
+
skip_patterns?: Array<AgentRequest_SkipPattern> | null;
|
|
929
|
+
credential?: AgentRequest_PublicCredentialPatch | null;
|
|
930
|
+
vendor?: string | null;
|
|
931
|
+
params?: AgentRequest_JSONObject | null;
|
|
932
|
+
url?: string | null;
|
|
933
|
+
headers?: {
|
|
934
|
+
[key: string]: string;
|
|
935
|
+
} | null;
|
|
936
|
+
};
|
|
937
|
+
export type AgentRequest_TurnBoundaryPatch = {
|
|
938
|
+
type?: "semantic" | "vad" | "manual" | null;
|
|
939
|
+
interrupt_duration_ms?: number | null;
|
|
940
|
+
speaking_interrupt_duration_ms?: number | null;
|
|
941
|
+
prefix_padding_ms?: number | null;
|
|
942
|
+
silence_duration_ms?: number | null;
|
|
943
|
+
max_wait_ms?: number | -1 | null;
|
|
944
|
+
pause_state_enabled?: boolean | null;
|
|
945
|
+
};
|
|
946
|
+
export type AgentRequest_TurnDetection = {
|
|
947
|
+
speech_threshold?: number | number | null;
|
|
948
|
+
start_of_speech?: (AgentRequest_SemanticTurnStart | AgentRequest_VadTurnStart | AgentRequest_ManualTurnBoundary) | null;
|
|
949
|
+
end_of_speech?: (AgentRequest_SemanticTurnEnd | AgentRequest_VadTurnEnd | AgentRequest_ManualTurnBoundary) | null;
|
|
950
|
+
interruption?: (AgentRequest_SpeechInterruption | AgentRequest_KeywordInterruption | AgentRequest_DisabledInterruption) | null;
|
|
951
|
+
};
|
|
952
|
+
export type AgentRequest_VadTurnEnd = {
|
|
953
|
+
type: "vad";
|
|
954
|
+
silence_duration_ms?: number | null;
|
|
955
|
+
};
|
|
956
|
+
export type AgentRequest_VadTurnStart = {
|
|
957
|
+
type: "vad";
|
|
958
|
+
interrupt_duration_ms?: number | null;
|
|
959
|
+
speaking_interrupt_duration_ms?: number | null;
|
|
960
|
+
prefix_padding_ms?: number | null;
|
|
961
|
+
};
|
|
962
|
+
export type AgentRequest_VariableDefinition = {
|
|
963
|
+
type: "str" | "int" | "float" | "bool" | "date" | "datetime";
|
|
964
|
+
required?: boolean;
|
|
965
|
+
options?: Array<string | number | number | boolean> | null;
|
|
966
|
+
extract?: boolean;
|
|
967
|
+
description?: string | null;
|
|
968
|
+
};
|
|
969
|
+
export type AgentRequest_VariableDefinitionPatch = {
|
|
970
|
+
type?: "str" | "int" | "float" | "bool" | "date" | "datetime" | null;
|
|
971
|
+
required?: boolean | null;
|
|
972
|
+
options?: Array<string | number | number | boolean> | null;
|
|
973
|
+
extract?: boolean | null;
|
|
974
|
+
description?: string | null;
|
|
975
|
+
};
|
|
976
|
+
export type AgentCreateInput = AgentRequest_AgentCreateInput;
|
|
977
|
+
export type AgentPatch = AgentRequest_AgentPatch;
|
|
978
|
+
export type SessionEndCallPolicy = {
|
|
979
|
+
on_conversation_complete?: boolean;
|
|
980
|
+
on_user_request?: boolean;
|
|
981
|
+
on_fax?: boolean;
|
|
982
|
+
on_ai_assistant?: boolean;
|
|
983
|
+
on_voicemail?: boolean;
|
|
984
|
+
};
|
|
985
|
+
export type InboundEndCallPolicy = {
|
|
986
|
+
on_conversation_complete?: boolean;
|
|
987
|
+
on_user_request?: boolean;
|
|
988
|
+
on_voicemail?: boolean;
|
|
989
|
+
on_ai_assistant?: boolean;
|
|
990
|
+
on_fax?: boolean;
|
|
991
|
+
};
|
|
992
|
+
export type SessionAnalysis = {
|
|
993
|
+
status: "pending" | "completed" | "failed" | "skipped";
|
|
994
|
+
skip_reason: "no_user_turns" | "retention_none" | null;
|
|
995
|
+
complete_ts: number | null;
|
|
996
|
+
result: {
|
|
997
|
+
[key: string]: string | number | number | boolean | null;
|
|
998
|
+
} | null;
|
|
999
|
+
error: string | null;
|
|
1000
|
+
};
|
|
1001
|
+
export type { EphemeralSessionStartRequest, SessionGeofence, SessionStartOptions, SessionStartRequest, SessionTransport, } from "./session-lifecycle.js";
|
|
1002
|
+
export type AgentCreateRequest = AgentCreateInput;
|
|
1003
|
+
export type AgentPatchRequest = AgentPatch;
|
|
1004
|
+
export type Contract_VariableDefinition = AgentRequest_VariableDefinition;
|