telnyx 7.8.0 → 7.9.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 +8 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +6 -2
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +6 -2
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js +4 -0
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs +4 -0
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/ai/anthropic/anthropic.d.mts +10 -0
- package/resources/ai/anthropic/anthropic.d.mts.map +1 -0
- package/resources/ai/anthropic/anthropic.d.ts +10 -0
- package/resources/ai/anthropic/anthropic.d.ts.map +1 -0
- package/resources/ai/anthropic/anthropic.js +17 -0
- package/resources/ai/anthropic/anthropic.js.map +1 -0
- package/resources/ai/anthropic/anthropic.mjs +12 -0
- package/resources/ai/anthropic/anthropic.mjs.map +1 -0
- package/resources/ai/anthropic/index.d.mts +3 -0
- package/resources/ai/anthropic/index.d.mts.map +1 -0
- package/resources/ai/anthropic/index.d.ts +3 -0
- package/resources/ai/anthropic/index.d.ts.map +1 -0
- package/resources/ai/anthropic/index.js +9 -0
- package/resources/ai/anthropic/index.js.map +1 -0
- package/resources/ai/anthropic/index.mjs +4 -0
- package/resources/ai/anthropic/index.mjs.map +1 -0
- package/resources/ai/anthropic/v1.d.mts +148 -0
- package/resources/ai/anthropic/v1.d.mts.map +1 -0
- package/resources/ai/anthropic/v1.d.ts +148 -0
- package/resources/ai/anthropic/v1.d.ts.map +1 -0
- package/resources/ai/anthropic/v1.js +35 -0
- package/resources/ai/anthropic/v1.js.map +1 -0
- package/resources/ai/anthropic/v1.mjs +31 -0
- package/resources/ai/anthropic/v1.mjs.map +1 -0
- package/resources/ai/anthropic.d.mts +2 -0
- package/resources/ai/anthropic.d.mts.map +1 -0
- package/resources/ai/anthropic.d.ts +2 -0
- package/resources/ai/anthropic.d.ts.map +1 -0
- package/resources/ai/anthropic.js +6 -0
- package/resources/ai/anthropic.js.map +1 -0
- package/resources/ai/anthropic.mjs +3 -0
- package/resources/ai/anthropic.mjs.map +1 -0
- package/resources/ai/assistants/assistants.d.mts +16 -5
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +16 -5
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js +2 -2
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs +2 -2
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/conversations/conversation-insights.d.mts +105 -0
- package/resources/ai/conversations/conversation-insights.d.mts.map +1 -0
- package/resources/ai/conversations/conversation-insights.d.ts +105 -0
- package/resources/ai/conversations/conversation-insights.d.ts.map +1 -0
- package/resources/ai/conversations/conversation-insights.js +24 -0
- package/resources/ai/conversations/conversation-insights.js.map +1 -0
- package/resources/ai/conversations/conversation-insights.mjs +20 -0
- package/resources/ai/conversations/conversation-insights.mjs.map +1 -0
- package/resources/ai/conversations/conversations.d.mts +4 -0
- package/resources/ai/conversations/conversations.d.mts.map +1 -1
- package/resources/ai/conversations/conversations.d.ts +4 -0
- package/resources/ai/conversations/conversations.d.ts.map +1 -1
- package/resources/ai/conversations/conversations.js +4 -0
- package/resources/ai/conversations/conversations.js.map +1 -1
- package/resources/ai/conversations/conversations.mjs +4 -0
- package/resources/ai/conversations/conversations.mjs.map +1 -1
- package/resources/ai/conversations/index.d.mts +1 -0
- package/resources/ai/conversations/index.d.mts.map +1 -1
- package/resources/ai/conversations/index.d.ts +1 -0
- package/resources/ai/conversations/index.d.ts.map +1 -1
- package/resources/ai/conversations/index.js +3 -1
- package/resources/ai/conversations/index.js.map +1 -1
- package/resources/ai/conversations/index.mjs +1 -0
- package/resources/ai/conversations/index.mjs.map +1 -1
- package/resources/ai/index.d.mts +2 -1
- package/resources/ai/index.d.mts.map +1 -1
- package/resources/ai/index.d.ts +2 -1
- package/resources/ai/index.d.ts.map +1 -1
- package/resources/ai/index.js +17 -15
- package/resources/ai/index.js.map +1 -1
- package/resources/ai/index.mjs +1 -0
- package/resources/ai/index.mjs.map +1 -1
- package/resources/ai/tools.d.mts +22 -1
- package/resources/ai/tools.d.mts.map +1 -1
- package/resources/ai/tools.d.ts +22 -1
- package/resources/ai/tools.d.ts.map +1 -1
- package/resources/calls/actions.d.mts +8 -4
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +8 -4
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +8 -0
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +8 -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/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/managed-accounts/managed-accounts.d.mts +11 -2
- package/resources/managed-accounts/managed-accounts.d.mts.map +1 -1
- package/resources/managed-accounts/managed-accounts.d.ts +11 -2
- package/resources/managed-accounts/managed-accounts.d.ts.map +1 -1
- package/resources/managed-accounts/managed-accounts.js.map +1 -1
- package/resources/managed-accounts/managed-accounts.mjs.map +1 -1
- package/resources/requirements.d.mts +28 -3
- package/resources/requirements.d.mts.map +1 -1
- package/resources/requirements.d.ts +28 -3
- package/resources/requirements.d.ts.map +1 -1
- package/resources/requirements.js +2 -2
- package/resources/requirements.js.map +1 -1
- package/resources/requirements.mjs +2 -2
- package/resources/requirements.mjs.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.mts +1 -1
- package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.ts +1 -1
- package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
- package/resources/storage/cloudfs/actions.d.mts +43 -0
- package/resources/storage/cloudfs/actions.d.mts.map +1 -0
- package/resources/storage/cloudfs/actions.d.ts +43 -0
- package/resources/storage/cloudfs/actions.d.ts.map +1 -0
- package/resources/storage/cloudfs/actions.js +39 -0
- package/resources/storage/cloudfs/actions.js.map +1 -0
- package/resources/storage/cloudfs/actions.mjs +35 -0
- package/resources/storage/cloudfs/actions.mjs.map +1 -0
- package/resources/storage/cloudfs/cloudfs.d.mts +345 -0
- package/resources/storage/cloudfs/cloudfs.d.mts.map +1 -0
- package/resources/storage/cloudfs/cloudfs.d.ts +345 -0
- package/resources/storage/cloudfs/cloudfs.d.ts.map +1 -0
- package/resources/storage/cloudfs/cloudfs.js +116 -0
- package/resources/storage/cloudfs/cloudfs.js.map +1 -0
- package/resources/storage/cloudfs/cloudfs.mjs +111 -0
- package/resources/storage/cloudfs/cloudfs.mjs.map +1 -0
- package/resources/storage/cloudfs/index.d.mts +3 -0
- package/resources/storage/cloudfs/index.d.mts.map +1 -0
- package/resources/storage/cloudfs/index.d.ts +3 -0
- package/resources/storage/cloudfs/index.d.ts.map +1 -0
- package/resources/storage/cloudfs/index.js +9 -0
- package/resources/storage/cloudfs/index.js.map +1 -0
- package/resources/storage/cloudfs/index.mjs +4 -0
- package/resources/storage/cloudfs/index.mjs.map +1 -0
- package/resources/storage/cloudfs.d.mts +2 -0
- package/resources/storage/cloudfs.d.mts.map +1 -0
- package/resources/storage/cloudfs.d.ts +2 -0
- package/resources/storage/cloudfs.d.ts.map +1 -0
- package/resources/storage/cloudfs.js +6 -0
- package/resources/storage/cloudfs.js.map +1 -0
- package/resources/storage/cloudfs.mjs +3 -0
- package/resources/storage/cloudfs.mjs.map +1 -0
- package/resources/storage/index.d.mts +1 -0
- package/resources/storage/index.d.mts.map +1 -1
- package/resources/storage/index.d.ts +1 -0
- package/resources/storage/index.d.ts.map +1 -1
- package/resources/storage/index.js +7 -5
- package/resources/storage/index.js.map +1 -1
- package/resources/storage/index.mjs +1 -0
- package/resources/storage/index.mjs.map +1 -1
- package/resources/storage/storage.d.mts +4 -0
- package/resources/storage/storage.d.mts.map +1 -1
- package/resources/storage/storage.d.ts +4 -0
- package/resources/storage/storage.d.ts.map +1 -1
- package/resources/storage/storage.js +4 -0
- package/resources/storage/storage.js.map +1 -1
- package/resources/storage/storage.mjs +4 -0
- package/resources/storage/storage.mjs.map +1 -1
- package/resources/verify-profiles.d.mts +3 -3
- package/resources/verify-profiles.d.ts +3 -3
- package/resources/webhooks.d.mts +125 -19
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +125 -19
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/ai/ai.ts +8 -0
- package/src/resources/ai/anthropic/anthropic.ts +19 -0
- package/src/resources/ai/anthropic/index.ts +4 -0
- package/src/resources/ai/anthropic/v1.ts +157 -0
- package/src/resources/ai/anthropic.ts +3 -0
- package/src/resources/ai/assistants/assistants.ts +19 -5
- package/src/resources/ai/conversations/conversation-insights.ts +125 -0
- package/src/resources/ai/conversations/conversations.ts +15 -0
- package/src/resources/ai/conversations/index.ts +5 -0
- package/src/resources/ai/index.ts +2 -0
- package/src/resources/ai/tools.ts +28 -0
- package/src/resources/calls/actions.ts +8 -4
- package/src/resources/calls/calls.ts +9 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/managed-accounts/managed-accounts.ts +13 -2
- package/src/resources/requirements.ts +38 -3
- package/src/resources/speech-to-text/speech-to-text.ts +1 -1
- package/src/resources/storage/cloudfs/actions.ts +59 -0
- package/src/resources/storage/cloudfs/cloudfs.ts +446 -0
- package/src/resources/storage/cloudfs/index.ts +13 -0
- package/src/resources/storage/cloudfs.ts +3 -0
- package/src/resources/storage/index.ts +10 -0
- package/src/resources/storage/storage.ts +24 -0
- package/src/resources/verify-profiles.ts +3 -3
- package/src/resources/webhooks.ts +152 -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
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Manage historical AI assistant conversations
|
|
9
|
+
*/
|
|
10
|
+
export class ConversationInsights extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Aggregate conversation insights by specified fields
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response =
|
|
17
|
+
* await client.ai.conversations.conversationInsights.retrieveAggregates();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
retrieveAggregates(
|
|
21
|
+
query: ConversationInsightRetrieveAggregatesParams | null | undefined = {},
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): APIPromise<ConversationInsightRetrieveAggregatesResponse> {
|
|
24
|
+
return this._client.get('/ai/conversations/conversation-insights/aggregates', { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Aggregated conversation insight counts grouped by the specified fields. Each
|
|
30
|
+
* item in `data` contains the grouped field values and a `record_count` indicating
|
|
31
|
+
* how many conversation insights match that combination.
|
|
32
|
+
*/
|
|
33
|
+
export interface ConversationInsightRetrieveAggregatesResponse {
|
|
34
|
+
/**
|
|
35
|
+
* Aggregation result rows. Each row contains the grouped field values and a
|
|
36
|
+
* `record_count`.
|
|
37
|
+
*/
|
|
38
|
+
data: Array<ConversationInsightRetrieveAggregatesResponse.Data>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export namespace ConversationInsightRetrieveAggregatesResponse {
|
|
42
|
+
/**
|
|
43
|
+
* An aggregation row. Contains the grouped field values (keyed by the group_by
|
|
44
|
+
* field names) and a `record_count` integer. For example, when grouping by
|
|
45
|
+
* `score`, each row has a `score` value and a `record_count` of conversations with
|
|
46
|
+
* that score. When also splitting by `metadata.assistant_version_id`, each row
|
|
47
|
+
* includes both `score` and `metadata.assistant_version_id` plus their combined
|
|
48
|
+
* `record_count`.
|
|
49
|
+
*/
|
|
50
|
+
export interface Data {
|
|
51
|
+
/**
|
|
52
|
+
* Number of conversation insights that match this combination of grouped field
|
|
53
|
+
* values.
|
|
54
|
+
*/
|
|
55
|
+
record_count: number;
|
|
56
|
+
|
|
57
|
+
[k: string]: unknown;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface ConversationInsightRetrieveAggregatesParams {
|
|
62
|
+
/**
|
|
63
|
+
* Filter by creation datetime to scope the aggregation window. Supports range
|
|
64
|
+
* operators (e.g., `created_at=gte.2025-01-01T00:00:00Z` for the start of the
|
|
65
|
+
* range, `created_at=lt.2025-01-02T00:00:00Z` for the end). To build per-day time
|
|
66
|
+
* series (as the portal does for the 'Insights Over Time' chart), issue one
|
|
67
|
+
* request per day bounded by `created_at=gte.<day_start>` and
|
|
68
|
+
* `created_at=lt.<next_day_start>`.
|
|
69
|
+
*/
|
|
70
|
+
created_at?: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Fields to group by (can be comma-separated or multiple parameters). Prefix a
|
|
74
|
+
* field with 'metadata.' (e.g. 'metadata.assistant_id') to group by the
|
|
75
|
+
* conversation's metadata instead of the insight result.
|
|
76
|
+
*
|
|
77
|
+
* Common fields used for over-time charts:
|
|
78
|
+
*
|
|
79
|
+
* - `score` — Group by the insight's score value (e.g. for Agent Instruction
|
|
80
|
+
* Following, User Satisfaction).
|
|
81
|
+
* - `metadata.assistant_id` — Group by the assistant that handled the
|
|
82
|
+
* conversation.
|
|
83
|
+
* - `metadata.assistant_version_id` — Group by the assistant version, useful for
|
|
84
|
+
* comparing performance across versions in the portal's 'Insights Over Time'
|
|
85
|
+
* chart.
|
|
86
|
+
* - `metadata.telnyx_conversation_channel` — Group by conversation channel
|
|
87
|
+
* (phone_call, web_chat, etc.).
|
|
88
|
+
*/
|
|
89
|
+
group_by?: Array<string>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Optional insight ID to filter conversation insights. Only insights matching this
|
|
93
|
+
* ID will be included in the aggregation.
|
|
94
|
+
*/
|
|
95
|
+
insight_id?: string;
|
|
96
|
+
|
|
97
|
+
metadata?: ConversationInsightRetrieveAggregatesParams.Metadata;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Fields to include in the result (can be comma-separated or multiple parameters).
|
|
101
|
+
* Supports the same 'metadata.<key>' prefix as group_by. Each returned row will
|
|
102
|
+
* contain the grouped field values plus a `record_count` indicating how many
|
|
103
|
+
* conversation insights match that combination.
|
|
104
|
+
*/
|
|
105
|
+
show?: Array<string>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export namespace ConversationInsightRetrieveAggregatesParams {
|
|
109
|
+
export interface Metadata {
|
|
110
|
+
/**
|
|
111
|
+
* Filter by assistant ID (e.g., `metadata.assistant_id=eq.<assistant_id>`). When
|
|
112
|
+
* provided, only conversation insights for the specified assistant are aggregated.
|
|
113
|
+
* Used by the portal to scope the 'Insights Over Time' chart to a single
|
|
114
|
+
* assistant.
|
|
115
|
+
*/
|
|
116
|
+
assistant_id?: string;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export declare namespace ConversationInsights {
|
|
121
|
+
export {
|
|
122
|
+
type ConversationInsightRetrieveAggregatesResponse as ConversationInsightRetrieveAggregatesResponse,
|
|
123
|
+
type ConversationInsightRetrieveAggregatesParams as ConversationInsightRetrieveAggregatesParams,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as ConversationInsightsAPI from './conversation-insights';
|
|
5
|
+
import {
|
|
6
|
+
ConversationInsightRetrieveAggregatesParams,
|
|
7
|
+
ConversationInsightRetrieveAggregatesResponse,
|
|
8
|
+
ConversationInsights,
|
|
9
|
+
} from './conversation-insights';
|
|
4
10
|
import * as InsightsAPI from './insights';
|
|
5
11
|
import {
|
|
6
12
|
InsightCreateParams,
|
|
@@ -41,6 +47,8 @@ export class Conversations extends APIResource {
|
|
|
41
47
|
insightGroups: InsightGroupsAPI.InsightGroups = new InsightGroupsAPI.InsightGroups(this._client);
|
|
42
48
|
insights: InsightsAPI.Insights = new InsightsAPI.Insights(this._client);
|
|
43
49
|
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
50
|
+
conversationInsights: ConversationInsightsAPI.ConversationInsights =
|
|
51
|
+
new ConversationInsightsAPI.ConversationInsights(this._client);
|
|
44
52
|
|
|
45
53
|
/**
|
|
46
54
|
* Retrieve a list of all AI conversations configured by the user. Supports
|
|
@@ -354,6 +362,7 @@ export interface ConversationAddMessageParams {
|
|
|
354
362
|
Conversations.InsightGroups = InsightGroups;
|
|
355
363
|
Conversations.Insights = Insights;
|
|
356
364
|
Conversations.Messages = Messages;
|
|
365
|
+
Conversations.ConversationInsights = ConversationInsights;
|
|
357
366
|
|
|
358
367
|
export declare namespace Conversations {
|
|
359
368
|
export {
|
|
@@ -394,4 +403,10 @@ export declare namespace Conversations {
|
|
|
394
403
|
type MessageListResponsesDefaultFlatPagination as MessageListResponsesDefaultFlatPagination,
|
|
395
404
|
type MessageListParams as MessageListParams,
|
|
396
405
|
};
|
|
406
|
+
|
|
407
|
+
export {
|
|
408
|
+
ConversationInsights as ConversationInsights,
|
|
409
|
+
type ConversationInsightRetrieveAggregatesResponse as ConversationInsightRetrieveAggregatesResponse,
|
|
410
|
+
type ConversationInsightRetrieveAggregatesParams as ConversationInsightRetrieveAggregatesParams,
|
|
411
|
+
};
|
|
397
412
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
ConversationInsights,
|
|
5
|
+
type ConversationInsightRetrieveAggregatesResponse,
|
|
6
|
+
type ConversationInsightRetrieveAggregatesParams,
|
|
7
|
+
} from './conversation-insights';
|
|
3
8
|
export {
|
|
4
9
|
Conversations,
|
|
5
10
|
type Conversation,
|
|
@@ -9,6 +9,7 @@ export {
|
|
|
9
9
|
type AISummarizeParams,
|
|
10
10
|
type AIRetrieveConversationHistoriesParams,
|
|
11
11
|
} from './ai';
|
|
12
|
+
export { Anthropic } from './anthropic/index';
|
|
12
13
|
export {
|
|
13
14
|
Assistants,
|
|
14
15
|
type ArithmeticExpression,
|
|
@@ -130,6 +131,7 @@ export {
|
|
|
130
131
|
export { OpenAI, type OpenAICreateResponseResponse, type OpenAICreateResponseParams } from './openai/index';
|
|
131
132
|
export {
|
|
132
133
|
Tools,
|
|
134
|
+
type PayToolParams,
|
|
133
135
|
type SharedToolResponse,
|
|
134
136
|
type ToolDeleteResponse,
|
|
135
137
|
type ToolListParams,
|
|
@@ -89,6 +89,29 @@ export class Tools extends APIResource {
|
|
|
89
89
|
|
|
90
90
|
export type SharedToolResponsesDefaultFlatPagination = DefaultFlatPagination<SharedToolResponse>;
|
|
91
91
|
|
|
92
|
+
export interface PayToolParams {
|
|
93
|
+
/**
|
|
94
|
+
* The name of the pay connector configured in the Telnyx API. Must reference an
|
|
95
|
+
* existing pay connector for this organization.
|
|
96
|
+
*/
|
|
97
|
+
connector_name: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Default currency for payments processed by this tool.
|
|
101
|
+
*/
|
|
102
|
+
currency?: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Optional description of the pay tool that will be passed to the assistant.
|
|
106
|
+
*/
|
|
107
|
+
description?: string | null;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Default payment method for payments processed by this tool.
|
|
111
|
+
*/
|
|
112
|
+
payment_method?: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
92
115
|
export interface SharedToolResponse {
|
|
93
116
|
id: string;
|
|
94
117
|
|
|
@@ -130,6 +153,8 @@ export interface ToolCreateParams {
|
|
|
130
153
|
|
|
131
154
|
invite?: { [key: string]: unknown };
|
|
132
155
|
|
|
156
|
+
pay?: PayToolParams;
|
|
157
|
+
|
|
133
158
|
retrieval?: { [key: string]: unknown };
|
|
134
159
|
|
|
135
160
|
timeout_ms?: number;
|
|
@@ -150,6 +175,8 @@ export interface ToolUpdateParams {
|
|
|
150
175
|
|
|
151
176
|
invite?: { [key: string]: unknown };
|
|
152
177
|
|
|
178
|
+
pay?: PayToolParams;
|
|
179
|
+
|
|
153
180
|
retrieval?: { [key: string]: unknown };
|
|
154
181
|
|
|
155
182
|
timeout_ms?: number;
|
|
@@ -163,6 +190,7 @@ export interface ToolUpdateParams {
|
|
|
163
190
|
|
|
164
191
|
export declare namespace Tools {
|
|
165
192
|
export {
|
|
193
|
+
type PayToolParams as PayToolParams,
|
|
166
194
|
type SharedToolResponse as SharedToolResponse,
|
|
167
195
|
type ToolDeleteResponse as ToolDeleteResponse,
|
|
168
196
|
type SharedToolResponsesDefaultFlatPagination as SharedToolResponsesDefaultFlatPagination,
|
|
@@ -1589,7 +1589,11 @@ export interface TranscriptionConfig {
|
|
|
1589
1589
|
* controls the language hint), `multi` (no language hint), and language-specific
|
|
1590
1590
|
* hints `en`, `es`, `fr`, `de`, `hi`, `ru`, `pt`, `ja`, `it`, and `nl`. For
|
|
1591
1591
|
* `soniox/stt-rt-v4`, `auto` omits the language hint and lets Soniox auto-detect;
|
|
1592
|
-
* ISO 639-1 codes (e.g. `en`, `es`) bias detection toward that language.
|
|
1592
|
+
* ISO 639-1 codes (e.g. `en`, `es`) bias detection toward that language. For
|
|
1593
|
+
* `assemblyai/universal-streaming`, `auto` (or unset) enables native multilingual
|
|
1594
|
+
* code-switching; ISO 639-1 codes (`en`, `es`, `de`, `fr`, `pt`, `it`, `tr`, `nl`,
|
|
1595
|
+
* `sv`, `no`, `da`, `fi`, `hi`, `vi`, `ar`, `he`, `ja`, `zh`) bias the session to
|
|
1596
|
+
* that language.
|
|
1593
1597
|
*/
|
|
1594
1598
|
language?: string;
|
|
1595
1599
|
|
|
@@ -1605,7 +1609,7 @@ export interface TranscriptionConfig {
|
|
|
1605
1609
|
* - `xai/grok-stt` for live streaming transcription.
|
|
1606
1610
|
* - `soniox/stt-rt-v4` for live streaming multilingual transcription with
|
|
1607
1611
|
* automatic language detection.
|
|
1608
|
-
* - `parakeet
|
|
1612
|
+
* - `nvidia/parakeet-v3` for multilingual transcription with automatic language
|
|
1609
1613
|
* detection.
|
|
1610
1614
|
* - `azure/fast` and `azure/realtime`; Azure models require `region`, and
|
|
1611
1615
|
* unsupported regions require `api_key_ref`.
|
|
@@ -1625,7 +1629,7 @@ export interface TranscriptionConfig {
|
|
|
1625
1629
|
| 'assemblyai/universal-streaming'
|
|
1626
1630
|
| 'xai/grok-stt'
|
|
1627
1631
|
| 'soniox/stt-rt-v4'
|
|
1628
|
-
| 'parakeet
|
|
1632
|
+
| 'nvidia/parakeet-v3'
|
|
1629
1633
|
| 'azure/fast'
|
|
1630
1634
|
| 'azure/realtime'
|
|
1631
1635
|
| 'google/latest_long'
|
|
@@ -1939,7 +1943,7 @@ export interface TranscriptionEngineParakeetConfig {
|
|
|
1939
1943
|
/**
|
|
1940
1944
|
* The model to use for transcription.
|
|
1941
1945
|
*/
|
|
1942
|
-
transcription_model?: 'parakeet
|
|
1946
|
+
transcription_model?: 'nvidia/parakeet-v3';
|
|
1943
1947
|
}
|
|
1944
1948
|
|
|
1945
1949
|
export interface TranscriptionEngineSonioxConfig {
|
|
@@ -1108,6 +1108,15 @@ export interface CallDialParams {
|
|
|
1108
1108
|
*/
|
|
1109
1109
|
record_trim?: 'trim-silence';
|
|
1110
1110
|
|
|
1111
|
+
/**
|
|
1112
|
+
* Whether to keep trying the remaining routing paths (e.g. alternate
|
|
1113
|
+
* providers/gateways) for the same destination after `timeout_secs` is reached for
|
|
1114
|
+
* the current attempt. When set to `false`, reaching `timeout_secs` aborts the
|
|
1115
|
+
* entire dial attempt and the `call.hangup` webhook reports a `hangup_cause` of
|
|
1116
|
+
* `no_answer` instead of `timeout`.
|
|
1117
|
+
*/
|
|
1118
|
+
retry_on_timeout?: boolean;
|
|
1119
|
+
|
|
1111
1120
|
/**
|
|
1112
1121
|
* DTMF digits to send automatically after the called party answers. Useful for
|
|
1113
1122
|
* reaching an extension behind an IVR (e.g. `"200"` to dial extension 200 once the
|
package/src/resources/index.ts
CHANGED
|
@@ -374,7 +374,7 @@ export interface ManagedAccountListParams extends DefaultFlatPaginationParams {
|
|
|
374
374
|
/**
|
|
375
375
|
* Consolidated filter parameter (deepObject style). Originally:
|
|
376
376
|
* filter[email][contains], filter[email][eq], filter[organization_name][contains],
|
|
377
|
-
* filter[organization_name][eq]
|
|
377
|
+
* filter[organization_name][eq], filter[status][eq]
|
|
378
378
|
*/
|
|
379
379
|
filter?: ManagedAccountListParams.Filter;
|
|
380
380
|
|
|
@@ -406,12 +406,14 @@ export namespace ManagedAccountListParams {
|
|
|
406
406
|
/**
|
|
407
407
|
* Consolidated filter parameter (deepObject style). Originally:
|
|
408
408
|
* filter[email][contains], filter[email][eq], filter[organization_name][contains],
|
|
409
|
-
* filter[organization_name][eq]
|
|
409
|
+
* filter[organization_name][eq], filter[status][eq]
|
|
410
410
|
*/
|
|
411
411
|
export interface Filter {
|
|
412
412
|
email?: Filter.Email;
|
|
413
413
|
|
|
414
414
|
organization_name?: Filter.OrganizationName;
|
|
415
|
+
|
|
416
|
+
status?: Filter.Status;
|
|
415
417
|
}
|
|
416
418
|
|
|
417
419
|
export namespace Filter {
|
|
@@ -443,6 +445,15 @@ export namespace ManagedAccountListParams {
|
|
|
443
445
|
*/
|
|
444
446
|
eq?: string;
|
|
445
447
|
}
|
|
448
|
+
|
|
449
|
+
export interface Status {
|
|
450
|
+
/**
|
|
451
|
+
* If present, only returns managed accounts with the <code>status</code> matching
|
|
452
|
+
* exactly the value given. Use <code>enabled</code> or <code>disabled</code> to
|
|
453
|
+
* filter accounts by whether they are currently able to use Telnyx services.
|
|
454
|
+
*/
|
|
455
|
+
eq?: 'all' | 'active' | 'enabled' | 'cancelled' | 'disabled' | 'blocked';
|
|
456
|
+
}
|
|
446
457
|
}
|
|
447
458
|
}
|
|
448
459
|
|
|
@@ -42,8 +42,12 @@ export class Requirements extends APIResource {
|
|
|
42
42
|
* );
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
retrieve(
|
|
46
|
-
|
|
45
|
+
retrieve(
|
|
46
|
+
id: string,
|
|
47
|
+
query: RequirementRetrieveParams | null | undefined = {},
|
|
48
|
+
options?: RequestOptions,
|
|
49
|
+
): APIPromise<RequirementRetrieveResponse> {
|
|
50
|
+
return this._client.get(path`/requirements/${id}`, { query, ...options });
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
|
|
@@ -71,6 +75,17 @@ export interface DocReqsRequirement {
|
|
|
71
75
|
*/
|
|
72
76
|
created_at?: string;
|
|
73
77
|
|
|
78
|
+
/**
|
|
79
|
+
* When this version was superseded. NULL means this is the active or pending
|
|
80
|
+
* version.
|
|
81
|
+
*/
|
|
82
|
+
effective_end_at?: string | null;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* When this version became (or will become) active.
|
|
86
|
+
*/
|
|
87
|
+
effective_start_at?: string | null;
|
|
88
|
+
|
|
74
89
|
/**
|
|
75
90
|
* The locality where this requirement applies
|
|
76
91
|
*/
|
|
@@ -90,12 +105,17 @@ export interface DocReqsRequirement {
|
|
|
90
105
|
/**
|
|
91
106
|
* Lists the requirement types necessary to fulfill this requirement
|
|
92
107
|
*/
|
|
93
|
-
|
|
108
|
+
requirement_types?: Array<Shared.DocReqsRequirementType>;
|
|
94
109
|
|
|
95
110
|
/**
|
|
96
111
|
* ISO 8601 formatted date-time indicating when the resource was last updated.
|
|
97
112
|
*/
|
|
98
113
|
updated_at?: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Version number. Increments with each new version. Defaults to 1.
|
|
117
|
+
*/
|
|
118
|
+
version?: number;
|
|
99
119
|
}
|
|
100
120
|
|
|
101
121
|
export interface RequirementRetrieveResponse {
|
|
@@ -123,6 +143,12 @@ export interface RequirementListParams extends DefaultFlatPaginationParams {
|
|
|
123
143
|
| '-country_code'
|
|
124
144
|
| '-phone_number_type'
|
|
125
145
|
>;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Filter by requirement version number. When omitted, returns the currently-active
|
|
149
|
+
* version.
|
|
150
|
+
*/
|
|
151
|
+
version?: number;
|
|
126
152
|
}
|
|
127
153
|
|
|
128
154
|
export namespace RequirementListParams {
|
|
@@ -149,11 +175,20 @@ export namespace RequirementListParams {
|
|
|
149
175
|
}
|
|
150
176
|
}
|
|
151
177
|
|
|
178
|
+
export interface RequirementRetrieveParams {
|
|
179
|
+
/**
|
|
180
|
+
* Filter by requirement version number. When omitted, returns the currently-active
|
|
181
|
+
* version.
|
|
182
|
+
*/
|
|
183
|
+
version?: number;
|
|
184
|
+
}
|
|
185
|
+
|
|
152
186
|
export declare namespace Requirements {
|
|
153
187
|
export {
|
|
154
188
|
type DocReqsRequirement as DocReqsRequirement,
|
|
155
189
|
type RequirementRetrieveResponse as RequirementRetrieveResponse,
|
|
156
190
|
type DocReqsRequirementsDefaultFlatPagination as DocReqsRequirementsDefaultFlatPagination,
|
|
157
191
|
type RequirementListParams as RequirementListParams,
|
|
192
|
+
type RequirementRetrieveParams as RequirementRetrieveParams,
|
|
158
193
|
};
|
|
159
194
|
}
|
|
@@ -300,7 +300,7 @@ export interface SpeechToTextRetrieveTranscriptionParams {
|
|
|
300
300
|
| 'xai/grok-stt'
|
|
301
301
|
| 'speechmatics/standard'
|
|
302
302
|
| 'soniox/stt-rt-v4'
|
|
303
|
-
| 'parakeet
|
|
303
|
+
| 'nvidia/parakeet-v3';
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
306
|
* Enable redaction of sensitive information (e.g., PCI data, SSN) from
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as CloudfsAPI from './cloudfs';
|
|
5
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
8
|
+
import { path } from '../../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Manage CloudFS filesystems — JuiceFS-compatible filesystems backed by Telnyx Cloud Storage
|
|
12
|
+
*/
|
|
13
|
+
export class Actions extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* Issues a new metadata access token for the filesystem and returns the full
|
|
16
|
+
* filesystem, including the new `meta_token` and credential-bearing `meta_url`.
|
|
17
|
+
* The previous token stops authenticating immediately; the metadata database and
|
|
18
|
+
* S3 bucket are unchanged. The request takes no body. Allowed while the filesystem
|
|
19
|
+
* is `ready` or `needs_format`; otherwise returns a `409`. Retrying with the same
|
|
20
|
+
* `Idempotency-Key` within 24 hours replays the original response — including the
|
|
21
|
+
* same token — instead of rotating again.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const cloudfsFilesystemResponseWrapper =
|
|
26
|
+
* await client.storage.cloudfs.actions.rotateMetaToken(
|
|
27
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
28
|
+
* { 'Idempotency-Key': 'Idempotency-Key' },
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
rotateMetaToken(
|
|
33
|
+
id: string,
|
|
34
|
+
params: ActionRotateMetaTokenParams,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<CloudfsAPI.CloudfsFilesystemResponseWrapper> {
|
|
37
|
+
const { 'Idempotency-Key': idempotencyKey } = params;
|
|
38
|
+
return this._client.post(path`/storage/cloudfs/${id}/actions/rotate-meta-token`, {
|
|
39
|
+
...options,
|
|
40
|
+
headers: buildHeaders([{ 'Idempotency-Key': idempotencyKey }, options?.headers]),
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ActionRotateMetaTokenParams {
|
|
46
|
+
/**
|
|
47
|
+
* Unique key that makes the request idempotent (1-255 characters: letters,
|
|
48
|
+
* numbers, `_`, and `-`). Retrying with the same key within 24 hours replays the
|
|
49
|
+
* original response (marked with an `Idempotent-Replayed: true` header) instead of
|
|
50
|
+
* repeating the action. Reusing a key with a different request returns a `422`;
|
|
51
|
+
* sending a key while the original request is still being processed returns a
|
|
52
|
+
* `409`.
|
|
53
|
+
*/
|
|
54
|
+
'Idempotency-Key': string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export declare namespace Actions {
|
|
58
|
+
export { type ActionRotateMetaTokenParams as ActionRotateMetaTokenParams };
|
|
59
|
+
}
|