retell-sdk 5.31.0 → 5.32.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 +20 -0
- package/client.d.mts +9 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -11
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/index.d.mts +0 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -4
- package/index.js.map +1 -1
- package/index.mjs +0 -1
- package/index.mjs.map +1 -1
- package/internal/uploads.js +2 -12
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +2 -12
- package/internal/uploads.mjs.map +1 -1
- package/package.json +1 -11
- package/resources/agent.d.mts +44 -44
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +44 -44
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +25 -25
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +25 -25
- package/resources/agent.mjs.map +1 -1
- package/resources/call.d.mts +1367 -1367
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +1367 -1367
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +60 -60
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +60 -60
- package/resources/call.mjs.map +1 -1
- package/resources/chat-agent.d.mts +46 -46
- package/resources/chat-agent.d.mts.map +1 -1
- package/resources/chat-agent.d.ts +46 -46
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat-agent.js +27 -27
- package/resources/chat-agent.js.map +1 -1
- package/resources/chat-agent.mjs +27 -27
- package/resources/chat-agent.mjs.map +1 -1
- package/resources/chat.d.mts +92 -92
- package/resources/chat.d.mts.map +1 -1
- package/resources/chat.d.ts +92 -92
- package/resources/chat.d.ts.map +1 -1
- package/resources/chat.js +55 -55
- package/resources/chat.js.map +1 -1
- package/resources/chat.mjs +55 -55
- package/resources/chat.mjs.map +1 -1
- package/resources/conversation-flow-component.d.mts +25 -25
- package/resources/conversation-flow-component.d.mts.map +1 -1
- package/resources/conversation-flow-component.d.ts +25 -25
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow-component.js +12 -12
- package/resources/conversation-flow-component.js.map +1 -1
- package/resources/conversation-flow-component.mjs +12 -12
- package/resources/conversation-flow-component.mjs.map +1 -1
- package/resources/conversation-flow.d.mts +26 -26
- package/resources/conversation-flow.d.mts.map +1 -1
- package/resources/conversation-flow.d.ts +26 -26
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/conversation-flow.js +12 -12
- package/resources/conversation-flow.js.map +1 -1
- package/resources/conversation-flow.mjs +12 -12
- package/resources/conversation-flow.mjs.map +1 -1
- package/resources/index.d.mts +9 -9
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -9
- package/resources/index.d.ts.map +1 -1
- package/resources/llm.d.mts +24 -24
- package/resources/llm.d.mts.map +1 -1
- package/resources/llm.d.ts +24 -24
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +11 -11
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +11 -11
- package/resources/llm.mjs.map +1 -1
- package/resources/phone-number.d.mts +8 -8
- package/resources/phone-number.d.ts +8 -8
- package/resources/tests.d.mts +95 -95
- package/resources/tests.d.mts.map +1 -1
- package/resources/tests.d.ts +95 -95
- package/resources/tests.d.ts.map +1 -1
- package/resources/tests.js +27 -27
- package/resources/tests.js.map +1 -1
- package/resources/tests.mjs +27 -27
- package/resources/tests.mjs.map +1 -1
- package/resources/voice.d.mts +8 -8
- package/resources/voice.d.mts.map +1 -1
- package/resources/voice.d.ts +8 -8
- package/resources/voice.d.ts.map +1 -1
- package/resources/voice.js +12 -12
- package/resources/voice.js.map +1 -1
- package/resources/voice.mjs +12 -12
- package/resources/voice.mjs.map +1 -1
- package/src/client.ts +18 -22
- package/src/index.ts +0 -1
- package/src/internal/uploads.ts +4 -12
- package/src/resources/agent.ts +61 -61
- package/src/resources/call.ts +2364 -2364
- package/src/resources/chat-agent.ts +63 -63
- package/src/resources/chat.ts +107 -107
- package/src/resources/conversation-flow-component.ts +34 -34
- package/src/resources/conversation-flow.ts +35 -35
- package/src/resources/index.ts +18 -18
- package/src/resources/llm.ts +30 -30
- package/src/resources/phone-number.ts +8 -8
- package/src/resources/tests.ts +136 -136
- package/src/resources/voice.ts +12 -12
- 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
- package/lib/webhook_auth.d.mts +0 -11
- package/lib/webhook_auth.d.mts.map +0 -1
- package/lib/webhook_auth.d.ts +0 -11
- package/lib/webhook_auth.d.ts.map +0 -1
- package/lib/webhook_auth.js +0 -48
- package/lib/webhook_auth.js.map +0 -1
- package/lib/webhook_auth.mjs +0 -43
- package/lib/webhook_auth.mjs.map +0 -1
- package/src/lib/webhook_auth.ts +0 -76
package/resources/chat.mjs
CHANGED
|
@@ -17,71 +17,47 @@ export class Chat extends APIResource {
|
|
|
17
17
|
return this._client.post('/create-chat', { body, ...options });
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* ```ts
|
|
24
|
-
* const chatResponse = await client.chat.retrieve(
|
|
25
|
-
* '16b980523634a6dc504898cda492e939',
|
|
26
|
-
* );
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
retrieve(chatID, options) {
|
|
30
|
-
return this._client.get(path `/get-chat/${chatID}`, options);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Update metadata and sensitive data storage settings for an existing chat.
|
|
20
|
+
* Start an outbound SMS chat conversation with a phone number using the specified
|
|
21
|
+
* agent. The agent must be configured for chat mode. The initial SMS message will
|
|
22
|
+
* be automatically generated and sent based on the agent's configuration.
|
|
34
23
|
*
|
|
35
24
|
* @example
|
|
36
25
|
* ```ts
|
|
37
|
-
* const chatResponse = await client.chat.
|
|
38
|
-
* '
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* metadata: {
|
|
42
|
-
* customer_id: 'cust_123',
|
|
43
|
-
* notes: 'Follow-up required',
|
|
44
|
-
* },
|
|
45
|
-
* override_dynamic_variables: {
|
|
46
|
-
* additional_discount: '15%',
|
|
47
|
-
* },
|
|
48
|
-
* },
|
|
49
|
-
* );
|
|
26
|
+
* const chatResponse = await client.chat.createSMSChat({
|
|
27
|
+
* from_number: '+12137771234',
|
|
28
|
+
* to_number: '+14155551234',
|
|
29
|
+
* });
|
|
50
30
|
* ```
|
|
51
31
|
*/
|
|
52
|
-
|
|
53
|
-
return this._client.
|
|
32
|
+
createSMSChat(body, options) {
|
|
33
|
+
return this._client.post('/create-sms-chat', { body, ...options });
|
|
54
34
|
}
|
|
55
35
|
/**
|
|
56
|
-
*
|
|
36
|
+
* End an ongoing chat
|
|
57
37
|
*
|
|
58
38
|
* @example
|
|
59
39
|
* ```ts
|
|
60
|
-
*
|
|
40
|
+
* await client.chat.end('16b980523634a6dc504898cda492e939');
|
|
61
41
|
* ```
|
|
62
42
|
*/
|
|
63
|
-
|
|
64
|
-
return this._client.
|
|
65
|
-
body,
|
|
66
|
-
timeout: this._client._options.timeout ?? 300000,
|
|
43
|
+
end(chatID, options) {
|
|
44
|
+
return this._client.patch(path `/end-chat/${chatID}`, {
|
|
67
45
|
...options,
|
|
46
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
68
47
|
});
|
|
69
48
|
}
|
|
70
49
|
/**
|
|
71
|
-
*
|
|
50
|
+
* Retrieve details of a specific chat
|
|
72
51
|
*
|
|
73
52
|
* @example
|
|
74
53
|
* ```ts
|
|
75
|
-
* await client.chat.
|
|
54
|
+
* const chatResponse = await client.chat.retrieve(
|
|
76
55
|
* '16b980523634a6dc504898cda492e939',
|
|
77
56
|
* );
|
|
78
57
|
* ```
|
|
79
58
|
*/
|
|
80
|
-
|
|
81
|
-
return this._client.
|
|
82
|
-
...options,
|
|
83
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
84
|
-
});
|
|
59
|
+
retrieve(chatID, options) {
|
|
60
|
+
return this._client.get(path `/get-chat/${chatID}`, options);
|
|
85
61
|
}
|
|
86
62
|
/**
|
|
87
63
|
* Create a chat completion message
|
|
@@ -102,31 +78,55 @@ export class Chat extends APIResource {
|
|
|
102
78
|
});
|
|
103
79
|
}
|
|
104
80
|
/**
|
|
105
|
-
*
|
|
106
|
-
* agent. The agent must be configured for chat mode. The initial SMS message will
|
|
107
|
-
* be automatically generated and sent based on the agent's configuration.
|
|
81
|
+
* List chats with unified cursor pagination response.
|
|
108
82
|
*
|
|
109
83
|
* @example
|
|
110
84
|
* ```ts
|
|
111
|
-
* const
|
|
112
|
-
* from_number: '+12137771234',
|
|
113
|
-
* to_number: '+14155551234',
|
|
114
|
-
* });
|
|
85
|
+
* const chats = await client.chat.list();
|
|
115
86
|
* ```
|
|
116
87
|
*/
|
|
117
|
-
|
|
118
|
-
return this._client.post('/
|
|
88
|
+
list(body = {}, options) {
|
|
89
|
+
return this._client.post('/v3/list-chats', {
|
|
90
|
+
body,
|
|
91
|
+
timeout: this._client._options.timeout ?? 300000,
|
|
92
|
+
...options,
|
|
93
|
+
});
|
|
119
94
|
}
|
|
120
95
|
/**
|
|
121
|
-
*
|
|
96
|
+
* Update metadata and sensitive data storage settings for an existing chat.
|
|
122
97
|
*
|
|
123
98
|
* @example
|
|
124
99
|
* ```ts
|
|
125
|
-
* await client.chat.
|
|
100
|
+
* const chatResponse = await client.chat.update(
|
|
101
|
+
* 'chat_98c1a2157aa0559144d67bb0729',
|
|
102
|
+
* {
|
|
103
|
+
* data_storage_setting: 'everything',
|
|
104
|
+
* metadata: {
|
|
105
|
+
* customer_id: 'cust_123',
|
|
106
|
+
* notes: 'Follow-up required',
|
|
107
|
+
* },
|
|
108
|
+
* override_dynamic_variables: {
|
|
109
|
+
* additional_discount: '15%',
|
|
110
|
+
* },
|
|
111
|
+
* },
|
|
112
|
+
* );
|
|
126
113
|
* ```
|
|
127
114
|
*/
|
|
128
|
-
|
|
129
|
-
return this._client.patch(path `/
|
|
115
|
+
update(chatID, body, options) {
|
|
116
|
+
return this._client.patch(path `/update-chat/${chatID}`, { body, ...options });
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Delete an existing chat
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* await client.chat.delete(
|
|
124
|
+
* '16b980523634a6dc504898cda492e939',
|
|
125
|
+
* );
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
delete(chatID, options) {
|
|
129
|
+
return this._client.delete(path `/delete-chat/${chatID}`, {
|
|
130
130
|
...options,
|
|
131
131
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
132
132
|
});
|
package/resources/chat.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,YAAY,EAAE,gC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AAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;YACzC,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,gBAAgB,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,gBAAgB,MAAM,EAAE,EAAE;YACvD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -37,27 +37,27 @@ export declare class ConversationFlowComponent extends APIResource {
|
|
|
37
37
|
*/
|
|
38
38
|
retrieve(conversationFlowComponentID: string, options?: RequestOptions): APIPromise<ConversationFlowComponentResponse>;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* List shared conversation flow components with pagination
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
43
|
* ```ts
|
|
44
|
-
* const
|
|
45
|
-
* await client.conversationFlowComponent.
|
|
46
|
-
* 'conversation_flow_component_id',
|
|
47
|
-
* );
|
|
44
|
+
* const conversationFlowComponents =
|
|
45
|
+
* await client.conversationFlowComponent.list();
|
|
48
46
|
* ```
|
|
49
47
|
*/
|
|
50
|
-
|
|
48
|
+
list(query?: ConversationFlowComponentListParams | null | undefined, options?: RequestOptions): APIPromise<ConversationFlowComponentListResponse>;
|
|
51
49
|
/**
|
|
52
|
-
*
|
|
50
|
+
* Update an existing shared conversation flow component
|
|
53
51
|
*
|
|
54
52
|
* @example
|
|
55
53
|
* ```ts
|
|
56
|
-
* const
|
|
57
|
-
* await client.conversationFlowComponent.
|
|
54
|
+
* const conversationFlowComponentResponse =
|
|
55
|
+
* await client.conversationFlowComponent.update(
|
|
56
|
+
* 'conversation_flow_component_id',
|
|
57
|
+
* );
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
|
|
60
|
+
update(conversationFlowComponentID: string, body: ConversationFlowComponentUpdateParams, options?: RequestOptions): APIPromise<ConversationFlowComponentResponse>;
|
|
61
61
|
/**
|
|
62
62
|
* Delete a shared conversation flow component. When deleting a shared component,
|
|
63
63
|
* creates local copies for all linked conversation flows.
|
|
@@ -11698,6 +11698,20 @@ export declare namespace ConversationFlowComponentCreateParams {
|
|
|
11698
11698
|
tool_id?: string;
|
|
11699
11699
|
}
|
|
11700
11700
|
}
|
|
11701
|
+
export interface ConversationFlowComponentListParams {
|
|
11702
|
+
/**
|
|
11703
|
+
* Maximum number of items to return.
|
|
11704
|
+
*/
|
|
11705
|
+
limit?: number;
|
|
11706
|
+
/**
|
|
11707
|
+
* Pagination key for fetching the next page.
|
|
11708
|
+
*/
|
|
11709
|
+
pagination_key?: string;
|
|
11710
|
+
/**
|
|
11711
|
+
* Sort order for results.
|
|
11712
|
+
*/
|
|
11713
|
+
sort_order?: 'ascending' | 'descending';
|
|
11714
|
+
}
|
|
11701
11715
|
export interface ConversationFlowComponentUpdateParams {
|
|
11702
11716
|
/**
|
|
11703
11717
|
* Display position for the begin tag in the frontend
|
|
@@ -17500,21 +17514,7 @@ export declare namespace ConversationFlowComponentUpdateParams {
|
|
|
17500
17514
|
tool_id?: string;
|
|
17501
17515
|
}
|
|
17502
17516
|
}
|
|
17503
|
-
export interface ConversationFlowComponentListParams {
|
|
17504
|
-
/**
|
|
17505
|
-
* Maximum number of items to return.
|
|
17506
|
-
*/
|
|
17507
|
-
limit?: number;
|
|
17508
|
-
/**
|
|
17509
|
-
* Pagination key for fetching the next page.
|
|
17510
|
-
*/
|
|
17511
|
-
pagination_key?: string;
|
|
17512
|
-
/**
|
|
17513
|
-
* Sort order for results.
|
|
17514
|
-
*/
|
|
17515
|
-
sort_order?: 'ascending' | 'descending';
|
|
17516
|
-
}
|
|
17517
17517
|
export declare namespace ConversationFlowComponent {
|
|
17518
|
-
export { type ConversationFlowComponentResponse as ConversationFlowComponentResponse, type ConversationFlowComponentListResponse as ConversationFlowComponentListResponse, type ConversationFlowComponentCreateParams as ConversationFlowComponentCreateParams, type
|
|
17518
|
+
export { type ConversationFlowComponentResponse as ConversationFlowComponentResponse, type ConversationFlowComponentListResponse as ConversationFlowComponentListResponse, type ConversationFlowComponentCreateParams as ConversationFlowComponentCreateParams, type ConversationFlowComponentListParams as ConversationFlowComponentListParams, type ConversationFlowComponentUpdateParams as ConversationFlowComponentUpdateParams, };
|
|
17519
17519
|
}
|
|
17520
17520
|
//# sourceMappingURL=conversation-flow-component.d.mts.map
|