telnyx 7.17.0 → 7.19.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.
- package/CHANGELOG.md +27 -0
- package/client.d.mts +5 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -2
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/lib/webhooks.d.mts +1 -1
- package/lib/webhooks.d.mts.map +1 -1
- package/lib/webhooks.d.ts +1 -1
- package/lib/webhooks.d.ts.map +1 -1
- package/lib/webhooks.js +74 -39
- package/lib/webhooks.js.map +1 -1
- package/lib/webhooks.mjs +52 -17
- package/lib/webhooks.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +6 -2
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +6 -2
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js +4 -0
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs +4 -0
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/anthropic/v1.d.mts +4 -3
- package/resources/ai/anthropic/v1.d.mts.map +1 -1
- package/resources/ai/anthropic/v1.d.ts +4 -3
- package/resources/ai/anthropic/v1.d.ts.map +1 -1
- package/resources/ai/anthropic/v1.js +1 -1
- package/resources/ai/anthropic/v1.mjs +1 -1
- package/resources/ai/assistants/assistants.d.mts +124 -18
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +124 -18
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/chat.d.mts +8 -0
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +8 -0
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/collections/collections.d.mts +1 -102
- package/resources/ai/collections/collections.d.mts.map +1 -1
- package/resources/ai/collections/collections.d.ts +1 -102
- package/resources/ai/collections/collections.d.ts.map +1 -1
- package/resources/ai/collections/collections.js +0 -44
- package/resources/ai/collections/collections.js.map +1 -1
- package/resources/ai/collections/collections.mjs +0 -44
- package/resources/ai/collections/collections.mjs.map +1 -1
- package/resources/ai/collections/index.d.mts +1 -1
- package/resources/ai/collections/index.d.mts.map +1 -1
- package/resources/ai/collections/index.d.ts +1 -1
- package/resources/ai/collections/index.d.ts.map +1 -1
- package/resources/ai/collections/index.js.map +1 -1
- package/resources/ai/collections/index.mjs.map +1 -1
- package/resources/ai/collections/settings.d.mts +4 -1
- package/resources/ai/collections/settings.d.mts.map +1 -1
- package/resources/ai/collections/settings.d.ts +4 -1
- package/resources/ai/collections/settings.d.ts.map +1 -1
- package/resources/ai/index.d.mts +2 -1
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -1
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js +7 -5
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs +1 -0
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/knowledge/collections.d.mts +140 -0
- package/resources/ai/knowledge/collections.d.mts.map +1 -0
- package/resources/ai/knowledge/collections.d.ts +140 -0
- package/resources/ai/knowledge/collections.d.ts.map +1 -0
- package/resources/ai/knowledge/collections.js +58 -0
- package/resources/ai/knowledge/collections.js.map +1 -0
- package/resources/ai/knowledge/collections.mjs +54 -0
- package/resources/ai/knowledge/collections.mjs.map +1 -0
- package/resources/ai/knowledge/index.d.mts +3 -0
- package/resources/ai/knowledge/index.d.mts.map +1 -0
- package/resources/ai/knowledge/index.d.ts +3 -0
- package/resources/ai/knowledge/index.d.ts.map +1 -0
- package/resources/ai/knowledge/index.js +9 -0
- package/resources/ai/knowledge/index.js.map +1 -0
- package/resources/ai/knowledge/index.mjs +4 -0
- package/resources/ai/knowledge/index.mjs.map +1 -0
- package/resources/ai/knowledge/knowledge.d.mts +10 -0
- package/resources/ai/knowledge/knowledge.d.mts.map +1 -0
- package/resources/ai/knowledge/knowledge.d.ts +10 -0
- package/resources/ai/knowledge/knowledge.d.ts.map +1 -0
- package/resources/ai/knowledge/knowledge.js +17 -0
- package/resources/ai/knowledge/knowledge.js.map +1 -0
- package/resources/ai/knowledge/knowledge.mjs +12 -0
- package/resources/ai/knowledge/knowledge.mjs.map +1 -0
- package/resources/ai/knowledge.d.mts +2 -0
- package/resources/ai/knowledge.d.mts.map +1 -0
- package/resources/ai/knowledge.d.ts +2 -0
- package/resources/ai/knowledge.d.ts.map +1 -0
- package/resources/ai/knowledge.js +6 -0
- package/resources/ai/knowledge.js.map +1 -0
- package/resources/ai/knowledge.mjs +3 -0
- package/resources/ai/knowledge.mjs.map +1 -0
- package/resources/ai/openai/chat.d.mts +8 -0
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +8 -0
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/openai/openai.d.mts +10 -0
- package/resources/ai/openai/openai.d.mts.map +1 -1
- package/resources/ai/openai/openai.d.ts +10 -0
- package/resources/ai/openai/openai.d.ts.map +1 -1
- package/resources/ai/openai/openai.js.map +1 -1
- package/resources/ai/openai/openai.mjs.map +1 -1
- package/resources/calls/actions.d.mts +35 -12
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +35 -12
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +2 -2
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +2 -2
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/calls/index.d.mts +1 -1
- package/resources/calls/index.d.mts.map +1 -1
- package/resources/calls/index.d.ts +1 -1
- package/resources/calls/index.d.ts.map +1 -1
- package/resources/calls/index.js.map +1 -1
- package/resources/calls/index.mjs.map +1 -1
- package/resources/conferences/actions.d.mts +3 -1
- package/resources/conferences/actions.d.mts.map +1 -1
- package/resources/conferences/actions.d.ts +3 -1
- package/resources/conferences/actions.d.ts.map +1 -1
- package/resources/credential-connections/credential-connections.d.mts +2 -2
- package/resources/credential-connections/credential-connections.d.ts +2 -2
- package/resources/external-requirements/external-requirements.d.mts +10 -0
- package/resources/external-requirements/external-requirements.d.mts.map +1 -0
- package/resources/external-requirements/external-requirements.d.ts +10 -0
- package/resources/external-requirements/external-requirements.d.ts.map +1 -0
- package/resources/external-requirements/external-requirements.js +17 -0
- package/resources/external-requirements/external-requirements.js.map +1 -0
- package/resources/external-requirements/external-requirements.mjs +12 -0
- package/resources/external-requirements/external-requirements.mjs.map +1 -0
- package/resources/external-requirements/index.d.mts +3 -0
- package/resources/external-requirements/index.d.mts.map +1 -0
- package/resources/external-requirements/index.d.ts +3 -0
- package/resources/external-requirements/index.d.ts.map +1 -0
- package/resources/external-requirements/index.js +9 -0
- package/resources/external-requirements/index.js.map +1 -0
- package/resources/external-requirements/index.mjs +4 -0
- package/resources/external-requirements/index.mjs.map +1 -0
- package/resources/external-requirements/sub-number-orders.d.mts +151 -0
- package/resources/external-requirements/sub-number-orders.d.mts.map +1 -0
- package/resources/external-requirements/sub-number-orders.d.ts +151 -0
- package/resources/external-requirements/sub-number-orders.d.ts.map +1 -0
- package/resources/external-requirements/sub-number-orders.js +61 -0
- package/resources/external-requirements/sub-number-orders.js.map +1 -0
- package/resources/external-requirements/sub-number-orders.mjs +57 -0
- package/resources/external-requirements/sub-number-orders.mjs.map +1 -0
- package/resources/external-requirements.d.mts +2 -0
- package/resources/external-requirements.d.mts.map +1 -0
- package/resources/external-requirements.d.ts +2 -0
- package/resources/external-requirements.d.ts.map +1 -0
- package/resources/external-requirements.js +6 -0
- package/resources/external-requirements.js.map +1 -0
- package/resources/external-requirements.mjs +3 -0
- package/resources/external-requirements.mjs.map +1 -0
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +6 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/outbound-voice-profiles.d.mts +30 -30
- package/resources/outbound-voice-profiles.d.ts +30 -30
- package/resources/phone-numbers/jobs.d.mts +21 -4
- package/resources/phone-numbers/jobs.d.mts.map +1 -1
- package/resources/phone-numbers/jobs.d.ts +21 -4
- package/resources/phone-numbers/jobs.d.ts.map +1 -1
- package/resources/phone-numbers/jobs.js +4 -2
- package/resources/phone-numbers/jobs.js.map +1 -1
- package/resources/phone-numbers/jobs.mjs +4 -2
- package/resources/phone-numbers/jobs.mjs.map +1 -1
- package/resources/sim-card-groups/actions.d.mts +10 -4
- package/resources/sim-card-groups/actions.d.mts.map +1 -1
- package/resources/sim-card-groups/actions.d.ts +10 -4
- package/resources/sim-card-groups/actions.d.ts.map +1 -1
- package/resources/sim-card-groups/actions.js +6 -4
- package/resources/sim-card-groups/actions.js.map +1 -1
- package/resources/sim-card-groups/actions.mjs +6 -4
- package/resources/sim-card-groups/actions.mjs.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.mts +20 -10
- package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.ts +20 -10
- package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
- package/resources/speech-to-text/speech-to-text.js +3 -2
- package/resources/speech-to-text/speech-to-text.js.map +1 -1
- package/resources/speech-to-text/speech-to-text.mjs +3 -2
- package/resources/speech-to-text/speech-to-text.mjs.map +1 -1
- package/resources/webhooks.d.mts +4 -3
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +4 -3
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +4 -11
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +4 -11
- package/resources/webhooks.mjs.map +1 -1
- package/resources/wireless-blocklist-values.d.mts +6 -19
- package/resources/wireless-blocklist-values.d.mts.map +1 -1
- package/resources/wireless-blocklist-values.d.ts +6 -19
- package/resources/wireless-blocklist-values.d.ts.map +1 -1
- package/resources/wireless-blocklist-values.js +2 -1
- package/resources/wireless-blocklist-values.js.map +1 -1
- package/resources/wireless-blocklist-values.mjs +2 -1
- package/resources/wireless-blocklist-values.mjs.map +1 -1
- package/resources/wireless-blocklists.d.mts +40 -20
- package/resources/wireless-blocklists.d.mts.map +1 -1
- package/resources/wireless-blocklists.d.ts +40 -20
- package/resources/wireless-blocklists.d.ts.map +1 -1
- package/resources/wireless-blocklists.js +12 -7
- package/resources/wireless-blocklists.js.map +1 -1
- package/resources/wireless-blocklists.mjs +12 -7
- package/resources/wireless-blocklists.mjs.map +1 -1
- package/src/client.ts +9 -4
- package/src/lib/webhooks.ts +59 -18
- package/src/resources/ai/ai.ts +6 -6
- package/src/resources/ai/anthropic/v1.ts +4 -3
- package/src/resources/ai/assistants/assistants.ts +130 -17
- package/src/resources/ai/chat.ts +9 -0
- package/src/resources/ai/collections/collections.ts +0 -134
- package/src/resources/ai/collections/index.ts +0 -3
- package/src/resources/ai/collections/settings.ts +4 -1
- package/src/resources/ai/index.ts +1 -3
- package/src/resources/ai/knowledge/collections.ts +179 -0
- package/src/resources/ai/knowledge/index.ts +8 -0
- package/src/resources/ai/knowledge/knowledge.ts +23 -0
- package/src/resources/ai/knowledge.ts +3 -0
- package/src/resources/ai/openai/chat.ts +9 -0
- package/src/resources/ai/openai/openai.ts +12 -0
- package/src/resources/calls/actions.ts +38 -6
- package/src/resources/calls/calls.ts +2 -0
- package/src/resources/calls/index.ts +1 -0
- package/src/resources/conferences/actions.ts +3 -1
- package/src/resources/credential-connections/credential-connections.ts +2 -2
- package/src/resources/external-requirements/external-requirements.ts +27 -0
- package/src/resources/external-requirements/index.ts +10 -0
- package/src/resources/external-requirements/sub-number-orders.ts +202 -0
- package/src/resources/external-requirements.ts +3 -0
- package/src/resources/index.ts +3 -2
- package/src/resources/outbound-voice-profiles.ts +30 -30
- package/src/resources/phone-numbers/jobs.ts +23 -4
- package/src/resources/sim-card-groups/actions.ts +11 -4
- package/src/resources/speech-to-text/speech-to-text.ts +23 -9
- package/src/resources/webhooks.ts +8 -13
- package/src/resources/wireless-blocklist-values.ts +6 -23
- package/src/resources/wireless-blocklists.ts +54 -25
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -14,8 +14,10 @@ import { path } from '../../internal/utils/path';
|
|
|
14
14
|
*/
|
|
15
15
|
export class Jobs extends APIResource {
|
|
16
16
|
/**
|
|
17
|
-
* Returns background jobs that operate on phone numbers.
|
|
18
|
-
*
|
|
17
|
+
* Returns background jobs that operate on phone numbers. Filter by job type,
|
|
18
|
+
* target phone numbers, or job status, and sort by creation time. Multiple
|
|
19
|
+
* phone-number or status values use OR semantics within that filter; different
|
|
20
|
+
* filter categories use AND semantics. Results include pagination metadata.
|
|
19
21
|
*
|
|
20
22
|
* @example
|
|
21
23
|
* ```ts
|
|
@@ -239,7 +241,8 @@ export interface JobUpdateEmergencySettingsBatchResponse {
|
|
|
239
241
|
|
|
240
242
|
export interface JobListParams extends DefaultFlatPaginationParams {
|
|
241
243
|
/**
|
|
242
|
-
* Consolidated filter parameter (deepObject style). Originally: filter[type]
|
|
244
|
+
* Consolidated filter parameter (deepObject style). Originally: filter[type],
|
|
245
|
+
* filter[phone_number], filter[phone_number][], filter[status][]
|
|
243
246
|
*/
|
|
244
247
|
filter?: JobListParams.Filter;
|
|
245
248
|
|
|
@@ -252,9 +255,25 @@ export interface JobListParams extends DefaultFlatPaginationParams {
|
|
|
252
255
|
|
|
253
256
|
export namespace JobListParams {
|
|
254
257
|
/**
|
|
255
|
-
* Consolidated filter parameter (deepObject style). Originally: filter[type]
|
|
258
|
+
* Consolidated filter parameter (deepObject style). Originally: filter[type],
|
|
259
|
+
* filter[phone_number], filter[phone_number][], filter[status][]
|
|
256
260
|
*/
|
|
257
261
|
export interface Filter {
|
|
262
|
+
/**
|
|
263
|
+
* Returns jobs that targeted any of the supplied account-owned phone numbers.
|
|
264
|
+
* Values beginning with `+` must contain 1 to 20 digits after the plus sign. The
|
|
265
|
+
* 10-value limit is enforced before duplicate values are removed. Unmatched or
|
|
266
|
+
* non-account-owned identifiers return an empty result. Phone-number filtering
|
|
267
|
+
* must be enabled for the account.
|
|
268
|
+
*/
|
|
269
|
+
phone_number?: string | Array<string>;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Returns jobs with any of the supplied statuses. Use repeated `filter[status][]`
|
|
273
|
+
* parameters; scalar and comma-separated status values are not accepted.
|
|
274
|
+
*/
|
|
275
|
+
status?: Array<'pending' | 'in_progress' | 'completed' | 'failed' | 'expired'>;
|
|
276
|
+
|
|
258
277
|
/**
|
|
259
278
|
* Identifies the type of the background job.
|
|
260
279
|
*/
|
|
@@ -67,8 +67,9 @@ export class Actions extends APIResource {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
|
-
* This action
|
|
71
|
-
*
|
|
70
|
+
* This action asynchronously removes the Wireless Blocklist assigned to a SIM Card
|
|
71
|
+
* Group. The request returns `404` when the SIM Card Group does not exist and
|
|
72
|
+
* `422` when no Wireless Blocklist is assigned.
|
|
72
73
|
*
|
|
73
74
|
* @example
|
|
74
75
|
* ```ts
|
|
@@ -118,8 +119,9 @@ export class Actions extends APIResource {
|
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
/**
|
|
121
|
-
* This action
|
|
122
|
-
* the SIM
|
|
122
|
+
* This action asynchronously assigns a Wireless Blocklist to all SIMs in the SIM
|
|
123
|
+
* Card Group. The request returns `404` when the SIM Card Group does not exist and
|
|
124
|
+
* `422` when the Wireless Blocklist does not exist.
|
|
123
125
|
*
|
|
124
126
|
* @example
|
|
125
127
|
* ```ts
|
|
@@ -201,6 +203,11 @@ export namespace SimCardGroupAction {
|
|
|
201
203
|
* The identification of the related Private Wireless Gateway resource.
|
|
202
204
|
*/
|
|
203
205
|
private_wireless_gateway_id?: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The identification of the related Wireless Blocklist resource.
|
|
209
|
+
*/
|
|
210
|
+
wireless_blocklist_id?: string;
|
|
204
211
|
}
|
|
205
212
|
}
|
|
206
213
|
|
|
@@ -43,13 +43,14 @@ export class SpeechToText extends APIResource {
|
|
|
43
43
|
* `Authorization: Bearer <API_KEY>` header.
|
|
44
44
|
*
|
|
45
45
|
* Supported engines: `Azure`, `Deepgram`, `Google`, `Telnyx`, `xAI`,
|
|
46
|
-
* `Speechmatics`, `Soniox`, `Parakeet`, `Humain`, `Reson8`.
|
|
46
|
+
* `Speechmatics`, `Soniox`, `Parakeet`, `Humain`, `Reson8`, `Cohere`.
|
|
47
47
|
*
|
|
48
48
|
* **Connection flow:**
|
|
49
49
|
*
|
|
50
50
|
* 1. Open WebSocket with query parameters specifying engine, input format, and
|
|
51
51
|
* language.
|
|
52
|
-
* 2. Send binary audio frames (mp3
|
|
52
|
+
* 2. Send binary audio frames (mp3, wav, linear16, or linear32 format, per
|
|
53
|
+
* `input_format`).
|
|
53
54
|
* 3. Receive JSON transcript frames with `transcript`, `is_final`, and
|
|
54
55
|
* `confidence` fields.
|
|
55
56
|
* 4. Close connection when done.
|
|
@@ -76,7 +77,7 @@ export class SpeechToText extends APIResource {
|
|
|
76
77
|
export type SttServiceType = 'streaming' | 'file_based' | 'in_call' | 'ai_assistant';
|
|
77
78
|
|
|
78
79
|
/**
|
|
79
|
-
* Binary audio data in mp3 or
|
|
80
|
+
* Binary audio data in mp3, wav, linear16, or linear32 format, per `input_format`.
|
|
80
81
|
*/
|
|
81
82
|
export type TranscribeClientEvent = Uploadable;
|
|
82
83
|
|
|
@@ -103,9 +104,10 @@ export namespace TranscribeServerEvent {
|
|
|
103
104
|
type: 'transcript';
|
|
104
105
|
|
|
105
106
|
/**
|
|
106
|
-
* Confidence score of the transcription, ranging from 0 to 1.
|
|
107
|
+
* Confidence score of the transcription, ranging from 0 to 1. `cohere/ar-stt`
|
|
108
|
+
* frames return `null` here rather than omitting the field.
|
|
107
109
|
*/
|
|
108
|
-
confidence?: number;
|
|
110
|
+
confidence?: number | null;
|
|
109
111
|
|
|
110
112
|
/**
|
|
111
113
|
* Whether this is a final transcription result. When `false`, this is an interim
|
|
@@ -219,6 +221,7 @@ export interface SpeechToTextListProvidersParams {
|
|
|
219
221
|
| 'parakeet'
|
|
220
222
|
| 'humain'
|
|
221
223
|
| 'reson8'
|
|
224
|
+
| 'cohere'
|
|
222
225
|
| 'azure'
|
|
223
226
|
| 'openai'
|
|
224
227
|
| 'google'
|
|
@@ -239,7 +242,7 @@ export interface SpeechToTextRetrieveTranscriptionParams {
|
|
|
239
242
|
/**
|
|
240
243
|
* The format of input audio stream.
|
|
241
244
|
*/
|
|
242
|
-
input_format: 'mp3' | 'wav';
|
|
245
|
+
input_format: 'mp3' | 'wav' | 'linear16' | 'linear32';
|
|
243
246
|
|
|
244
247
|
/**
|
|
245
248
|
* The transcription engine to use for processing the audio stream.
|
|
@@ -254,7 +257,8 @@ export interface SpeechToTextRetrieveTranscriptionParams {
|
|
|
254
257
|
| 'Soniox'
|
|
255
258
|
| 'Parakeet'
|
|
256
259
|
| 'Humain'
|
|
257
|
-
| 'Reson8'
|
|
260
|
+
| 'Reson8'
|
|
261
|
+
| 'Cohere';
|
|
258
262
|
|
|
259
263
|
/**
|
|
260
264
|
* Silence duration (in milliseconds) that triggers end-of-speech detection. When
|
|
@@ -283,7 +287,9 @@ export interface SpeechToTextRetrieveTranscriptionParams {
|
|
|
283
287
|
keywords?: string;
|
|
284
288
|
|
|
285
289
|
/**
|
|
286
|
-
* The language spoken in the audio stream.
|
|
290
|
+
* The language spoken in the audio stream. For `cohere/ar-stt`, this must be `ar`
|
|
291
|
+
* or `en` — unlike other engines, Cohere does not auto-detect the language, and
|
|
292
|
+
* rejects unsupported values including `auto`; omitting it defaults to `ar`.
|
|
287
293
|
*/
|
|
288
294
|
language?: string;
|
|
289
295
|
|
|
@@ -309,13 +315,21 @@ export interface SpeechToTextRetrieveTranscriptionParams {
|
|
|
309
315
|
| 'soniox/stt-rt-v4'
|
|
310
316
|
| 'nvidia/parakeet-v3'
|
|
311
317
|
| 'humain/realtime'
|
|
312
|
-
| 'reson8/turns'
|
|
318
|
+
| 'reson8/turns'
|
|
319
|
+
| 'cohere/ar-stt';
|
|
313
320
|
|
|
314
321
|
/**
|
|
315
322
|
* Enable redaction of sensitive information (e.g., PCI data, SSN) from
|
|
316
323
|
* transcription results. Supported values depend on the transcription engine.
|
|
317
324
|
*/
|
|
318
325
|
redact?: string;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Audio sample rate in Hz. Required when `input_format` is a raw encoding
|
|
329
|
+
* (`linear16`, `linear32`) — those formats carry no header metadata. Ignored for
|
|
330
|
+
* container formats (`mp3`, `wav`), which self-describe their rate.
|
|
331
|
+
*/
|
|
332
|
+
sample_rate?: number;
|
|
319
333
|
}
|
|
320
334
|
|
|
321
335
|
export declare namespace SpeechToText {
|
|
@@ -6,25 +6,19 @@ import * as NumberOrdersAPI from './number-orders';
|
|
|
6
6
|
import * as CallsAPI from './calls/calls';
|
|
7
7
|
import * as MessagesAPI from './messages/messages';
|
|
8
8
|
import * as ThreadsAPI from './email-inboxes/threads/threads';
|
|
9
|
-
import { Webhook } from 'standardwebhooks';
|
|
10
9
|
import { EmailBracketCursorPagination } from '../core/pagination';
|
|
10
|
+
import { unsafeUnwrapWebhook, unwrapWebhook } from '../lib/webhooks';
|
|
11
11
|
|
|
12
12
|
export class Webhooks extends APIResource {
|
|
13
|
-
unwrap(
|
|
13
|
+
async unwrap(
|
|
14
14
|
body: string,
|
|
15
15
|
{ headers, key }: { headers: Record<string, string>; key?: string },
|
|
16
|
-
): UnwrapWebhookEvent {
|
|
17
|
-
|
|
18
|
-
const keyStr: string | null = key === undefined ? this._client.publicKey : key;
|
|
19
|
-
if (keyStr === null) throw new Error('Webhook key must not be null in order to unwrap');
|
|
20
|
-
const wh = new Webhook(keyStr);
|
|
21
|
-
wh.verify(body, headers);
|
|
22
|
-
}
|
|
23
|
-
return JSON.parse(body) as UnwrapWebhookEvent;
|
|
16
|
+
): Promise<UnwrapWebhookEvent> {
|
|
17
|
+
return unwrapWebhook<UnwrapWebhookEvent>(body, { headers, key }, this._client.publicKey);
|
|
24
18
|
}
|
|
25
19
|
|
|
26
20
|
unsafeUnwrap(body: string): UnsafeUnwrapWebhookEvent {
|
|
27
|
-
return
|
|
21
|
+
return unsafeUnwrapWebhook<UnsafeUnwrapWebhookEvent>(body);
|
|
28
22
|
}
|
|
29
23
|
}
|
|
30
24
|
|
|
@@ -4482,9 +4476,10 @@ export namespace Transcription {
|
|
|
4482
4476
|
export namespace Payload {
|
|
4483
4477
|
export interface TranscriptionData {
|
|
4484
4478
|
/**
|
|
4485
|
-
* Speech recognition confidence level.
|
|
4479
|
+
* Speech recognition confidence level. `cohere/ar-stt` returns `null` here rather
|
|
4480
|
+
* than omitting the field.
|
|
4486
4481
|
*/
|
|
4487
|
-
confidence?: number;
|
|
4482
|
+
confidence?: number | null;
|
|
4488
4483
|
|
|
4489
4484
|
/**
|
|
4490
4485
|
* When false, it means that this is an interim result.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as AuthenticationProvidersAPI from './authentication-providers';
|
|
5
4
|
import { APIPromise } from '../core/api-promise';
|
|
6
5
|
import { RequestOptions } from '../internal/request-options';
|
|
7
6
|
|
|
@@ -10,7 +9,8 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
10
9
|
*/
|
|
11
10
|
export class WirelessBlocklistValues extends APIResource {
|
|
12
11
|
/**
|
|
13
|
-
* Retrieve all wireless blocklist values for a given blocklist type.
|
|
12
|
+
* Retrieve all wireless blocklist values for a given blocklist type. The request
|
|
13
|
+
* returns `422` when `type` is missing or invalid.
|
|
14
14
|
*/
|
|
15
15
|
list(
|
|
16
16
|
query: WirelessBlocklistValueListParams,
|
|
@@ -21,12 +21,10 @@ export class WirelessBlocklistValues extends APIResource {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface WirelessBlocklistValueListResponse {
|
|
24
|
-
data
|
|
24
|
+
data:
|
|
25
25
|
| Array<WirelessBlocklistValueListResponse.Country>
|
|
26
26
|
| Array<WirelessBlocklistValueListResponse.Mcc>
|
|
27
27
|
| Array<WirelessBlocklistValueListResponse.Plmn>;
|
|
28
|
-
|
|
29
|
-
meta?: AuthenticationProvidersAPI.PaginationMeta;
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
export namespace WirelessBlocklistValueListResponse {
|
|
@@ -34,36 +32,21 @@ export namespace WirelessBlocklistValueListResponse {
|
|
|
34
32
|
/**
|
|
35
33
|
* ISO 3166-1 Alpha-2 Country Code.
|
|
36
34
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* The name of the country.
|
|
41
|
-
*/
|
|
42
|
-
name: string;
|
|
35
|
+
country_code: string;
|
|
43
36
|
}
|
|
44
37
|
|
|
45
38
|
export interface Mcc {
|
|
46
39
|
/**
|
|
47
40
|
* Mobile Country Code.
|
|
48
41
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The name of the country.
|
|
53
|
-
*/
|
|
54
|
-
name: string;
|
|
42
|
+
mcc: string;
|
|
55
43
|
}
|
|
56
44
|
|
|
57
45
|
export interface Plmn {
|
|
58
46
|
/**
|
|
59
47
|
* Public land mobile network code (MCC + MNC).
|
|
60
48
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* The name of the network.
|
|
65
|
-
*/
|
|
66
|
-
name: string;
|
|
49
|
+
plmn: string;
|
|
67
50
|
}
|
|
68
51
|
}
|
|
69
52
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from '../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../internal/request-options';
|
|
7
8
|
import { path } from '../internal/utils/path';
|
|
8
9
|
|
|
@@ -16,7 +17,7 @@ export class WirelessBlocklists extends APIResource {
|
|
|
16
17
|
* @example
|
|
17
18
|
* ```ts
|
|
18
19
|
* // Automatically fetches more pages as needed.
|
|
19
|
-
* for await (const
|
|
20
|
+
* for await (const wirelessWirelessBlocklist of client.wirelessBlocklists.list()) {
|
|
20
21
|
* // ...
|
|
21
22
|
* }
|
|
22
23
|
* ```
|
|
@@ -24,8 +25,8 @@ export class WirelessBlocklists extends APIResource {
|
|
|
24
25
|
list(
|
|
25
26
|
query: WirelessBlocklistListParams | null | undefined = {},
|
|
26
27
|
options?: RequestOptions,
|
|
27
|
-
): PagePromise<
|
|
28
|
-
return this._client.getAPIList('/wireless_blocklists', DefaultFlatPagination<
|
|
28
|
+
): PagePromise<WirelessWirelessBlocklistsDefaultFlatPagination, WirelessWirelessBlocklist> {
|
|
29
|
+
return this._client.getAPIList('/wireless_blocklists', DefaultFlatPagination<WirelessWirelessBlocklist>, {
|
|
29
30
|
query,
|
|
30
31
|
...options,
|
|
31
32
|
});
|
|
@@ -72,18 +73,22 @@ export class WirelessBlocklists extends APIResource {
|
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
/**
|
|
75
|
-
* Permanently deletes the specified wireless blocklist from your account.
|
|
76
|
+
* Permanently deletes the specified wireless blocklist from your account. The
|
|
77
|
+
* request returns `422` when the wireless blocklist is assigned to a SIM Card
|
|
78
|
+
* Group.
|
|
76
79
|
*
|
|
77
80
|
* @example
|
|
78
81
|
* ```ts
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* );
|
|
82
|
+
* await client.wirelessBlocklists.delete(
|
|
83
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
84
|
+
* );
|
|
83
85
|
* ```
|
|
84
86
|
*/
|
|
85
|
-
delete(id: string, options?: RequestOptions): APIPromise<
|
|
86
|
-
return this._client.delete(path`/wireless_blocklists/${id}`,
|
|
87
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
88
|
+
return this._client.delete(path`/wireless_blocklists/${id}`, {
|
|
89
|
+
...options,
|
|
90
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
91
|
+
});
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
/**
|
|
@@ -102,7 +107,8 @@ export class WirelessBlocklists extends APIResource {
|
|
|
102
107
|
}
|
|
103
108
|
}
|
|
104
109
|
|
|
105
|
-
export type
|
|
110
|
+
export type WirelessWirelessBlocklistsDefaultFlatPagination =
|
|
111
|
+
DefaultFlatPagination<WirelessWirelessBlocklist>;
|
|
106
112
|
|
|
107
113
|
export interface WirelessBlocklist {
|
|
108
114
|
/**
|
|
@@ -138,20 +144,48 @@ export interface WirelessBlocklist {
|
|
|
138
144
|
values?: Array<string>;
|
|
139
145
|
}
|
|
140
146
|
|
|
147
|
+
export interface WirelessWirelessBlocklist {
|
|
148
|
+
/**
|
|
149
|
+
* Identifies the resource.
|
|
150
|
+
*/
|
|
151
|
+
id?: string;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* ISO 8601 formatted date-time indicating when the resource was created.
|
|
155
|
+
*/
|
|
156
|
+
created_at?: string;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The wireless blocklist name.
|
|
160
|
+
*/
|
|
161
|
+
name?: string;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The type of the wireless blocklist.
|
|
165
|
+
*/
|
|
166
|
+
type?: 'country' | 'mcc' | 'plmn';
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* ISO 8601 formatted date-time indicating when the resource was updated.
|
|
170
|
+
*/
|
|
171
|
+
updated_at?: string;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Values to block. The values here depend on the `type` of Wireless Blocklist.
|
|
175
|
+
*/
|
|
176
|
+
values?: Array<string>;
|
|
177
|
+
}
|
|
178
|
+
|
|
141
179
|
export interface WirelessBlocklistCreateResponse {
|
|
142
|
-
data?:
|
|
180
|
+
data?: WirelessWirelessBlocklist;
|
|
143
181
|
}
|
|
144
182
|
|
|
145
183
|
export interface WirelessBlocklistRetrieveResponse {
|
|
146
|
-
data?:
|
|
184
|
+
data?: WirelessWirelessBlocklist;
|
|
147
185
|
}
|
|
148
186
|
|
|
149
187
|
export interface WirelessBlocklistUpdateResponse {
|
|
150
|
-
data?:
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export interface WirelessBlocklistDeleteResponse {
|
|
154
|
-
data?: WirelessBlocklist;
|
|
188
|
+
data?: WirelessWirelessBlocklist;
|
|
155
189
|
}
|
|
156
190
|
|
|
157
191
|
export interface WirelessBlocklistListParams extends DefaultFlatPaginationParams {
|
|
@@ -164,11 +198,6 @@ export interface WirelessBlocklistListParams extends DefaultFlatPaginationParams
|
|
|
164
198
|
* When the Private Wireless Gateway was last updated.
|
|
165
199
|
*/
|
|
166
200
|
'filter[type]'?: string;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Values to filter on (inclusive).
|
|
170
|
-
*/
|
|
171
|
-
'filter[values]'?: string;
|
|
172
201
|
}
|
|
173
202
|
|
|
174
203
|
export interface WirelessBlocklistUpdateParams {
|
|
@@ -203,11 +232,11 @@ export interface WirelessBlocklistCreateParams {
|
|
|
203
232
|
export declare namespace WirelessBlocklists {
|
|
204
233
|
export {
|
|
205
234
|
type WirelessBlocklist as WirelessBlocklist,
|
|
235
|
+
type WirelessWirelessBlocklist as WirelessWirelessBlocklist,
|
|
206
236
|
type WirelessBlocklistCreateResponse as WirelessBlocklistCreateResponse,
|
|
207
237
|
type WirelessBlocklistRetrieveResponse as WirelessBlocklistRetrieveResponse,
|
|
208
238
|
type WirelessBlocklistUpdateResponse as WirelessBlocklistUpdateResponse,
|
|
209
|
-
type
|
|
210
|
-
type WirelessBlocklistsDefaultFlatPagination as WirelessBlocklistsDefaultFlatPagination,
|
|
239
|
+
type WirelessWirelessBlocklistsDefaultFlatPagination as WirelessWirelessBlocklistsDefaultFlatPagination,
|
|
211
240
|
type WirelessBlocklistListParams as WirelessBlocklistListParams,
|
|
212
241
|
type WirelessBlocklistUpdateParams as WirelessBlocklistUpdateParams,
|
|
213
242
|
type WirelessBlocklistCreateParams as WirelessBlocklistCreateParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '7.
|
|
1
|
+
export const VERSION = '7.19.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.
|
|
1
|
+
export declare const VERSION = "7.19.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.
|
|
1
|
+
export declare const VERSION = "7.19.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '7.
|
|
1
|
+
export const VERSION = '7.19.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|