agentphone 1.0.2 → 1.0.4
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +6 -0
- package/dist/cjs/Client.js +18 -8
- package/dist/cjs/api/resources/agentWebhooks/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/agentWebhooks/client/Client.js +1 -1
- package/dist/cjs/api/resources/agents/client/Client.d.ts +30 -2
- package/dist/cjs/api/resources/agents/client/Client.js +96 -2
- package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/dist/cjs/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.d.ts +11 -0
- package/dist/cjs/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -0
- package/dist/cjs/api/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/calls/client/Client.d.ts +27 -3
- package/dist/cjs/api/resources/calls/client/Client.js +68 -4
- package/dist/cjs/api/resources/calls/client/requests/CreateOutboundCallRequest.d.ts +2 -2
- package/dist/cjs/api/resources/calls/client/requests/ListCallsV1CallsGetRequest.d.ts +8 -0
- package/dist/cjs/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.js +3 -0
- package/dist/cjs/api/resources/calls/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +94 -0
- package/dist/cjs/api/resources/contacts/client/Client.js +341 -0
- package/dist/cjs/api/resources/contacts/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/contacts/client/index.js +17 -0
- package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.d.ts +13 -0
- package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.js +3 -0
- package/dist/cjs/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.d.ts +9 -0
- package/dist/cjs/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.js +3 -0
- package/dist/cjs/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.js +3 -0
- package/dist/cjs/api/resources/contacts/client/requests/UpdateContactRequest.d.ts +13 -0
- package/dist/cjs/api/resources/contacts/client/requests/UpdateContactRequest.js +3 -0
- package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/contacts/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/contacts/index.d.ts +1 -0
- package/dist/cjs/api/resources/contacts/index.js +17 -0
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/conversations/client/Client.js +1 -1
- package/dist/cjs/api/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/index.js +5 -1
- package/dist/cjs/api/resources/messages/client/Client.d.ts +49 -0
- package/dist/cjs/api/resources/messages/client/Client.js +183 -0
- package/dist/cjs/api/resources/messages/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/client/index.js +17 -0
- package/dist/cjs/api/resources/messages/client/requests/SendMessageRequest.d.ts +15 -0
- package/dist/cjs/api/resources/messages/client/requests/SendMessageRequest.js +3 -0
- package/dist/cjs/api/resources/messages/client/requests/SendReactionRequest.d.ts +11 -0
- package/dist/cjs/api/resources/messages/client/requests/SendReactionRequest.js +3 -0
- package/dist/cjs/api/resources/messages/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/messages/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/messages/index.d.ts +1 -0
- package/dist/cjs/api/resources/messages/index.js +17 -0
- package/dist/cjs/api/resources/numbers/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/numbers/client/Client.js +1 -1
- package/dist/cjs/api/resources/usage/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/usage/client/Client.js +1 -1
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/webhooks/client/Client.js +6 -6
- package/dist/cjs/api/types/AgentNumberResponse.d.ts +1 -0
- package/dist/cjs/api/types/AgentResponse.d.ts +2 -0
- package/dist/cjs/api/types/CallSummary.d.ts +1 -1
- package/dist/cjs/api/types/ContactListResponse.d.ts +6 -0
- package/dist/cjs/api/types/ContactListResponse.js +3 -0
- package/dist/cjs/api/types/ContactResponse.d.ts +9 -0
- package/dist/cjs/api/types/ContactResponse.js +3 -0
- package/dist/cjs/api/types/MessageInConversation.d.ts +2 -0
- package/dist/cjs/api/types/MessageResponse.d.ts +2 -0
- package/dist/cjs/api/types/PhoneNumberResponse.d.ts +1 -0
- package/dist/cjs/api/types/SendMessageResponse.d.ts +7 -0
- package/dist/cjs/api/types/SendMessageResponse.js +3 -0
- package/dist/cjs/api/types/SendReactionResponse.d.ts +6 -0
- package/dist/cjs/api/types/SendReactionResponse.js +3 -0
- package/dist/cjs/api/types/WebhookCreateRequest.d.ts +1 -0
- package/dist/cjs/api/types/WebhookResponse.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +4 -0
- package/dist/cjs/api/types/index.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +6 -0
- package/dist/esm/Client.mjs +10 -0
- package/dist/esm/api/resources/agentWebhooks/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/agentWebhooks/client/Client.mjs +1 -1
- package/dist/esm/api/resources/agents/client/Client.d.mts +30 -2
- package/dist/esm/api/resources/agents/client/Client.mjs +96 -2
- package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.d.mts +2 -0
- package/dist/esm/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.d.mts +11 -0
- package/dist/esm/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +2 -0
- package/dist/esm/api/resources/agents/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/calls/client/Client.d.mts +27 -3
- package/dist/esm/api/resources/calls/client/Client.mjs +68 -4
- package/dist/esm/api/resources/calls/client/requests/CreateOutboundCallRequest.d.mts +2 -2
- package/dist/esm/api/resources/calls/client/requests/ListCallsV1CallsGetRequest.d.mts +8 -0
- package/dist/esm/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.mjs +2 -0
- package/dist/esm/api/resources/calls/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/contacts/client/Client.d.mts +94 -0
- package/dist/esm/api/resources/contacts/client/Client.mjs +304 -0
- package/dist/esm/api/resources/contacts/client/index.d.mts +1 -0
- package/dist/esm/api/resources/contacts/client/index.mjs +1 -0
- package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.d.mts +13 -0
- package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.mjs +2 -0
- package/dist/esm/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.d.mts +9 -0
- package/dist/esm/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.mjs +2 -0
- package/dist/esm/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.mjs +2 -0
- package/dist/esm/api/resources/contacts/client/requests/UpdateContactRequest.d.mts +13 -0
- package/dist/esm/api/resources/contacts/client/requests/UpdateContactRequest.mjs +2 -0
- package/dist/esm/api/resources/contacts/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/contacts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/contacts/index.d.mts +1 -0
- package/dist/esm/api/resources/contacts/index.mjs +1 -0
- package/dist/esm/api/resources/conversations/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/conversations/client/Client.mjs +1 -1
- package/dist/esm/api/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/index.mjs +4 -0
- package/dist/esm/api/resources/messages/client/Client.d.mts +49 -0
- package/dist/esm/api/resources/messages/client/Client.mjs +146 -0
- package/dist/esm/api/resources/messages/client/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/client/index.mjs +1 -0
- package/dist/esm/api/resources/messages/client/requests/SendMessageRequest.d.mts +15 -0
- package/dist/esm/api/resources/messages/client/requests/SendMessageRequest.mjs +2 -0
- package/dist/esm/api/resources/messages/client/requests/SendReactionRequest.d.mts +11 -0
- package/dist/esm/api/resources/messages/client/requests/SendReactionRequest.mjs +2 -0
- package/dist/esm/api/resources/messages/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/messages/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/messages/index.d.mts +1 -0
- package/dist/esm/api/resources/messages/index.mjs +1 -0
- package/dist/esm/api/resources/numbers/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/numbers/client/Client.mjs +1 -1
- package/dist/esm/api/resources/usage/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/usage/client/Client.mjs +1 -1
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/webhooks/client/Client.mjs +6 -6
- package/dist/esm/api/types/AgentNumberResponse.d.mts +1 -0
- package/dist/esm/api/types/AgentResponse.d.mts +2 -0
- package/dist/esm/api/types/CallSummary.d.mts +1 -1
- package/dist/esm/api/types/ContactListResponse.d.mts +6 -0
- package/dist/esm/api/types/ContactListResponse.mjs +2 -0
- package/dist/esm/api/types/ContactResponse.d.mts +9 -0
- package/dist/esm/api/types/ContactResponse.mjs +2 -0
- package/dist/esm/api/types/MessageInConversation.d.mts +2 -0
- package/dist/esm/api/types/MessageResponse.d.mts +2 -0
- package/dist/esm/api/types/PhoneNumberResponse.d.mts +1 -0
- package/dist/esm/api/types/SendMessageResponse.d.mts +7 -0
- package/dist/esm/api/types/SendMessageResponse.mjs +2 -0
- package/dist/esm/api/types/SendReactionResponse.d.mts +6 -0
- package/dist/esm/api/types/SendReactionResponse.mjs +2 -0
- package/dist/esm/api/types/WebhookCreateRequest.d.mts +1 -0
- package/dist/esm/api/types/WebhookResponse.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +4 -0
- package/dist/esm/api/types/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +780 -114
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "agentphone",
|
|
46
|
-
"X-Fern-SDK-Version": "1.0.
|
|
47
|
-
"User-Agent": "agentphone/1.0.
|
|
46
|
+
"X-Fern-SDK-Version": "1.0.4",
|
|
47
|
+
"User-Agent": "agentphone/1.0.4",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AgentsClient } from "./api/resources/agents/client/Client.js";
|
|
2
2
|
import { AgentWebhooksClient } from "./api/resources/agentWebhooks/client/Client.js";
|
|
3
3
|
import { CallsClient } from "./api/resources/calls/client/Client.js";
|
|
4
|
+
import { ContactsClient } from "./api/resources/contacts/client/Client.js";
|
|
4
5
|
import { ConversationsClient } from "./api/resources/conversations/client/Client.js";
|
|
6
|
+
import { MessagesClient } from "./api/resources/messages/client/Client.js";
|
|
5
7
|
import { NumbersClient } from "./api/resources/numbers/client/Client.js";
|
|
6
8
|
import { UsageClient } from "./api/resources/usage/client/Client.js";
|
|
7
9
|
import { WebhooksClient } from "./api/resources/webhooks/client/Client.js";
|
|
@@ -18,15 +20,19 @@ export declare class AgentPhoneClient {
|
|
|
18
20
|
protected _numbers: NumbersClient | undefined;
|
|
19
21
|
protected _webhooks: WebhooksClient | undefined;
|
|
20
22
|
protected _agentWebhooks: AgentWebhooksClient | undefined;
|
|
23
|
+
protected _contacts: ContactsClient | undefined;
|
|
21
24
|
protected _conversations: ConversationsClient | undefined;
|
|
22
25
|
protected _calls: CallsClient | undefined;
|
|
23
26
|
protected _usage: UsageClient | undefined;
|
|
27
|
+
protected _messages: MessagesClient | undefined;
|
|
24
28
|
constructor(options: AgentPhoneClient.Options);
|
|
25
29
|
get agents(): AgentsClient;
|
|
26
30
|
get numbers(): NumbersClient;
|
|
27
31
|
get webhooks(): WebhooksClient;
|
|
28
32
|
get agentWebhooks(): AgentWebhooksClient;
|
|
33
|
+
get contacts(): ContactsClient;
|
|
29
34
|
get conversations(): ConversationsClient;
|
|
30
35
|
get calls(): CallsClient;
|
|
31
36
|
get usage(): UsageClient;
|
|
37
|
+
get messages(): MessagesClient;
|
|
32
38
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -5,10 +5,12 @@ exports.AgentPhoneClient = void 0;
|
|
|
5
5
|
const Client_js_1 = require("./api/resources/agents/client/Client.js");
|
|
6
6
|
const Client_js_2 = require("./api/resources/agentWebhooks/client/Client.js");
|
|
7
7
|
const Client_js_3 = require("./api/resources/calls/client/Client.js");
|
|
8
|
-
const Client_js_4 = require("./api/resources/
|
|
9
|
-
const Client_js_5 = require("./api/resources/
|
|
10
|
-
const Client_js_6 = require("./api/resources/
|
|
11
|
-
const Client_js_7 = require("./api/resources/
|
|
8
|
+
const Client_js_4 = require("./api/resources/contacts/client/Client.js");
|
|
9
|
+
const Client_js_5 = require("./api/resources/conversations/client/Client.js");
|
|
10
|
+
const Client_js_6 = require("./api/resources/messages/client/Client.js");
|
|
11
|
+
const Client_js_7 = require("./api/resources/numbers/client/Client.js");
|
|
12
|
+
const Client_js_8 = require("./api/resources/usage/client/Client.js");
|
|
13
|
+
const Client_js_9 = require("./api/resources/webhooks/client/Client.js");
|
|
12
14
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
13
15
|
class AgentPhoneClient {
|
|
14
16
|
constructor(options) {
|
|
@@ -20,19 +22,23 @@ class AgentPhoneClient {
|
|
|
20
22
|
}
|
|
21
23
|
get numbers() {
|
|
22
24
|
var _a;
|
|
23
|
-
return ((_a = this._numbers) !== null && _a !== void 0 ? _a : (this._numbers = new
|
|
25
|
+
return ((_a = this._numbers) !== null && _a !== void 0 ? _a : (this._numbers = new Client_js_7.NumbersClient(this._options)));
|
|
24
26
|
}
|
|
25
27
|
get webhooks() {
|
|
26
28
|
var _a;
|
|
27
|
-
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new
|
|
29
|
+
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_9.WebhooksClient(this._options)));
|
|
28
30
|
}
|
|
29
31
|
get agentWebhooks() {
|
|
30
32
|
var _a;
|
|
31
33
|
return ((_a = this._agentWebhooks) !== null && _a !== void 0 ? _a : (this._agentWebhooks = new Client_js_2.AgentWebhooksClient(this._options)));
|
|
32
34
|
}
|
|
35
|
+
get contacts() {
|
|
36
|
+
var _a;
|
|
37
|
+
return ((_a = this._contacts) !== null && _a !== void 0 ? _a : (this._contacts = new Client_js_4.ContactsClient(this._options)));
|
|
38
|
+
}
|
|
33
39
|
get conversations() {
|
|
34
40
|
var _a;
|
|
35
|
-
return ((_a = this._conversations) !== null && _a !== void 0 ? _a : (this._conversations = new
|
|
41
|
+
return ((_a = this._conversations) !== null && _a !== void 0 ? _a : (this._conversations = new Client_js_5.ConversationsClient(this._options)));
|
|
36
42
|
}
|
|
37
43
|
get calls() {
|
|
38
44
|
var _a;
|
|
@@ -40,7 +46,11 @@ class AgentPhoneClient {
|
|
|
40
46
|
}
|
|
41
47
|
get usage() {
|
|
42
48
|
var _a;
|
|
43
|
-
return ((_a = this._usage) !== null && _a !== void 0 ? _a : (this._usage = new
|
|
49
|
+
return ((_a = this._usage) !== null && _a !== void 0 ? _a : (this._usage = new Client_js_8.UsageClient(this._options)));
|
|
50
|
+
}
|
|
51
|
+
get messages() {
|
|
52
|
+
var _a;
|
|
53
|
+
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_js_6.MessagesClient(this._options)));
|
|
44
54
|
}
|
|
45
55
|
}
|
|
46
56
|
exports.AgentPhoneClient = AgentPhoneClient;
|
|
@@ -28,7 +28,7 @@ export declare class AgentWebhooksClient {
|
|
|
28
28
|
/**
|
|
29
29
|
* Register or update a webhook URL for a specific agent.
|
|
30
30
|
*
|
|
31
|
-
* When set, this agent's events are delivered here instead of the
|
|
31
|
+
* When set, this agent's events are delivered here instead of the account default webhook.
|
|
32
32
|
*
|
|
33
33
|
* @param {AgentPhone.CreateOrUpdateAgentWebhookV1AgentsAgentIdWebhookPostRequest} request
|
|
34
34
|
* @param {AgentWebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -109,7 +109,7 @@ class AgentWebhooksClient {
|
|
|
109
109
|
/**
|
|
110
110
|
* Register or update a webhook URL for a specific agent.
|
|
111
111
|
*
|
|
112
|
-
* When set, this agent's events are delivered here instead of the
|
|
112
|
+
* When set, this agent's events are delivered here instead of the account default webhook.
|
|
113
113
|
*
|
|
114
114
|
* @param {AgentPhone.CreateOrUpdateAgentWebhookV1AgentsAgentIdWebhookPostRequest} request
|
|
115
115
|
* @param {AgentWebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -11,7 +11,17 @@ export declare class AgentsClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<AgentsClient.Options>;
|
|
12
12
|
constructor(options: AgentsClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Return available voices from the call provider (Retell).
|
|
15
|
+
*
|
|
16
|
+
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* await client.agents.listVoices()
|
|
20
|
+
*/
|
|
21
|
+
listVoices(requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
22
|
+
private __listVoices;
|
|
23
|
+
/**
|
|
24
|
+
* List all agents for this account.
|
|
15
25
|
*
|
|
16
26
|
* @param {AgentPhone.ListAgentsV1AgentsGetRequest} request
|
|
17
27
|
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -98,7 +108,7 @@ export declare class AgentsClient {
|
|
|
98
108
|
/**
|
|
99
109
|
* Attach an existing phone number to an agent.
|
|
100
110
|
*
|
|
101
|
-
* The number must belong to the same
|
|
111
|
+
* The number must belong to the same account and not be released.
|
|
102
112
|
*
|
|
103
113
|
* @param {AgentPhone.AttachNumberRequest} request
|
|
104
114
|
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -113,6 +123,24 @@ export declare class AgentsClient {
|
|
|
113
123
|
*/
|
|
114
124
|
attachNumberToAgent(request: AgentPhone.AttachNumberRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise<AgentPhone.AttachNumberResponse>;
|
|
115
125
|
private __attachNumberToAgent;
|
|
126
|
+
/**
|
|
127
|
+
* Detach a phone number from an agent (sets agentId to null).
|
|
128
|
+
*
|
|
129
|
+
* The number remains active and can be re-attached to any agent.
|
|
130
|
+
*
|
|
131
|
+
* @param {AgentPhone.DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest} request
|
|
132
|
+
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
133
|
+
*
|
|
134
|
+
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* await client.agents.detachNumberFromAgent({
|
|
138
|
+
* agent_id: "agent_id",
|
|
139
|
+
* number_id: "number_id"
|
|
140
|
+
* })
|
|
141
|
+
*/
|
|
142
|
+
detachNumberFromAgent(request: AgentPhone.DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
143
|
+
private __detachNumberFromAgent;
|
|
116
144
|
/**
|
|
117
145
|
* List all conversations for an agent.
|
|
118
146
|
*
|
|
@@ -67,7 +67,47 @@ class AgentsClient {
|
|
|
67
67
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* Return available voices from the call provider (Retell).
|
|
71
|
+
*
|
|
72
|
+
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* await client.agents.listVoices()
|
|
76
|
+
*/
|
|
77
|
+
listVoices(requestOptions) {
|
|
78
|
+
return core.HttpResponsePromise.fromPromise(this.__listVoices(requestOptions));
|
|
79
|
+
}
|
|
80
|
+
__listVoices(requestOptions) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
83
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
85
|
+
const _response = yield core.fetcher({
|
|
86
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Default, "v1/agents/voices"),
|
|
87
|
+
method: "GET",
|
|
88
|
+
headers: _headers,
|
|
89
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
90
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
91
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
92
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
93
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
94
|
+
logging: this._options.logging,
|
|
95
|
+
});
|
|
96
|
+
if (_response.ok) {
|
|
97
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
98
|
+
}
|
|
99
|
+
if (_response.error.reason === "status-code") {
|
|
100
|
+
throw new errors.AgentPhoneError({
|
|
101
|
+
statusCode: _response.error.statusCode,
|
|
102
|
+
body: _response.error.body,
|
|
103
|
+
rawResponse: _response.rawResponse,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/agents/voices");
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* List all agents for this account.
|
|
71
111
|
*
|
|
72
112
|
* @param {AgentPhone.ListAgentsV1AgentsGetRequest} request
|
|
73
113
|
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -343,7 +383,7 @@ class AgentsClient {
|
|
|
343
383
|
/**
|
|
344
384
|
* Attach an existing phone number to an agent.
|
|
345
385
|
*
|
|
346
|
-
* The number must belong to the same
|
|
386
|
+
* The number must belong to the same account and not be released.
|
|
347
387
|
*
|
|
348
388
|
* @param {AgentPhone.AttachNumberRequest} request
|
|
349
389
|
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -397,6 +437,60 @@ class AgentsClient {
|
|
|
397
437
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/agents/{agent_id}/numbers");
|
|
398
438
|
});
|
|
399
439
|
}
|
|
440
|
+
/**
|
|
441
|
+
* Detach a phone number from an agent (sets agentId to null).
|
|
442
|
+
*
|
|
443
|
+
* The number remains active and can be re-attached to any agent.
|
|
444
|
+
*
|
|
445
|
+
* @param {AgentPhone.DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest} request
|
|
446
|
+
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
447
|
+
*
|
|
448
|
+
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
449
|
+
*
|
|
450
|
+
* @example
|
|
451
|
+
* await client.agents.detachNumberFromAgent({
|
|
452
|
+
* agent_id: "agent_id",
|
|
453
|
+
* number_id: "number_id"
|
|
454
|
+
* })
|
|
455
|
+
*/
|
|
456
|
+
detachNumberFromAgent(request, requestOptions) {
|
|
457
|
+
return core.HttpResponsePromise.fromPromise(this.__detachNumberFromAgent(request, requestOptions));
|
|
458
|
+
}
|
|
459
|
+
__detachNumberFromAgent(request, requestOptions) {
|
|
460
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
461
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
462
|
+
const { agent_id: agentId, number_id: numberId } = request;
|
|
463
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
464
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
465
|
+
const _response = yield core.fetcher({
|
|
466
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Default, `v1/agents/${core.url.encodePathParam(agentId)}/numbers/${core.url.encodePathParam(numberId)}`),
|
|
467
|
+
method: "DELETE",
|
|
468
|
+
headers: _headers,
|
|
469
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
470
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
471
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
472
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
473
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
474
|
+
logging: this._options.logging,
|
|
475
|
+
});
|
|
476
|
+
if (_response.ok) {
|
|
477
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
478
|
+
}
|
|
479
|
+
if (_response.error.reason === "status-code") {
|
|
480
|
+
switch (_response.error.statusCode) {
|
|
481
|
+
case 422:
|
|
482
|
+
throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
483
|
+
default:
|
|
484
|
+
throw new errors.AgentPhoneError({
|
|
485
|
+
statusCode: _response.error.statusCode,
|
|
486
|
+
body: _response.error.body,
|
|
487
|
+
rawResponse: _response.rawResponse,
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v1/agents/{agent_id}/numbers/{number_id}");
|
|
492
|
+
});
|
|
493
|
+
}
|
|
400
494
|
/**
|
|
401
495
|
* List all conversations for an agent.
|
|
402
496
|
*
|
|
@@ -8,8 +8,10 @@ export interface CreateAgentRequest {
|
|
|
8
8
|
name: string;
|
|
9
9
|
description?: string | null;
|
|
10
10
|
voiceMode?: string | null;
|
|
11
|
+
modelTier?: string | null;
|
|
11
12
|
systemPrompt?: string | null;
|
|
12
13
|
beginMessage?: string | null;
|
|
13
14
|
voice?: string | null;
|
|
14
15
|
transferNumber?: string | null;
|
|
16
|
+
voicemailMessage?: string | null;
|
|
15
17
|
}
|
|
@@ -9,8 +9,10 @@ export interface UpdateAgentRequest {
|
|
|
9
9
|
name?: string | null;
|
|
10
10
|
description?: string | null;
|
|
11
11
|
voiceMode?: string | null;
|
|
12
|
+
modelTier?: string | null;
|
|
12
13
|
systemPrompt?: string | null;
|
|
13
14
|
beginMessage?: string | null;
|
|
14
15
|
voice?: string | null;
|
|
15
16
|
transferNumber?: string | null;
|
|
17
|
+
voicemailMessage?: string | null;
|
|
16
18
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type { AttachNumberRequest } from "./AttachNumberRequest.js";
|
|
2
2
|
export type { CreateAgentRequest } from "./CreateAgentRequest.js";
|
|
3
3
|
export type { DeleteAgentV1AgentsAgentIdDeleteRequest } from "./DeleteAgentV1AgentsAgentIdDeleteRequest.js";
|
|
4
|
+
export type { DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest } from "./DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.js";
|
|
4
5
|
export type { GetAgentV1AgentsAgentIdGetRequest } from "./GetAgentV1AgentsAgentIdGetRequest.js";
|
|
5
6
|
export type { ListAgentCallsV1AgentsAgentIdCallsGetRequest } from "./ListAgentCallsV1AgentsAgentIdCallsGetRequest.js";
|
|
6
7
|
export type { ListAgentConversationsV1AgentsAgentIdConversationsGetRequest } from "./ListAgentConversationsV1AgentsAgentIdConversationsGetRequest.js";
|
|
@@ -11,7 +11,7 @@ export declare class CallsClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<CallsClient.Options>;
|
|
12
12
|
constructor(options: CallsClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* List all calls for this
|
|
14
|
+
* List all calls for this account.
|
|
15
15
|
*
|
|
16
16
|
* @param {AgentPhone.ListCallsV1CallsGetRequest} request
|
|
17
17
|
* @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -31,7 +31,7 @@ export declare class CallsClient {
|
|
|
31
31
|
* to use as caller ID; if omitted, the first assigned number is used.
|
|
32
32
|
*
|
|
33
33
|
* Flow:
|
|
34
|
-
* 1. Validates the agent belongs to your
|
|
34
|
+
* 1. Validates the agent belongs to your account and has a phone number
|
|
35
35
|
* 2. Initiates a call from the agent's number to the destination
|
|
36
36
|
* 3. When recipient answers, speaks the initial greeting (if provided)
|
|
37
37
|
* 4. Listens for recipient's speech and sends to your webhook
|
|
@@ -58,7 +58,7 @@ export declare class CallsClient {
|
|
|
58
58
|
* expires 30 seconds after creation.
|
|
59
59
|
*
|
|
60
60
|
* Flow:
|
|
61
|
-
* 1. Validates the agent belongs to your
|
|
61
|
+
* 1. Validates the agent belongs to your account
|
|
62
62
|
* 2. Creates a web call and returns an access token
|
|
63
63
|
* 3. Your client calls `webClient.startCall({ accessToken })` to connect
|
|
64
64
|
* 4. Call lifecycle (transcripts, webhooks) works the same as phone calls
|
|
@@ -109,6 +109,30 @@ export declare class CallsClient {
|
|
|
109
109
|
*/
|
|
110
110
|
getCallTranscript(request: AgentPhone.GetCallTranscriptV1CallsCallIdTranscriptGetRequest, requestOptions?: CallsClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
111
111
|
private __getCallTranscript;
|
|
112
|
+
/**
|
|
113
|
+
* Stream a call's transcript via Server-Sent Events.
|
|
114
|
+
*
|
|
115
|
+
* On connect the server replays all existing transcript turns from the
|
|
116
|
+
* database, then streams new turns in real time as they arrive from the
|
|
117
|
+
* voice provider. A ``: heartbeat`` comment is sent every 15 s to keep
|
|
118
|
+
* proxies alive. The stream closes after sending an ``ended`` event
|
|
119
|
+
* when the call completes (or immediately after replay if the call has
|
|
120
|
+
* already ended).
|
|
121
|
+
*
|
|
122
|
+
* Works for both live and completed calls — same URL either way.
|
|
123
|
+
*
|
|
124
|
+
* @param {AgentPhone.StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest} request
|
|
125
|
+
* @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
126
|
+
*
|
|
127
|
+
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* await client.calls.streamCallTranscript({
|
|
131
|
+
* call_id: "call_id"
|
|
132
|
+
* })
|
|
133
|
+
*/
|
|
134
|
+
streamCallTranscript(request: AgentPhone.StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest, requestOptions?: CallsClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
135
|
+
private __streamCallTranscript;
|
|
112
136
|
/**
|
|
113
137
|
* List all calls for a specific phone number.
|
|
114
138
|
*
|
|
@@ -56,7 +56,7 @@ class CallsClient {
|
|
|
56
56
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* List all calls for this
|
|
59
|
+
* List all calls for this account.
|
|
60
60
|
*
|
|
61
61
|
* @param {AgentPhone.ListCallsV1CallsGetRequest} request
|
|
62
62
|
* @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -72,10 +72,14 @@ class CallsClient {
|
|
|
72
72
|
__listCalls() {
|
|
73
73
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
74
74
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
75
|
-
const { limit, offset } = request;
|
|
75
|
+
const { limit, offset, status, direction, type: type_, search } = request;
|
|
76
76
|
const _queryParams = {
|
|
77
77
|
limit,
|
|
78
78
|
offset,
|
|
79
|
+
status,
|
|
80
|
+
direction,
|
|
81
|
+
type: type_,
|
|
82
|
+
search,
|
|
79
83
|
};
|
|
80
84
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
81
85
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -116,7 +120,7 @@ class CallsClient {
|
|
|
116
120
|
* to use as caller ID; if omitted, the first assigned number is used.
|
|
117
121
|
*
|
|
118
122
|
* Flow:
|
|
119
|
-
* 1. Validates the agent belongs to your
|
|
123
|
+
* 1. Validates the agent belongs to your account and has a phone number
|
|
120
124
|
* 2. Initiates a call from the agent's number to the destination
|
|
121
125
|
* 3. When recipient answers, speaks the initial greeting (if provided)
|
|
122
126
|
* 4. Listens for recipient's speech and sends to your webhook
|
|
@@ -181,7 +185,7 @@ class CallsClient {
|
|
|
181
185
|
* expires 30 seconds after creation.
|
|
182
186
|
*
|
|
183
187
|
* Flow:
|
|
184
|
-
* 1. Validates the agent belongs to your
|
|
188
|
+
* 1. Validates the agent belongs to your account
|
|
185
189
|
* 2. Creates a web call and returns an access token
|
|
186
190
|
* 3. Your client calls `webClient.startCall({ accessToken })` to connect
|
|
187
191
|
* 4. Call lifecycle (transcripts, webhooks) works the same as phone calls
|
|
@@ -342,6 +346,66 @@ class CallsClient {
|
|
|
342
346
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/calls/{call_id}/transcript");
|
|
343
347
|
});
|
|
344
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Stream a call's transcript via Server-Sent Events.
|
|
351
|
+
*
|
|
352
|
+
* On connect the server replays all existing transcript turns from the
|
|
353
|
+
* database, then streams new turns in real time as they arrive from the
|
|
354
|
+
* voice provider. A ``: heartbeat`` comment is sent every 15 s to keep
|
|
355
|
+
* proxies alive. The stream closes after sending an ``ended`` event
|
|
356
|
+
* when the call completes (or immediately after replay if the call has
|
|
357
|
+
* already ended).
|
|
358
|
+
*
|
|
359
|
+
* Works for both live and completed calls — same URL either way.
|
|
360
|
+
*
|
|
361
|
+
* @param {AgentPhone.StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest} request
|
|
362
|
+
* @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
363
|
+
*
|
|
364
|
+
* @throws {@link AgentPhone.UnprocessableEntityError}
|
|
365
|
+
*
|
|
366
|
+
* @example
|
|
367
|
+
* await client.calls.streamCallTranscript({
|
|
368
|
+
* call_id: "call_id"
|
|
369
|
+
* })
|
|
370
|
+
*/
|
|
371
|
+
streamCallTranscript(request, requestOptions) {
|
|
372
|
+
return core.HttpResponsePromise.fromPromise(this.__streamCallTranscript(request, requestOptions));
|
|
373
|
+
}
|
|
374
|
+
__streamCallTranscript(request, requestOptions) {
|
|
375
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
376
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
377
|
+
const { call_id: callId } = request;
|
|
378
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
379
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
380
|
+
const _response = yield core.fetcher({
|
|
381
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentPhoneEnvironment.Default, `v1/calls/${core.url.encodePathParam(callId)}/transcript/stream`),
|
|
382
|
+
method: "GET",
|
|
383
|
+
headers: _headers,
|
|
384
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
385
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
386
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
387
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
388
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
389
|
+
logging: this._options.logging,
|
|
390
|
+
});
|
|
391
|
+
if (_response.ok) {
|
|
392
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
393
|
+
}
|
|
394
|
+
if (_response.error.reason === "status-code") {
|
|
395
|
+
switch (_response.error.statusCode) {
|
|
396
|
+
case 422:
|
|
397
|
+
throw new AgentPhone.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
398
|
+
default:
|
|
399
|
+
throw new errors.AgentPhoneError({
|
|
400
|
+
statusCode: _response.error.statusCode,
|
|
401
|
+
body: _response.error.body,
|
|
402
|
+
rawResponse: _response.rawResponse,
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/calls/{call_id}/transcript/stream");
|
|
407
|
+
});
|
|
408
|
+
}
|
|
345
409
|
/**
|
|
346
410
|
* List all calls for a specific phone number.
|
|
347
411
|
*
|
|
@@ -14,8 +14,8 @@ export interface CreateOutboundCallRequest {
|
|
|
14
14
|
fromNumberId?: string | null;
|
|
15
15
|
/** Optional initial greeting to speak when recipient answers */
|
|
16
16
|
initialGreeting?: string | null;
|
|
17
|
-
/** Voice
|
|
18
|
-
voice?: string;
|
|
17
|
+
/** Voice ID override for this call (uses agent's configured voice if omitted) */
|
|
18
|
+
voice?: string | null;
|
|
19
19
|
/** When provided, uses a built-in LLM for the conversation instead of forwarding to a webhook. The prompt defines the AI's personality and conversation topic. */
|
|
20
20
|
systemPrompt?: string | null;
|
|
21
21
|
}
|
|
@@ -5,4 +5,12 @@
|
|
|
5
5
|
export interface ListCallsV1CallsGetRequest {
|
|
6
6
|
limit?: number;
|
|
7
7
|
offset?: number;
|
|
8
|
+
/** Filter by status: completed, in-progress, failed */
|
|
9
|
+
status?: string | null;
|
|
10
|
+
/** Filter by direction: inbound, outbound */
|
|
11
|
+
direction?: string | null;
|
|
12
|
+
/** Filter by type: pstn, web */
|
|
13
|
+
type?: string | null;
|
|
14
|
+
/** Search fromNumber or toNumber (contains) */
|
|
15
|
+
search?: string | null;
|
|
8
16
|
}
|
|
@@ -4,3 +4,4 @@ export type { GetCallTranscriptV1CallsCallIdTranscriptGetRequest } from "./GetCa
|
|
|
4
4
|
export type { GetCallV1CallsCallIdGetRequest } from "./GetCallV1CallsCallIdGetRequest.js";
|
|
5
5
|
export type { ListCallsForNumberV1NumbersNumberIdCallsGetRequest } from "./ListCallsForNumberV1NumbersNumberIdCallsGetRequest.js";
|
|
6
6
|
export type { ListCallsV1CallsGetRequest } from "./ListCallsV1CallsGetRequest.js";
|
|
7
|
+
export type { StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest } from "./StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.js";
|