telnyx 7.20.0 → 7.21.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 +7 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/anthropic/v1.d.mts +16 -0
- package/resources/ai/anthropic/v1.d.mts.map +1 -1
- package/resources/ai/anthropic/v1.d.ts +16 -0
- package/resources/ai/anthropic/v1.d.ts.map +1 -1
- package/resources/ai/chat.d.mts +16 -0
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +16 -0
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/openai/chat.d.mts +16 -0
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +16 -0
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/openai/openai.d.mts +16 -0
- package/resources/ai/openai/openai.d.mts.map +1 -1
- package/resources/ai/openai/openai.d.ts +16 -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/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messaging-profiles/actions.d.mts +1 -1
- package/resources/messaging-profiles/actions.d.mts.map +1 -1
- package/resources/messaging-profiles/actions.d.ts +1 -1
- package/resources/messaging-profiles/actions.d.ts.map +1 -1
- package/resources/messaging-profiles/index.d.mts +1 -1
- package/resources/messaging-profiles/index.d.mts.map +1 -1
- package/resources/messaging-profiles/index.d.ts +1 -1
- package/resources/messaging-profiles/index.d.ts.map +1 -1
- package/resources/messaging-profiles/index.js.map +1 -1
- package/resources/messaging-profiles/index.mjs.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.d.mts +152 -8
- package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.d.ts +152 -8
- package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.js +1 -1
- package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
- package/resources/messaging-profiles/messaging-profiles.mjs +1 -1
- package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
- package/src/client.ts +4 -2
- package/src/resources/ai/anthropic/v1.ts +18 -0
- package/src/resources/ai/chat.ts +18 -0
- package/src/resources/ai/openai/chat.ts +18 -0
- package/src/resources/ai/openai/openai.ts +18 -0
- package/src/resources/index.ts +2 -1
- package/src/resources/messaging-profiles/actions.ts +1 -1
- package/src/resources/messaging-profiles/index.ts +2 -1
- package/src/resources/messaging-profiles/messaging-profiles.ts +183 -9
- 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
|
@@ -115,6 +115,15 @@ export interface ChatCreateCompletionParams {
|
|
|
115
115
|
*/
|
|
116
116
|
min_p?: number;
|
|
117
117
|
|
|
118
|
+
/**
|
|
119
|
+
* How strictly `region` is applied. `preferred` (the default when `region` is set)
|
|
120
|
+
* tries that region first and falls back to another when the model cannot be
|
|
121
|
+
* served there, so a request that would have succeeded still succeeds. `strict`
|
|
122
|
+
* pins the request: it is served from that region or it fails with a 422, never
|
|
123
|
+
* redirected to another region. Requires `region`.
|
|
124
|
+
*/
|
|
125
|
+
mode?: 'preferred' | 'strict';
|
|
126
|
+
|
|
118
127
|
/**
|
|
119
128
|
* The language model to chat with.
|
|
120
129
|
*/
|
|
@@ -139,6 +148,15 @@ export interface ChatCreateCompletionParams {
|
|
|
139
148
|
*/
|
|
140
149
|
reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
141
150
|
|
|
151
|
+
/**
|
|
152
|
+
* Optional data-residency region the request should be served from, using the same
|
|
153
|
+
* vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
|
|
154
|
+
* Supported for Telnyx-hosted models only: a request routed to an external
|
|
155
|
+
* provider never passes through Telnyx model routing, so a region cannot be
|
|
156
|
+
* enforced for it. Omit for today's latency-based routing.
|
|
157
|
+
*/
|
|
158
|
+
region?: 'USA' | 'EU' | 'AUS' | 'UAE';
|
|
159
|
+
|
|
142
160
|
/**
|
|
143
161
|
* Use this is you want to guarantee a JSON output without defining a schema. For
|
|
144
162
|
* control over the schema, use `guided_json`.
|
|
@@ -121,6 +121,15 @@ export interface OpenAICreateResponseParams {
|
|
|
121
121
|
*/
|
|
122
122
|
instructions?: string;
|
|
123
123
|
|
|
124
|
+
/**
|
|
125
|
+
* How strictly `region` is applied. `preferred` (the default when `region` is set)
|
|
126
|
+
* tries that region first and falls back to another when the model cannot be
|
|
127
|
+
* served there, so a request that would have succeeded still succeeds. `strict`
|
|
128
|
+
* pins the request: it is served from that region or it fails with a 422, never
|
|
129
|
+
* redirected to another region. Requires `region`.
|
|
130
|
+
*/
|
|
131
|
+
mode?: 'preferred' | 'strict';
|
|
132
|
+
|
|
124
133
|
/**
|
|
125
134
|
* Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
|
|
126
135
|
* another model available from the Telnyx OpenAI-compatible models endpoint.
|
|
@@ -129,6 +138,15 @@ export interface OpenAICreateResponseParams {
|
|
|
129
138
|
|
|
130
139
|
reasoning?: OpenAICreateResponseParams.Reasoning;
|
|
131
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Optional data-residency region the request should be served from, using the same
|
|
143
|
+
* vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
|
|
144
|
+
* Supported for Telnyx-hosted models only: a request routed to an external
|
|
145
|
+
* provider never passes through Telnyx model routing, so a region cannot be
|
|
146
|
+
* enforced for it. Omit for today's latency-based routing.
|
|
147
|
+
*/
|
|
148
|
+
region?: 'USA' | 'EU' | 'AUS' | 'UAE';
|
|
149
|
+
|
|
132
150
|
/**
|
|
133
151
|
* The service tier to use for this request. Supported values vary by model; use
|
|
134
152
|
* `GET /v2/ai/openai/models` and inspect the model's `service_tiers` field. If
|
package/src/resources/index.ts
CHANGED
|
@@ -772,6 +772,7 @@ export {
|
|
|
772
772
|
} from './messaging-profile-metrics';
|
|
773
773
|
export {
|
|
774
774
|
MessagingProfiles,
|
|
775
|
+
type MessagingMessagingProfile,
|
|
775
776
|
type MessagingProfile,
|
|
776
777
|
type NumberPoolSettings,
|
|
777
778
|
type URLShortenerSettings,
|
|
@@ -787,7 +788,7 @@ export {
|
|
|
787
788
|
type MessagingProfileListShortCodesParams,
|
|
788
789
|
type MessagingProfileListAlphanumericSenderIDsParams,
|
|
789
790
|
type MessagingProfileRetrieveMetricsParams,
|
|
790
|
-
type
|
|
791
|
+
type MessagingMessagingProfilesDefaultFlatPagination,
|
|
791
792
|
} from './messaging-profiles/messaging-profiles';
|
|
792
793
|
export { MessagingTollfree } from './messaging-tollfree/messaging-tollfree';
|
|
793
794
|
export {
|
|
@@ -16,6 +16,7 @@ export {
|
|
|
16
16
|
} from './autoresp-configs';
|
|
17
17
|
export {
|
|
18
18
|
MessagingProfiles,
|
|
19
|
+
type MessagingMessagingProfile,
|
|
19
20
|
type MessagingProfile,
|
|
20
21
|
type NumberPoolSettings,
|
|
21
22
|
type URLShortenerSettings,
|
|
@@ -31,5 +32,5 @@ export {
|
|
|
31
32
|
type MessagingProfileListShortCodesParams,
|
|
32
33
|
type MessagingProfileListAlphanumericSenderIDsParams,
|
|
33
34
|
type MessagingProfileRetrieveMetricsParams,
|
|
34
|
-
type
|
|
35
|
+
type MessagingMessagingProfilesDefaultFlatPagination,
|
|
35
36
|
} from './messaging-profiles';
|
|
@@ -41,7 +41,7 @@ export class MessagingProfiles extends APIResource {
|
|
|
41
41
|
* @example
|
|
42
42
|
* ```ts
|
|
43
43
|
* // Automatically fetches more pages as needed.
|
|
44
|
-
* for await (const
|
|
44
|
+
* for await (const messagingMessagingProfile of client.messagingProfiles.list()) {
|
|
45
45
|
* // ...
|
|
46
46
|
* }
|
|
47
47
|
* ```
|
|
@@ -49,8 +49,8 @@ export class MessagingProfiles extends APIResource {
|
|
|
49
49
|
list(
|
|
50
50
|
query: MessagingProfileListParams | null | undefined = {},
|
|
51
51
|
options?: RequestOptions,
|
|
52
|
-
): PagePromise<
|
|
53
|
-
return this._client.getAPIList('/messaging_profiles', DefaultFlatPagination<
|
|
52
|
+
): PagePromise<MessagingMessagingProfilesDefaultFlatPagination, MessagingMessagingProfile> {
|
|
53
|
+
return this._client.getAPIList('/messaging_profiles', DefaultFlatPagination<MessagingMessagingProfile>, {
|
|
54
54
|
query,
|
|
55
55
|
...options,
|
|
56
56
|
});
|
|
@@ -232,7 +232,165 @@ export class MessagingProfiles extends APIResource {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
export type
|
|
235
|
+
export type MessagingMessagingProfilesDefaultFlatPagination =
|
|
236
|
+
DefaultFlatPagination<MessagingMessagingProfile>;
|
|
237
|
+
|
|
238
|
+
export interface MessagingMessagingProfile {
|
|
239
|
+
/**
|
|
240
|
+
* Identifies the type of resource.
|
|
241
|
+
*/
|
|
242
|
+
id?: string;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The AI assistant ID associated with this messaging profile.
|
|
246
|
+
*/
|
|
247
|
+
ai_assistant_id?: string | null;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* The alphanumeric sender ID to use when sending to destinations that require an
|
|
251
|
+
* alphanumeric sender ID.
|
|
252
|
+
*/
|
|
253
|
+
alpha_sender?: string | null;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* ISO 8601 formatted date indicating when the resource was created.
|
|
257
|
+
*/
|
|
258
|
+
created_at?: string;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* The maximum amount of money (in USD) that can be spent by this profile before
|
|
262
|
+
* midnight UTC.
|
|
263
|
+
*/
|
|
264
|
+
daily_spend_limit?: string;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Whether to enforce the value configured by `daily_spend_limit`.
|
|
268
|
+
*/
|
|
269
|
+
daily_spend_limit_enabled?: boolean;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Specifies whether the messaging profile is enabled or not.
|
|
273
|
+
*/
|
|
274
|
+
enabled?: boolean;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* DEPRECATED: health check url service checking
|
|
278
|
+
*/
|
|
279
|
+
health_webhook_url?: string | null;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* enables SMS fallback for MMS messages.
|
|
283
|
+
*/
|
|
284
|
+
mms_fall_back_to_sms?: boolean;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* enables automated resizing of MMS media.
|
|
288
|
+
*/
|
|
289
|
+
mms_transcoding?: boolean;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Send messages only to mobile phone numbers.
|
|
293
|
+
*/
|
|
294
|
+
mobile_only?: boolean;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* A user friendly name for the messaging profile.
|
|
298
|
+
*/
|
|
299
|
+
name?: string;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Number Pool allows you to send messages from a pool of numbers of different
|
|
303
|
+
* types, assigning weights to each type. The pool consists of all the long code
|
|
304
|
+
* and toll free numbers assigned to the messaging profile.
|
|
305
|
+
*
|
|
306
|
+
* To disable this feature, set the object field to `null`.
|
|
307
|
+
*/
|
|
308
|
+
number_pool_settings?: NumberPoolSettings | null;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* The organization that owns this messaging profile.
|
|
312
|
+
*/
|
|
313
|
+
organization_id?: string;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Identifies the type of the resource.
|
|
317
|
+
*/
|
|
318
|
+
record_type?: 'messaging_profile';
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Indicates whether message content redaction is enabled for this profile. When
|
|
322
|
+
* enabled, message text, MMS media, and the counterparty phone number are redacted
|
|
323
|
+
* in message records and reporting. Requires organization activation — contact
|
|
324
|
+
* support to enable. The field is only present in responses for organizations with
|
|
325
|
+
* redaction access.
|
|
326
|
+
*/
|
|
327
|
+
redaction_enabled?: boolean;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Determines how much information is redacted for privacy or compliance purposes.
|
|
331
|
+
* Level 1: message records and reporting are redacted, but inbound webhook
|
|
332
|
+
* payloads are not. Level 2 (default): message records, reporting, and inbound
|
|
333
|
+
* webhook payloads are all redacted.
|
|
334
|
+
*/
|
|
335
|
+
redaction_level?: number;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* The resource group ID associated with this messaging profile.
|
|
339
|
+
*/
|
|
340
|
+
resource_group_id?: string | null;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Enables automatic character encoding optimization for SMS messages. When
|
|
344
|
+
* enabled, the system automatically selects the most efficient encoding (GSM-7 or
|
|
345
|
+
* UCS-2) based on message content to maximize character limits and minimize costs.
|
|
346
|
+
*/
|
|
347
|
+
smart_encoding?: boolean;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* ISO 8601 formatted date indicating when the resource was updated.
|
|
351
|
+
*/
|
|
352
|
+
updated_at?: string;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* The URL shortener feature allows automatic replacement of URLs that were
|
|
356
|
+
* generated using a public URL shortener service. Some examples include bit.do,
|
|
357
|
+
* bit.ly, goo.gl, ht.ly, is.gd, ow.ly, rebrand.ly, t.co, tiny.cc, and tinyurl.com.
|
|
358
|
+
* Such URLs are replaced with with links generated by Telnyx. The use of custom
|
|
359
|
+
* links can improve branding and message deliverability.
|
|
360
|
+
*
|
|
361
|
+
* To disable this feature, set the object field to `null`.
|
|
362
|
+
*/
|
|
363
|
+
url_shortener_settings?: URLShortenerSettings | null;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Secret used to authenticate with v1 endpoints.
|
|
367
|
+
*/
|
|
368
|
+
v1_secret?: string;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Determines which webhook format will be used, Telnyx API v1, v2, or a legacy
|
|
372
|
+
* 2010-04-01 format.
|
|
373
|
+
*/
|
|
374
|
+
webhook_api_version?: '1' | '2' | '2010-04-01';
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* The failover URL where webhooks related to this messaging profile will be sent
|
|
378
|
+
* if sending to the primary URL fails.
|
|
379
|
+
*/
|
|
380
|
+
webhook_failover_url?: string | null;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* The URL where webhooks related to this messaging profile will be sent.
|
|
384
|
+
*/
|
|
385
|
+
webhook_url?: string | null;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Destinations to which the messaging profile is allowed to send. The elements in
|
|
389
|
+
* the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
390
|
+
* destinations will be allowed.
|
|
391
|
+
*/
|
|
392
|
+
whitelisted_destinations?: Array<string>;
|
|
393
|
+
}
|
|
236
394
|
|
|
237
395
|
export interface MessagingProfile {
|
|
238
396
|
/**
|
|
@@ -471,19 +629,19 @@ export interface URLShortenerSettings {
|
|
|
471
629
|
}
|
|
472
630
|
|
|
473
631
|
export interface MessagingProfileCreateResponse {
|
|
474
|
-
data?:
|
|
632
|
+
data?: MessagingMessagingProfile;
|
|
475
633
|
}
|
|
476
634
|
|
|
477
635
|
export interface MessagingProfileRetrieveResponse {
|
|
478
|
-
data?:
|
|
636
|
+
data?: MessagingMessagingProfile;
|
|
479
637
|
}
|
|
480
638
|
|
|
481
639
|
export interface MessagingProfileUpdateResponse {
|
|
482
|
-
data?:
|
|
640
|
+
data?: MessagingMessagingProfile;
|
|
483
641
|
}
|
|
484
642
|
|
|
485
643
|
export interface MessagingProfileDeleteResponse {
|
|
486
|
-
data?:
|
|
644
|
+
data?: MessagingMessagingProfile;
|
|
487
645
|
}
|
|
488
646
|
|
|
489
647
|
export interface MessagingProfileRetrieveMetricsResponse {
|
|
@@ -689,6 +847,21 @@ export interface MessagingProfileUpdateParams {
|
|
|
689
847
|
*/
|
|
690
848
|
number_pool_settings?: NumberPoolSettings | null;
|
|
691
849
|
|
|
850
|
+
/**
|
|
851
|
+
* Set to true to enable message content redaction on this profile, or false to
|
|
852
|
+
* disable it. Ignored if the organization is not on the redaction allowlist. See
|
|
853
|
+
* the [Message Redaction guide](/docs/messaging/messages/message-redaction) for
|
|
854
|
+
* what is redacted.
|
|
855
|
+
*/
|
|
856
|
+
redaction_enabled?: boolean;
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* The redaction level to apply when redaction is enabled. 1: redact message
|
|
860
|
+
* records and reporting only. 2 (default): also redact inbound webhook payloads.
|
|
861
|
+
* See the [Message Redaction guide](/docs/messaging/messages/message-redaction).
|
|
862
|
+
*/
|
|
863
|
+
redaction_level?: number;
|
|
864
|
+
|
|
692
865
|
/**
|
|
693
866
|
* Enables automatic character encoding optimization for SMS messages. When
|
|
694
867
|
* enabled, the system automatically selects the most efficient encoding (GSM-7 or
|
|
@@ -757,6 +930,7 @@ MessagingProfiles.Actions = Actions;
|
|
|
757
930
|
|
|
758
931
|
export declare namespace MessagingProfiles {
|
|
759
932
|
export {
|
|
933
|
+
type MessagingMessagingProfile as MessagingMessagingProfile,
|
|
760
934
|
type MessagingProfile as MessagingProfile,
|
|
761
935
|
type NumberPoolSettings as NumberPoolSettings,
|
|
762
936
|
type URLShortenerSettings as URLShortenerSettings,
|
|
@@ -765,7 +939,7 @@ export declare namespace MessagingProfiles {
|
|
|
765
939
|
type MessagingProfileUpdateResponse as MessagingProfileUpdateResponse,
|
|
766
940
|
type MessagingProfileDeleteResponse as MessagingProfileDeleteResponse,
|
|
767
941
|
type MessagingProfileRetrieveMetricsResponse as MessagingProfileRetrieveMetricsResponse,
|
|
768
|
-
type
|
|
942
|
+
type MessagingMessagingProfilesDefaultFlatPagination as MessagingMessagingProfilesDefaultFlatPagination,
|
|
769
943
|
type MessagingProfileListParams as MessagingProfileListParams,
|
|
770
944
|
type MessagingProfileCreateParams as MessagingProfileCreateParams,
|
|
771
945
|
type MessagingProfileUpdateParams as MessagingProfileUpdateParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '7.
|
|
1
|
+
export const VERSION = '7.21.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.21.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.21.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.21.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|