@l7mp/tivadar-ai-api-sdk 0.2.14 → 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 +20 -1
- package/dist/api-client.js +13 -0
- package/dist/apis/AdminPhoneNumbersApi.d.ts +80 -1
- package/dist/apis/AdminPhoneNumbersApi.js +245 -1
- package/dist/apis/OutboundCallsApi.d.ts +32 -0
- package/dist/apis/OutboundCallsApi.js +77 -0
- package/dist/apis/SIPApi.d.ts +34 -1
- package/dist/apis/SIPApi.js +89 -1
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +20 -1
- package/dist/esm/api-client.js +13 -0
- package/dist/esm/apis/AdminPhoneNumbersApi.d.ts +80 -1
- package/dist/esm/apis/AdminPhoneNumbersApi.js +245 -1
- package/dist/esm/apis/OutboundCallsApi.d.ts +32 -0
- package/dist/esm/apis/OutboundCallsApi.js +73 -0
- package/dist/esm/apis/SIPApi.d.ts +34 -1
- package/dist/esm/apis/SIPApi.js +89 -1
- 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/PhoneNumberOrder.d.ts +101 -0
- package/dist/esm/models/PhoneNumberOrder.js +69 -0
- package/dist/esm/models/PhoneNumberOrderDetail.d.ts +119 -0
- package/dist/esm/models/PhoneNumberOrderDetail.js +75 -0
- package/dist/esm/models/PhoneNumberOrdersListResponse.d.ts +39 -0
- package/dist/esm/models/PhoneNumberOrdersListResponse.js +44 -0
- package/dist/esm/models/ProcessOrdersResult.d.ts +38 -0
- package/dist/esm/models/ProcessOrdersResult.js +43 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -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/PhoneNumberOrder.d.ts +101 -0
- package/dist/models/PhoneNumberOrder.js +77 -0
- package/dist/models/PhoneNumberOrderDetail.d.ts +119 -0
- package/dist/models/PhoneNumberOrderDetail.js +83 -0
- package/dist/models/PhoneNumberOrdersListResponse.d.ts +39 -0
- package/dist/models/PhoneNumberOrdersListResponse.js +51 -0
- package/dist/models/ProcessOrdersResult.d.ts +38 -0
- package/dist/models/ProcessOrdersResult.js +50 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +1 -1
- package/src/api-client.ts +28 -0
- package/src/apis/AdminPhoneNumbersApi.ts +332 -0
- package/src/apis/OutboundCallsApi.ts +95 -0
- package/src/apis/SIPApi.ts +124 -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/PhoneNumberOrder.ts +157 -0
- package/src/models/PhoneNumberOrderDetail.ts +181 -0
- package/src/models/PhoneNumberOrdersListResponse.ts +81 -0
- package/src/models/ProcessOrdersResult.ts +73 -0
- package/src/models/index.ts +7 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AdminPhoneNumberAssignOutbound
|
|
20
|
+
*/
|
|
21
|
+
export interface AdminPhoneNumberAssignOutbound {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AdminPhoneNumberAssignOutbound
|
|
26
|
+
*/
|
|
27
|
+
organization_id: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the AdminPhoneNumberAssignOutbound interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfAdminPhoneNumberAssignOutbound(value: object): value is AdminPhoneNumberAssignOutbound {
|
|
34
|
+
if (!('organization_id' in value) || value['organization_id'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function AdminPhoneNumberAssignOutboundFromJSON(json: any): AdminPhoneNumberAssignOutbound {
|
|
39
|
+
return AdminPhoneNumberAssignOutboundFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function AdminPhoneNumberAssignOutboundFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminPhoneNumberAssignOutbound {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'organization_id': json['organization_id'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function AdminPhoneNumberAssignOutboundToJSON(json: any): AdminPhoneNumberAssignOutbound {
|
|
53
|
+
return AdminPhoneNumberAssignOutboundToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AdminPhoneNumberAssignOutboundToJSONTyped(value?: AdminPhoneNumberAssignOutbound | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'organization_id': value['organization_id'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -37,6 +37,36 @@ export interface AdminPhoneNumberDetail {
|
|
|
37
37
|
* @memberof AdminPhoneNumberDetail
|
|
38
38
|
*/
|
|
39
39
|
supports_call_redirect?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof AdminPhoneNumberDetail
|
|
44
|
+
*/
|
|
45
|
+
supports_outbound?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof AdminPhoneNumberDetail
|
|
50
|
+
*/
|
|
51
|
+
sip_address?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof AdminPhoneNumberDetail
|
|
56
|
+
*/
|
|
57
|
+
outbound_configured?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof AdminPhoneNumberDetail
|
|
62
|
+
*/
|
|
63
|
+
outbound_organization_id?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof AdminPhoneNumberDetail
|
|
68
|
+
*/
|
|
69
|
+
outbound_organization_name?: string | null;
|
|
40
70
|
/**
|
|
41
71
|
*
|
|
42
72
|
* @type {string}
|
|
@@ -118,6 +148,11 @@ export function AdminPhoneNumberDetailFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
118
148
|
'id': json['id'] == null ? undefined : json['id'],
|
|
119
149
|
'number': json['number'] == null ? undefined : json['number'],
|
|
120
150
|
'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
|
|
151
|
+
'supports_outbound': json['supports_outbound'] == null ? undefined : json['supports_outbound'],
|
|
152
|
+
'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
|
|
153
|
+
'outbound_configured': json['outbound_configured'] == null ? undefined : json['outbound_configured'],
|
|
154
|
+
'outbound_organization_id': json['outbound_organization_id'] == null ? undefined : json['outbound_organization_id'],
|
|
155
|
+
'outbound_organization_name': json['outbound_organization_name'] == null ? undefined : json['outbound_organization_name'],
|
|
121
156
|
'status': json['status'] == null ? undefined : json['status'],
|
|
122
157
|
'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
123
158
|
'sip_trunk_id': json['sip_trunk_id'] == null ? undefined : json['sip_trunk_id'],
|
|
@@ -143,6 +178,11 @@ export function AdminPhoneNumberDetailToJSONTyped(value?: AdminPhoneNumberDetail
|
|
|
143
178
|
'id': value['id'],
|
|
144
179
|
'number': value['number'],
|
|
145
180
|
'supports_call_redirect': value['supports_call_redirect'],
|
|
181
|
+
'supports_outbound': value['supports_outbound'],
|
|
182
|
+
'sip_address': value['sip_address'],
|
|
183
|
+
'outbound_configured': value['outbound_configured'],
|
|
184
|
+
'outbound_organization_id': value['outbound_organization_id'],
|
|
185
|
+
'outbound_organization_name': value['outbound_organization_name'],
|
|
146
186
|
'status': value['status'],
|
|
147
187
|
'created_at': value['created_at'] == null ? value['created_at'] : value['created_at'].toISOString(),
|
|
148
188
|
'sip_trunk_id': value['sip_trunk_id'],
|
|
@@ -31,6 +31,24 @@ export interface AdminPhoneNumberUpdate {
|
|
|
31
31
|
* @memberof AdminPhoneNumberUpdate
|
|
32
32
|
*/
|
|
33
33
|
supports_call_redirect?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Update the outbound SIP address (outbound numbers only).
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof AdminPhoneNumberUpdate
|
|
38
|
+
*/
|
|
39
|
+
sip_address?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Update the outbound SIP auth username (re-encrypted).
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof AdminPhoneNumberUpdate
|
|
44
|
+
*/
|
|
45
|
+
auth_username?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Update the outbound SIP auth password (re-encrypted).
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof AdminPhoneNumberUpdate
|
|
50
|
+
*/
|
|
51
|
+
auth_password?: string;
|
|
34
52
|
}
|
|
35
53
|
|
|
36
54
|
/**
|
|
@@ -52,6 +70,9 @@ export function AdminPhoneNumberUpdateFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
52
70
|
|
|
53
71
|
'number': json['number'] == null ? undefined : json['number'],
|
|
54
72
|
'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
|
|
73
|
+
'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
|
|
74
|
+
'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
|
|
75
|
+
'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
|
|
55
76
|
};
|
|
56
77
|
}
|
|
57
78
|
|
|
@@ -68,6 +89,9 @@ export function AdminPhoneNumberUpdateToJSONTyped(value?: AdminPhoneNumberUpdate
|
|
|
68
89
|
|
|
69
90
|
'number': value['number'],
|
|
70
91
|
'supports_call_redirect': value['supports_call_redirect'],
|
|
92
|
+
'sip_address': value['sip_address'],
|
|
93
|
+
'auth_username': value['auth_username'],
|
|
94
|
+
'auth_password': value['auth_password'],
|
|
71
95
|
};
|
|
72
96
|
}
|
|
73
97
|
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface OutboundCall
|
|
20
|
+
*/
|
|
21
|
+
export interface OutboundCall {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof OutboundCall
|
|
26
|
+
*/
|
|
27
|
+
call_id?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof OutboundCall
|
|
32
|
+
*/
|
|
33
|
+
room_name?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof OutboundCall
|
|
38
|
+
*/
|
|
39
|
+
destination?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof OutboundCall
|
|
44
|
+
*/
|
|
45
|
+
from_number?: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof OutboundCall
|
|
50
|
+
*/
|
|
51
|
+
participant_identity?: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof OutboundCall
|
|
56
|
+
*/
|
|
57
|
+
sip_participant_id?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {boolean}
|
|
61
|
+
* @memberof OutboundCall
|
|
62
|
+
*/
|
|
63
|
+
dispatched?: boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the OutboundCall interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfOutboundCall(value: object): value is OutboundCall {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function OutboundCallFromJSON(json: any): OutboundCall {
|
|
74
|
+
return OutboundCallFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function OutboundCallFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutboundCall {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'call_id': json['call_id'] == null ? undefined : json['call_id'],
|
|
84
|
+
'room_name': json['room_name'] == null ? undefined : json['room_name'],
|
|
85
|
+
'destination': json['destination'] == null ? undefined : json['destination'],
|
|
86
|
+
'from_number': json['from_number'] == null ? undefined : json['from_number'],
|
|
87
|
+
'participant_identity': json['participant_identity'] == null ? undefined : json['participant_identity'],
|
|
88
|
+
'sip_participant_id': json['sip_participant_id'] == null ? undefined : json['sip_participant_id'],
|
|
89
|
+
'dispatched': json['dispatched'] == null ? undefined : json['dispatched'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function OutboundCallToJSON(json: any): OutboundCall {
|
|
94
|
+
return OutboundCallToJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function OutboundCallToJSONTyped(value?: OutboundCall | null, ignoreDiscriminator: boolean = false): any {
|
|
98
|
+
if (value == null) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
'call_id': value['call_id'],
|
|
105
|
+
'room_name': value['room_name'],
|
|
106
|
+
'destination': value['destination'],
|
|
107
|
+
'from_number': value['from_number'],
|
|
108
|
+
'participant_identity': value['participant_identity'],
|
|
109
|
+
'sip_participant_id': value['sip_participant_id'],
|
|
110
|
+
'dispatched': value['dispatched'],
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface OutboundCallRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface OutboundCallRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof OutboundCallRequest
|
|
26
|
+
*/
|
|
27
|
+
voice_agent_id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Destination from a phonebook entry. Provide this OR destination_number.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof OutboundCallRequest
|
|
32
|
+
*/
|
|
33
|
+
phonebook_entry_id?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Custom destination phone number. Provide this OR phonebook_entry_id.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof OutboundCallRequest
|
|
38
|
+
*/
|
|
39
|
+
destination_number?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the OutboundCallRequest interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfOutboundCallRequest(value: object): value is OutboundCallRequest {
|
|
46
|
+
if (!('voice_agent_id' in value) || value['voice_agent_id'] === undefined) return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function OutboundCallRequestFromJSON(json: any): OutboundCallRequest {
|
|
51
|
+
return OutboundCallRequestFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function OutboundCallRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutboundCallRequest {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'voice_agent_id': json['voice_agent_id'],
|
|
61
|
+
'phonebook_entry_id': json['phonebook_entry_id'] == null ? undefined : json['phonebook_entry_id'],
|
|
62
|
+
'destination_number': json['destination_number'] == null ? undefined : json['destination_number'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function OutboundCallRequestToJSON(json: any): OutboundCallRequest {
|
|
67
|
+
return OutboundCallRequestToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function OutboundCallRequestToJSONTyped(value?: OutboundCallRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'voice_agent_id': value['voice_agent_id'],
|
|
78
|
+
'phonebook_entry_id': value['phonebook_entry_id'],
|
|
79
|
+
'destination_number': value['destination_number'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -43,6 +43,24 @@ export interface PhoneNumber {
|
|
|
43
43
|
* @memberof PhoneNumber
|
|
44
44
|
*/
|
|
45
45
|
supports_call_redirect?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether this number can place outbound calls (has an outbound trunk).
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
* @memberof PhoneNumber
|
|
50
|
+
*/
|
|
51
|
+
supports_outbound?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Outbound SIP provider host/address (outbound numbers only).
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof PhoneNumber
|
|
56
|
+
*/
|
|
57
|
+
sip_address?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the outbound trunk + credentials are configured. Secrets are never returned.
|
|
60
|
+
* @type {boolean}
|
|
61
|
+
* @memberof PhoneNumber
|
|
62
|
+
*/
|
|
63
|
+
outbound_configured?: boolean;
|
|
46
64
|
/**
|
|
47
65
|
*
|
|
48
66
|
* @type {Date}
|
|
@@ -72,6 +90,9 @@ export function PhoneNumberFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
72
90
|
'number': json['number'] == null ? undefined : json['number'],
|
|
73
91
|
'sip_trunk_id': json['sip_trunk_id'] == null ? undefined : json['sip_trunk_id'],
|
|
74
92
|
'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
|
|
93
|
+
'supports_outbound': json['supports_outbound'] == null ? undefined : json['supports_outbound'],
|
|
94
|
+
'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
|
|
95
|
+
'outbound_configured': json['outbound_configured'] == null ? undefined : json['outbound_configured'],
|
|
75
96
|
'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
76
97
|
};
|
|
77
98
|
}
|
|
@@ -91,6 +112,9 @@ export function PhoneNumberToJSONTyped(value?: PhoneNumber | null, ignoreDiscrim
|
|
|
91
112
|
'number': value['number'],
|
|
92
113
|
'sip_trunk_id': value['sip_trunk_id'],
|
|
93
114
|
'supports_call_redirect': value['supports_call_redirect'],
|
|
115
|
+
'supports_outbound': value['supports_outbound'],
|
|
116
|
+
'sip_address': value['sip_address'],
|
|
117
|
+
'outbound_configured': value['outbound_configured'],
|
|
94
118
|
'created_at': value['created_at'] == null ? value['created_at'] : value['created_at'].toISOString(),
|
|
95
119
|
};
|
|
96
120
|
}
|
|
@@ -31,6 +31,30 @@ export interface PhoneNumberCreate {
|
|
|
31
31
|
* @memberof PhoneNumberCreate
|
|
32
32
|
*/
|
|
33
33
|
supports_call_redirect?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether this number can place outbound calls. When true, sip_address, auth_username and auth_password are required.
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof PhoneNumberCreate
|
|
38
|
+
*/
|
|
39
|
+
supports_outbound?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Outbound SIP provider host/address (required when supports_outbound is true).
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof PhoneNumberCreate
|
|
44
|
+
*/
|
|
45
|
+
sip_address?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Outbound SIP auth username (required when supports_outbound is true). Stored encrypted.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof PhoneNumberCreate
|
|
50
|
+
*/
|
|
51
|
+
auth_username?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Outbound SIP auth password (required when supports_outbound is true). Stored encrypted, never returned.
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof PhoneNumberCreate
|
|
56
|
+
*/
|
|
57
|
+
auth_password?: string;
|
|
34
58
|
}
|
|
35
59
|
|
|
36
60
|
/**
|
|
@@ -53,6 +77,10 @@ export function PhoneNumberCreateFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
53
77
|
|
|
54
78
|
'number': json['number'],
|
|
55
79
|
'supports_call_redirect': json['supports_call_redirect'] == null ? undefined : json['supports_call_redirect'],
|
|
80
|
+
'supports_outbound': json['supports_outbound'] == null ? undefined : json['supports_outbound'],
|
|
81
|
+
'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
|
|
82
|
+
'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
|
|
83
|
+
'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
|
|
56
84
|
};
|
|
57
85
|
}
|
|
58
86
|
|
|
@@ -69,6 +97,10 @@ export function PhoneNumberCreateToJSONTyped(value?: PhoneNumberCreate | null, i
|
|
|
69
97
|
|
|
70
98
|
'number': value['number'],
|
|
71
99
|
'supports_call_redirect': value['supports_call_redirect'],
|
|
100
|
+
'supports_outbound': value['supports_outbound'],
|
|
101
|
+
'sip_address': value['sip_address'],
|
|
102
|
+
'auth_username': value['auth_username'],
|
|
103
|
+
'auth_password': value['auth_password'],
|
|
72
104
|
};
|
|
73
105
|
}
|
|
74
106
|
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* A backorder for a phone number, fulfilled automatically when the pool expands.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface PhoneNumberOrder
|
|
20
|
+
*/
|
|
21
|
+
export interface PhoneNumberOrder {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof PhoneNumberOrder
|
|
26
|
+
*/
|
|
27
|
+
id?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PhoneNumberOrder
|
|
32
|
+
*/
|
|
33
|
+
organization_id?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof PhoneNumberOrder
|
|
38
|
+
*/
|
|
39
|
+
agent_id?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof PhoneNumberOrder
|
|
44
|
+
*/
|
|
45
|
+
requires_call_redirect?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof PhoneNumberOrder
|
|
50
|
+
*/
|
|
51
|
+
status?: PhoneNumberOrderStatusEnum;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof PhoneNumberOrder
|
|
56
|
+
*/
|
|
57
|
+
phone_number_id?: number | null;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof PhoneNumberOrder
|
|
62
|
+
*/
|
|
63
|
+
sip_trunk_id?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof PhoneNumberOrder
|
|
68
|
+
*/
|
|
69
|
+
note?: string | null;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {Date}
|
|
73
|
+
* @memberof PhoneNumberOrder
|
|
74
|
+
*/
|
|
75
|
+
created_at?: Date;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {Date}
|
|
79
|
+
* @memberof PhoneNumberOrder
|
|
80
|
+
*/
|
|
81
|
+
fulfilled_at?: Date | null;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {Date}
|
|
85
|
+
* @memberof PhoneNumberOrder
|
|
86
|
+
*/
|
|
87
|
+
canceled_at?: Date | null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @export
|
|
93
|
+
*/
|
|
94
|
+
export const PhoneNumberOrderStatusEnum = {
|
|
95
|
+
Pending: 'pending',
|
|
96
|
+
Active: 'active',
|
|
97
|
+
Canceled: 'canceled'
|
|
98
|
+
} as const;
|
|
99
|
+
export type PhoneNumberOrderStatusEnum = typeof PhoneNumberOrderStatusEnum[keyof typeof PhoneNumberOrderStatusEnum];
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Check if a given object implements the PhoneNumberOrder interface.
|
|
104
|
+
*/
|
|
105
|
+
export function instanceOfPhoneNumberOrder(value: object): value is PhoneNumberOrder {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function PhoneNumberOrderFromJSON(json: any): PhoneNumberOrder {
|
|
110
|
+
return PhoneNumberOrderFromJSONTyped(json, false);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function PhoneNumberOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): PhoneNumberOrder {
|
|
114
|
+
if (json == null) {
|
|
115
|
+
return json;
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
|
|
119
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
120
|
+
'organization_id': json['organization_id'] == null ? undefined : json['organization_id'],
|
|
121
|
+
'agent_id': json['agent_id'] == null ? undefined : json['agent_id'],
|
|
122
|
+
'requires_call_redirect': json['requires_call_redirect'] == null ? undefined : json['requires_call_redirect'],
|
|
123
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
124
|
+
'phone_number_id': json['phone_number_id'] == null ? undefined : json['phone_number_id'],
|
|
125
|
+
'sip_trunk_id': json['sip_trunk_id'] == null ? undefined : json['sip_trunk_id'],
|
|
126
|
+
'note': json['note'] == null ? undefined : json['note'],
|
|
127
|
+
'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
128
|
+
'fulfilled_at': json['fulfilled_at'] == null ? undefined : (new Date(json['fulfilled_at'])),
|
|
129
|
+
'canceled_at': json['canceled_at'] == null ? undefined : (new Date(json['canceled_at'])),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function PhoneNumberOrderToJSON(json: any): PhoneNumberOrder {
|
|
134
|
+
return PhoneNumberOrderToJSONTyped(json, false);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function PhoneNumberOrderToJSONTyped(value?: PhoneNumberOrder | null, ignoreDiscriminator: boolean = false): any {
|
|
138
|
+
if (value == null) {
|
|
139
|
+
return value;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
|
|
144
|
+
'id': value['id'],
|
|
145
|
+
'organization_id': value['organization_id'],
|
|
146
|
+
'agent_id': value['agent_id'],
|
|
147
|
+
'requires_call_redirect': value['requires_call_redirect'],
|
|
148
|
+
'status': value['status'],
|
|
149
|
+
'phone_number_id': value['phone_number_id'],
|
|
150
|
+
'sip_trunk_id': value['sip_trunk_id'],
|
|
151
|
+
'note': value['note'],
|
|
152
|
+
'created_at': value['created_at'] == null ? value['created_at'] : value['created_at'].toISOString(),
|
|
153
|
+
'fulfilled_at': value['fulfilled_at'] == null ? value['fulfilled_at'] : value['fulfilled_at'].toISOString(),
|
|
154
|
+
'canceled_at': value['canceled_at'] == null ? value['canceled_at'] : value['canceled_at'].toISOString(),
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|