telnyx 6.41.0 → 6.42.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 +41 -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 +11 -0
- package/client.js.map +1 -1
- package/client.mjs +11 -0
- package/client.mjs.map +1 -1
- package/core/EventEmitter.d.mts +11 -0
- package/core/EventEmitter.d.mts.map +1 -1
- package/core/EventEmitter.d.ts +11 -0
- package/core/EventEmitter.d.ts.map +1 -1
- package/core/EventEmitter.js +15 -1
- package/core/EventEmitter.js.map +1 -1
- package/core/EventEmitter.mjs +13 -0
- package/core/EventEmitter.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/internal/detect-platform.js +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/internal/ws-adapter-browser.d.mts +34 -0
- package/internal/ws-adapter-browser.d.mts.map +1 -0
- package/internal/ws-adapter-browser.d.ts +34 -0
- package/internal/ws-adapter-browser.d.ts.map +1 -0
- package/internal/ws-adapter-browser.js +88 -0
- package/internal/ws-adapter-browser.js.map +1 -0
- package/internal/ws-adapter-browser.mjs +84 -0
- package/internal/ws-adapter-browser.mjs.map +1 -0
- package/internal/ws-adapter-node.d.mts +27 -0
- package/internal/ws-adapter-node.d.mts.map +1 -0
- package/internal/ws-adapter-node.d.ts +27 -0
- package/internal/ws-adapter-node.d.ts.map +1 -0
- package/internal/ws-adapter-node.js +90 -0
- package/internal/ws-adapter-node.js.map +1 -0
- package/internal/ws-adapter-node.mjs +86 -0
- package/internal/ws-adapter-node.mjs.map +1 -0
- package/internal/ws-adapter.d.mts +24 -0
- package/internal/ws-adapter.d.mts.map +1 -0
- package/internal/ws-adapter.d.ts +24 -0
- package/internal/ws-adapter.d.ts.map +1 -0
- package/internal/ws-adapter.js +11 -0
- package/internal/ws-adapter.js.map +1 -0
- package/internal/ws-adapter.mjs +8 -0
- package/internal/ws-adapter.mjs.map +1 -0
- package/internal/ws.d.mts +80 -0
- package/internal/ws.d.mts.map +1 -0
- package/internal/ws.d.ts +80 -0
- package/internal/ws.d.ts.map +1 -0
- package/internal/ws.js +153 -0
- package/internal/ws.js.map +1 -0
- package/internal/ws.mjs +147 -0
- package/internal/ws.mjs.map +1 -0
- package/lib/text-to-speech-ws-base.d.mts +106 -0
- package/lib/text-to-speech-ws-base.d.mts.map +1 -0
- package/lib/text-to-speech-ws-base.d.ts +106 -0
- package/lib/text-to-speech-ws-base.d.ts.map +1 -0
- package/lib/text-to-speech-ws-base.js +475 -0
- package/lib/text-to-speech-ws-base.js.map +1 -0
- package/lib/text-to-speech-ws-base.mjs +471 -0
- package/lib/text-to-speech-ws-base.mjs.map +1 -0
- package/lib/text-to-speech-ws-internal.d.mts +71 -0
- package/lib/text-to-speech-ws-internal.d.mts.map +1 -0
- package/lib/text-to-speech-ws-internal.d.ts +71 -0
- package/lib/text-to-speech-ws-internal.d.ts.map +1 -0
- package/lib/text-to-speech-ws-internal.js +47 -0
- package/lib/text-to-speech-ws-internal.js.map +1 -0
- package/lib/text-to-speech-ws-internal.mjs +41 -0
- package/lib/text-to-speech-ws-internal.mjs.map +1 -0
- package/lib/text-to-speech-ws.d.mts +13 -0
- package/lib/text-to-speech-ws.d.mts.map +1 -0
- package/lib/text-to-speech-ws.d.ts +13 -0
- package/lib/text-to-speech-ws.d.ts.map +1 -0
- package/lib/text-to-speech-ws.js +30 -0
- package/lib/text-to-speech-ws.js.map +1 -0
- package/lib/text-to-speech-ws.mjs +25 -0
- package/lib/text-to-speech-ws.mjs.map +1 -0
- package/lib/webhooks.d.mts +6 -0
- package/lib/webhooks.d.mts.map +1 -1
- package/lib/webhooks.d.ts +6 -0
- package/lib/webhooks.d.ts.map +1 -1
- package/lib/webhooks.js +16 -0
- package/lib/webhooks.js.map +1 -1
- package/lib/webhooks.mjs +14 -0
- package/lib/webhooks.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/assistants/assistants.d.mts +901 -51
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +901 -51
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js +0 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs +0 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/assistants/versions.d.mts +563 -25
- package/resources/ai/assistants/versions.d.mts.map +1 -1
- package/resources/ai/assistants/versions.d.ts +563 -25
- package/resources/ai/assistants/versions.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.d.mts +2 -2
- package/resources/ai/conversations/conversations.d.mts.map +1 -1
- package/resources/ai/conversations/conversations.d.ts +2 -2
- package/resources/ai/conversations/conversations.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.js.map +1 -1
- package/resources/ai/conversations/conversations.mjs +1 -1
- package/resources/ai/conversations/conversations.mjs.map +1 -1
- package/resources/ai/conversations/index.d.mts +1 -1
- package/resources/ai/conversations/index.d.mts.map +1 -1
- package/resources/ai/conversations/index.d.ts +1 -1
- package/resources/ai/conversations/index.d.ts.map +1 -1
- package/resources/ai/conversations/index.js.map +1 -1
- package/resources/ai/conversations/index.mjs +1 -1
- package/resources/ai/conversations/index.mjs.map +1 -1
- package/resources/ai/conversations/messages.d.mts +46 -48
- package/resources/ai/conversations/messages.d.mts.map +1 -1
- package/resources/ai/conversations/messages.d.ts +46 -48
- package/resources/ai/conversations/messages.d.ts.map +1 -1
- package/resources/ai/conversations/messages.js +9 -6
- package/resources/ai/conversations/messages.js.map +1 -1
- package/resources/ai/conversations/messages.mjs +9 -6
- package/resources/ai/conversations/messages.mjs.map +1 -1
- package/resources/calls/actions.d.mts +114 -6
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +114 -6
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/actions.js +4 -0
- package/resources/calls/actions.js.map +1 -1
- package/resources/calls/actions.mjs +4 -0
- package/resources/calls/actions.mjs.map +1 -1
- package/resources/calls/calls.d.mts +168 -8
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +168 -8
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js +4 -0
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs +4 -0
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/index.d.mts +2 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -2
- package/resources/index.mjs.map +1 -1
- package/resources/inexplicit-number-orders.d.mts.map +1 -1
- package/resources/inexplicit-number-orders.d.ts.map +1 -1
- package/resources/messages/messages.d.mts +4 -0
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +4 -0
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/networks/networks.d.mts.map +1 -1
- package/resources/networks/networks.d.ts.map +1 -1
- package/resources/networks/networks.js.map +1 -1
- package/resources/networks/networks.mjs.map +1 -1
- package/resources/session-analysis/session-analysis.d.mts +3 -13
- package/resources/session-analysis/session-analysis.d.mts.map +1 -1
- package/resources/session-analysis/session-analysis.d.ts +3 -13
- package/resources/session-analysis/session-analysis.d.ts.map +1 -1
- package/resources/session-analysis/session-analysis.js.map +1 -1
- package/resources/session-analysis/session-analysis.mjs.map +1 -1
- package/resources/texml/accounts/calls/calls.d.mts +45 -0
- package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
- package/resources/texml/accounts/calls/calls.d.ts +45 -0
- package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
- package/resources/texml/accounts/calls/calls.js.map +1 -1
- package/resources/texml/accounts/calls/calls.mjs.map +1 -1
- package/resources/text-to-speech/index.d.mts +2 -1
- package/resources/text-to-speech/index.d.mts.map +1 -1
- package/resources/text-to-speech/index.d.ts +2 -1
- package/resources/text-to-speech/index.d.ts.map +1 -1
- package/resources/text-to-speech/index.js.map +1 -1
- package/resources/text-to-speech/index.mjs.map +1 -1
- package/resources/text-to-speech/internal-base.d.mts +1 -48
- package/resources/text-to-speech/internal-base.d.mts.map +1 -1
- package/resources/text-to-speech/internal-base.d.ts +1 -48
- package/resources/text-to-speech/internal-base.d.ts.map +1 -1
- package/resources/text-to-speech/internal-base.js +5 -48
- package/resources/text-to-speech/internal-base.js.map +1 -1
- package/resources/text-to-speech/internal-base.mjs +1 -44
- package/resources/text-to-speech/internal-base.mjs.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.mts +28 -3
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +28 -3
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/resources/text-to-speech/text-to-speech.js +1 -1
- package/resources/text-to-speech/text-to-speech.mjs +1 -1
- package/resources/text-to-speech/ws-base.d.mts +2 -0
- package/resources/text-to-speech/ws-base.d.mts.map +1 -0
- package/resources/text-to-speech/ws-base.d.ts +2 -0
- package/resources/text-to-speech/ws-base.d.ts.map +1 -0
- package/resources/text-to-speech/ws-base.js +7 -0
- package/resources/text-to-speech/ws-base.js.map +1 -0
- package/resources/text-to-speech/ws-base.mjs +3 -0
- package/resources/text-to-speech/ws-base.mjs.map +1 -0
- package/resources/text-to-speech/ws.d.mts +2 -41
- package/resources/text-to-speech/ws.d.mts.map +1 -1
- package/resources/text-to-speech/ws.d.ts +2 -41
- package/resources/text-to-speech/ws.d.ts.map +1 -1
- package/resources/text-to-speech/ws.js +2 -182
- package/resources/text-to-speech/ws.js.map +1 -1
- package/resources/text-to-speech/ws.mjs +1 -180
- package/resources/text-to-speech/ws.mjs.map +1 -1
- package/resources/verify-profiles.d.mts +97 -121
- package/resources/verify-profiles.d.mts.map +1 -1
- package/resources/verify-profiles.d.ts +97 -121
- package/resources/verify-profiles.d.ts.map +1 -1
- package/resources/virtual-cross-connects.d.mts.map +1 -1
- package/resources/virtual-cross-connects.d.ts.map +1 -1
- package/resources/webhooks.d.mts +642 -7
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +642 -7
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +4 -10
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +5 -11
- package/resources/webhooks.mjs.map +1 -1
- package/resources/whatsapp/phone-numbers/profile/profile.d.mts +5 -0
- package/resources/whatsapp/phone-numbers/profile/profile.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/profile/profile.d.ts +5 -0
- package/resources/whatsapp/phone-numbers/profile/profile.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/profile/profile.js.map +1 -1
- package/resources/whatsapp/phone-numbers/profile/profile.mjs.map +1 -1
- package/resources/wireguard-interfaces.d.mts.map +1 -1
- package/resources/wireguard-interfaces.d.ts.map +1 -1
- package/src/client.ts +22 -0
- package/src/core/EventEmitter.ts +16 -0
- package/src/core/pagination.ts +3 -3
- package/src/internal/detect-platform.ts +1 -1
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/env.ts +2 -2
- package/src/internal/ws-adapter-browser.ts +123 -0
- package/src/internal/ws-adapter-node.ts +105 -0
- package/src/internal/ws-adapter.ts +30 -0
- package/src/internal/ws.ts +193 -0
- package/src/lib/text-to-speech-ws-base.ts +618 -0
- package/src/lib/text-to-speech-ws-internal.ts +111 -0
- package/src/lib/text-to-speech-ws.ts +40 -0
- package/src/lib/webhooks.ts +27 -0
- package/src/resources/ai/assistants/assistants.ts +1025 -51
- package/src/resources/ai/assistants/versions.ts +639 -25
- package/src/resources/ai/conversations/conversations.ts +12 -2
- package/src/resources/ai/conversations/index.ts +6 -1
- package/src/resources/ai/conversations/messages.ts +67 -54
- package/src/resources/calls/actions.ts +184 -4
- package/src/resources/calls/calls.ts +191 -4
- package/src/resources/index.ts +6 -12
- package/src/resources/inexplicit-number-orders.ts +2 -1
- package/src/resources/messages/messages.ts +5 -0
- package/src/resources/networks/networks.ts +2 -1
- package/src/resources/session-analysis/session-analysis.ts +3 -16
- package/src/resources/texml/accounts/calls/calls.ts +54 -0
- package/src/resources/text-to-speech/index.ts +2 -1
- package/src/resources/text-to-speech/internal-base.ts +6 -95
- package/src/resources/text-to-speech/text-to-speech.ts +33 -3
- package/src/resources/text-to-speech/ws-base.ts +7 -0
- package/src/resources/text-to-speech/ws.ts +2 -201
- package/src/resources/verify-profiles.ts +109 -142
- package/src/resources/virtual-cross-connects.ts +2 -1
- package/src/resources/webhooks.ts +886 -45
- package/src/resources/whatsapp/phone-numbers/profile/profile.ts +7 -0
- package/src/resources/wireguard-interfaces.ts +2 -1
- 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
|
@@ -12,7 +12,12 @@ import {
|
|
|
12
12
|
Insights,
|
|
13
13
|
} from './insights';
|
|
14
14
|
import * as MessagesAPI from './messages';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
MessageListParams,
|
|
17
|
+
MessageListResponse,
|
|
18
|
+
MessageListResponsesDefaultFlatPagination,
|
|
19
|
+
Messages,
|
|
20
|
+
} from './messages';
|
|
16
21
|
import * as InsightGroupsAPI from './insight-groups/insight-groups';
|
|
17
22
|
import {
|
|
18
23
|
InsightGroupInsightGroupsParams,
|
|
@@ -383,5 +388,10 @@ export declare namespace Conversations {
|
|
|
383
388
|
type InsightListParams as InsightListParams,
|
|
384
389
|
};
|
|
385
390
|
|
|
386
|
-
export {
|
|
391
|
+
export {
|
|
392
|
+
Messages as Messages,
|
|
393
|
+
type MessageListResponse as MessageListResponse,
|
|
394
|
+
type MessageListResponsesDefaultFlatPagination as MessageListResponsesDefaultFlatPagination,
|
|
395
|
+
type MessageListParams as MessageListParams,
|
|
396
|
+
};
|
|
387
397
|
}
|
|
@@ -30,4 +30,9 @@ export {
|
|
|
30
30
|
type InsightListParams,
|
|
31
31
|
type InsightTemplatesDefaultFlatPagination,
|
|
32
32
|
} from './insights';
|
|
33
|
-
export {
|
|
33
|
+
export {
|
|
34
|
+
Messages,
|
|
35
|
+
type MessageListResponse,
|
|
36
|
+
type MessageListParams,
|
|
37
|
+
type MessageListResponsesDefaultFlatPagination,
|
|
38
|
+
} from './messages';
|
|
@@ -1,8 +1,11 @@
|
|
|
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
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
DefaultFlatPagination,
|
|
6
|
+
type DefaultFlatPaginationParams,
|
|
7
|
+
PagePromise,
|
|
8
|
+
} from '../../../core/pagination';
|
|
6
9
|
import { RequestOptions } from '../../../internal/request-options';
|
|
7
10
|
import { path } from '../../../internal/utils/path';
|
|
8
11
|
|
|
@@ -16,84 +19,94 @@ export class Messages extends APIResource {
|
|
|
16
19
|
*
|
|
17
20
|
* @example
|
|
18
21
|
* ```ts
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
22
|
+
* // Automatically fetches more pages as needed.
|
|
23
|
+
* for await (const messageListResponse of client.ai.conversations.messages.list(
|
|
24
|
+
* 'conversation_id',
|
|
25
|
+
* )) {
|
|
26
|
+
* // ...
|
|
27
|
+
* }
|
|
23
28
|
* ```
|
|
24
29
|
*/
|
|
25
|
-
list(
|
|
26
|
-
|
|
30
|
+
list(
|
|
31
|
+
conversationID: string,
|
|
32
|
+
query: MessageListParams | null | undefined = {},
|
|
33
|
+
options?: RequestOptions,
|
|
34
|
+
): PagePromise<MessageListResponsesDefaultFlatPagination, MessageListResponse> {
|
|
35
|
+
return this._client.getAPIList(
|
|
36
|
+
path`/ai/conversations/${conversationID}/messages`,
|
|
37
|
+
DefaultFlatPagination<MessageListResponse>,
|
|
38
|
+
{ query, ...options },
|
|
39
|
+
);
|
|
27
40
|
}
|
|
28
41
|
}
|
|
29
42
|
|
|
43
|
+
export type MessageListResponsesDefaultFlatPagination = DefaultFlatPagination<MessageListResponse>;
|
|
44
|
+
|
|
30
45
|
export interface MessageListResponse {
|
|
31
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The role of the message sender.
|
|
48
|
+
*/
|
|
49
|
+
role: 'user' | 'assistant' | 'tool';
|
|
32
50
|
|
|
33
|
-
|
|
34
|
-
|
|
51
|
+
/**
|
|
52
|
+
* The message content. Can be null for tool calls.
|
|
53
|
+
*/
|
|
54
|
+
text: string;
|
|
35
55
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The datetime the message was created on the conversation. This does not
|
|
58
|
+
* necesarily correspond to the time the message was sent. The best field to use to
|
|
59
|
+
* determine the time the end user experienced the message is `sent_at`.
|
|
60
|
+
*/
|
|
61
|
+
created_at?: string;
|
|
42
62
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
63
|
+
/**
|
|
64
|
+
* The datetime the message was sent to the end user.
|
|
65
|
+
*/
|
|
66
|
+
sent_at?: string;
|
|
47
67
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
created_at?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Optional tool calls made by the assistant.
|
|
70
|
+
*/
|
|
71
|
+
tool_calls?: Array<MessageListResponse.ToolCall>;
|
|
72
|
+
}
|
|
54
73
|
|
|
74
|
+
export namespace MessageListResponse {
|
|
75
|
+
export interface ToolCall {
|
|
55
76
|
/**
|
|
56
|
-
*
|
|
77
|
+
* Unique identifier for the tool call.
|
|
57
78
|
*/
|
|
58
|
-
|
|
79
|
+
id: string;
|
|
80
|
+
|
|
81
|
+
function: ToolCall.Function;
|
|
59
82
|
|
|
60
83
|
/**
|
|
61
|
-
*
|
|
84
|
+
* Type of the tool call.
|
|
62
85
|
*/
|
|
63
|
-
|
|
86
|
+
type: 'function';
|
|
64
87
|
}
|
|
65
88
|
|
|
66
|
-
export namespace
|
|
67
|
-
export interface
|
|
89
|
+
export namespace ToolCall {
|
|
90
|
+
export interface Function {
|
|
68
91
|
/**
|
|
69
|
-
*
|
|
92
|
+
* JSON-formatted arguments to pass to the function.
|
|
70
93
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
function: ToolCall.Function;
|
|
94
|
+
arguments: string;
|
|
74
95
|
|
|
75
96
|
/**
|
|
76
|
-
*
|
|
97
|
+
* Name of the function to call.
|
|
77
98
|
*/
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export namespace ToolCall {
|
|
82
|
-
export interface Function {
|
|
83
|
-
/**
|
|
84
|
-
* JSON-formatted arguments to pass to the function.
|
|
85
|
-
*/
|
|
86
|
-
arguments: string;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Name of the function to call.
|
|
90
|
-
*/
|
|
91
|
-
name: string;
|
|
92
|
-
}
|
|
99
|
+
name: string;
|
|
93
100
|
}
|
|
94
101
|
}
|
|
95
102
|
}
|
|
96
103
|
|
|
104
|
+
export interface MessageListParams extends DefaultFlatPaginationParams {}
|
|
105
|
+
|
|
97
106
|
export declare namespace Messages {
|
|
98
|
-
export {
|
|
107
|
+
export {
|
|
108
|
+
type MessageListResponse as MessageListResponse,
|
|
109
|
+
type MessageListResponsesDefaultFlatPagination as MessageListResponsesDefaultFlatPagination,
|
|
110
|
+
type MessageListParams as MessageListParams,
|
|
111
|
+
};
|
|
99
112
|
}
|
|
@@ -41,6 +41,10 @@ export class Actions extends APIResource {
|
|
|
41
41
|
* **Expected Webhooks:**
|
|
42
42
|
*
|
|
43
43
|
* - `call.answered`
|
|
44
|
+
* - `call.hold` and `call.unhold` if the call is held/unheld
|
|
45
|
+
* - `call.deepfake_detection.result` if `deepfake_detection` was enabled
|
|
46
|
+
* - `call.deepfake_detection.error` if `deepfake_detection` was enabled and an
|
|
47
|
+
* error occurred
|
|
44
48
|
* - `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url`
|
|
45
49
|
* was set
|
|
46
50
|
*
|
|
@@ -1655,12 +1659,14 @@ export interface TranscriptionStartRequest {
|
|
|
1655
1659
|
* Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
1656
1660
|
* `Telnyx` are supported for backward compatibility.
|
|
1657
1661
|
*/
|
|
1658
|
-
transcription_engine?: 'Google' | 'Telnyx' | 'Deepgram' | 'Azure' | 'A' | 'B';
|
|
1662
|
+
transcription_engine?: 'Google' | 'Telnyx' | 'Deepgram' | 'Azure' | 'xAI' | 'AssemblyAI' | 'A' | 'B';
|
|
1659
1663
|
|
|
1660
1664
|
transcription_engine_config?:
|
|
1661
1665
|
| TranscriptionEngineGoogleConfig
|
|
1662
1666
|
| TranscriptionEngineTelnyxConfig
|
|
1663
1667
|
| TranscriptionEngineAzureConfig
|
|
1668
|
+
| TranscriptionStartRequest.TranscriptionEngineXaiConfig
|
|
1669
|
+
| TranscriptionStartRequest.TranscriptionEngineAssemblyaiConfig
|
|
1664
1670
|
| TranscriptionEngineAConfig
|
|
1665
1671
|
| TranscriptionEngineBConfig
|
|
1666
1672
|
| DeepgramNova2Config
|
|
@@ -1674,6 +1680,74 @@ export interface TranscriptionStartRequest {
|
|
|
1674
1680
|
transcription_tracks?: string;
|
|
1675
1681
|
}
|
|
1676
1682
|
|
|
1683
|
+
export namespace TranscriptionStartRequest {
|
|
1684
|
+
export interface TranscriptionEngineXaiConfig {
|
|
1685
|
+
/**
|
|
1686
|
+
* Whether to send also interim results. If set to false, only final results will
|
|
1687
|
+
* be sent.
|
|
1688
|
+
*/
|
|
1689
|
+
interim_results?: boolean;
|
|
1690
|
+
|
|
1691
|
+
/**
|
|
1692
|
+
* Language to use for speech recognition
|
|
1693
|
+
*/
|
|
1694
|
+
language?:
|
|
1695
|
+
| 'ar'
|
|
1696
|
+
| 'cs'
|
|
1697
|
+
| 'da'
|
|
1698
|
+
| 'de'
|
|
1699
|
+
| 'en'
|
|
1700
|
+
| 'es'
|
|
1701
|
+
| 'fa'
|
|
1702
|
+
| 'fil'
|
|
1703
|
+
| 'fr'
|
|
1704
|
+
| 'hi'
|
|
1705
|
+
| 'id'
|
|
1706
|
+
| 'it'
|
|
1707
|
+
| 'ja'
|
|
1708
|
+
| 'ko'
|
|
1709
|
+
| 'mk'
|
|
1710
|
+
| 'ms'
|
|
1711
|
+
| 'nl'
|
|
1712
|
+
| 'pl'
|
|
1713
|
+
| 'pt'
|
|
1714
|
+
| 'ro'
|
|
1715
|
+
| 'ru'
|
|
1716
|
+
| 'sv'
|
|
1717
|
+
| 'th'
|
|
1718
|
+
| 'tr'
|
|
1719
|
+
| 'vi';
|
|
1720
|
+
|
|
1721
|
+
/**
|
|
1722
|
+
* Engine identifier for xAI transcription service
|
|
1723
|
+
*/
|
|
1724
|
+
transcription_engine?: 'xAI';
|
|
1725
|
+
|
|
1726
|
+
/**
|
|
1727
|
+
* The model to use for transcription.
|
|
1728
|
+
*/
|
|
1729
|
+
transcription_model?: 'xai/grok-stt';
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
export interface TranscriptionEngineAssemblyaiConfig {
|
|
1733
|
+
/**
|
|
1734
|
+
* Whether to send also interim results. If set to false, only final results will
|
|
1735
|
+
* be sent.
|
|
1736
|
+
*/
|
|
1737
|
+
interim_results?: boolean;
|
|
1738
|
+
|
|
1739
|
+
/**
|
|
1740
|
+
* Engine identifier for AssemblyAI transcription service
|
|
1741
|
+
*/
|
|
1742
|
+
transcription_engine?: 'AssemblyAI';
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* The model to use for transcription.
|
|
1746
|
+
*/
|
|
1747
|
+
transcription_model?: 'assemblyai/universal-streaming';
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1677
1751
|
export interface ActionAddAIAssistantMessagesResponse {
|
|
1678
1752
|
data?: CallControlCommandResult;
|
|
1679
1753
|
}
|
|
@@ -2039,6 +2113,14 @@ export interface ActionAnswerParams {
|
|
|
2039
2113
|
*/
|
|
2040
2114
|
custom_headers?: Array<CallsAPI.CustomSipHeader>;
|
|
2041
2115
|
|
|
2116
|
+
/**
|
|
2117
|
+
* Enables deepfake detection on the call. When enabled, audio from the remote
|
|
2118
|
+
* party is streamed to a detection service that analyzes whether the voice is
|
|
2119
|
+
* AI-generated. Results are delivered via the `call.deepfake_detection.result`
|
|
2120
|
+
* webhook.
|
|
2121
|
+
*/
|
|
2122
|
+
deepfake_detection?: ActionAnswerParams.DeepfakeDetection;
|
|
2123
|
+
|
|
2042
2124
|
/**
|
|
2043
2125
|
* The list of comma-separated codecs in a preferred order for the forked media to
|
|
2044
2126
|
* be received.
|
|
@@ -2183,6 +2265,30 @@ export interface ActionAnswerParams {
|
|
|
2183
2265
|
}
|
|
2184
2266
|
|
|
2185
2267
|
export namespace ActionAnswerParams {
|
|
2268
|
+
/**
|
|
2269
|
+
* Enables deepfake detection on the call. When enabled, audio from the remote
|
|
2270
|
+
* party is streamed to a detection service that analyzes whether the voice is
|
|
2271
|
+
* AI-generated. Results are delivered via the `call.deepfake_detection.result`
|
|
2272
|
+
* webhook.
|
|
2273
|
+
*/
|
|
2274
|
+
export interface DeepfakeDetection {
|
|
2275
|
+
/**
|
|
2276
|
+
* Whether deepfake detection is enabled.
|
|
2277
|
+
*/
|
|
2278
|
+
enabled: boolean;
|
|
2279
|
+
|
|
2280
|
+
/**
|
|
2281
|
+
* Maximum time in seconds to wait for RTP audio before timing out. If no audio is
|
|
2282
|
+
* received within this window, detection stops with an error.
|
|
2283
|
+
*/
|
|
2284
|
+
rtp_timeout?: number;
|
|
2285
|
+
|
|
2286
|
+
/**
|
|
2287
|
+
* Maximum time in seconds to wait for a detection result before timing out.
|
|
2288
|
+
*/
|
|
2289
|
+
timeout?: number;
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2186
2292
|
export interface WebhookRetriesPolicies {
|
|
2187
2293
|
/**
|
|
2188
2294
|
* Array of delays in milliseconds between retry attempts. Total sum cannot exceed
|
|
@@ -4198,12 +4304,14 @@ export interface ActionStartTranscriptionParams {
|
|
|
4198
4304
|
* Engine to use for speech recognition. Legacy values `A` - `Google`, `B` -
|
|
4199
4305
|
* `Telnyx` are supported for backward compatibility.
|
|
4200
4306
|
*/
|
|
4201
|
-
transcription_engine?: 'Google' | 'Telnyx' | 'Deepgram' | 'Azure' | 'A' | 'B';
|
|
4307
|
+
transcription_engine?: 'Google' | 'Telnyx' | 'Deepgram' | 'Azure' | 'xAI' | 'AssemblyAI' | 'A' | 'B';
|
|
4202
4308
|
|
|
4203
4309
|
transcription_engine_config?:
|
|
4204
4310
|
| TranscriptionEngineGoogleConfig
|
|
4205
4311
|
| TranscriptionEngineTelnyxConfig
|
|
4206
4312
|
| TranscriptionEngineAzureConfig
|
|
4313
|
+
| ActionStartTranscriptionParams.TranscriptionEngineXaiConfig
|
|
4314
|
+
| ActionStartTranscriptionParams.TranscriptionEngineAssemblyaiConfig
|
|
4207
4315
|
| TranscriptionEngineAConfig
|
|
4208
4316
|
| TranscriptionEngineBConfig
|
|
4209
4317
|
| DeepgramNova2Config
|
|
@@ -4217,6 +4325,74 @@ export interface ActionStartTranscriptionParams {
|
|
|
4217
4325
|
transcription_tracks?: string;
|
|
4218
4326
|
}
|
|
4219
4327
|
|
|
4328
|
+
export namespace ActionStartTranscriptionParams {
|
|
4329
|
+
export interface TranscriptionEngineXaiConfig {
|
|
4330
|
+
/**
|
|
4331
|
+
* Whether to send also interim results. If set to false, only final results will
|
|
4332
|
+
* be sent.
|
|
4333
|
+
*/
|
|
4334
|
+
interim_results?: boolean;
|
|
4335
|
+
|
|
4336
|
+
/**
|
|
4337
|
+
* Language to use for speech recognition
|
|
4338
|
+
*/
|
|
4339
|
+
language?:
|
|
4340
|
+
| 'ar'
|
|
4341
|
+
| 'cs'
|
|
4342
|
+
| 'da'
|
|
4343
|
+
| 'de'
|
|
4344
|
+
| 'en'
|
|
4345
|
+
| 'es'
|
|
4346
|
+
| 'fa'
|
|
4347
|
+
| 'fil'
|
|
4348
|
+
| 'fr'
|
|
4349
|
+
| 'hi'
|
|
4350
|
+
| 'id'
|
|
4351
|
+
| 'it'
|
|
4352
|
+
| 'ja'
|
|
4353
|
+
| 'ko'
|
|
4354
|
+
| 'mk'
|
|
4355
|
+
| 'ms'
|
|
4356
|
+
| 'nl'
|
|
4357
|
+
| 'pl'
|
|
4358
|
+
| 'pt'
|
|
4359
|
+
| 'ro'
|
|
4360
|
+
| 'ru'
|
|
4361
|
+
| 'sv'
|
|
4362
|
+
| 'th'
|
|
4363
|
+
| 'tr'
|
|
4364
|
+
| 'vi';
|
|
4365
|
+
|
|
4366
|
+
/**
|
|
4367
|
+
* Engine identifier for xAI transcription service
|
|
4368
|
+
*/
|
|
4369
|
+
transcription_engine?: 'xAI';
|
|
4370
|
+
|
|
4371
|
+
/**
|
|
4372
|
+
* The model to use for transcription.
|
|
4373
|
+
*/
|
|
4374
|
+
transcription_model?: 'xai/grok-stt';
|
|
4375
|
+
}
|
|
4376
|
+
|
|
4377
|
+
export interface TranscriptionEngineAssemblyaiConfig {
|
|
4378
|
+
/**
|
|
4379
|
+
* Whether to send also interim results. If set to false, only final results will
|
|
4380
|
+
* be sent.
|
|
4381
|
+
*/
|
|
4382
|
+
interim_results?: boolean;
|
|
4383
|
+
|
|
4384
|
+
/**
|
|
4385
|
+
* Engine identifier for AssemblyAI transcription service
|
|
4386
|
+
*/
|
|
4387
|
+
transcription_engine?: 'AssemblyAI';
|
|
4388
|
+
|
|
4389
|
+
/**
|
|
4390
|
+
* The model to use for transcription.
|
|
4391
|
+
*/
|
|
4392
|
+
transcription_model?: 'assemblyai/universal-streaming';
|
|
4393
|
+
}
|
|
4394
|
+
}
|
|
4395
|
+
|
|
4220
4396
|
export interface ActionStopAIAssistantParams {
|
|
4221
4397
|
/**
|
|
4222
4398
|
* Use this field to add state to every subsequent webhook. It must be a valid
|
|
@@ -4404,7 +4580,9 @@ export interface ActionTransferParams {
|
|
|
4404
4580
|
|
|
4405
4581
|
/**
|
|
4406
4582
|
* Optional configuration parameters to modify 'answering_machine_detection'
|
|
4407
|
-
* performance.
|
|
4583
|
+
* performance. Only `total_analysis_time_millis` and `greeting_duration_millis`
|
|
4584
|
+
* parameters are applicable when `premium` is selected as
|
|
4585
|
+
* answering_machine_detection.
|
|
4408
4586
|
*/
|
|
4409
4587
|
answering_machine_detection_config?: ActionTransferParams.AnsweringMachineDetectionConfig;
|
|
4410
4588
|
|
|
@@ -4634,7 +4812,9 @@ export interface ActionTransferParams {
|
|
|
4634
4812
|
export namespace ActionTransferParams {
|
|
4635
4813
|
/**
|
|
4636
4814
|
* Optional configuration parameters to modify 'answering_machine_detection'
|
|
4637
|
-
* performance.
|
|
4815
|
+
* performance. Only `total_analysis_time_millis` and `greeting_duration_millis`
|
|
4816
|
+
* parameters are applicable when `premium` is selected as
|
|
4817
|
+
* answering_machine_detection.
|
|
4638
4818
|
*/
|
|
4639
4819
|
export interface AnsweringMachineDetectionConfig {
|
|
4640
4820
|
/**
|