@l7mp/tivadar-ai-api-sdk 0.2.15 → 0.2.17
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/api-client.d.ts +9 -1
- package/dist/api-client.js +8 -0
- package/dist/apis/AdminPhoneNumbersApi.d.ts +26 -1
- package/dist/apis/AdminPhoneNumbersApi.js +81 -0
- package/dist/apis/OutboundCallsApi.d.ts +45 -0
- package/dist/apis/OutboundCallsApi.js +116 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +9 -1
- package/dist/esm/api-client.js +8 -0
- package/dist/esm/apis/AdminPhoneNumbersApi.d.ts +26 -1
- package/dist/esm/apis/AdminPhoneNumbersApi.js +82 -1
- package/dist/esm/apis/OutboundCallsApi.d.ts +45 -0
- package/dist/esm/apis/OutboundCallsApi.js +112 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AdminPhoneNumberAssignOutbound.d.ts +32 -0
- package/dist/esm/models/AdminPhoneNumberAssignOutbound.js +43 -0
- package/dist/esm/models/AdminPhoneNumberDetail.d.ts +30 -0
- package/dist/esm/models/AdminPhoneNumberDetail.js +10 -0
- package/dist/esm/models/AdminPhoneNumberUpdate.d.ts +18 -0
- package/dist/esm/models/AdminPhoneNumberUpdate.js +6 -0
- package/dist/esm/models/OutboundCall.d.ts +68 -0
- package/dist/esm/models/OutboundCall.js +53 -0
- package/dist/esm/models/OutboundCallRequest.d.ts +50 -0
- package/dist/esm/models/OutboundCallRequest.js +49 -0
- package/dist/esm/models/OutboundNumber.d.ts +38 -0
- package/dist/esm/models/OutboundNumber.js +43 -0
- package/dist/esm/models/PhoneNumber.d.ts +18 -0
- package/dist/esm/models/PhoneNumber.js +6 -0
- package/dist/esm/models/PhoneNumberCreate.d.ts +24 -0
- package/dist/esm/models/PhoneNumberCreate.js +8 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/AdminPhoneNumberAssignOutbound.d.ts +32 -0
- package/dist/models/AdminPhoneNumberAssignOutbound.js +50 -0
- package/dist/models/AdminPhoneNumberDetail.d.ts +30 -0
- package/dist/models/AdminPhoneNumberDetail.js +10 -0
- package/dist/models/AdminPhoneNumberUpdate.d.ts +18 -0
- package/dist/models/AdminPhoneNumberUpdate.js +6 -0
- package/dist/models/OutboundCall.d.ts +68 -0
- package/dist/models/OutboundCall.js +60 -0
- package/dist/models/OutboundCallRequest.d.ts +50 -0
- package/dist/models/OutboundCallRequest.js +56 -0
- package/dist/models/OutboundNumber.d.ts +38 -0
- package/dist/models/OutboundNumber.js +50 -0
- package/dist/models/PhoneNumber.d.ts +18 -0
- package/dist/models/PhoneNumber.js +6 -0
- package/dist/models/PhoneNumberCreate.d.ts +24 -0
- package/dist/models/PhoneNumberCreate.js +8 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/api-client.ts +18 -0
- package/src/apis/AdminPhoneNumbersApi.ts +114 -0
- package/src/apis/OutboundCallsApi.ts +149 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AdminPhoneNumberAssignOutbound.ts +66 -0
- package/src/models/AdminPhoneNumberDetail.ts +40 -0
- package/src/models/AdminPhoneNumberUpdate.ts +24 -0
- package/src/models/OutboundCall.ts +113 -0
- package/src/models/OutboundCallRequest.ts +90 -0
- package/src/models/OutboundNumber.ts +73 -0
- package/src/models/PhoneNumber.ts +24 -0
- package/src/models/PhoneNumberCreate.ts +32 -0
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tivadar AI Backend API
|
|
6
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfOutboundCallRequest = instanceOfOutboundCallRequest;
|
|
17
|
+
exports.OutboundCallRequestFromJSON = OutboundCallRequestFromJSON;
|
|
18
|
+
exports.OutboundCallRequestFromJSONTyped = OutboundCallRequestFromJSONTyped;
|
|
19
|
+
exports.OutboundCallRequestToJSON = OutboundCallRequestToJSON;
|
|
20
|
+
exports.OutboundCallRequestToJSONTyped = OutboundCallRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the OutboundCallRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfOutboundCallRequest(value) {
|
|
25
|
+
if (!('voice_agent_id' in value) || value['voice_agent_id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function OutboundCallRequestFromJSON(json) {
|
|
30
|
+
return OutboundCallRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function OutboundCallRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'voice_agent_id': json['voice_agent_id'],
|
|
38
|
+
'phonebook_entry_id': json['phonebook_entry_id'] == null ? undefined : json['phonebook_entry_id'],
|
|
39
|
+
'destination_number': json['destination_number'] == null ? undefined : json['destination_number'],
|
|
40
|
+
'from_phone_number_id': json['from_phone_number_id'] == null ? undefined : json['from_phone_number_id'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function OutboundCallRequestToJSON(json) {
|
|
44
|
+
return OutboundCallRequestToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function OutboundCallRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
52
|
+
'phonebook_entry_id': value['phonebook_entry_id'],
|
|
53
|
+
'destination_number': value['destination_number'],
|
|
54
|
+
'from_phone_number_id': value['from_phone_number_id'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tivadar AI Backend API
|
|
3
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* An outbound-capable number assigned to the organization, usable as caller-ID.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface OutboundNumber
|
|
16
|
+
*/
|
|
17
|
+
export interface OutboundNumber {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof OutboundNumber
|
|
22
|
+
*/
|
|
23
|
+
id?: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof OutboundNumber
|
|
28
|
+
*/
|
|
29
|
+
number?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the OutboundNumber interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfOutboundNumber(value: object): value is OutboundNumber;
|
|
35
|
+
export declare function OutboundNumberFromJSON(json: any): OutboundNumber;
|
|
36
|
+
export declare function OutboundNumberFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutboundNumber;
|
|
37
|
+
export declare function OutboundNumberToJSON(json: any): OutboundNumber;
|
|
38
|
+
export declare function OutboundNumberToJSONTyped(value?: OutboundNumber | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tivadar AI Backend API
|
|
6
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfOutboundNumber = instanceOfOutboundNumber;
|
|
17
|
+
exports.OutboundNumberFromJSON = OutboundNumberFromJSON;
|
|
18
|
+
exports.OutboundNumberFromJSONTyped = OutboundNumberFromJSONTyped;
|
|
19
|
+
exports.OutboundNumberToJSON = OutboundNumberToJSON;
|
|
20
|
+
exports.OutboundNumberToJSONTyped = OutboundNumberToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the OutboundNumber interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfOutboundNumber(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function OutboundNumberFromJSON(json) {
|
|
28
|
+
return OutboundNumberFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function OutboundNumberFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
36
|
+
'number': json['number'] == null ? undefined : json['number'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function OutboundNumberToJSON(json) {
|
|
40
|
+
return OutboundNumberToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function OutboundNumberToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'id': value['id'],
|
|
48
|
+
'number': value['number'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -39,6 +39,24 @@ export interface PhoneNumber {
|
|
|
39
39
|
* @memberof PhoneNumber
|
|
40
40
|
*/
|
|
41
41
|
supports_call_redirect?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether this number can place outbound calls (has an outbound trunk).
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof PhoneNumber
|
|
46
|
+
*/
|
|
47
|
+
supports_outbound?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Outbound SIP provider host/address (outbound numbers only).
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof PhoneNumber
|
|
52
|
+
*/
|
|
53
|
+
sip_address?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the outbound trunk + credentials are configured. Secrets are never returned.
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof PhoneNumber
|
|
58
|
+
*/
|
|
59
|
+
outbound_configured?: boolean;
|
|
42
60
|
/**
|
|
43
61
|
*
|
|
44
62
|
* @type {Date}
|
|
@@ -36,6 +36,9 @@ function PhoneNumberFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
36
|
'number': json['number'] == null ? undefined : json['number'],
|
|
37
37
|
'sip_trunk_id': json['sip_trunk_id'] == null ? undefined : json['sip_trunk_id'],
|
|
38
38
|
'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
|
|
39
|
+
'supports_outbound': json['supports_outbound'] == null ? undefined : json['supports_outbound'],
|
|
40
|
+
'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
|
|
41
|
+
'outbound_configured': json['outbound_configured'] == null ? undefined : json['outbound_configured'],
|
|
39
42
|
'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
40
43
|
};
|
|
41
44
|
}
|
|
@@ -51,6 +54,9 @@ function PhoneNumberToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
51
54
|
'number': value['number'],
|
|
52
55
|
'sip_trunk_id': value['sip_trunk_id'],
|
|
53
56
|
'supports_call_redirect': value['supports_call_redirect'],
|
|
57
|
+
'supports_outbound': value['supports_outbound'],
|
|
58
|
+
'sip_address': value['sip_address'],
|
|
59
|
+
'outbound_configured': value['outbound_configured'],
|
|
54
60
|
'created_at': value['created_at'] == null ? value['created_at'] : value['created_at'].toISOString(),
|
|
55
61
|
};
|
|
56
62
|
}
|
|
@@ -27,6 +27,30 @@ export interface PhoneNumberCreate {
|
|
|
27
27
|
* @memberof PhoneNumberCreate
|
|
28
28
|
*/
|
|
29
29
|
supports_call_redirect?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Whether this number can place outbound calls. When true, sip_address, auth_username and auth_password are required.
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof PhoneNumberCreate
|
|
34
|
+
*/
|
|
35
|
+
supports_outbound?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Outbound SIP provider host/address (required when supports_outbound is true).
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof PhoneNumberCreate
|
|
40
|
+
*/
|
|
41
|
+
sip_address?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Outbound SIP auth username (required when supports_outbound is true). Stored encrypted.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof PhoneNumberCreate
|
|
46
|
+
*/
|
|
47
|
+
auth_username?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Outbound SIP auth password (required when supports_outbound is true). Stored encrypted, never returned.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof PhoneNumberCreate
|
|
52
|
+
*/
|
|
53
|
+
auth_password?: string;
|
|
30
54
|
}
|
|
31
55
|
/**
|
|
32
56
|
* Check if a given object implements the PhoneNumberCreate interface.
|
|
@@ -36,6 +36,10 @@ function PhoneNumberCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
36
|
return {
|
|
37
37
|
'number': json['number'],
|
|
38
38
|
'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
|
|
39
|
+
'supports_outbound': json['supports_outbound'] == null ? undefined : json['supports_outbound'],
|
|
40
|
+
'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
|
|
41
|
+
'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
|
|
42
|
+
'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
|
|
39
43
|
};
|
|
40
44
|
}
|
|
41
45
|
function PhoneNumberCreateToJSON(json) {
|
|
@@ -48,5 +52,9 @@ function PhoneNumberCreateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
48
52
|
return {
|
|
49
53
|
'number': value['number'],
|
|
50
54
|
'supports_call_redirect': value['supports_call_redirect'],
|
|
55
|
+
'supports_outbound': value['supports_outbound'],
|
|
56
|
+
'sip_address': value['sip_address'],
|
|
57
|
+
'auth_username': value['auth_username'],
|
|
58
|
+
'auth_password': value['auth_password'],
|
|
51
59
|
};
|
|
52
60
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './AdminDispatchRuleCreate';
|
|
2
2
|
export * from './AdminGrantMinutesRequest';
|
|
3
3
|
export * from './AdminPhoneNumberAssign';
|
|
4
|
+
export * from './AdminPhoneNumberAssignOutbound';
|
|
4
5
|
export * from './AdminPhoneNumberDetail';
|
|
5
6
|
export * from './AdminPhoneNumberUpdate';
|
|
6
7
|
export * from './AdminPhoneNumbersListResponse';
|
|
@@ -69,6 +70,9 @@ export * from './OrganizationsOrganizationIdNotificationsGet200Response';
|
|
|
69
70
|
export * from './OrganizationsOrganizationIdSipDispatchRulesPost200Response';
|
|
70
71
|
export * from './OrganizationsOrganizationIdVoiceAgentsBasicGet200ResponseInner';
|
|
71
72
|
export * from './OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest';
|
|
73
|
+
export * from './OutboundCall';
|
|
74
|
+
export * from './OutboundCallRequest';
|
|
75
|
+
export * from './OutboundNumber';
|
|
72
76
|
export * from './PauseSubscriptionRequest';
|
|
73
77
|
export * from './PhoneNumber';
|
|
74
78
|
export * from './PhoneNumberCreate';
|
package/dist/models/index.js
CHANGED
|
@@ -19,6 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
__exportStar(require("./AdminDispatchRuleCreate"), exports);
|
|
20
20
|
__exportStar(require("./AdminGrantMinutesRequest"), exports);
|
|
21
21
|
__exportStar(require("./AdminPhoneNumberAssign"), exports);
|
|
22
|
+
__exportStar(require("./AdminPhoneNumberAssignOutbound"), exports);
|
|
22
23
|
__exportStar(require("./AdminPhoneNumberDetail"), exports);
|
|
23
24
|
__exportStar(require("./AdminPhoneNumberUpdate"), exports);
|
|
24
25
|
__exportStar(require("./AdminPhoneNumbersListResponse"), exports);
|
|
@@ -87,6 +88,9 @@ __exportStar(require("./OrganizationsOrganizationIdNotificationsGet200Response")
|
|
|
87
88
|
__exportStar(require("./OrganizationsOrganizationIdSipDispatchRulesPost200Response"), exports);
|
|
88
89
|
__exportStar(require("./OrganizationsOrganizationIdVoiceAgentsBasicGet200ResponseInner"), exports);
|
|
89
90
|
__exportStar(require("./OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest"), exports);
|
|
91
|
+
__exportStar(require("./OutboundCall"), exports);
|
|
92
|
+
__exportStar(require("./OutboundCallRequest"), exports);
|
|
93
|
+
__exportStar(require("./OutboundNumber"), exports);
|
|
90
94
|
__exportStar(require("./PauseSubscriptionRequest"), exports);
|
|
91
95
|
__exportStar(require("./PhoneNumber"), exports);
|
|
92
96
|
__exportStar(require("./PhoneNumberCreate"), exports);
|
package/package.json
CHANGED
package/src/api-client.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
|
26
26
|
import { AdminSubscriptionsApi } from "./apis/AdminSubscriptionsApi";
|
|
27
27
|
import { AdminPhoneNumbersApi } from "./apis/AdminPhoneNumbersApi";
|
|
28
28
|
import { AdminSIPApi } from "./apis/AdminSIPApi";
|
|
29
|
+
import { OutboundCallsApi } from "./apis/OutboundCallsApi";
|
|
29
30
|
import { VoiceUsageApi } from "./apis/VoiceUsageApi";
|
|
30
31
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
31
32
|
import { ToolsApi } from "./apis/ToolsApi";
|
|
@@ -67,8 +68,10 @@ import type {
|
|
|
67
68
|
AdminGrantMinutesRequest,
|
|
68
69
|
AdminPhoneNumberUpdate,
|
|
69
70
|
AdminPhoneNumberAssign,
|
|
71
|
+
AdminPhoneNumberAssignOutbound,
|
|
70
72
|
AdminSipTrunkCreate,
|
|
71
73
|
AdminDispatchRuleCreate,
|
|
74
|
+
OutboundCallRequest,
|
|
72
75
|
VoiceUsageReportRequest,
|
|
73
76
|
OrganizationsOrganizationIdNotificationsGet200Response,
|
|
74
77
|
UserPreferencesUpdate,
|
|
@@ -219,6 +222,8 @@ export class Api {
|
|
|
219
222
|
delete: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdDelete"]>;
|
|
220
223
|
assign: (phoneNumberId: number, adminPhoneNumberAssign: AdminPhoneNumberAssign, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignPost"]>;
|
|
221
224
|
unassign: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignPost"]>;
|
|
225
|
+
assignOutbound: (phoneNumberId: number, adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdAssignOutboundPost"]>;
|
|
226
|
+
unassignOutbound: (phoneNumberId: number, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersPhoneNumberIdUnassignOutboundPost"]>;
|
|
222
227
|
listOrders: (params?: { status?: "pending" | "active" | "canceled"; organizationId?: string; requiresCallRedirect?: boolean; limit?: number; offset?: number }, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersOrdersGet"]>;
|
|
223
228
|
processOrders: (options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersOrdersProcessPost"]>;
|
|
224
229
|
fulfillOrder: (orderId: string, options?: RequestInit) => ReturnType<AdminPhoneNumbersApi["adminPhoneNumbersOrdersOrderIdFulfillPost"]>;
|
|
@@ -234,6 +239,10 @@ export class Api {
|
|
|
234
239
|
listLiveKitTrunks: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitTrunksGet"]>;
|
|
235
240
|
listLiveKitDispatchRules: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitDispatchRulesGet"]>;
|
|
236
241
|
};
|
|
242
|
+
public readonly outboundCalls: {
|
|
243
|
+
create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
|
|
244
|
+
listNumbers: (organizationId: string, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsNumbersGet"]>;
|
|
245
|
+
};
|
|
237
246
|
public readonly voiceUsage: {
|
|
238
247
|
report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
|
|
239
248
|
};
|
|
@@ -295,6 +304,7 @@ export class Api {
|
|
|
295
304
|
private readonly adminSubscriptionsApi: AdminSubscriptionsApi;
|
|
296
305
|
private readonly adminPhoneNumbersApi: AdminPhoneNumbersApi;
|
|
297
306
|
private readonly adminSipApi: AdminSIPApi;
|
|
307
|
+
private readonly outboundCallsApi: OutboundCallsApi;
|
|
298
308
|
private readonly voiceUsageApi: VoiceUsageApi;
|
|
299
309
|
private readonly embeddingProvidersApi: EmbeddingProvidersApi;
|
|
300
310
|
private readonly llmProvidersApi: LLMProvidersApi;
|
|
@@ -341,6 +351,7 @@ export class Api {
|
|
|
341
351
|
this.adminSubscriptionsApi = new AdminSubscriptionsApi(configuration);
|
|
342
352
|
this.adminPhoneNumbersApi = new AdminPhoneNumbersApi(configuration);
|
|
343
353
|
this.adminSipApi = new AdminSIPApi(configuration);
|
|
354
|
+
this.outboundCallsApi = new OutboundCallsApi(configuration);
|
|
344
355
|
this.voiceUsageApi = new VoiceUsageApi(configuration);
|
|
345
356
|
this.embeddingProvidersApi = new EmbeddingProvidersApi(configuration);
|
|
346
357
|
this.llmProvidersApi = new LLMProvidersApi(configuration);
|
|
@@ -503,6 +514,8 @@ export class Api {
|
|
|
503
514
|
delete: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
|
|
504
515
|
assign: (phoneNumberId, adminPhoneNumberAssign, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignPost({ phoneNumberId, adminPhoneNumberAssign }, options),
|
|
505
516
|
unassign: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignPost({ phoneNumberId }, options),
|
|
517
|
+
assignOutbound: (phoneNumberId, adminPhoneNumberAssignOutbound, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignOutboundPost({ phoneNumberId, adminPhoneNumberAssignOutbound }, options),
|
|
518
|
+
unassignOutbound: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignOutboundPost({ phoneNumberId }, options),
|
|
506
519
|
listOrders: (params, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersGet({ status: params?.status, organizationId: params?.organizationId, requiresCallRedirect: params?.requiresCallRedirect, limit: params?.limit, offset: params?.offset }, options),
|
|
507
520
|
processOrders: (options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersProcessPost(options),
|
|
508
521
|
fulfillOrder: (orderId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersOrderIdFulfillPost({ orderId }, options),
|
|
@@ -520,6 +533,11 @@ export class Api {
|
|
|
520
533
|
listLiveKitDispatchRules: (options) => this.adminSipApi.adminSipLivekitDispatchRulesGet(options),
|
|
521
534
|
};
|
|
522
535
|
|
|
536
|
+
this.outboundCalls = {
|
|
537
|
+
create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
|
|
538
|
+
listNumbers: (organizationId, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsNumbersGet({ organizationId }, options),
|
|
539
|
+
};
|
|
540
|
+
|
|
523
541
|
this.voiceUsage = {
|
|
524
542
|
report: (voiceUsageReportRequest, options) => this.voiceUsageApi.voiceUsageReportPost({ voiceUsageReportRequest }, options),
|
|
525
543
|
};
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
AdminPhoneNumberAssign,
|
|
19
|
+
AdminPhoneNumberAssignOutbound,
|
|
19
20
|
AdminPhoneNumberDetail,
|
|
20
21
|
AdminPhoneNumberUpdate,
|
|
21
22
|
AdminPhoneNumbersListResponse,
|
|
@@ -28,6 +29,8 @@ import type {
|
|
|
28
29
|
import {
|
|
29
30
|
AdminPhoneNumberAssignFromJSON,
|
|
30
31
|
AdminPhoneNumberAssignToJSON,
|
|
32
|
+
AdminPhoneNumberAssignOutboundFromJSON,
|
|
33
|
+
AdminPhoneNumberAssignOutboundToJSON,
|
|
31
34
|
AdminPhoneNumberDetailFromJSON,
|
|
32
35
|
AdminPhoneNumberDetailToJSON,
|
|
33
36
|
AdminPhoneNumberUpdateFromJSON,
|
|
@@ -71,6 +74,11 @@ export interface AdminPhoneNumbersOrdersOrderIdFulfillPostRequest {
|
|
|
71
74
|
orderId: string;
|
|
72
75
|
}
|
|
73
76
|
|
|
77
|
+
export interface AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest {
|
|
78
|
+
phoneNumberId: number;
|
|
79
|
+
adminPhoneNumberAssignOutbound: AdminPhoneNumberAssignOutbound;
|
|
80
|
+
}
|
|
81
|
+
|
|
74
82
|
export interface AdminPhoneNumbersPhoneNumberIdAssignPostRequest {
|
|
75
83
|
phoneNumberId: number;
|
|
76
84
|
adminPhoneNumberAssign: AdminPhoneNumberAssign;
|
|
@@ -89,6 +97,10 @@ export interface AdminPhoneNumbersPhoneNumberIdPatchRequest {
|
|
|
89
97
|
adminPhoneNumberUpdate: AdminPhoneNumberUpdate;
|
|
90
98
|
}
|
|
91
99
|
|
|
100
|
+
export interface AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest {
|
|
101
|
+
phoneNumberId: number;
|
|
102
|
+
}
|
|
103
|
+
|
|
92
104
|
export interface AdminPhoneNumbersPhoneNumberIdUnassignPostRequest {
|
|
93
105
|
phoneNumberId: number;
|
|
94
106
|
}
|
|
@@ -347,6 +359,63 @@ export class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
347
359
|
return await response.value();
|
|
348
360
|
}
|
|
349
361
|
|
|
362
|
+
/**
|
|
363
|
+
* Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
|
|
364
|
+
* Assign an outbound-capable number to an organization (app-admin only)
|
|
365
|
+
*/
|
|
366
|
+
async adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters: AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPhoneNumberDetail>> {
|
|
367
|
+
if (requestParameters['phoneNumberId'] == null) {
|
|
368
|
+
throw new runtime.RequiredError(
|
|
369
|
+
'phoneNumberId',
|
|
370
|
+
'Required parameter "phoneNumberId" was null or undefined when calling adminPhoneNumbersPhoneNumberIdAssignOutboundPost().'
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
if (requestParameters['adminPhoneNumberAssignOutbound'] == null) {
|
|
375
|
+
throw new runtime.RequiredError(
|
|
376
|
+
'adminPhoneNumberAssignOutbound',
|
|
377
|
+
'Required parameter "adminPhoneNumberAssignOutbound" was null or undefined when calling adminPhoneNumbersPhoneNumberIdAssignOutboundPost().'
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
const queryParameters: any = {};
|
|
382
|
+
|
|
383
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
384
|
+
|
|
385
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
386
|
+
|
|
387
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
388
|
+
const token = this.configuration.accessToken;
|
|
389
|
+
const tokenString = await token("bearerAuth", []);
|
|
390
|
+
|
|
391
|
+
if (tokenString) {
|
|
392
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
let urlPath = `/admin/phone-numbers/{phoneNumberId}/assign-outbound`;
|
|
397
|
+
urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
|
|
398
|
+
|
|
399
|
+
const response = await this.request({
|
|
400
|
+
path: urlPath,
|
|
401
|
+
method: 'POST',
|
|
402
|
+
headers: headerParameters,
|
|
403
|
+
query: queryParameters,
|
|
404
|
+
body: AdminPhoneNumberAssignOutboundToJSON(requestParameters['adminPhoneNumberAssignOutbound']),
|
|
405
|
+
}, initOverrides);
|
|
406
|
+
|
|
407
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminPhoneNumberDetailFromJSON(jsonValue));
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
|
|
412
|
+
* Assign an outbound-capable number to an organization (app-admin only)
|
|
413
|
+
*/
|
|
414
|
+
async adminPhoneNumbersPhoneNumberIdAssignOutboundPost(requestParameters: AdminPhoneNumbersPhoneNumberIdAssignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPhoneNumberDetail> {
|
|
415
|
+
const response = await this.adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters, initOverrides);
|
|
416
|
+
return await response.value();
|
|
417
|
+
}
|
|
418
|
+
|
|
350
419
|
/**
|
|
351
420
|
* Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
|
|
352
421
|
* Assign a phone number to an organization (app-admin only)
|
|
@@ -550,6 +619,51 @@ export class AdminPhoneNumbersApi extends runtime.BaseAPI {
|
|
|
550
619
|
return await response.value();
|
|
551
620
|
}
|
|
552
621
|
|
|
622
|
+
/**
|
|
623
|
+
* Release an outbound number\'s organization ownership (app-admin only)
|
|
624
|
+
*/
|
|
625
|
+
async adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters: AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPhoneNumberDetail>> {
|
|
626
|
+
if (requestParameters['phoneNumberId'] == null) {
|
|
627
|
+
throw new runtime.RequiredError(
|
|
628
|
+
'phoneNumberId',
|
|
629
|
+
'Required parameter "phoneNumberId" was null or undefined when calling adminPhoneNumbersPhoneNumberIdUnassignOutboundPost().'
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
const queryParameters: any = {};
|
|
634
|
+
|
|
635
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
636
|
+
|
|
637
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
638
|
+
const token = this.configuration.accessToken;
|
|
639
|
+
const tokenString = await token("bearerAuth", []);
|
|
640
|
+
|
|
641
|
+
if (tokenString) {
|
|
642
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
let urlPath = `/admin/phone-numbers/{phoneNumberId}/unassign-outbound`;
|
|
647
|
+
urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
|
|
648
|
+
|
|
649
|
+
const response = await this.request({
|
|
650
|
+
path: urlPath,
|
|
651
|
+
method: 'POST',
|
|
652
|
+
headers: headerParameters,
|
|
653
|
+
query: queryParameters,
|
|
654
|
+
}, initOverrides);
|
|
655
|
+
|
|
656
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminPhoneNumberDetailFromJSON(jsonValue));
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Release an outbound number\'s organization ownership (app-admin only)
|
|
661
|
+
*/
|
|
662
|
+
async adminPhoneNumbersPhoneNumberIdUnassignOutboundPost(requestParameters: AdminPhoneNumbersPhoneNumberIdUnassignOutboundPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPhoneNumberDetail> {
|
|
663
|
+
const response = await this.adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters, initOverrides);
|
|
664
|
+
return await response.value();
|
|
665
|
+
}
|
|
666
|
+
|
|
553
667
|
/**
|
|
554
668
|
* Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
|
|
555
669
|
* Release a phone number from its organization (app-admin only)
|