@sentdm/sentdm 0.46.0 → 0.47.0

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +3 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/core/pagination.d.mts +25 -0
  9. package/core/pagination.d.mts.map +1 -1
  10. package/core/pagination.d.ts +25 -0
  11. package/core/pagination.d.ts.map +1 -1
  12. package/core/pagination.js +28 -1
  13. package/core/pagination.js.map +1 -1
  14. package/core/pagination.mjs +26 -0
  15. package/core/pagination.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/channels/voice.d.mts +68 -19
  18. package/resources/channels/voice.d.mts.map +1 -1
  19. package/resources/channels/voice.d.ts +68 -19
  20. package/resources/channels/voice.d.ts.map +1 -1
  21. package/resources/channels/voice.js +31 -12
  22. package/resources/channels/voice.js.map +1 -1
  23. package/resources/channels/voice.mjs +31 -12
  24. package/resources/channels/voice.mjs.map +1 -1
  25. package/resources/profiles/campaigns.d.mts +3 -2
  26. package/resources/profiles/campaigns.d.mts.map +1 -1
  27. package/resources/profiles/campaigns.d.ts +3 -2
  28. package/resources/profiles/campaigns.d.ts.map +1 -1
  29. package/resources/profiles/campaigns.js +3 -2
  30. package/resources/profiles/campaigns.js.map +1 -1
  31. package/resources/profiles/campaigns.mjs +3 -2
  32. package/resources/profiles/campaigns.mjs.map +1 -1
  33. package/resources/voice/agents.d.mts +524 -0
  34. package/resources/voice/agents.d.mts.map +1 -0
  35. package/resources/voice/agents.d.ts +524 -0
  36. package/resources/voice/agents.d.ts.map +1 -0
  37. package/resources/voice/agents.js +193 -0
  38. package/resources/voice/agents.js.map +1 -0
  39. package/resources/voice/agents.mjs +189 -0
  40. package/resources/voice/agents.mjs.map +1 -0
  41. package/resources/voice/calls/calls.d.mts +87 -15
  42. package/resources/voice/calls/calls.d.mts.map +1 -1
  43. package/resources/voice/calls/calls.d.ts +87 -15
  44. package/resources/voice/calls/calls.d.ts.map +1 -1
  45. package/resources/voice/calls/calls.js +18 -11
  46. package/resources/voice/calls/calls.js.map +1 -1
  47. package/resources/voice/calls/calls.mjs +18 -11
  48. package/resources/voice/calls/calls.mjs.map +1 -1
  49. package/resources/voice/calls/participants.d.mts +2 -0
  50. package/resources/voice/calls/participants.d.mts.map +1 -1
  51. package/resources/voice/calls/participants.d.ts +2 -0
  52. package/resources/voice/calls/participants.d.ts.map +1 -1
  53. package/resources/voice/calls/participants.js +2 -0
  54. package/resources/voice/calls/participants.js.map +1 -1
  55. package/resources/voice/calls/participants.mjs +2 -0
  56. package/resources/voice/calls/participants.mjs.map +1 -1
  57. package/resources/voice/catalogue.d.mts +86 -0
  58. package/resources/voice/catalogue.d.mts.map +1 -0
  59. package/resources/voice/catalogue.d.ts +86 -0
  60. package/resources/voice/catalogue.d.ts.map +1 -0
  61. package/resources/voice/catalogue.js +40 -0
  62. package/resources/voice/catalogue.js.map +1 -0
  63. package/resources/voice/catalogue.mjs +36 -0
  64. package/resources/voice/catalogue.mjs.map +1 -0
  65. package/resources/voice/index.d.mts +2 -0
  66. package/resources/voice/index.d.mts.map +1 -1
  67. package/resources/voice/index.d.ts +2 -0
  68. package/resources/voice/index.d.ts.map +1 -1
  69. package/resources/voice/index.js +5 -1
  70. package/resources/voice/index.js.map +1 -1
  71. package/resources/voice/index.mjs +2 -0
  72. package/resources/voice/index.mjs.map +1 -1
  73. package/resources/voice/tokens.d.mts +2 -0
  74. package/resources/voice/tokens.d.mts.map +1 -1
  75. package/resources/voice/tokens.d.ts +2 -0
  76. package/resources/voice/tokens.d.ts.map +1 -1
  77. package/resources/voice/tokens.js +2 -0
  78. package/resources/voice/tokens.js.map +1 -1
  79. package/resources/voice/tokens.mjs +2 -0
  80. package/resources/voice/tokens.mjs.map +1 -1
  81. package/resources/voice/voice.d.mts +8 -0
  82. package/resources/voice/voice.d.mts.map +1 -1
  83. package/resources/voice/voice.d.ts +8 -0
  84. package/resources/voice/voice.d.ts.map +1 -1
  85. package/resources/voice/voice.js +8 -0
  86. package/resources/voice/voice.js.map +1 -1
  87. package/resources/voice/voice.mjs +8 -0
  88. package/resources/voice/voice.mjs.map +1 -1
  89. package/resources/webhooks.d.mts +151 -29
  90. package/resources/webhooks.d.mts.map +1 -1
  91. package/resources/webhooks.d.ts +151 -29
  92. package/resources/webhooks.d.ts.map +1 -1
  93. package/resources/webhooks.js +51 -11
  94. package/resources/webhooks.js.map +1 -1
  95. package/resources/webhooks.mjs +51 -11
  96. package/resources/webhooks.mjs.map +1 -1
  97. package/src/client.ts +8 -0
  98. package/src/core/pagination.ts +64 -0
  99. package/src/resources/channels/voice.ts +72 -19
  100. package/src/resources/profiles/campaigns.ts +3 -2
  101. package/src/resources/voice/agents.ts +729 -0
  102. package/src/resources/voice/calls/calls.ts +98 -15
  103. package/src/resources/voice/calls/participants.ts +2 -0
  104. package/src/resources/voice/catalogue.ts +118 -0
  105. package/src/resources/voice/index.ts +33 -0
  106. package/src/resources/voice/tokens.ts +2 -0
  107. package/src/resources/voice/voice.ts +74 -0
  108. package/src/resources/webhooks.ts +159 -29
  109. package/src/version.ts +1 -1
  110. package/version.d.mts +1 -1
  111. package/version.d.ts +1 -1
  112. package/version.js +1 -1
  113. package/version.mjs +1 -1
@@ -0,0 +1,524 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as WebhooksAPI from "../webhooks.mjs";
3
+ import { APIPromise } from "../../core/api-promise.mjs";
4
+ import { PagePromise, VoiceAgentsPage, type VoiceAgentsPageParams } from "../../core/pagination.mjs";
5
+ import { RequestOptions } from "../../internal/request-options.mjs";
6
+ /**
7
+ * Phone calls from the numbers you hold, driven by your own callback URL.
8
+ *
9
+ * `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent asks what to do with each call on it, and `POST /v3/voice/tokens` mints a short-lived token that lets a user of your app place and receive calls as that number. When a call arrives or a caller presses a key, a signed question is POSTed to the callback URL and the answer decides the call; `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need before a real call reaches it, and `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret. The call events themselves (`call.completed` and the rest) arrive through your webhooks.
10
+ *
11
+ * Every call is a record under `/v3/voice/calls`: read it, list its recordings once one is ready, hang it up, start or stop recording, and add, mute or remove conference participants while it is live. A leg to a phone number runs for at most what your balance affords at the destination's rate.
12
+ *
13
+ * **Voice agents.** `POST /v3/voice/agents` creates an agent that answers calls through the Sent Voice Gateway: `session_type` says whether Sent carries the call as text (speech recognised and spoken for the agent) or as audio, `websocket_url` is where the gateway dials the agent for each call (leave it out and the agent dials in with your API key), and `tools`, `transfer_targets`, `fallback` and `limits` say what it may do on a call. The agent's `signing_secret` is shown on create and on `POST /v3/voice/agents/{id}/rotate-secret` only. Voices and languages for text sessions come from `GET /v3/voice/voices`. A number takes calls to an agent once it is bound to it on `/v3/channels/voice`.
14
+ */
15
+ export declare class Agents extends APIResource {
16
+ /**
17
+ * Creates an agent that answers phone calls through the Sent Voice Gateway.
18
+ * `session_type` says whether Sent carries the call as text (the caller's speech
19
+ * recognised for the agent, the agent's text spoken) or as audio. With
20
+ * `websocket_url` the gateway dials your agent for each call and signs the
21
+ * handshake with the `signing_secret` this response returns; without it, your
22
+ * agent dials in with your API key and this agent's `id`.
23
+ *
24
+ * `tools`, `transfer_targets`, `fallback` and `limits` say what the agent may do
25
+ * on a call. Voices and languages for text sessions come from
26
+ * `GET /v3/voice/voices`. Calls reach the agent once a number is bound to it on
27
+ * `/v3/channels/voice`.
28
+ *
29
+ * `signing_secret` is shown here and on `POST /v3/voice/agents/{id}/rotate-secret`
30
+ * only; store it now. With `sandbox: true` the request is validated and the agent
31
+ * reported with `202`; nothing is written.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const apiResponseOfVoiceAgent =
36
+ * await client.voice.agents.create();
37
+ * ```
38
+ */
39
+ create(params: AgentCreateParams, options?: RequestOptions): APIPromise<APIResponseOfVoiceAgent>;
40
+ /**
41
+ * The agent as stored, without its signing secret.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const apiResponseOfVoiceAgent =
46
+ * await client.voice.agents.retrieve('id');
47
+ * ```
48
+ */
49
+ retrieve(id: string, params?: AgentRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseOfVoiceAgent>;
50
+ /**
51
+ * Changes the fields you name and answers with the agent as stored, the same shape
52
+ * `GET` returns.
53
+ *
54
+ * A key left out is left alone. A key sent as `null` clears an optional field
55
+ * (`websocket_url` makes the agent dial in, `greeting` and `fallback` go,
56
+ * `speech`, `audio`, `tools`, `limits` and `transcripts` return to their
57
+ * defaults). A key sent with a value replaces that field whole: send the whole
58
+ * `limits` object, not one of its keys. Changing `session_type` drops `speech`,
59
+ * `audio` and `greeting` unless the body sends them, since the other type cannot
60
+ * carry them. The result is checked like a new agent, and a body that changes
61
+ * nothing is `400`.
62
+ *
63
+ * With `sandbox: true` nothing is written: the request is validated against the
64
+ * stored agent and the agent is reported with `200` as it would read after the
65
+ * change.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const apiResponseOfVoiceAgent =
70
+ * await client.voice.agents.update('id');
71
+ * ```
72
+ */
73
+ update(id: string, params: AgentUpdateParams, options?: RequestOptions): APIPromise<APIResponseOfVoiceAgent>;
74
+ /**
75
+ * Your voice agents, newest first. `page` and `page_size` (1 to 100, default 20)
76
+ * page the list. Signing secrets are never listed.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * // Automatically fetches more pages as needed.
81
+ * for await (const voiceAgent of client.voice.agents.list()) {
82
+ * // ...
83
+ * }
84
+ * ```
85
+ */
86
+ list(params?: AgentListParams | null | undefined, options?: RequestOptions): PagePromise<VoiceAgentsVoiceAgentsPage, VoiceAgent>;
87
+ /**
88
+ * Removes the agent. Calls it already took keep their `agent_id`.
89
+ *
90
+ * An agent that one of your voice numbers routes to, or that another of your
91
+ * agents lists in `transfer_targets`, is not deleted: the answer is `409` with a
92
+ * message naming those numbers and agents. Unbind the numbers
93
+ * (`PATCH /v3/channels/voice/{number}` with `"agent_id": null`), take the agent
94
+ * out of the others' `transfer_targets` or delete them, and try again.
95
+ *
96
+ * With `sandbox: true` nothing is written: the agent is looked up and the answer
97
+ * is the one a real delete would give.
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * await client.voice.agents.delete('id');
102
+ * ```
103
+ */
104
+ delete(id: string, params: AgentDeleteParams, options?: RequestOptions): APIPromise<void>;
105
+ /**
106
+ * Generates a new `signing_secret` for the agent and returns it. The previous
107
+ * secret stops signing immediately, so update your agent before the next call
108
+ * reaches it.
109
+ *
110
+ * With `sandbox: true` a secret is generated and returned with `202`, and nothing
111
+ * is written.
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * const apiResponseOfVoiceAgentSecret =
116
+ * await client.voice.agents.rotateSecret('id');
117
+ * ```
118
+ */
119
+ rotateSecret(id: string, params: AgentRotateSecretParams, options?: RequestOptions): APIPromise<APIResponseOfVoiceAgentSecret>;
120
+ }
121
+ export type VoiceAgentsVoiceAgentsPage = VoiceAgentsPage<VoiceAgent>;
122
+ /**
123
+ * Standard API response envelope for all v3 endpoints
124
+ */
125
+ export interface APIResponseOfVoiceAgent {
126
+ /**
127
+ * A voice agent as stored: what was written with every default filled in, plus the
128
+ * signing secret the one time it is shown (on create, and on rotate). The one
129
+ * shape every read of an agent answers with, on /v3/voice/agents and on the admin
130
+ * API the dashboard uses, so the two cannot drift.
131
+ */
132
+ data?: VoiceAgent | null;
133
+ /**
134
+ * Error information
135
+ */
136
+ error?: WebhooksAPI.ErrorDetail | null;
137
+ /**
138
+ * Request and response metadata
139
+ */
140
+ meta?: WebhooksAPI.APIMeta;
141
+ /**
142
+ * Indicates whether the request was successful
143
+ */
144
+ success?: boolean;
145
+ }
146
+ /**
147
+ * Standard API response envelope for all v3 endpoints
148
+ */
149
+ export interface APIResponseOfVoiceAgentSecret {
150
+ /**
151
+ * A freshly rotated signing secret.
152
+ */
153
+ data?: VoiceAgentSecret | null;
154
+ /**
155
+ * Error information
156
+ */
157
+ error?: WebhooksAPI.ErrorDetail | null;
158
+ /**
159
+ * Request and response metadata
160
+ */
161
+ meta?: WebhooksAPI.APIMeta;
162
+ /**
163
+ * Indicates whether the request was successful
164
+ */
165
+ success?: boolean;
166
+ }
167
+ /**
168
+ * Standard API response envelope for all v3 endpoints
169
+ */
170
+ export interface APIResponseOfVoiceAgentsList {
171
+ /**
172
+ * A page of the account's agents. The agent itself is VoiceAgentResponse, shared
173
+ * with the admin API.
174
+ */
175
+ data?: VoiceAgentsList | null;
176
+ /**
177
+ * Error information
178
+ */
179
+ error?: WebhooksAPI.ErrorDetail | null;
180
+ /**
181
+ * Request and response metadata
182
+ */
183
+ meta?: WebhooksAPI.APIMeta;
184
+ /**
185
+ * Indicates whether the request was successful
186
+ */
187
+ success?: boolean;
188
+ }
189
+ /**
190
+ * A voice agent as stored: what was written with every default filled in, plus the
191
+ * signing secret the one time it is shown (on create, and on rotate). The one
192
+ * shape every read of an agent answers with, on /v3/voice/agents and on the admin
193
+ * API the dashboard uses, so the two cannot drift.
194
+ */
195
+ export interface VoiceAgent {
196
+ /**
197
+ * The agent's id, agent\_ and a UUID. It is also what the agent connects to the
198
+ * gateway as.
199
+ */
200
+ id?: string;
201
+ /**
202
+ * Audio sessions: the sample rate in use.
203
+ */
204
+ audio?: VoiceAgentAudio | null;
205
+ created_at?: string;
206
+ fallback?: VoiceAgentParty | null;
207
+ greeting?: string | null;
208
+ limits?: VoiceAgentLimits;
209
+ name?: string;
210
+ /**
211
+ * text or audio.
212
+ */
213
+ session_type?: string;
214
+ /**
215
+ * The whsec\_ secret the gateway signs its handshake to websocket_url with.
216
+ * Present on create and after a rotate-secret; absent on every other read. Store
217
+ * it now.
218
+ */
219
+ signing_secret?: string | null;
220
+ /**
221
+ * Text sessions: the speech setting, voice and language in use.
222
+ */
223
+ speech?: VoiceAgentSpeech | null;
224
+ tools?: Array<string>;
225
+ transcripts?: VoiceAgentTranscripts;
226
+ transfer_targets?: Array<VoiceAgentParty>;
227
+ updated_at?: string | null;
228
+ /**
229
+ * Where the gateway dials the agent; null when the agent dials in with your API
230
+ * key.
231
+ */
232
+ websocket_url?: string | null;
233
+ }
234
+ export interface VoiceAgentAudio {
235
+ sample_rate?: number;
236
+ }
237
+ export interface VoiceAgentAudioSpec {
238
+ /**
239
+ * Samples per second of the audio exchanged: 8000, 16000 or 24000. Default 16000.
240
+ */
241
+ sample_rate?: number | null;
242
+ }
243
+ export interface VoiceAgentLimits {
244
+ allowed_countries?: Array<string> | null;
245
+ max_call_seconds?: number;
246
+ max_concurrent_calls?: number;
247
+ }
248
+ export interface VoiceAgentLimitsSpec {
249
+ /**
250
+ * ISO 3166-1 alpha-2 codes of the countries the agent may call or transfer to.
251
+ * Omit it to allow every country. Stored now, applied when the agent places calls.
252
+ */
253
+ allowed_countries?: Array<string> | null;
254
+ /**
255
+ * The longest a call may last, 60 to 14,400 seconds. Default 3,600.
256
+ */
257
+ max_call_seconds?: number | null;
258
+ /**
259
+ * How many calls the agent may have going at once, from 1. Default 10.
260
+ */
261
+ max_concurrent_calls?: number | null;
262
+ }
263
+ export interface VoiceAgentParty {
264
+ kind?: string;
265
+ value?: string;
266
+ }
267
+ export interface VoiceAgentPartySpec {
268
+ /**
269
+ * number, user or agent.
270
+ */
271
+ kind?: string | null;
272
+ /**
273
+ * The E.164 number, the app user's identity, or the agent id (agent\_…).
274
+ */
275
+ value?: string | null;
276
+ }
277
+ /**
278
+ * A freshly rotated signing secret.
279
+ */
280
+ export interface VoiceAgentSecret {
281
+ /**
282
+ * The new whsec\_ secret. The previous one stopped signing the moment this was
283
+ * returned. Shown once.
284
+ */
285
+ signing_secret?: string;
286
+ }
287
+ export interface VoiceAgentSpeech {
288
+ language?: string;
289
+ setting?: string;
290
+ voice?: string;
291
+ }
292
+ export interface VoiceAgentSpeechSpec {
293
+ /**
294
+ * The language spoken and listened for, a BCP 47 tag from GET /v3/voice/voices.
295
+ * Default en-US.
296
+ */
297
+ language?: string | null;
298
+ /**
299
+ * standard, Sent's speech. Other settings are not available yet.
300
+ */
301
+ setting?: string | null;
302
+ /**
303
+ * A voice name from GET /v3/voice/voices. Default: the catalogue's default voice.
304
+ */
305
+ voice?: string | null;
306
+ }
307
+ export interface VoiceAgentTranscripts {
308
+ retention_days?: number;
309
+ store?: boolean;
310
+ }
311
+ export interface VoiceAgentTranscriptsSpec {
312
+ /**
313
+ * How long a stored transcript is kept, 1 to 365 days. Default 30.
314
+ */
315
+ retention_days?: number | null;
316
+ /**
317
+ * Whether Sent keeps the call's transcript. Default false. Stored now, applied
318
+ * when transcripts land.
319
+ */
320
+ store?: boolean | null;
321
+ }
322
+ /**
323
+ * A page of the account's agents. The agent itself is VoiceAgentResponse, shared
324
+ * with the admin API.
325
+ */
326
+ export interface VoiceAgentsList {
327
+ agents?: Array<VoiceAgent>;
328
+ /**
329
+ * Pagination metadata for list responses
330
+ */
331
+ pagination?: WebhooksAPI.PaginationMeta;
332
+ }
333
+ export interface AgentCreateParams {
334
+ /**
335
+ * Body param: Audio sessions only: the sound format.
336
+ */
337
+ audio?: VoiceAgentAudioSpec | null;
338
+ /**
339
+ * Body param: Who takes the call when the agent cannot: a phone number (kind:
340
+ * number). Omit it and such a call hangs up.
341
+ */
342
+ fallback?: VoiceAgentPartySpec | null;
343
+ /**
344
+ * Body param: Text sessions only: what the caller hears as soon as the call is
345
+ * answered, before the agent's first turn. 1 to 4,096 characters. Omit it and the
346
+ * agent speaks first.
347
+ */
348
+ greeting?: string | null;
349
+ /**
350
+ * Body param
351
+ */
352
+ limits?: VoiceAgentLimitsSpec | null;
353
+ /**
354
+ * Body param: A name for your own reference, 1 to 100 characters.
355
+ */
356
+ name?: string | null;
357
+ /**
358
+ * Body param: Sandbox flag - when true, the operation is simulated without side
359
+ * effects Useful for testing integrations without actual execution
360
+ */
361
+ sandbox?: boolean;
362
+ /**
363
+ * Body param: text: Sent turns the caller's speech into text and the agent's text
364
+ * into speech, so the agent exchanges text frames. audio: the agent receives and
365
+ * sends the sound itself.
366
+ */
367
+ session_type?: string | null;
368
+ /**
369
+ * Body param: Text sessions only: how the caller is spoken to and listened to.
370
+ */
371
+ speech?: VoiceAgentSpeechSpec | null;
372
+ /**
373
+ * Body param: What the agent may do to the call: any of transfer, hangup,
374
+ * send_dtmf and hold. Default ["hangup"]. transfer needs at least one
375
+ * transfer_targets entry.
376
+ */
377
+ tools?: Array<string> | null;
378
+ /**
379
+ * Body param
380
+ */
381
+ transcripts?: VoiceAgentTranscriptsSpec | null;
382
+ /**
383
+ * Body param: Where the agent may transfer a call to, up to 20 parties: a phone
384
+ * number (kind: number, E.164), one of your app users (kind: user, the identity)
385
+ * or another of your agents (kind: agent, its id). The agent can only transfer to
386
+ * a party listed here.
387
+ */
388
+ transfer_targets?: Array<VoiceAgentPartySpec> | null;
389
+ /**
390
+ * Body param: Where the gateway connects to the agent for each call: an absolute
391
+ * wss:// URL on a public host, at most 2,048 characters. The handshake is signed
392
+ * with the agent's signing_secret. Leave it out and the agent dials in instead,
393
+ * connecting to the gateway with your API key.
394
+ */
395
+ websocket_url?: string | null;
396
+ /**
397
+ * Header param: Unique key to ensure idempotent request processing. Must be 1-255
398
+ * alphanumeric characters, hyphens, or underscores. Responses are cached for 24
399
+ * hours per key per customer.
400
+ */
401
+ 'Idempotency-Key'?: string;
402
+ /**
403
+ * Header param: Profile UUID to scope the request to a child profile. Only
404
+ * organization API keys can use this header. The profile must belong to the
405
+ * calling organization.
406
+ */
407
+ 'x-profile-id'?: string;
408
+ }
409
+ export interface AgentRetrieveParams {
410
+ /**
411
+ * Profile UUID to scope the request to a child profile. Only organization API keys
412
+ * can use this header. The profile must belong to the calling organization.
413
+ */
414
+ 'x-profile-id'?: string;
415
+ }
416
+ export interface AgentUpdateParams {
417
+ /**
418
+ * Body param: Audio sessions: { sample_rate }; null restores the default.
419
+ */
420
+ audio?: VoiceAgentAudioSpec | null;
421
+ /**
422
+ * Body param: A new fallback party, or null for none.
423
+ */
424
+ fallback?: VoiceAgentPartySpec | null;
425
+ /**
426
+ * Body param: A new greeting, or null for none.
427
+ */
428
+ greeting?: string | null;
429
+ /**
430
+ * Body param: The whole limits object; null restores the defaults.
431
+ */
432
+ limits?: VoiceAgentLimitsSpec | null;
433
+ /**
434
+ * Body param: A new name, 1 to 100 characters.
435
+ */
436
+ name?: string;
437
+ /**
438
+ * Body param: Sandbox flag - when true, the operation is simulated without side
439
+ * effects Useful for testing integrations without actual execution
440
+ */
441
+ sandbox?: boolean;
442
+ /**
443
+ * Body param: text or audio. Changing it drops the settings the other type cannot
444
+ * have (speech, audio, greeting) unless the body sends them.
445
+ */
446
+ session_type?: string;
447
+ /**
448
+ * Body param: Text sessions: { setting, voice, language }, replaced whole; null
449
+ * restores the defaults.
450
+ */
451
+ speech?: VoiceAgentSpeechSpec | null;
452
+ /**
453
+ * Body param: The whole list of tools; null restores the default.
454
+ */
455
+ tools?: Array<string> | null;
456
+ /**
457
+ * Body param: The whole transcripts object; null restores the defaults.
458
+ */
459
+ transcripts?: VoiceAgentTranscriptsSpec | null;
460
+ /**
461
+ * Body param: The whole list of parties; null clears it.
462
+ */
463
+ transfer_targets?: Array<VoiceAgentPartySpec> | null;
464
+ /**
465
+ * Body param: A new wss:// URL, or null for an agent that dials in.
466
+ */
467
+ websocket_url?: string | null;
468
+ /**
469
+ * Header param: Unique key to ensure idempotent request processing. Must be 1-255
470
+ * alphanumeric characters, hyphens, or underscores. Responses are cached for 24
471
+ * hours per key per customer.
472
+ */
473
+ 'Idempotency-Key'?: string;
474
+ /**
475
+ * Header param: Profile UUID to scope the request to a child profile. Only
476
+ * organization API keys can use this header. The profile must belong to the
477
+ * calling organization.
478
+ */
479
+ 'x-profile-id'?: string;
480
+ }
481
+ export interface AgentListParams extends VoiceAgentsPageParams {
482
+ /**
483
+ * Header param: Profile UUID to scope the request to a child profile. Only
484
+ * organization API keys can use this header. The profile must belong to the
485
+ * calling organization.
486
+ */
487
+ 'x-profile-id'?: string;
488
+ }
489
+ export interface AgentDeleteParams {
490
+ /**
491
+ * Body param: Sandbox flag - when true, the operation is simulated without side
492
+ * effects Useful for testing integrations without actual execution
493
+ */
494
+ sandbox?: boolean;
495
+ /**
496
+ * Header param: Profile UUID to scope the request to a child profile. Only
497
+ * organization API keys can use this header. The profile must belong to the
498
+ * calling organization.
499
+ */
500
+ 'x-profile-id'?: string;
501
+ }
502
+ export interface AgentRotateSecretParams {
503
+ /**
504
+ * Body param: Sandbox flag - when true, the operation is simulated without side
505
+ * effects Useful for testing integrations without actual execution
506
+ */
507
+ sandbox?: boolean;
508
+ /**
509
+ * Header param: Unique key to ensure idempotent request processing. Must be 1-255
510
+ * alphanumeric characters, hyphens, or underscores. Responses are cached for 24
511
+ * hours per key per customer.
512
+ */
513
+ 'Idempotency-Key'?: string;
514
+ /**
515
+ * Header param: Profile UUID to scope the request to a child profile. Only
516
+ * organization API keys can use this header. The profile must belong to the
517
+ * calling organization.
518
+ */
519
+ 'x-profile-id'?: string;
520
+ }
521
+ export declare namespace Agents {
522
+ export { type APIResponseOfVoiceAgent as APIResponseOfVoiceAgent, type APIResponseOfVoiceAgentSecret as APIResponseOfVoiceAgentSecret, type APIResponseOfVoiceAgentsList as APIResponseOfVoiceAgentsList, type VoiceAgent as VoiceAgent, type VoiceAgentAudio as VoiceAgentAudio, type VoiceAgentAudioSpec as VoiceAgentAudioSpec, type VoiceAgentLimits as VoiceAgentLimits, type VoiceAgentLimitsSpec as VoiceAgentLimitsSpec, type VoiceAgentParty as VoiceAgentParty, type VoiceAgentPartySpec as VoiceAgentPartySpec, type VoiceAgentSecret as VoiceAgentSecret, type VoiceAgentSpeech as VoiceAgentSpeech, type VoiceAgentSpeechSpec as VoiceAgentSpeechSpec, type VoiceAgentTranscripts as VoiceAgentTranscripts, type VoiceAgentTranscriptsSpec as VoiceAgentTranscriptsSpec, type VoiceAgentsList as VoiceAgentsList, type VoiceAgentsVoiceAgentsPage as VoiceAgentsVoiceAgentsPage, type AgentCreateParams as AgentCreateParams, type AgentRetrieveParams as AgentRetrieveParams, type AgentUpdateParams as AgentUpdateParams, type AgentListParams as AgentListParams, type AgentDeleteParams as AgentDeleteParams, type AgentRotateSecretParams as AgentRotateSecretParams, };
523
+ }
524
+ //# sourceMappingURL=agents.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.mts","sourceRoot":"","sources":["../../src/resources/voice/agents.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,WAAW,wBAAoB;AAC3C,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,qBAAqB,EAAE,kCAA8B;AAEjG,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;;;;;;;GAQG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAehG;;;;;;;;OAQG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAWtC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAetC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,MAAM,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0BAA0B,EAAE,UAAU,CAAC;IAYtD;;;;;;;;;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