telnyx 7.24.0 → 7.25.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 +19 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +19 -4
- package/client.d.ts.map +1 -1
- package/client.js +15 -0
- package/client.js.map +1 -1
- package/client.mjs +15 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +7 -6
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +7 -6
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/assistants/assistants.d.mts +320 -28
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +320 -28
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js +79 -2
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs +79 -2
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/assistants/deleted.d.mts +60 -0
- package/resources/ai/assistants/deleted.d.mts.map +1 -0
- package/resources/ai/assistants/deleted.d.ts +60 -0
- package/resources/ai/assistants/deleted.d.ts.map +1 -0
- package/resources/ai/assistants/deleted.js +49 -0
- package/resources/ai/assistants/deleted.js.map +1 -0
- package/resources/ai/assistants/deleted.mjs +45 -0
- package/resources/ai/assistants/deleted.mjs.map +1 -0
- package/resources/ai/assistants/index.d.mts +2 -1
- package/resources/ai/assistants/index.d.mts.map +1 -1
- package/resources/ai/assistants/index.d.ts +2 -1
- package/resources/ai/assistants/index.d.ts.map +1 -1
- package/resources/ai/assistants/index.js +3 -1
- package/resources/ai/assistants/index.js.map +1 -1
- package/resources/ai/assistants/index.mjs +1 -0
- package/resources/ai/assistants/index.mjs.map +1 -1
- package/resources/ai/assistants/versions.d.mts +36 -0
- package/resources/ai/assistants/versions.d.mts.map +1 -1
- package/resources/ai/assistants/versions.d.ts +36 -0
- package/resources/ai/assistants/versions.d.ts.map +1 -1
- package/resources/ai/chat.d.mts +7 -2
- package/resources/ai/chat.d.mts.map +1 -1
- package/resources/ai/chat.d.ts +7 -2
- package/resources/ai/chat.d.ts.map +1 -1
- package/resources/ai/embeddings/embeddings.d.mts +1 -1
- package/resources/ai/embeddings/embeddings.d.ts +1 -1
- package/resources/ai/embeddings/embeddings.js +1 -1
- package/resources/ai/embeddings/embeddings.mjs +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.map +1 -1
- package/resources/ai/memory/index.d.mts +1 -1
- package/resources/ai/memory/index.d.mts.map +1 -1
- package/resources/ai/memory/index.d.ts +1 -1
- package/resources/ai/memory/index.d.ts.map +1 -1
- package/resources/ai/memory/index.js.map +1 -1
- package/resources/ai/memory/index.mjs +1 -1
- package/resources/ai/memory/index.mjs.map +1 -1
- package/resources/ai/memory/memory.d.mts +2 -2
- package/resources/ai/memory/memory.d.mts.map +1 -1
- package/resources/ai/memory/memory.d.ts +2 -2
- package/resources/ai/memory/memory.d.ts.map +1 -1
- package/resources/ai/memory/memory.js.map +1 -1
- package/resources/ai/memory/memory.mjs +1 -1
- package/resources/ai/memory/memory.mjs.map +1 -1
- package/resources/ai/memory/namespaces/index.d.mts +1 -1
- package/resources/ai/memory/namespaces/index.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/index.d.ts +1 -1
- package/resources/ai/memory/namespaces/index.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/index.js.map +1 -1
- package/resources/ai/memory/namespaces/index.mjs +1 -1
- package/resources/ai/memory/namespaces/index.mjs.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.mts +60 -4
- package/resources/ai/memory/namespaces/namespaces.d.mts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.d.ts +60 -4
- package/resources/ai/memory/namespaces/namespaces.d.ts.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.js +41 -3
- package/resources/ai/memory/namespaces/namespaces.js.map +1 -1
- package/resources/ai/memory/namespaces/namespaces.mjs +41 -3
- package/resources/ai/memory/namespaces/namespaces.mjs.map +1 -1
- package/resources/ai/openai/chat.d.mts +7 -2
- package/resources/ai/openai/chat.d.mts.map +1 -1
- package/resources/ai/openai/chat.d.ts +7 -2
- package/resources/ai/openai/chat.d.ts.map +1 -1
- package/resources/ai/tools.d.mts +3 -4
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +3 -4
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/ai/tools.js +5 -2
- package/resources/ai/tools.js.map +1 -1
- package/resources/ai/tools.mjs +5 -2
- package/resources/ai/tools.mjs.map +1 -1
- package/resources/calls/actions.d.mts +76 -17
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +76 -17
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/actions.js +31 -0
- package/resources/calls/actions.js.map +1 -1
- package/resources/calls/actions.mjs +31 -0
- package/resources/calls/actions.mjs.map +1 -1
- package/resources/calls/calls.d.mts +48 -11
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +48 -11
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js +3 -0
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs +3 -0
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/dir/dir.d.mts +220 -28
- package/resources/dir/dir.d.mts.map +1 -1
- package/resources/dir/dir.d.ts +220 -28
- package/resources/dir/dir.d.ts.map +1 -1
- package/resources/dir/dir.js +77 -13
- package/resources/dir/dir.js.map +1 -1
- package/resources/dir/dir.mjs +77 -13
- package/resources/dir/dir.mjs.map +1 -1
- package/resources/dir/index.d.mts +1 -1
- package/resources/dir/index.d.mts.map +1 -1
- package/resources/dir/index.d.ts +1 -1
- package/resources/dir/index.d.ts.map +1 -1
- package/resources/dir/index.js.map +1 -1
- package/resources/dir/index.mjs.map +1 -1
- package/resources/dir/phone-numbers.d.mts +8 -4
- package/resources/dir/phone-numbers.d.mts.map +1 -1
- package/resources/dir/phone-numbers.d.ts +8 -4
- package/resources/dir/phone-numbers.d.ts.map +1 -1
- package/resources/dir/phone-numbers.js +4 -4
- package/resources/dir/phone-numbers.mjs +4 -4
- package/resources/dir/references.d.mts +9 -6
- package/resources/dir/references.d.mts.map +1 -1
- package/resources/dir/references.d.ts +9 -6
- package/resources/dir/references.d.ts.map +1 -1
- package/resources/enterprises/dir.d.mts +17 -1
- package/resources/enterprises/dir.d.mts.map +1 -1
- package/resources/enterprises/dir.d.ts +17 -1
- package/resources/enterprises/dir.d.ts.map +1 -1
- package/resources/enterprises/enterprises.d.mts +237 -23
- package/resources/enterprises/enterprises.d.mts.map +1 -1
- package/resources/enterprises/enterprises.d.ts +237 -23
- package/resources/enterprises/enterprises.d.ts.map +1 -1
- package/resources/enterprises/enterprises.js +26 -4
- package/resources/enterprises/enterprises.js.map +1 -1
- package/resources/enterprises/enterprises.mjs +26 -4
- package/resources/enterprises/enterprises.mjs.map +1 -1
- package/resources/enterprises/index.d.mts +1 -0
- package/resources/enterprises/index.d.mts.map +1 -1
- package/resources/enterprises/index.d.ts +1 -0
- package/resources/enterprises/index.d.ts.map +1 -1
- package/resources/enterprises/index.js +3 -1
- package/resources/enterprises/index.js.map +1 -1
- package/resources/enterprises/index.mjs +1 -0
- package/resources/enterprises/index.mjs.map +1 -1
- package/resources/enterprises/reputation/loa.d.mts +61 -1
- package/resources/enterprises/reputation/loa.d.mts.map +1 -1
- package/resources/enterprises/reputation/loa.d.ts +61 -1
- package/resources/enterprises/reputation/loa.d.ts.map +1 -1
- package/resources/enterprises/verify-email.d.mts +91 -0
- package/resources/enterprises/verify-email.d.mts.map +1 -0
- package/resources/enterprises/verify-email.d.ts +91 -0
- package/resources/enterprises/verify-email.d.ts.map +1 -0
- package/resources/enterprises/verify-email.js +55 -0
- package/resources/enterprises/verify-email.js.map +1 -0
- package/resources/enterprises/verify-email.mjs +51 -0
- package/resources/enterprises/verify-email.mjs.map +1 -0
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/infringement-claims.d.mts +4 -0
- package/resources/infringement-claims.d.mts.map +1 -1
- package/resources/infringement-claims.d.ts +4 -0
- package/resources/infringement-claims.d.ts.map +1 -1
- package/resources/llm-token-gateway/index.d.mts +3 -0
- package/resources/llm-token-gateway/index.d.mts.map +1 -0
- package/resources/llm-token-gateway/index.d.ts +3 -0
- package/resources/llm-token-gateway/index.d.ts.map +1 -0
- package/resources/llm-token-gateway/index.js +9 -0
- package/resources/llm-token-gateway/index.js.map +1 -0
- package/resources/llm-token-gateway/index.mjs +4 -0
- package/resources/llm-token-gateway/index.mjs.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.mts +10 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.mts.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.ts +10 -0
- package/resources/llm-token-gateway/llm-token-gateway.d.ts.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.js +17 -0
- package/resources/llm-token-gateway/llm-token-gateway.js.map +1 -0
- package/resources/llm-token-gateway/llm-token-gateway.mjs +12 -0
- package/resources/llm-token-gateway/llm-token-gateway.mjs.map +1 -0
- package/resources/llm-token-gateway/usage.d.mts +260 -0
- package/resources/llm-token-gateway/usage.d.mts.map +1 -0
- package/resources/llm-token-gateway/usage.d.ts +260 -0
- package/resources/llm-token-gateway/usage.d.ts.map +1 -0
- package/resources/llm-token-gateway/usage.js +31 -0
- package/resources/llm-token-gateway/usage.js.map +1 -0
- package/resources/llm-token-gateway/usage.mjs +27 -0
- package/resources/llm-token-gateway/usage.mjs.map +1 -0
- package/resources/llm-token-gateway.d.mts +2 -0
- package/resources/llm-token-gateway.d.mts.map +1 -0
- package/resources/llm-token-gateway.d.ts +2 -0
- package/resources/llm-token-gateway.d.ts.map +1 -0
- package/resources/llm-token-gateway.js +6 -0
- package/resources/llm-token-gateway.js.map +1 -0
- package/resources/llm-token-gateway.mjs +3 -0
- package/resources/llm-token-gateway.mjs.map +1 -0
- package/resources/meeting-sessions/meeting-sessions.d.mts +8 -9
- package/resources/meeting-sessions/meeting-sessions.d.mts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.d.ts +8 -9
- package/resources/meeting-sessions/meeting-sessions.d.ts.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.js +6 -6
- package/resources/meeting-sessions/meeting-sessions.js.map +1 -1
- package/resources/meeting-sessions/meeting-sessions.mjs +6 -6
- package/resources/meeting-sessions/meeting-sessions.mjs.map +1 -1
- package/resources/porting-orders/phone-number-blocks.d.mts +1 -1
- package/resources/porting-orders/phone-number-blocks.d.mts.map +1 -1
- package/resources/porting-orders/phone-number-blocks.d.ts +1 -1
- package/resources/porting-orders/phone-number-blocks.d.ts.map +1 -1
- package/resources/porting-orders/porting-orders.d.mts +1 -1
- package/resources/porting-orders/porting-orders.d.mts.map +1 -1
- package/resources/porting-orders/porting-orders.d.ts +1 -1
- package/resources/porting-orders/porting-orders.d.ts.map +1 -1
- package/resources/porting-orders/porting-orders.js.map +1 -1
- package/resources/porting-orders/porting-orders.mjs.map +1 -1
- package/resources/porting-phone-numbers.d.mts +1 -1
- package/resources/porting-phone-numbers.d.mts.map +1 -1
- package/resources/porting-phone-numbers.d.ts +1 -1
- package/resources/porting-phone-numbers.d.ts.map +1 -1
- package/resources/requirements.d.mts +2 -2
- package/resources/requirements.d.mts.map +1 -1
- package/resources/requirements.d.ts +2 -2
- package/resources/requirements.d.ts.map +1 -1
- package/resources/spend-limits.d.mts +335 -0
- package/resources/spend-limits.d.mts.map +1 -0
- package/resources/spend-limits.d.ts +335 -0
- package/resources/spend-limits.d.ts.map +1 -0
- package/resources/spend-limits.js +91 -0
- package/resources/spend-limits.js.map +1 -0
- package/resources/spend-limits.mjs +87 -0
- package/resources/spend-limits.mjs.map +1 -0
- package/resources/terms-of-service/agreements.d.mts +12 -0
- package/resources/terms-of-service/agreements.d.mts.map +1 -1
- package/resources/terms-of-service/agreements.d.ts +12 -0
- package/resources/terms-of-service/agreements.d.ts.map +1 -1
- package/resources/terms-of-service/terms-of-service.d.mts +15 -0
- package/resources/terms-of-service/terms-of-service.d.mts.map +1 -1
- package/resources/terms-of-service/terms-of-service.d.ts +15 -0
- package/resources/terms-of-service/terms-of-service.d.ts.map +1 -1
- package/resources/terms-of-service/terms-of-service.js.map +1 -1
- package/resources/terms-of-service/terms-of-service.mjs.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.mts +4 -2
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +4 -2
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/resources/webhooks.d.mts +403 -5
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +403 -5
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/calling-routing.d.mts +89 -0
- package/resources/whatsapp/phone-numbers/calling-routing.d.mts.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-routing.d.ts +89 -0
- package/resources/whatsapp/phone-numbers/calling-routing.d.ts.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-routing.js +65 -0
- package/resources/whatsapp/phone-numbers/calling-routing.js.map +1 -0
- package/resources/whatsapp/phone-numbers/calling-routing.mjs +61 -0
- package/resources/whatsapp/phone-numbers/calling-routing.mjs.map +1 -0
- package/resources/whatsapp/phone-numbers/index.d.mts +1 -0
- package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.d.ts +1 -0
- package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/index.js +3 -1
- package/resources/whatsapp/phone-numbers/index.js.map +1 -1
- package/resources/whatsapp/phone-numbers/index.mjs +1 -0
- package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.js +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs +4 -0
- package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
- package/src/client.ts +55 -0
- package/src/resources/ai/ai.ts +13 -4
- package/src/resources/ai/assistants/assistants.ts +384 -28
- package/src/resources/ai/assistants/deleted.ts +86 -0
- package/src/resources/ai/assistants/index.ts +11 -0
- package/src/resources/ai/assistants/versions.ts +40 -0
- package/src/resources/ai/chat.ts +7 -2
- package/src/resources/ai/embeddings/embeddings.ts +1 -1
- package/src/resources/ai/index.ts +5 -1
- package/src/resources/ai/memory/index.ts +9 -1
- package/src/resources/ai/memory/memory.ts +13 -1
- package/src/resources/ai/memory/namespaces/index.ts +9 -1
- package/src/resources/ai/memory/namespaces/namespaces.ts +81 -3
- package/src/resources/ai/openai/chat.ts +7 -2
- package/src/resources/ai/tools.ts +6 -6
- package/src/resources/calls/actions.ts +76 -15
- package/src/resources/calls/calls.ts +49 -9
- package/src/resources/dir/dir.ts +263 -32
- package/src/resources/dir/index.ts +6 -0
- package/src/resources/dir/phone-numbers.ts +8 -4
- package/src/resources/dir/references.ts +9 -6
- package/src/resources/enterprises/dir.ts +19 -1
- package/src/resources/enterprises/enterprises.ts +250 -23
- package/src/resources/enterprises/index.ts +5 -0
- package/src/resources/enterprises/reputation/loa.ts +73 -1
- package/src/resources/enterprises/verify-email.ts +117 -0
- package/src/resources/index.ts +20 -0
- package/src/resources/infringement-claims.ts +4 -0
- package/src/resources/llm-token-gateway/index.ts +4 -0
- package/src/resources/llm-token-gateway/llm-token-gateway.ts +19 -0
- package/src/resources/llm-token-gateway/usage.ts +336 -0
- package/src/resources/llm-token-gateway.ts +3 -0
- package/src/resources/meeting-sessions/meeting-sessions.ts +8 -9
- package/src/resources/porting-orders/phone-number-blocks.ts +9 -1
- package/src/resources/porting-orders/porting-orders.ts +9 -1
- package/src/resources/porting-phone-numbers.ts +9 -1
- package/src/resources/requirements.ts +2 -2
- package/src/resources/spend-limits.ts +428 -0
- package/src/resources/terms-of-service/agreements.ts +12 -0
- package/src/resources/terms-of-service/terms-of-service.ts +15 -0
- package/src/resources/text-to-speech/text-to-speech.ts +4 -2
- package/src/resources/webhooks.ts +495 -2
- package/src/resources/whatsapp/phone-numbers/calling-routing.ts +113 -0
- package/src/resources/whatsapp/phone-numbers/index.ts +7 -0
- package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +18 -0
- 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
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as AssistantsAPI from './assistants';
|
|
5
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import {
|
|
7
|
+
DefaultFlatPagination,
|
|
8
|
+
type DefaultFlatPaginationParams,
|
|
9
|
+
PagePromise,
|
|
10
|
+
} from '../../../core/pagination';
|
|
11
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
12
|
+
import { path } from '../../../internal/utils/path';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Configure AI assistant specifications
|
|
16
|
+
*/
|
|
17
|
+
export class Deleted extends APIResource {
|
|
18
|
+
/**
|
|
19
|
+
* List the organization's soft-deleted assistants in the Recently Deleted list.
|
|
20
|
+
*
|
|
21
|
+
* Each entry includes `deleted_at` and `permanently_deleted_at`, the point after
|
|
22
|
+
* which the assistant is erased automatically and can no longer be restored.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Automatically fetches more pages as needed.
|
|
27
|
+
* for await (const deletedAssistant of client.ai.assistants.deleted.list()) {
|
|
28
|
+
* // ...
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
list(
|
|
33
|
+
query: DeletedListParams | null | undefined = {},
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): PagePromise<DeletedAssistantsDefaultFlatPagination, DeletedAssistant> {
|
|
36
|
+
return this._client.getAPIList('/ai/assistants/deleted', DefaultFlatPagination<DeletedAssistant>, {
|
|
37
|
+
query,
|
|
38
|
+
...options,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Retrieve a soft-deleted assistant from the Recently Deleted list by
|
|
44
|
+
* `assistant_id`, including its `deleted_at` and `permanently_deleted_at`
|
|
45
|
+
* timestamps. This is a read-only view; the assistant cannot be modified while it
|
|
46
|
+
* remains deleted.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const deletedAssistant =
|
|
51
|
+
* await client.ai.assistants.deleted.get('assistant_id');
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
get(assistantID: string, options?: RequestOptions): APIPromise<DeletedAssistant> {
|
|
55
|
+
return this._client.get(path`/ai/assistants/${assistantID}/deleted`, options);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type DeletedAssistantsDefaultFlatPagination = DefaultFlatPagination<DeletedAssistant>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* A soft-deleted assistant in the Recently Deleted list: the full assistant
|
|
63
|
+
* configuration plus deletion metadata.
|
|
64
|
+
*/
|
|
65
|
+
export interface DeletedAssistant extends AssistantsAPI.InferenceEmbedding {
|
|
66
|
+
/**
|
|
67
|
+
* Timestamp of the soft delete.
|
|
68
|
+
*/
|
|
69
|
+
deleted_at: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Point after which the assistant is permanently deleted automatically and can no
|
|
73
|
+
* longer be restored.
|
|
74
|
+
*/
|
|
75
|
+
permanently_deleted_at: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface DeletedListParams extends DefaultFlatPaginationParams {}
|
|
79
|
+
|
|
80
|
+
export declare namespace Deleted {
|
|
81
|
+
export {
|
|
82
|
+
type DeletedAssistant as DeletedAssistant,
|
|
83
|
+
type DeletedAssistantsDefaultFlatPagination as DeletedAssistantsDefaultFlatPagination,
|
|
84
|
+
type DeletedListParams as DeletedListParams,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -15,6 +15,7 @@ export {
|
|
|
15
15
|
type ComparisonExpression,
|
|
16
16
|
type ConversationFlow,
|
|
17
17
|
type ConversationFlowReq,
|
|
18
|
+
type DelegationSettings,
|
|
18
19
|
type EnabledFeatures,
|
|
19
20
|
type Expression,
|
|
20
21
|
type ExternalLlm,
|
|
@@ -54,18 +55,22 @@ export {
|
|
|
54
55
|
type TransferTool,
|
|
55
56
|
type VoiceSettings,
|
|
56
57
|
type WebhookTool,
|
|
58
|
+
type WebsocketSettings,
|
|
57
59
|
type WidgetSettings,
|
|
58
60
|
type AssistantDeleteResponse,
|
|
59
61
|
type AssistantChatResponse,
|
|
60
62
|
type AssistantGetTexmlResponse,
|
|
61
63
|
type AssistantSendSMSResponse,
|
|
64
|
+
type AssistantWhatsappResponse,
|
|
62
65
|
type AssistantCreateParams,
|
|
63
66
|
type AssistantImportsParams,
|
|
67
|
+
type AssistantDeleteParams,
|
|
64
68
|
type AssistantRetrieveParams,
|
|
65
69
|
type AssistantUpdateParams,
|
|
66
70
|
type AssistantChatParams,
|
|
67
71
|
type AssistantCloneParams,
|
|
68
72
|
type AssistantSendSMSParams,
|
|
73
|
+
type AssistantWhatsappParams,
|
|
69
74
|
} from './assistants';
|
|
70
75
|
export {
|
|
71
76
|
CanaryDeploys,
|
|
@@ -79,6 +84,12 @@ export {
|
|
|
79
84
|
type CanaryDeployCreateParams,
|
|
80
85
|
type CanaryDeployUpdateParams,
|
|
81
86
|
} from './canary-deploys';
|
|
87
|
+
export {
|
|
88
|
+
Deleted,
|
|
89
|
+
type DeletedAssistant,
|
|
90
|
+
type DeletedListParams,
|
|
91
|
+
type DeletedAssistantsDefaultFlatPagination,
|
|
92
|
+
} from './deleted';
|
|
82
93
|
export { Instructions, type InstructionEnhanceResponse, type InstructionEnhanceParams } from './instructions';
|
|
83
94
|
export {
|
|
84
95
|
ScheduledEvents,
|
|
@@ -139,6 +139,17 @@ export interface UpdateAssistant {
|
|
|
139
139
|
*/
|
|
140
140
|
conversation_flow?: AssistantsAPI.ConversationFlowReq;
|
|
141
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Splits the conversation between a frontend model that talks to the caller and a
|
|
144
|
+
* backend model that does the work. On the GPT-Live route the frontend model
|
|
145
|
+
* cannot call tools at all — when it needs something done it raises a delegation
|
|
146
|
+
* and waits. On the chat completion route the frontend keeps a single `delegate`
|
|
147
|
+
* tool that returns immediately, so the conversation carries on while the backend
|
|
148
|
+
* works. Either way the backend's answer is spoken as commentary or kept as silent
|
|
149
|
+
* context, depending on `speak_results`. Beta feature.
|
|
150
|
+
*/
|
|
151
|
+
delegation_settings?: AssistantsAPI.DelegationSettings;
|
|
152
|
+
|
|
142
153
|
description?: string;
|
|
143
154
|
|
|
144
155
|
/**
|
|
@@ -292,6 +303,15 @@ export interface UpdateAssistant {
|
|
|
292
303
|
|
|
293
304
|
voice_settings?: AssistantsAPI.InferenceEmbeddingVoiceSettings;
|
|
294
305
|
|
|
306
|
+
/**
|
|
307
|
+
* Streams conversation and telephony events to a WebSocket server you host, and
|
|
308
|
+
* accepts messages injected back into the conversation. Telnyx opens the
|
|
309
|
+
* connection as a client, once per conversation. Delivery is best effort
|
|
310
|
+
* throughout: while the connection is down events are dropped rather than queued,
|
|
311
|
+
* and no socket failure is ever allowed to affect the call. Beta feature.
|
|
312
|
+
*/
|
|
313
|
+
websocket_settings?: AssistantsAPI.WebsocketSettings;
|
|
314
|
+
|
|
295
315
|
/**
|
|
296
316
|
* Configuration settings for the assistant's web widget.
|
|
297
317
|
*/
|
|
@@ -346,6 +366,17 @@ export interface VersionUpdateParams {
|
|
|
346
366
|
*/
|
|
347
367
|
conversation_flow?: AssistantsAPI.ConversationFlowReq;
|
|
348
368
|
|
|
369
|
+
/**
|
|
370
|
+
* Body param: Splits the conversation between a frontend model that talks to the
|
|
371
|
+
* caller and a backend model that does the work. On the GPT-Live route the
|
|
372
|
+
* frontend model cannot call tools at all — when it needs something done it raises
|
|
373
|
+
* a delegation and waits. On the chat completion route the frontend keeps a single
|
|
374
|
+
* `delegate` tool that returns immediately, so the conversation carries on while
|
|
375
|
+
* the backend works. Either way the backend's answer is spoken as commentary or
|
|
376
|
+
* kept as silent context, depending on `speak_results`. Beta feature.
|
|
377
|
+
*/
|
|
378
|
+
delegation_settings?: AssistantsAPI.DelegationSettings;
|
|
379
|
+
|
|
349
380
|
/**
|
|
350
381
|
* Body param
|
|
351
382
|
*/
|
|
@@ -536,6 +567,15 @@ export interface VersionUpdateParams {
|
|
|
536
567
|
*/
|
|
537
568
|
voice_settings?: AssistantsAPI.InferenceEmbeddingVoiceSettings;
|
|
538
569
|
|
|
570
|
+
/**
|
|
571
|
+
* Body param: Streams conversation and telephony events to a WebSocket server you
|
|
572
|
+
* host, and accepts messages injected back into the conversation. Telnyx opens the
|
|
573
|
+
* connection as a client, once per conversation. Delivery is best effort
|
|
574
|
+
* throughout: while the connection is down events are dropped rather than queued,
|
|
575
|
+
* and no socket failure is ever allowed to affect the call. Beta feature.
|
|
576
|
+
*/
|
|
577
|
+
websocket_settings?: AssistantsAPI.WebsocketSettings;
|
|
578
|
+
|
|
539
579
|
/**
|
|
540
580
|
* Body param: Configuration settings for the assistant's web widget.
|
|
541
581
|
*/
|
package/src/resources/ai/chat.ts
CHANGED
|
@@ -72,9 +72,14 @@ export interface ChatCompletionRequest {
|
|
|
72
72
|
logprobs?: boolean;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
* Maximum number of completion tokens the model
|
|
75
|
+
* Maximum number of completion (output) tokens the model may generate per request.
|
|
76
|
+
* Defaults to 8192 when omitted or `null`. Set a higher value to allow longer
|
|
77
|
+
* completions. The model's `max_completion_tokens` metadata (see
|
|
78
|
+
* `GET /ai/models`), when set, caps both the default and any larger explicit
|
|
79
|
+
* value. Reasoning models consume this budget across reasoning and answer tokens
|
|
80
|
+
* combined.
|
|
76
81
|
*/
|
|
77
|
-
max_tokens?: number;
|
|
82
|
+
max_tokens?: number | null;
|
|
78
83
|
|
|
79
84
|
/**
|
|
80
85
|
* This is an alternative to `top_p` that
|
|
@@ -70,7 +70,7 @@ export class Embeddings extends APIResource {
|
|
|
70
70
|
* bucket_name: 'Bucket Name',
|
|
71
71
|
* document_chunk_overlap_size: 512,
|
|
72
72
|
* document_chunk_size: 1024,
|
|
73
|
-
* embedding_model: '
|
|
73
|
+
* embedding_model: 'intfloat/multilingual-e5-large',
|
|
74
74
|
* loader: 'default',
|
|
75
75
|
* },
|
|
76
76
|
* );
|
|
@@ -26,6 +26,7 @@ export {
|
|
|
26
26
|
type ComparisonExpression,
|
|
27
27
|
type ConversationFlow,
|
|
28
28
|
type ConversationFlowReq,
|
|
29
|
+
type DelegationSettings,
|
|
29
30
|
type EnabledFeatures,
|
|
30
31
|
type Expression,
|
|
31
32
|
type ExternalLlm,
|
|
@@ -65,18 +66,22 @@ export {
|
|
|
65
66
|
type TransferTool,
|
|
66
67
|
type VoiceSettings,
|
|
67
68
|
type WebhookTool,
|
|
69
|
+
type WebsocketSettings,
|
|
68
70
|
type WidgetSettings,
|
|
69
71
|
type AssistantDeleteResponse,
|
|
70
72
|
type AssistantChatResponse,
|
|
71
73
|
type AssistantGetTexmlResponse,
|
|
72
74
|
type AssistantSendSMSResponse,
|
|
75
|
+
type AssistantWhatsappResponse,
|
|
73
76
|
type AssistantCreateParams,
|
|
74
77
|
type AssistantImportsParams,
|
|
78
|
+
type AssistantDeleteParams,
|
|
75
79
|
type AssistantRetrieveParams,
|
|
76
80
|
type AssistantUpdateParams,
|
|
77
81
|
type AssistantChatParams,
|
|
78
82
|
type AssistantCloneParams,
|
|
79
83
|
type AssistantSendSMSParams,
|
|
84
|
+
type AssistantWhatsappParams,
|
|
80
85
|
} from './assistants/index';
|
|
81
86
|
export {
|
|
82
87
|
Audio,
|
|
@@ -161,7 +166,6 @@ export {
|
|
|
161
166
|
type PayToolParams,
|
|
162
167
|
type SharedToolResponse,
|
|
163
168
|
type UpdateDynamicVariablesToolParams,
|
|
164
|
-
type ToolDeleteResponse,
|
|
165
169
|
type ToolListParams,
|
|
166
170
|
type ToolCreateParams,
|
|
167
171
|
type ToolUpdateParams,
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export { Memory } from './memory';
|
|
4
|
-
export {
|
|
4
|
+
export {
|
|
5
|
+
Namespaces,
|
|
6
|
+
type Namespace,
|
|
7
|
+
type NamespaceCreateResponse,
|
|
8
|
+
type NamespaceRetrieveResponse,
|
|
9
|
+
type NamespaceListResponse,
|
|
10
|
+
type NamespaceRetrieveParams,
|
|
11
|
+
type NamespaceCreateParams,
|
|
12
|
+
} from './namespaces/index';
|
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as NamespacesAPI from './namespaces/namespaces';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
Namespace,
|
|
7
|
+
NamespaceCreateParams,
|
|
8
|
+
NamespaceCreateResponse,
|
|
9
|
+
NamespaceListResponse,
|
|
10
|
+
NamespaceRetrieveParams,
|
|
11
|
+
NamespaceRetrieveResponse,
|
|
12
|
+
Namespaces,
|
|
13
|
+
} from './namespaces/namespaces';
|
|
6
14
|
|
|
7
15
|
export class Memory extends APIResource {
|
|
8
16
|
namespaces: NamespacesAPI.Namespaces = new NamespacesAPI.Namespaces(this._client);
|
|
@@ -13,7 +21,11 @@ Memory.Namespaces = Namespaces;
|
|
|
13
21
|
export declare namespace Memory {
|
|
14
22
|
export {
|
|
15
23
|
Namespaces as Namespaces,
|
|
24
|
+
type Namespace as Namespace,
|
|
25
|
+
type NamespaceCreateResponse as NamespaceCreateResponse,
|
|
16
26
|
type NamespaceRetrieveResponse as NamespaceRetrieveResponse,
|
|
27
|
+
type NamespaceListResponse as NamespaceListResponse,
|
|
17
28
|
type NamespaceRetrieveParams as NamespaceRetrieveParams,
|
|
29
|
+
type NamespaceCreateParams as NamespaceCreateParams,
|
|
18
30
|
};
|
|
19
31
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export {
|
|
4
|
+
Namespaces,
|
|
5
|
+
type Namespace,
|
|
6
|
+
type NamespaceCreateResponse,
|
|
7
|
+
type NamespaceRetrieveResponse,
|
|
8
|
+
type NamespaceListResponse,
|
|
9
|
+
type NamespaceRetrieveParams,
|
|
10
|
+
type NamespaceCreateParams,
|
|
11
|
+
} from './namespaces';
|
|
4
12
|
export {
|
|
5
13
|
Profiles,
|
|
6
14
|
type PageMeta,
|
|
@@ -22,12 +22,10 @@ import {
|
|
|
22
22
|
Profiles,
|
|
23
23
|
} from './profiles/profiles';
|
|
24
24
|
import { APIPromise } from '../../../../core/api-promise';
|
|
25
|
+
import { buildHeaders } from '../../../../internal/headers';
|
|
25
26
|
import { RequestOptions } from '../../../../internal/request-options';
|
|
26
27
|
import { path } from '../../../../internal/utils/path';
|
|
27
28
|
|
|
28
|
-
/**
|
|
29
|
-
* Whether a write has finished.
|
|
30
|
-
*/
|
|
31
29
|
export class Namespaces extends APIResource {
|
|
32
30
|
profiles: ProfilesAPI.Profiles = new ProfilesAPI.Profiles(this._client);
|
|
33
31
|
settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client);
|
|
@@ -54,6 +52,71 @@ export class Namespaces extends APIResource {
|
|
|
54
52
|
const { namespace } = params;
|
|
55
53
|
return this._client.get(path`/ai/memory/namespaces/${namespace}/operations/${operationID}`, options);
|
|
56
54
|
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Every namespace in your organization, `default` among them.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const namespaces = await client.ai.memory.namespaces.list();
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
list(options?: RequestOptions): APIPromise<NamespaceListResponse> {
|
|
65
|
+
return this._client.get('/ai/memory/namespaces', options);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Create a namespace. An organization can have at most five, `default` among them
|
|
70
|
+
* — a sixth returns `403`.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const namespace = await client.ai.memory.namespaces.create({
|
|
75
|
+
* name: 'staging',
|
|
76
|
+
* });
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
create(body: NamespaceCreateParams, options?: RequestOptions): APIPromise<NamespaceCreateResponse> {
|
|
80
|
+
return this._client.post('/ai/memory/namespaces', { body, ...options });
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Delete a namespace and every profile and memory in it. `default` cannot be
|
|
85
|
+
* deleted. This cannot be undone.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* await client.ai.memory.namespaces.delete('namespace');
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
delete(namespace: string, options?: RequestOptions): APIPromise<void> {
|
|
93
|
+
return this._client.delete(path`/ai/memory/namespaces/${namespace}`, {
|
|
94
|
+
...options,
|
|
95
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* An isolated memory store within your organization.
|
|
102
|
+
*/
|
|
103
|
+
export interface Namespace {
|
|
104
|
+
/**
|
|
105
|
+
* The namespace's unique identifier.
|
|
106
|
+
*/
|
|
107
|
+
id: string;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The namespace's name, used in the path. `default` exists for every organization.
|
|
111
|
+
*/
|
|
112
|
+
name: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface NamespaceCreateResponse {
|
|
116
|
+
/**
|
|
117
|
+
* An isolated memory store within your organization.
|
|
118
|
+
*/
|
|
119
|
+
data: Namespace;
|
|
57
120
|
}
|
|
58
121
|
|
|
59
122
|
export interface NamespaceRetrieveResponse {
|
|
@@ -77,17 +140,32 @@ export namespace NamespaceRetrieveResponse {
|
|
|
77
140
|
}
|
|
78
141
|
}
|
|
79
142
|
|
|
143
|
+
export interface NamespaceListResponse {
|
|
144
|
+
data: Array<Namespace>;
|
|
145
|
+
}
|
|
146
|
+
|
|
80
147
|
export interface NamespaceRetrieveParams {
|
|
81
148
|
namespace: string;
|
|
82
149
|
}
|
|
83
150
|
|
|
151
|
+
export interface NamespaceCreateParams {
|
|
152
|
+
/**
|
|
153
|
+
* A name for the new namespace, unique within your organization.
|
|
154
|
+
*/
|
|
155
|
+
name: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
84
158
|
Namespaces.Profiles = Profiles;
|
|
85
159
|
Namespaces.Settings = Settings;
|
|
86
160
|
|
|
87
161
|
export declare namespace Namespaces {
|
|
88
162
|
export {
|
|
163
|
+
type Namespace as Namespace,
|
|
164
|
+
type NamespaceCreateResponse as NamespaceCreateResponse,
|
|
89
165
|
type NamespaceRetrieveResponse as NamespaceRetrieveResponse,
|
|
166
|
+
type NamespaceListResponse as NamespaceListResponse,
|
|
90
167
|
type NamespaceRetrieveParams as NamespaceRetrieveParams,
|
|
168
|
+
type NamespaceCreateParams as NamespaceCreateParams,
|
|
91
169
|
};
|
|
92
170
|
|
|
93
171
|
export {
|
|
@@ -97,9 +97,14 @@ export interface ChatCreateCompletionParams {
|
|
|
97
97
|
logprobs?: boolean;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* Maximum number of completion tokens the model
|
|
100
|
+
* Maximum number of completion (output) tokens the model may generate per request.
|
|
101
|
+
* Defaults to 8192 when omitted or `null`. Set a higher value to allow longer
|
|
102
|
+
* completions. The model's `max_completion_tokens` metadata (see
|
|
103
|
+
* `GET /ai/models`), when set, caps both the default and any larger explicit
|
|
104
|
+
* value. Reasoning models consume this budget across reasoning and answer tokens
|
|
105
|
+
* combined.
|
|
101
106
|
*/
|
|
102
|
-
max_tokens?: number;
|
|
107
|
+
max_tokens?: number | null;
|
|
103
108
|
|
|
104
109
|
/**
|
|
105
110
|
* This is an alternative to `top_p` that
|
|
@@ -60,11 +60,14 @@ export class Tools extends APIResource {
|
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
62
|
* ```ts
|
|
63
|
-
*
|
|
63
|
+
* await client.ai.tools.delete('tool_id');
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
|
-
delete(toolID: string, options?: RequestOptions): APIPromise<
|
|
67
|
-
return this._client.delete(path`/ai/tools/${toolID}`,
|
|
66
|
+
delete(toolID: string, options?: RequestOptions): APIPromise<void> {
|
|
67
|
+
return this._client.delete(path`/ai/tools/${toolID}`, {
|
|
68
|
+
...options,
|
|
69
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
70
|
+
});
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
/**
|
|
@@ -181,8 +184,6 @@ export namespace UpdateDynamicVariablesToolParams {
|
|
|
181
184
|
}
|
|
182
185
|
}
|
|
183
186
|
|
|
184
|
-
export type ToolDeleteResponse = unknown;
|
|
185
|
-
|
|
186
187
|
export interface ToolListParams extends DefaultFlatPaginationParams {
|
|
187
188
|
/**
|
|
188
189
|
* Filter results by filter name.
|
|
@@ -300,7 +301,6 @@ export declare namespace Tools {
|
|
|
300
301
|
type PayToolParams as PayToolParams,
|
|
301
302
|
type SharedToolResponse as SharedToolResponse,
|
|
302
303
|
type UpdateDynamicVariablesToolParams as UpdateDynamicVariablesToolParams,
|
|
303
|
-
type ToolDeleteResponse as ToolDeleteResponse,
|
|
304
304
|
type SharedToolResponsesDefaultFlatPagination as SharedToolResponsesDefaultFlatPagination,
|
|
305
305
|
type ToolListParams as ToolListParams,
|
|
306
306
|
type ToolCreateParams as ToolCreateParams,
|
|
@@ -18,6 +18,8 @@ export class Actions extends APIResource {
|
|
|
18
18
|
*
|
|
19
19
|
* **Expected Webhooks:**
|
|
20
20
|
*
|
|
21
|
+
* - [`call.conversation.created`](/api-reference/callbacks/call-conversation-created)
|
|
22
|
+
* includes `conversation_id` during startup
|
|
21
23
|
* - `call.conversation.ended`
|
|
22
24
|
* - `call.conversation_insights.generated`
|
|
23
25
|
*
|
|
@@ -60,9 +62,33 @@ export class Actions extends APIResource {
|
|
|
60
62
|
* Answer an incoming call. You must issue this command before executing subsequent
|
|
61
63
|
* commands on an incoming call.
|
|
62
64
|
*
|
|
65
|
+
* To answer with an AI assistant, include `assistant.id` and any per-call
|
|
66
|
+
* overrides in the `assistant` object. Telnyx attempts to warm up the assistant
|
|
67
|
+
* before answering the call, then starts the assistant automatically when the call
|
|
68
|
+
* is answered. Do not also send `ai_assistant_start` for this flow. The HTTP
|
|
69
|
+
* success response can arrive before the call is answered; use the `call.answered`
|
|
70
|
+
* webhook to track the answer. If warm-up fails, Telnyx falls back to starting the
|
|
71
|
+
* assistant after answering.
|
|
72
|
+
*
|
|
73
|
+
* When `assistant.id` is supplied, obtain the conversation ID from
|
|
74
|
+
* `data.payload.conversation_id` in the
|
|
75
|
+
* [call.conversation.created](/api-reference/callbacks/call-conversation-created)
|
|
76
|
+
* webhook and correlate it using `data.payload.call_control_id`. The `answer` HTTP
|
|
77
|
+
* response does not include `conversation_id`. The created event is emitted during
|
|
78
|
+
* assistant startup and does not indicate that the assistant is ready to speak.
|
|
79
|
+
*
|
|
80
|
+
* Set the assistant voice with `assistant.voice_settings.voice` and speech-to-text
|
|
81
|
+
* settings with `assistant.transcription`. You can reuse one stored assistant with
|
|
82
|
+
* different per-call settings. Warm-up prepares assistant configuration and
|
|
83
|
+
* dependencies; it does not wait for the greeting audio to be ready or guarantee
|
|
84
|
+
* zero silence after answer. A plain `answer` followed by `ai_assistant_start`
|
|
85
|
+
* performs assistant startup after the call has already been answered.
|
|
86
|
+
*
|
|
63
87
|
* **Expected Webhooks:**
|
|
64
88
|
*
|
|
65
89
|
* - `call.answered`
|
|
90
|
+
* - `call.conversation.created` when the requested assistant conversation is
|
|
91
|
+
* created
|
|
66
92
|
* - `call.hold` and `call.unhold` if the call is held/unheld
|
|
67
93
|
* - `call.deepfake_detection.result` if `deepfake_detection` was enabled
|
|
68
94
|
* - `call.deepfake_detection.error` if `deepfake_detection` was enabled and an
|
|
@@ -266,6 +292,8 @@ export class Actions extends APIResource {
|
|
|
266
292
|
*
|
|
267
293
|
* **Expected Webhooks:**
|
|
268
294
|
*
|
|
295
|
+
* - [`call.conversation.created`](/api-reference/callbacks/call-conversation-created)
|
|
296
|
+
* includes `conversation_id` during startup
|
|
269
297
|
* - `call.ai_gather.ended`
|
|
270
298
|
* - `call.conversation.ended`
|
|
271
299
|
* - `call.ai_gather.partial_results` (if `send_partial_results` is set to `true`)
|
|
@@ -888,6 +916,9 @@ export class Actions extends APIResource {
|
|
|
888
916
|
* `answering_machine_detection=premium` was requested
|
|
889
917
|
* - `call.machine.premium.greeting.ended` if `answering_machine_detection=premium`
|
|
890
918
|
* was requested and a beep was detected
|
|
919
|
+
* - `call.machine.premium.call_screening.detected` if
|
|
920
|
+
* `answering_machine_detection=premium_ios_call_screening_detection` was
|
|
921
|
+
* requested and an Apple Call Screening tone was detected
|
|
891
922
|
*
|
|
892
923
|
* @example
|
|
893
924
|
* ```ts
|
|
@@ -1652,9 +1683,10 @@ export interface TelnyxVoiceSettings {
|
|
|
1652
1683
|
type: 'telnyx';
|
|
1653
1684
|
|
|
1654
1685
|
/**
|
|
1655
|
-
* The voice speed to be used for the voice.
|
|
1656
|
-
*
|
|
1657
|
-
* `
|
|
1686
|
+
* The voice speed to be used for the voice. Telnyx `Ultra` voices accept values
|
|
1687
|
+
* from 0.6 to 1.5; values outside that range are rejected by the synthesis engine.
|
|
1688
|
+
* `Qwen3TTS` and `KokoroTTS` accept the field but do not apply it. Default value
|
|
1689
|
+
* is 1.0. Not supported for `Telnyx.Bayan.*` or `Telnyx.Sukhan.*` voices.
|
|
1658
1690
|
*/
|
|
1659
1691
|
voice_speed?: number;
|
|
1660
1692
|
}
|
|
@@ -2539,9 +2571,11 @@ export interface ActionUpdateClientStateResponse {
|
|
|
2539
2571
|
|
|
2540
2572
|
export interface ActionStartAIAssistantParams {
|
|
2541
2573
|
/**
|
|
2542
|
-
* AI Assistant configuration. All fields except `id` are
|
|
2543
|
-
*
|
|
2544
|
-
*
|
|
2574
|
+
* AI Assistant configuration and per-call overrides. All fields except `id` are
|
|
2575
|
+
* optional. Omitted assistant fields use the stored configuration. Supplied
|
|
2576
|
+
* `voice_settings` and `transcription` objects replace their stored objects rather
|
|
2577
|
+
* than merging individual settings; include every setting you want to retain.
|
|
2578
|
+
* `dynamic_variables` are merged, with request values taking precedence.
|
|
2545
2579
|
*/
|
|
2546
2580
|
assistant?: CallsAPI.CallAssistantRequest;
|
|
2547
2581
|
|
|
@@ -2613,9 +2647,11 @@ export interface ActionStopAIAssistantParams {
|
|
|
2613
2647
|
|
|
2614
2648
|
export interface ActionAnswerParams {
|
|
2615
2649
|
/**
|
|
2616
|
-
* AI Assistant configuration. All fields except `id` are
|
|
2617
|
-
*
|
|
2618
|
-
*
|
|
2650
|
+
* AI Assistant configuration and per-call overrides. All fields except `id` are
|
|
2651
|
+
* optional. Omitted assistant fields use the stored configuration. Supplied
|
|
2652
|
+
* `voice_settings` and `transcription` objects replace their stored objects rather
|
|
2653
|
+
* than merging individual settings; include every setting you want to retain.
|
|
2654
|
+
* `dynamic_variables` are merged, with request values taking precedence.
|
|
2619
2655
|
*/
|
|
2620
2656
|
assistant?: CallsAPI.CallAssistantRequest;
|
|
2621
2657
|
|
|
@@ -2766,7 +2802,9 @@ export interface ActionAnswerParams {
|
|
|
2766
2802
|
stream_url?: string;
|
|
2767
2803
|
|
|
2768
2804
|
/**
|
|
2769
|
-
* Enable transcription upon call answer. The default value is
|
|
2805
|
+
* Enable standalone call transcription upon call answer. The default value is
|
|
2806
|
+
* false. Configure this feature with `transcription_config`. To configure speech
|
|
2807
|
+
* recognition for an AI assistant, use `assistant.transcription` instead.
|
|
2770
2808
|
*/
|
|
2771
2809
|
transcription?: boolean;
|
|
2772
2810
|
|
|
@@ -4192,9 +4230,12 @@ export interface ActionReferParams {
|
|
|
4192
4230
|
|
|
4193
4231
|
export interface ActionRejectParams {
|
|
4194
4232
|
/**
|
|
4195
|
-
* Cause for call rejection.
|
|
4233
|
+
* Cause for call rejection. The cause sets the SIP response the caller receives:
|
|
4234
|
+
* `USER_BUSY` sends 486 User Busy, `CALL_REJECTED` sends 603 Decline, `NOT_FOUND`
|
|
4235
|
+
* sends 404 Not Found, and `TEMPORARILY_UNAVAILABLE` sends 480 Temporarily
|
|
4236
|
+
* Unavailable.
|
|
4196
4237
|
*/
|
|
4197
|
-
cause: 'CALL_REJECTED' | 'USER_BUSY';
|
|
4238
|
+
cause: 'CALL_REJECTED' | 'NOT_FOUND' | 'TEMPORARILY_UNAVAILABLE' | 'USER_BUSY';
|
|
4198
4239
|
|
|
4199
4240
|
/**
|
|
4200
4241
|
* Use this field to add state to every subsequent webhook. It must be a valid
|
|
@@ -4795,10 +4836,20 @@ export interface ActionTransferParams {
|
|
|
4795
4836
|
* 'greeting_end' or 'detect_words' is used and a 'machine' is detected, you will
|
|
4796
4837
|
* receive another 'call.machine.greeting.ended' webhook when the answering machine
|
|
4797
4838
|
* greeting ends with a beep or silence. If `detect_beep` is used, you will only
|
|
4798
|
-
* receive 'call.machine.greeting.ended' if a beep is detected.
|
|
4839
|
+
* receive 'call.machine.greeting.ended' if a beep is detected. If
|
|
4840
|
+
* `answering_machine_detection` is set to `premium_ios_call_screening_detection`,
|
|
4841
|
+
* Premium AMD runs with iOS Call Screening support: after an initial `machine`
|
|
4842
|
+
* result, Telnyx listens for the iOS call-screening prompt to end or for an Apple
|
|
4843
|
+
* Call Screening tone, sends `call.machine.premium.greeting.ended` with
|
|
4844
|
+
* `result=prompt_ended` or `call.machine.premium.call_screening.detected` with
|
|
4845
|
+
* `result=screening` respectively. When the Apple Call Screening tone is detected,
|
|
4846
|
+
* Premium AMD is restarted on the screened call and a
|
|
4847
|
+
* `call.machine.premium.detection.ended` webhook with the post-screening
|
|
4848
|
+
* classification follows.
|
|
4799
4849
|
*/
|
|
4800
4850
|
answering_machine_detection?:
|
|
4801
4851
|
| 'premium'
|
|
4852
|
+
| 'premium_ios_call_screening_detection'
|
|
4802
4853
|
| 'detect'
|
|
4803
4854
|
| 'detect_beep'
|
|
4804
4855
|
| 'detect_words'
|
|
@@ -4809,7 +4860,8 @@ export interface ActionTransferParams {
|
|
|
4809
4860
|
* Optional configuration parameters to modify 'answering_machine_detection'
|
|
4810
4861
|
* performance. Only `total_analysis_time_millis` and `greeting_duration_millis`
|
|
4811
4862
|
* parameters are applicable when `premium` is selected as
|
|
4812
|
-
* answering_machine_detection.
|
|
4863
|
+
* answering_machine_detection. `prompt_end_timeout_millis` is additionally
|
|
4864
|
+
* applicable when `premium_ios_call_screening_detection` is selected.
|
|
4813
4865
|
*/
|
|
4814
4866
|
answering_machine_detection_config?: ActionTransferParams.AnsweringMachineDetectionConfig;
|
|
4815
4867
|
|
|
@@ -5077,7 +5129,8 @@ export namespace ActionTransferParams {
|
|
|
5077
5129
|
* Optional configuration parameters to modify 'answering_machine_detection'
|
|
5078
5130
|
* performance. Only `total_analysis_time_millis` and `greeting_duration_millis`
|
|
5079
5131
|
* parameters are applicable when `premium` is selected as
|
|
5080
|
-
* answering_machine_detection.
|
|
5132
|
+
* answering_machine_detection. `prompt_end_timeout_millis` is additionally
|
|
5133
|
+
* applicable when `premium_ios_call_screening_detection` is selected.
|
|
5081
5134
|
*/
|
|
5082
5135
|
export interface AnsweringMachineDetectionConfig {
|
|
5083
5136
|
/**
|
|
@@ -5177,6 +5230,14 @@ export namespace ActionTransferParams {
|
|
|
5177
5230
|
*/
|
|
5178
5231
|
maximum_word_length_millis?: number;
|
|
5179
5232
|
|
|
5233
|
+
/**
|
|
5234
|
+
* Maximum time Telnyx waits, in milliseconds, for the iOS call-screening prompt to
|
|
5235
|
+
* end after Premium AMD initially detects a `machine`. Used when
|
|
5236
|
+
* `answering_machine_detection` is `premium_ios_call_screening_detection`.
|
|
5237
|
+
* Defaults to 5000 milliseconds.
|
|
5238
|
+
*/
|
|
5239
|
+
prompt_end_timeout_millis?: number;
|
|
5240
|
+
|
|
5180
5241
|
/**
|
|
5181
5242
|
* Minimum noise threshold for any analysis.
|
|
5182
5243
|
*/
|