telnyx 7.7.0 → 7.8.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 +9 -0
- package/client.d.mts +7 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -4
- 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/package.json +1 -1
- package/resources/ai/ai.d.mts +3 -36
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +3 -36
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js +0 -30
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs +1 -31
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +43 -1
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +43 -1
- 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 +1 -188
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +1 -188
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/chat.js +0 -14
- package/resources/ai/chat.js.map +1 -1
- package/resources/ai/chat.mjs +0 -14
- package/resources/ai/chat.mjs.map +1 -1
- package/resources/ai/index.d.mts +2 -2
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -2
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs +1 -1
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/tools.d.mts +6 -0
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +6 -0
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/calls/actions.d.mts +23 -1
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +23 -1
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +3 -0
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +3 -0
- 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/conferences/actions.d.mts +6 -0
- package/resources/conferences/actions.d.mts.map +1 -1
- package/resources/conferences/actions.d.ts +6 -0
- package/resources/conferences/actions.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/index.d.mts +1 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +4 -82
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +4 -82
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +3 -15
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +3 -15
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/phone-numbers/phone-numbers.d.mts +21 -0
- package/resources/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers/phone-numbers.d.ts +21 -0
- package/resources/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/phone-numbers/phone-numbers.mjs.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.mts +16 -11
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +16 -11
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/src/client.ts +3 -8
- package/src/resources/ai/ai.ts +2 -57
- package/src/resources/ai/assistants/assistants.ts +49 -0
- package/src/resources/ai/chat.ts +2 -234
- package/src/resources/ai/index.ts +1 -9
- package/src/resources/ai/tools.ts +4 -0
- package/src/resources/calls/actions.ts +23 -1
- package/src/resources/calls/calls.ts +3 -0
- package/src/resources/conferences/actions.ts +6 -0
- package/src/resources/index.ts +0 -4
- package/src/resources/messages/index.ts +0 -2
- package/src/resources/messages/messages.ts +3 -112
- package/src/resources/phone-numbers/phone-numbers.ts +24 -0
- package/src/resources/text-to-speech/text-to-speech.ts +16 -11
- 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
|
@@ -15,6 +15,9 @@ import { APIPromise } from '../../core/api-promise';
|
|
|
15
15
|
import { RequestOptions } from '../../internal/request-options';
|
|
16
16
|
import { path } from '../../internal/utils/path';
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Messages
|
|
20
|
+
*/
|
|
18
21
|
export class Messages extends APIResource {
|
|
19
22
|
rcs: RcsAPI.Rcs = new RcsAPI.Rcs(this._client);
|
|
20
23
|
|
|
@@ -110,25 +113,6 @@ export class Messages extends APIResource {
|
|
|
110
113
|
return this._client.post('/messages/group_mms', { body, ...options });
|
|
111
114
|
}
|
|
112
115
|
|
|
113
|
-
/**
|
|
114
|
-
* Send a Whatsapp message
|
|
115
|
-
*
|
|
116
|
-
* @example
|
|
117
|
-
* ```ts
|
|
118
|
-
* const response = await client.messages.sendWhatsapp({
|
|
119
|
-
* from: '+13125551234',
|
|
120
|
-
* to: '+13125551234',
|
|
121
|
-
* whatsapp_message: {},
|
|
122
|
-
* });
|
|
123
|
-
* ```
|
|
124
|
-
*/
|
|
125
|
-
sendWhatsapp(
|
|
126
|
-
body: MessageSendWhatsappParams,
|
|
127
|
-
options?: RequestOptions,
|
|
128
|
-
): APIPromise<MessageSendWhatsappResponse> {
|
|
129
|
-
return this._client.post('/messages/whatsapp', { body, ...options });
|
|
130
|
-
}
|
|
131
|
-
|
|
132
116
|
/**
|
|
133
117
|
* Schedule a message with a Phone Number, Alphanumeric Sender ID, Short Code or
|
|
134
118
|
* Number Pool.
|
|
@@ -1560,68 +1544,6 @@ export interface MessageSendShortCodeResponse {
|
|
|
1560
1544
|
data?: OutboundMessagePayload;
|
|
1561
1545
|
}
|
|
1562
1546
|
|
|
1563
|
-
export interface MessageSendWhatsappResponse {
|
|
1564
|
-
data?: MessageSendWhatsappResponse.Data;
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
export namespace MessageSendWhatsappResponse {
|
|
1568
|
-
export interface Data {
|
|
1569
|
-
/**
|
|
1570
|
-
* message ID
|
|
1571
|
-
*/
|
|
1572
|
-
id?: string;
|
|
1573
|
-
|
|
1574
|
-
body?: MessagesAPI.WhatsappMessageContent;
|
|
1575
|
-
|
|
1576
|
-
direction?: string;
|
|
1577
|
-
|
|
1578
|
-
encoding?: string;
|
|
1579
|
-
|
|
1580
|
-
from?: Data.From;
|
|
1581
|
-
|
|
1582
|
-
messaging_profile_id?: string;
|
|
1583
|
-
|
|
1584
|
-
organization_id?: string;
|
|
1585
|
-
|
|
1586
|
-
received_at?: string;
|
|
1587
|
-
|
|
1588
|
-
record_type?: string;
|
|
1589
|
-
|
|
1590
|
-
to?: Array<MessagesAPI.RcsToItem>;
|
|
1591
|
-
|
|
1592
|
-
type?: string;
|
|
1593
|
-
|
|
1594
|
-
/**
|
|
1595
|
-
* Seconds the message is queued due to rate limiting before being sent to the
|
|
1596
|
-
* carrier. Represents the maximum wait across all applicable rate limits (account,
|
|
1597
|
-
* carrier, campaign). 0.0 = no queuing delay.
|
|
1598
|
-
*/
|
|
1599
|
-
wait_seconds?: number | null;
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
export namespace Data {
|
|
1603
|
-
export interface From {
|
|
1604
|
-
/**
|
|
1605
|
-
* The carrier of the sender.
|
|
1606
|
-
*/
|
|
1607
|
-
carrier?: string;
|
|
1608
|
-
|
|
1609
|
-
/**
|
|
1610
|
-
* The line-type of the sender.
|
|
1611
|
-
*/
|
|
1612
|
-
line_type?: 'Wireline' | 'Wireless' | 'VoWiFi' | 'VoIP' | 'Pre-Paid Wireless' | '';
|
|
1613
|
-
|
|
1614
|
-
/**
|
|
1615
|
-
* Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short
|
|
1616
|
-
* code).
|
|
1617
|
-
*/
|
|
1618
|
-
phone_number?: string;
|
|
1619
|
-
|
|
1620
|
-
status?: 'received' | 'delivered';
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
1547
|
export interface MessageSendWithAlphanumericSenderResponse {
|
|
1626
1548
|
data?: OutboundMessagePayload;
|
|
1627
1549
|
}
|
|
@@ -1964,35 +1886,6 @@ export interface MessageSendGroupMmsParams {
|
|
|
1964
1886
|
webhook_url?: string;
|
|
1965
1887
|
}
|
|
1966
1888
|
|
|
1967
|
-
export interface MessageSendWhatsappParams {
|
|
1968
|
-
/**
|
|
1969
|
-
* Phone number in +E.164 format associated with Whatsapp account
|
|
1970
|
-
*/
|
|
1971
|
-
from: string;
|
|
1972
|
-
|
|
1973
|
-
/**
|
|
1974
|
-
* Phone number in +E.164 format
|
|
1975
|
-
*/
|
|
1976
|
-
to: string;
|
|
1977
|
-
|
|
1978
|
-
whatsapp_message: WhatsappMessageContent;
|
|
1979
|
-
|
|
1980
|
-
/**
|
|
1981
|
-
* Messaging profile ID - required if the 'from' number is not SMS-enabled
|
|
1982
|
-
*/
|
|
1983
|
-
messaging_profile_id?: string;
|
|
1984
|
-
|
|
1985
|
-
/**
|
|
1986
|
-
* Message type - must be set to "WHATSAPP"
|
|
1987
|
-
*/
|
|
1988
|
-
type?: 'WHATSAPP';
|
|
1989
|
-
|
|
1990
|
-
/**
|
|
1991
|
-
* The URL where webhooks related to this message will be sent.
|
|
1992
|
-
*/
|
|
1993
|
-
webhook_url?: string;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
1889
|
export interface MessageScheduleParams {
|
|
1997
1890
|
/**
|
|
1998
1891
|
* Receiving address (+E.164 formatted phone number or short code).
|
|
@@ -2132,14 +2025,12 @@ export declare namespace Messages {
|
|
|
2132
2025
|
type MessageSendLongCodeResponse as MessageSendLongCodeResponse,
|
|
2133
2026
|
type MessageSendNumberPoolResponse as MessageSendNumberPoolResponse,
|
|
2134
2027
|
type MessageSendShortCodeResponse as MessageSendShortCodeResponse,
|
|
2135
|
-
type MessageSendWhatsappResponse as MessageSendWhatsappResponse,
|
|
2136
2028
|
type MessageSendWithAlphanumericSenderResponse as MessageSendWithAlphanumericSenderResponse,
|
|
2137
2029
|
type MessageSendParams as MessageSendParams,
|
|
2138
2030
|
type MessageSendLongCodeParams as MessageSendLongCodeParams,
|
|
2139
2031
|
type MessageSendNumberPoolParams as MessageSendNumberPoolParams,
|
|
2140
2032
|
type MessageSendShortCodeParams as MessageSendShortCodeParams,
|
|
2141
2033
|
type MessageSendGroupMmsParams as MessageSendGroupMmsParams,
|
|
2142
|
-
type MessageSendWhatsappParams as MessageSendWhatsappParams,
|
|
2143
2034
|
type MessageScheduleParams as MessageScheduleParams,
|
|
2144
2035
|
type MessageSendWithAlphanumericSenderParams as MessageSendWithAlphanumericSenderParams,
|
|
2145
2036
|
};
|
|
@@ -264,6 +264,14 @@ export interface PhoneNumberDetailed {
|
|
|
264
264
|
*/
|
|
265
265
|
tags: Array<string>;
|
|
266
266
|
|
|
267
|
+
/**
|
|
268
|
+
* ISO 8601 formatted date indicating when the phone number was first activated
|
|
269
|
+
* (transitioned from purchase-pending or port-pending to active). Will be null for
|
|
270
|
+
* numbers that have not yet been activated, or for legacy numbers activated before
|
|
271
|
+
* this field was tracked.
|
|
272
|
+
*/
|
|
273
|
+
activated_at?: string | null;
|
|
274
|
+
|
|
267
275
|
/**
|
|
268
276
|
* Identifies the billing group associated with the phone number.
|
|
269
277
|
*/
|
|
@@ -384,6 +392,14 @@ export namespace PhoneNumberDeleteResponse {
|
|
|
384
392
|
*/
|
|
385
393
|
id?: string;
|
|
386
394
|
|
|
395
|
+
/**
|
|
396
|
+
* ISO 8601 formatted date indicating when the phone number was first activated
|
|
397
|
+
* (transitioned from purchase-pending or port-pending to active). Will be null for
|
|
398
|
+
* numbers that have not yet been activated, or for legacy numbers activated before
|
|
399
|
+
* this field was tracked.
|
|
400
|
+
*/
|
|
401
|
+
activated_at?: string | null;
|
|
402
|
+
|
|
387
403
|
/**
|
|
388
404
|
* Identifies the billing group associated with the phone number.
|
|
389
405
|
*/
|
|
@@ -530,6 +546,14 @@ export interface PhoneNumberSlimListResponse {
|
|
|
530
546
|
*/
|
|
531
547
|
id?: string;
|
|
532
548
|
|
|
549
|
+
/**
|
|
550
|
+
* ISO 8601 formatted date indicating when the phone number was first activated
|
|
551
|
+
* (transitioned from purchase-pending or port-pending to active). Will be null for
|
|
552
|
+
* numbers that have not yet been activated, or for legacy numbers activated before
|
|
553
|
+
* this field was tracked.
|
|
554
|
+
*/
|
|
555
|
+
activated_at?: string | null;
|
|
556
|
+
|
|
533
557
|
/**
|
|
534
558
|
* Identifies the billing group associated with the phone number.
|
|
535
559
|
*/
|
|
@@ -322,7 +322,9 @@ export interface TextToSpeechGenerateSpeechParams {
|
|
|
322
322
|
/**
|
|
323
323
|
* Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
|
|
324
324
|
* `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
|
|
325
|
-
* `volume`, and `emotion`.
|
|
325
|
+
* `volume`, and `emotion`. `Bayan` and `Sukhan` don't use `temperature`, `volume`,
|
|
326
|
+
* or `emotion`, and don't support `voice_speed`. `Sukhan`'s `response_format` is
|
|
327
|
+
* restricted to `mp3` or `pcm` (no `wav`).
|
|
326
328
|
*/
|
|
327
329
|
telnyx?: TextToSpeechGenerateSpeechParams.Telnyx;
|
|
328
330
|
|
|
@@ -339,10 +341,10 @@ export interface TextToSpeechGenerateSpeechParams {
|
|
|
339
341
|
/**
|
|
340
342
|
* Voice identifier in the format `provider.model_id.voice_id` or
|
|
341
343
|
* `provider.voice_id`. Examples: `telnyx.NaturalHD.Alloy`,
|
|
342
|
-
* `Telnyx.Ultra.<voice_id>`, `
|
|
343
|
-
* `aws.Polly.Generative.Lucia`. When
|
|
344
|
-
* `voice_id` are extracted automatically and
|
|
345
|
-
* parameters.
|
|
344
|
+
* `Telnyx.Ultra.<voice_id>`, `Telnyx.Bayan.Ahmed`, `Telnyx.Sukhan.urdu-professor`,
|
|
345
|
+
* `azure.en-US-AvaMultilingualNeural`, `aws.Polly.Generative.Lucia`. When
|
|
346
|
+
* provided, `provider`, `model_id`, and `voice_id` are extracted automatically and
|
|
347
|
+
* take precedence over individual parameters.
|
|
346
348
|
*/
|
|
347
349
|
voice?: string;
|
|
348
350
|
|
|
@@ -532,7 +534,9 @@ export namespace TextToSpeechGenerateSpeechParams {
|
|
|
532
534
|
/**
|
|
533
535
|
* Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
|
|
534
536
|
* `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
|
|
535
|
-
* `volume`, and `emotion`.
|
|
537
|
+
* `volume`, and `emotion`. `Bayan` and `Sukhan` don't use `temperature`, `volume`,
|
|
538
|
+
* or `emotion`, and don't support `voice_speed`. `Sukhan`'s `response_format` is
|
|
539
|
+
* restricted to `mp3` or `pcm` (no `wav`).
|
|
536
540
|
*/
|
|
537
541
|
export interface Telnyx {
|
|
538
542
|
/**
|
|
@@ -557,7 +561,8 @@ export namespace TextToSpeechGenerateSpeechParams {
|
|
|
557
561
|
temperature?: number;
|
|
558
562
|
|
|
559
563
|
/**
|
|
560
|
-
* Voice speed multiplier. Applies to all models
|
|
564
|
+
* Voice speed multiplier. Applies to all models except `Bayan` and `Sukhan`, which
|
|
565
|
+
* don't support it. Range: 0.5 to 2.0.
|
|
561
566
|
*/
|
|
562
567
|
voice_speed?: number;
|
|
563
568
|
|
|
@@ -627,10 +632,10 @@ export interface TextToSpeechRetrieveSpeechParams {
|
|
|
627
632
|
/**
|
|
628
633
|
* Voice identifier in the format `provider.model_id.voice_id` or
|
|
629
634
|
* `provider.voice_id` (e.g. `telnyx.NaturalHD.Telnyx_Alloy`,
|
|
630
|
-
* `Telnyx.Ultra.<voice_id>`,
|
|
631
|
-
* provided, the `provider`,
|
|
632
|
-
* automatically. Takes precedence over
|
|
633
|
-
* parameters.
|
|
635
|
+
* `Telnyx.Ultra.<voice_id>`, `Telnyx.Bayan.Ahmed`, `Telnyx.Sukhan.urdu-professor`,
|
|
636
|
+
* or `azure.en-US-AvaMultilingualNeural`). When provided, the `provider`,
|
|
637
|
+
* `model_id`, and `voice_id` are extracted automatically. Takes precedence over
|
|
638
|
+
* individual `provider`/`model_id`/`voice_id` parameters.
|
|
634
639
|
*/
|
|
635
640
|
voice?: string;
|
|
636
641
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '7.
|
|
1
|
+
export const VERSION = '7.8.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.8.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.8.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.8.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|