@l7mp/tivadar-ai-api-sdk 0.2.15 → 0.2.16
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 +8 -1
- package/dist/api-client.js +7 -0
- package/dist/apis/AdminPhoneNumbersApi.d.ts +26 -1
- package/dist/apis/AdminPhoneNumbersApi.js +81 -0
- package/dist/apis/OutboundCallsApi.d.ts +32 -0
- package/dist/apis/OutboundCallsApi.js +77 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +8 -1
- package/dist/esm/api-client.js +7 -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 +32 -0
- package/dist/esm/apis/OutboundCallsApi.js +73 -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 +44 -0
- package/dist/esm/models/OutboundCallRequest.js +47 -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 +3 -0
- package/dist/esm/models/index.js +3 -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 +44 -0
- package/dist/models/OutboundCallRequest.js +54 -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 +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/api-client.ts +16 -0
- package/src/apis/AdminPhoneNumbersApi.ts +114 -0
- package/src/apis/OutboundCallsApi.ts +95 -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 +82 -0
- package/src/models/PhoneNumber.ts +24 -0
- package/src/models/PhoneNumberCreate.ts +32 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AdminPhoneNumberAssignOutbound
|
|
16
|
+
*/
|
|
17
|
+
export interface AdminPhoneNumberAssignOutbound {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AdminPhoneNumberAssignOutbound
|
|
22
|
+
*/
|
|
23
|
+
organization_id: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the AdminPhoneNumberAssignOutbound interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfAdminPhoneNumberAssignOutbound(value: object): value is AdminPhoneNumberAssignOutbound;
|
|
29
|
+
export declare function AdminPhoneNumberAssignOutboundFromJSON(json: any): AdminPhoneNumberAssignOutbound;
|
|
30
|
+
export declare function AdminPhoneNumberAssignOutboundFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminPhoneNumberAssignOutbound;
|
|
31
|
+
export declare function AdminPhoneNumberAssignOutboundToJSON(json: any): AdminPhoneNumberAssignOutbound;
|
|
32
|
+
export declare function AdminPhoneNumberAssignOutboundToJSONTyped(value?: AdminPhoneNumberAssignOutbound | 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.instanceOfAdminPhoneNumberAssignOutbound = instanceOfAdminPhoneNumberAssignOutbound;
|
|
17
|
+
exports.AdminPhoneNumberAssignOutboundFromJSON = AdminPhoneNumberAssignOutboundFromJSON;
|
|
18
|
+
exports.AdminPhoneNumberAssignOutboundFromJSONTyped = AdminPhoneNumberAssignOutboundFromJSONTyped;
|
|
19
|
+
exports.AdminPhoneNumberAssignOutboundToJSON = AdminPhoneNumberAssignOutboundToJSON;
|
|
20
|
+
exports.AdminPhoneNumberAssignOutboundToJSONTyped = AdminPhoneNumberAssignOutboundToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AdminPhoneNumberAssignOutbound interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAdminPhoneNumberAssignOutbound(value) {
|
|
25
|
+
if (!('organization_id' in value) || value['organization_id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function AdminPhoneNumberAssignOutboundFromJSON(json) {
|
|
30
|
+
return AdminPhoneNumberAssignOutboundFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function AdminPhoneNumberAssignOutboundFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'organization_id': json['organization_id'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function AdminPhoneNumberAssignOutboundToJSON(json) {
|
|
41
|
+
return AdminPhoneNumberAssignOutboundToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function AdminPhoneNumberAssignOutboundToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'organization_id': value['organization_id'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -33,6 +33,36 @@ export interface AdminPhoneNumberDetail {
|
|
|
33
33
|
* @memberof AdminPhoneNumberDetail
|
|
34
34
|
*/
|
|
35
35
|
supports_call_redirect?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof AdminPhoneNumberDetail
|
|
40
|
+
*/
|
|
41
|
+
supports_outbound?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof AdminPhoneNumberDetail
|
|
46
|
+
*/
|
|
47
|
+
sip_address?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof AdminPhoneNumberDetail
|
|
52
|
+
*/
|
|
53
|
+
outbound_configured?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof AdminPhoneNumberDetail
|
|
58
|
+
*/
|
|
59
|
+
outbound_organization_id?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof AdminPhoneNumberDetail
|
|
64
|
+
*/
|
|
65
|
+
outbound_organization_name?: string | null;
|
|
36
66
|
/**
|
|
37
67
|
*
|
|
38
68
|
* @type {string}
|
|
@@ -43,6 +43,11 @@ function AdminPhoneNumberDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
43
|
'id': json['id'] == null ? undefined : json['id'],
|
|
44
44
|
'number': json['number'] == null ? undefined : json['number'],
|
|
45
45
|
'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
|
|
46
|
+
'supports_outbound': json['supports_outbound'] == null ? undefined : json['supports_outbound'],
|
|
47
|
+
'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
|
|
48
|
+
'outbound_configured': json['outbound_configured'] == null ? undefined : json['outbound_configured'],
|
|
49
|
+
'outbound_organization_id': json['outbound_organization_id'] == null ? undefined : json['outbound_organization_id'],
|
|
50
|
+
'outbound_organization_name': json['outbound_organization_name'] == null ? undefined : json['outbound_organization_name'],
|
|
46
51
|
'status': json['status'] == null ? undefined : json['status'],
|
|
47
52
|
'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
48
53
|
'sip_trunk_id': json['sip_trunk_id'] == null ? undefined : json['sip_trunk_id'],
|
|
@@ -64,6 +69,11 @@ function AdminPhoneNumberDetailToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
64
69
|
'id': value['id'],
|
|
65
70
|
'number': value['number'],
|
|
66
71
|
'supports_call_redirect': value['supports_call_redirect'],
|
|
72
|
+
'supports_outbound': value['supports_outbound'],
|
|
73
|
+
'sip_address': value['sip_address'],
|
|
74
|
+
'outbound_configured': value['outbound_configured'],
|
|
75
|
+
'outbound_organization_id': value['outbound_organization_id'],
|
|
76
|
+
'outbound_organization_name': value['outbound_organization_name'],
|
|
67
77
|
'status': value['status'],
|
|
68
78
|
'created_at': value['created_at'] == null ? value['created_at'] : value['created_at'].toISOString(),
|
|
69
79
|
'sip_trunk_id': value['sip_trunk_id'],
|
|
@@ -27,6 +27,24 @@ export interface AdminPhoneNumberUpdate {
|
|
|
27
27
|
* @memberof AdminPhoneNumberUpdate
|
|
28
28
|
*/
|
|
29
29
|
supports_call_redirect?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Update the outbound SIP address (outbound numbers only).
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AdminPhoneNumberUpdate
|
|
34
|
+
*/
|
|
35
|
+
sip_address?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Update the outbound SIP auth username (re-encrypted).
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof AdminPhoneNumberUpdate
|
|
40
|
+
*/
|
|
41
|
+
auth_username?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Update the outbound SIP auth password (re-encrypted).
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof AdminPhoneNumberUpdate
|
|
46
|
+
*/
|
|
47
|
+
auth_password?: string;
|
|
30
48
|
}
|
|
31
49
|
/**
|
|
32
50
|
* Check if a given object implements the AdminPhoneNumberUpdate interface.
|
|
@@ -34,6 +34,9 @@ function AdminPhoneNumberUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
34
34
|
return {
|
|
35
35
|
'number': json['number'] == null ? undefined : json['number'],
|
|
36
36
|
'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
|
|
37
|
+
'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
|
|
38
|
+
'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
|
|
39
|
+
'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
|
|
37
40
|
};
|
|
38
41
|
}
|
|
39
42
|
function AdminPhoneNumberUpdateToJSON(json) {
|
|
@@ -46,5 +49,8 @@ function AdminPhoneNumberUpdateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
46
49
|
return {
|
|
47
50
|
'number': value['number'],
|
|
48
51
|
'supports_call_redirect': value['supports_call_redirect'],
|
|
52
|
+
'sip_address': value['sip_address'],
|
|
53
|
+
'auth_username': value['auth_username'],
|
|
54
|
+
'auth_password': value['auth_password'],
|
|
49
55
|
};
|
|
50
56
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface OutboundCall
|
|
16
|
+
*/
|
|
17
|
+
export interface OutboundCall {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof OutboundCall
|
|
22
|
+
*/
|
|
23
|
+
call_id?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof OutboundCall
|
|
28
|
+
*/
|
|
29
|
+
room_name?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof OutboundCall
|
|
34
|
+
*/
|
|
35
|
+
destination?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof OutboundCall
|
|
40
|
+
*/
|
|
41
|
+
from_number?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof OutboundCall
|
|
46
|
+
*/
|
|
47
|
+
participant_identity?: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof OutboundCall
|
|
52
|
+
*/
|
|
53
|
+
sip_participant_id?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof OutboundCall
|
|
58
|
+
*/
|
|
59
|
+
dispatched?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Check if a given object implements the OutboundCall interface.
|
|
63
|
+
*/
|
|
64
|
+
export declare function instanceOfOutboundCall(value: object): value is OutboundCall;
|
|
65
|
+
export declare function OutboundCallFromJSON(json: any): OutboundCall;
|
|
66
|
+
export declare function OutboundCallFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutboundCall;
|
|
67
|
+
export declare function OutboundCallToJSON(json: any): OutboundCall;
|
|
68
|
+
export declare function OutboundCallToJSONTyped(value?: OutboundCall | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
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.instanceOfOutboundCall = instanceOfOutboundCall;
|
|
17
|
+
exports.OutboundCallFromJSON = OutboundCallFromJSON;
|
|
18
|
+
exports.OutboundCallFromJSONTyped = OutboundCallFromJSONTyped;
|
|
19
|
+
exports.OutboundCallToJSON = OutboundCallToJSON;
|
|
20
|
+
exports.OutboundCallToJSONTyped = OutboundCallToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the OutboundCall interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfOutboundCall(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function OutboundCallFromJSON(json) {
|
|
28
|
+
return OutboundCallFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function OutboundCallFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'call_id': json['call_id'] == null ? undefined : json['call_id'],
|
|
36
|
+
'room_name': json['room_name'] == null ? undefined : json['room_name'],
|
|
37
|
+
'destination': json['destination'] == null ? undefined : json['destination'],
|
|
38
|
+
'from_number': json['from_number'] == null ? undefined : json['from_number'],
|
|
39
|
+
'participant_identity': json['participant_identity'] == null ? undefined : json['participant_identity'],
|
|
40
|
+
'sip_participant_id': json['sip_participant_id'] == null ? undefined : json['sip_participant_id'],
|
|
41
|
+
'dispatched': json['dispatched'] == null ? undefined : json['dispatched'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function OutboundCallToJSON(json) {
|
|
45
|
+
return OutboundCallToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function OutboundCallToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'call_id': value['call_id'],
|
|
53
|
+
'room_name': value['room_name'],
|
|
54
|
+
'destination': value['destination'],
|
|
55
|
+
'from_number': value['from_number'],
|
|
56
|
+
'participant_identity': value['participant_identity'],
|
|
57
|
+
'sip_participant_id': value['sip_participant_id'],
|
|
58
|
+
'dispatched': value['dispatched'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface OutboundCallRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface OutboundCallRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof OutboundCallRequest
|
|
22
|
+
*/
|
|
23
|
+
voice_agent_id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Destination from a phonebook entry. Provide this OR destination_number.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof OutboundCallRequest
|
|
28
|
+
*/
|
|
29
|
+
phonebook_entry_id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Custom destination phone number. Provide this OR phonebook_entry_id.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof OutboundCallRequest
|
|
34
|
+
*/
|
|
35
|
+
destination_number?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the OutboundCallRequest interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfOutboundCallRequest(value: object): value is OutboundCallRequest;
|
|
41
|
+
export declare function OutboundCallRequestFromJSON(json: any): OutboundCallRequest;
|
|
42
|
+
export declare function OutboundCallRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutboundCallRequest;
|
|
43
|
+
export declare function OutboundCallRequestToJSON(json: any): OutboundCallRequest;
|
|
44
|
+
export declare function OutboundCallRequestToJSONTyped(value?: OutboundCallRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function OutboundCallRequestToJSON(json) {
|
|
43
|
+
return OutboundCallRequestToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function OutboundCallRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
51
|
+
'phonebook_entry_id': value['phonebook_entry_id'],
|
|
52
|
+
'destination_number': value['destination_number'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -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,8 @@ 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';
|
|
72
75
|
export * from './PauseSubscriptionRequest';
|
|
73
76
|
export * from './PhoneNumber';
|
|
74
77
|
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,8 @@ __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);
|
|
90
93
|
__exportStar(require("./PauseSubscriptionRequest"), exports);
|
|
91
94
|
__exportStar(require("./PhoneNumber"), exports);
|
|
92
95
|
__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,9 @@ 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
|
+
};
|
|
237
245
|
public readonly voiceUsage: {
|
|
238
246
|
report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
|
|
239
247
|
};
|
|
@@ -295,6 +303,7 @@ export class Api {
|
|
|
295
303
|
private readonly adminSubscriptionsApi: AdminSubscriptionsApi;
|
|
296
304
|
private readonly adminPhoneNumbersApi: AdminPhoneNumbersApi;
|
|
297
305
|
private readonly adminSipApi: AdminSIPApi;
|
|
306
|
+
private readonly outboundCallsApi: OutboundCallsApi;
|
|
298
307
|
private readonly voiceUsageApi: VoiceUsageApi;
|
|
299
308
|
private readonly embeddingProvidersApi: EmbeddingProvidersApi;
|
|
300
309
|
private readonly llmProvidersApi: LLMProvidersApi;
|
|
@@ -341,6 +350,7 @@ export class Api {
|
|
|
341
350
|
this.adminSubscriptionsApi = new AdminSubscriptionsApi(configuration);
|
|
342
351
|
this.adminPhoneNumbersApi = new AdminPhoneNumbersApi(configuration);
|
|
343
352
|
this.adminSipApi = new AdminSIPApi(configuration);
|
|
353
|
+
this.outboundCallsApi = new OutboundCallsApi(configuration);
|
|
344
354
|
this.voiceUsageApi = new VoiceUsageApi(configuration);
|
|
345
355
|
this.embeddingProvidersApi = new EmbeddingProvidersApi(configuration);
|
|
346
356
|
this.llmProvidersApi = new LLMProvidersApi(configuration);
|
|
@@ -503,6 +513,8 @@ export class Api {
|
|
|
503
513
|
delete: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
|
|
504
514
|
assign: (phoneNumberId, adminPhoneNumberAssign, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignPost({ phoneNumberId, adminPhoneNumberAssign }, options),
|
|
505
515
|
unassign: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignPost({ phoneNumberId }, options),
|
|
516
|
+
assignOutbound: (phoneNumberId, adminPhoneNumberAssignOutbound, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdAssignOutboundPost({ phoneNumberId, adminPhoneNumberAssignOutbound }, options),
|
|
517
|
+
unassignOutbound: (phoneNumberId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersPhoneNumberIdUnassignOutboundPost({ phoneNumberId }, options),
|
|
506
518
|
listOrders: (params, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersGet({ status: params?.status, organizationId: params?.organizationId, requiresCallRedirect: params?.requiresCallRedirect, limit: params?.limit, offset: params?.offset }, options),
|
|
507
519
|
processOrders: (options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersProcessPost(options),
|
|
508
520
|
fulfillOrder: (orderId, options) => this.adminPhoneNumbersApi.adminPhoneNumbersOrdersOrderIdFulfillPost({ orderId }, options),
|
|
@@ -520,6 +532,10 @@ export class Api {
|
|
|
520
532
|
listLiveKitDispatchRules: (options) => this.adminSipApi.adminSipLivekitDispatchRulesGet(options),
|
|
521
533
|
};
|
|
522
534
|
|
|
535
|
+
this.outboundCalls = {
|
|
536
|
+
create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
|
|
537
|
+
};
|
|
538
|
+
|
|
523
539
|
this.voiceUsage = {
|
|
524
540
|
report: (voiceUsageReportRequest, options) => this.voiceUsageApi.voiceUsageReportPost({ voiceUsageReportRequest }, options),
|
|
525
541
|
};
|