@l7mp/tivadar-ai-api-sdk 0.2.16 → 0.2.18
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 +7 -0
- package/dist/api-client.js +7 -0
- package/dist/apis/LiveCallsApi.d.ts +45 -0
- package/dist/apis/LiveCallsApi.js +115 -0
- package/dist/apis/OutboundCallsApi.d.ts +14 -1
- package/dist/apis/OutboundCallsApi.js +39 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +7 -0
- package/dist/esm/api-client.js +7 -0
- package/dist/esm/apis/LiveCallsApi.d.ts +45 -0
- package/dist/esm/apis/LiveCallsApi.js +111 -0
- package/dist/esm/apis/OutboundCallsApi.d.ts +14 -1
- package/dist/esm/apis/OutboundCallsApi.js +40 -1
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/LiveCall.d.ts +57 -0
- package/dist/esm/models/LiveCall.js +50 -0
- package/dist/esm/models/LiveCallParticipant.d.ts +95 -0
- package/dist/esm/models/LiveCallParticipant.js +81 -0
- package/dist/esm/models/LiveCallToken.d.ts +44 -0
- package/dist/esm/models/LiveCallToken.js +45 -0
- package/dist/esm/models/OutboundCallRequest.d.ts +6 -0
- package/dist/esm/models/OutboundCallRequest.js +2 -0
- package/dist/esm/models/OutboundNumber.d.ts +38 -0
- package/dist/esm/models/OutboundNumber.js +43 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/LiveCall.d.ts +57 -0
- package/dist/models/LiveCall.js +57 -0
- package/dist/models/LiveCallParticipant.d.ts +95 -0
- package/dist/models/LiveCallParticipant.js +89 -0
- package/dist/models/LiveCallToken.d.ts +44 -0
- package/dist/models/LiveCallToken.js +52 -0
- package/dist/models/OutboundCallRequest.d.ts +6 -0
- package/dist/models/OutboundCallRequest.js +2 -0
- package/dist/models/OutboundNumber.d.ts +38 -0
- package/dist/models/OutboundNumber.js +50 -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 +14 -0
- package/src/apis/LiveCallsApi.ts +144 -0
- package/src/apis/OutboundCallsApi.ts +54 -0
- package/src/apis/index.ts +1 -0
- package/src/models/LiveCall.ts +105 -0
- package/src/models/LiveCallParticipant.ts +143 -0
- package/src/models/LiveCallToken.ts +81 -0
- package/src/models/OutboundCallRequest.ts +8 -0
- package/src/models/OutboundNumber.ts +73 -0
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,95 @@
|
|
|
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 LiveCallParticipant
|
|
16
|
+
*/
|
|
17
|
+
export interface LiveCallParticipant {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof LiveCallParticipant
|
|
22
|
+
*/
|
|
23
|
+
identity?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof LiveCallParticipant
|
|
28
|
+
*/
|
|
29
|
+
name?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* LiveKit participant kind.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof LiveCallParticipant
|
|
34
|
+
*/
|
|
35
|
+
kind?: LiveCallParticipantKindEnum;
|
|
36
|
+
/**
|
|
37
|
+
* Interpreted role — sip→caller, agent→agent, standard→operator.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof LiveCallParticipant
|
|
40
|
+
*/
|
|
41
|
+
role?: LiveCallParticipantRoleEnum;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof LiveCallParticipant
|
|
46
|
+
*/
|
|
47
|
+
state?: LiveCallParticipantStateEnum;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Date}
|
|
51
|
+
* @memberof LiveCallParticipant
|
|
52
|
+
*/
|
|
53
|
+
joined_at?: Date | null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export declare const LiveCallParticipantKindEnum: {
|
|
59
|
+
readonly Standard: "standard";
|
|
60
|
+
readonly Sip: "sip";
|
|
61
|
+
readonly Agent: "agent";
|
|
62
|
+
readonly Ingress: "ingress";
|
|
63
|
+
readonly Egress: "egress";
|
|
64
|
+
readonly Unknown: "unknown";
|
|
65
|
+
};
|
|
66
|
+
export type LiveCallParticipantKindEnum = typeof LiveCallParticipantKindEnum[keyof typeof LiveCallParticipantKindEnum];
|
|
67
|
+
/**
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
export declare const LiveCallParticipantRoleEnum: {
|
|
71
|
+
readonly Caller: "caller";
|
|
72
|
+
readonly Agent: "agent";
|
|
73
|
+
readonly Operator: "operator";
|
|
74
|
+
readonly Other: "other";
|
|
75
|
+
};
|
|
76
|
+
export type LiveCallParticipantRoleEnum = typeof LiveCallParticipantRoleEnum[keyof typeof LiveCallParticipantRoleEnum];
|
|
77
|
+
/**
|
|
78
|
+
* @export
|
|
79
|
+
*/
|
|
80
|
+
export declare const LiveCallParticipantStateEnum: {
|
|
81
|
+
readonly Joining: "joining";
|
|
82
|
+
readonly Joined: "joined";
|
|
83
|
+
readonly Active: "active";
|
|
84
|
+
readonly Disconnected: "disconnected";
|
|
85
|
+
readonly Unknown: "unknown";
|
|
86
|
+
};
|
|
87
|
+
export type LiveCallParticipantStateEnum = typeof LiveCallParticipantStateEnum[keyof typeof LiveCallParticipantStateEnum];
|
|
88
|
+
/**
|
|
89
|
+
* Check if a given object implements the LiveCallParticipant interface.
|
|
90
|
+
*/
|
|
91
|
+
export declare function instanceOfLiveCallParticipant(value: object): value is LiveCallParticipant;
|
|
92
|
+
export declare function LiveCallParticipantFromJSON(json: any): LiveCallParticipant;
|
|
93
|
+
export declare function LiveCallParticipantFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveCallParticipant;
|
|
94
|
+
export declare function LiveCallParticipantToJSON(json: any): LiveCallParticipant;
|
|
95
|
+
export declare function LiveCallParticipantToJSONTyped(value?: LiveCallParticipant | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,89 @@
|
|
|
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.LiveCallParticipantStateEnum = exports.LiveCallParticipantRoleEnum = exports.LiveCallParticipantKindEnum = void 0;
|
|
17
|
+
exports.instanceOfLiveCallParticipant = instanceOfLiveCallParticipant;
|
|
18
|
+
exports.LiveCallParticipantFromJSON = LiveCallParticipantFromJSON;
|
|
19
|
+
exports.LiveCallParticipantFromJSONTyped = LiveCallParticipantFromJSONTyped;
|
|
20
|
+
exports.LiveCallParticipantToJSON = LiveCallParticipantToJSON;
|
|
21
|
+
exports.LiveCallParticipantToJSONTyped = LiveCallParticipantToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.LiveCallParticipantKindEnum = {
|
|
26
|
+
Standard: 'standard',
|
|
27
|
+
Sip: 'sip',
|
|
28
|
+
Agent: 'agent',
|
|
29
|
+
Ingress: 'ingress',
|
|
30
|
+
Egress: 'egress',
|
|
31
|
+
Unknown: 'unknown'
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* @export
|
|
35
|
+
*/
|
|
36
|
+
exports.LiveCallParticipantRoleEnum = {
|
|
37
|
+
Caller: 'caller',
|
|
38
|
+
Agent: 'agent',
|
|
39
|
+
Operator: 'operator',
|
|
40
|
+
Other: 'other'
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @export
|
|
44
|
+
*/
|
|
45
|
+
exports.LiveCallParticipantStateEnum = {
|
|
46
|
+
Joining: 'joining',
|
|
47
|
+
Joined: 'joined',
|
|
48
|
+
Active: 'active',
|
|
49
|
+
Disconnected: 'disconnected',
|
|
50
|
+
Unknown: 'unknown'
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the LiveCallParticipant interface.
|
|
54
|
+
*/
|
|
55
|
+
function instanceOfLiveCallParticipant(value) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
function LiveCallParticipantFromJSON(json) {
|
|
59
|
+
return LiveCallParticipantFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
function LiveCallParticipantFromJSONTyped(json, ignoreDiscriminator) {
|
|
62
|
+
if (json == null) {
|
|
63
|
+
return json;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
'identity': json['identity'] == null ? undefined : json['identity'],
|
|
67
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
68
|
+
'kind': json['kind'] == null ? undefined : json['kind'],
|
|
69
|
+
'role': json['role'] == null ? undefined : json['role'],
|
|
70
|
+
'state': json['state'] == null ? undefined : json['state'],
|
|
71
|
+
'joined_at': json['joined_at'] == null ? undefined : (new Date(json['joined_at'])),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function LiveCallParticipantToJSON(json) {
|
|
75
|
+
return LiveCallParticipantToJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
function LiveCallParticipantToJSONTyped(value, ignoreDiscriminator = false) {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
'identity': value['identity'],
|
|
83
|
+
'name': value['name'],
|
|
84
|
+
'kind': value['kind'],
|
|
85
|
+
'role': value['role'],
|
|
86
|
+
'state': value['state'],
|
|
87
|
+
'joined_at': value['joined_at'] == null ? value['joined_at'] : value['joined_at'].toISOString(),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -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 LiveCallToken
|
|
16
|
+
*/
|
|
17
|
+
export interface LiveCallToken {
|
|
18
|
+
/**
|
|
19
|
+
* LiveKit access token with talk + listen + room-admin grants.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof LiveCallToken
|
|
22
|
+
*/
|
|
23
|
+
token?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof LiveCallToken
|
|
28
|
+
*/
|
|
29
|
+
room_name?: string;
|
|
30
|
+
/**
|
|
31
|
+
* LiveKit server URL to connect to.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof LiveCallToken
|
|
34
|
+
*/
|
|
35
|
+
url?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the LiveCallToken interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfLiveCallToken(value: object): value is LiveCallToken;
|
|
41
|
+
export declare function LiveCallTokenFromJSON(json: any): LiveCallToken;
|
|
42
|
+
export declare function LiveCallTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveCallToken;
|
|
43
|
+
export declare function LiveCallTokenToJSON(json: any): LiveCallToken;
|
|
44
|
+
export declare function LiveCallTokenToJSONTyped(value?: LiveCallToken | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.instanceOfLiveCallToken = instanceOfLiveCallToken;
|
|
17
|
+
exports.LiveCallTokenFromJSON = LiveCallTokenFromJSON;
|
|
18
|
+
exports.LiveCallTokenFromJSONTyped = LiveCallTokenFromJSONTyped;
|
|
19
|
+
exports.LiveCallTokenToJSON = LiveCallTokenToJSON;
|
|
20
|
+
exports.LiveCallTokenToJSONTyped = LiveCallTokenToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the LiveCallToken interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfLiveCallToken(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function LiveCallTokenFromJSON(json) {
|
|
28
|
+
return LiveCallTokenFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function LiveCallTokenFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'token': json['token'] == null ? undefined : json['token'],
|
|
36
|
+
'room_name': json['room_name'] == null ? undefined : json['room_name'],
|
|
37
|
+
'url': json['url'] == null ? undefined : json['url'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function LiveCallTokenToJSON(json) {
|
|
41
|
+
return LiveCallTokenToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function LiveCallTokenToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'token': value['token'],
|
|
49
|
+
'room_name': value['room_name'],
|
|
50
|
+
'url': value['url'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -33,6 +33,12 @@ export interface OutboundCallRequest {
|
|
|
33
33
|
* @memberof OutboundCallRequest
|
|
34
34
|
*/
|
|
35
35
|
destination_number?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Which of the org's outbound-capable numbers to use as caller-ID (From). Omit to auto-select.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof OutboundCallRequest
|
|
40
|
+
*/
|
|
41
|
+
from_phone_number_id?: number;
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
44
|
* Check if a given object implements the OutboundCallRequest interface.
|
|
@@ -37,6 +37,7 @@ function OutboundCallRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
37
|
'voice_agent_id': json['voice_agent_id'],
|
|
38
38
|
'phonebook_entry_id': json['phonebook_entry_id'] == null ? undefined : json['phonebook_entry_id'],
|
|
39
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'],
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
43
|
function OutboundCallRequestToJSON(json) {
|
|
@@ -50,5 +51,6 @@ function OutboundCallRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
50
51
|
'voice_agent_id': value['voice_agent_id'],
|
|
51
52
|
'phonebook_entry_id': value['phonebook_entry_id'],
|
|
52
53
|
'destination_number': value['destination_number'],
|
|
54
|
+
'from_phone_number_id': value['from_phone_number_id'],
|
|
53
55
|
};
|
|
54
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
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -48,6 +48,9 @@ export * from './InvitationAccept';
|
|
|
48
48
|
export * from './InvitationCreate';
|
|
49
49
|
export * from './InvitationResponse';
|
|
50
50
|
export * from './LifecycleResponse';
|
|
51
|
+
export * from './LiveCall';
|
|
52
|
+
export * from './LiveCallParticipant';
|
|
53
|
+
export * from './LiveCallToken';
|
|
51
54
|
export * from './LlmAgent';
|
|
52
55
|
export * from './LlmAgentInput';
|
|
53
56
|
export * from './LlmAgentUpdateInput';
|
|
@@ -72,6 +75,7 @@ export * from './OrganizationsOrganizationIdVoiceAgentsBasicGet200ResponseInner'
|
|
|
72
75
|
export * from './OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest';
|
|
73
76
|
export * from './OutboundCall';
|
|
74
77
|
export * from './OutboundCallRequest';
|
|
78
|
+
export * from './OutboundNumber';
|
|
75
79
|
export * from './PauseSubscriptionRequest';
|
|
76
80
|
export * from './PhoneNumber';
|
|
77
81
|
export * from './PhoneNumberCreate';
|
package/dist/models/index.js
CHANGED
|
@@ -66,6 +66,9 @@ __exportStar(require("./InvitationAccept"), exports);
|
|
|
66
66
|
__exportStar(require("./InvitationCreate"), exports);
|
|
67
67
|
__exportStar(require("./InvitationResponse"), exports);
|
|
68
68
|
__exportStar(require("./LifecycleResponse"), exports);
|
|
69
|
+
__exportStar(require("./LiveCall"), exports);
|
|
70
|
+
__exportStar(require("./LiveCallParticipant"), exports);
|
|
71
|
+
__exportStar(require("./LiveCallToken"), exports);
|
|
69
72
|
__exportStar(require("./LlmAgent"), exports);
|
|
70
73
|
__exportStar(require("./LlmAgentInput"), exports);
|
|
71
74
|
__exportStar(require("./LlmAgentUpdateInput"), exports);
|
|
@@ -90,6 +93,7 @@ __exportStar(require("./OrganizationsOrganizationIdVoiceAgentsBasicGet200Respons
|
|
|
90
93
|
__exportStar(require("./OrganizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPostRequest"), exports);
|
|
91
94
|
__exportStar(require("./OutboundCall"), exports);
|
|
92
95
|
__exportStar(require("./OutboundCallRequest"), exports);
|
|
96
|
+
__exportStar(require("./OutboundNumber"), exports);
|
|
93
97
|
__exportStar(require("./PauseSubscriptionRequest"), exports);
|
|
94
98
|
__exportStar(require("./PhoneNumber"), exports);
|
|
95
99
|
__exportStar(require("./PhoneNumberCreate"), exports);
|
package/package.json
CHANGED
package/src/api-client.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { AdminSubscriptionsApi } from "./apis/AdminSubscriptionsApi";
|
|
|
27
27
|
import { AdminPhoneNumbersApi } from "./apis/AdminPhoneNumbersApi";
|
|
28
28
|
import { AdminSIPApi } from "./apis/AdminSIPApi";
|
|
29
29
|
import { OutboundCallsApi } from "./apis/OutboundCallsApi";
|
|
30
|
+
import { LiveCallsApi } from "./apis/LiveCallsApi";
|
|
30
31
|
import { VoiceUsageApi } from "./apis/VoiceUsageApi";
|
|
31
32
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
32
33
|
import { ToolsApi } from "./apis/ToolsApi";
|
|
@@ -241,6 +242,11 @@ export class Api {
|
|
|
241
242
|
};
|
|
242
243
|
public readonly outboundCalls: {
|
|
243
244
|
create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
|
|
245
|
+
listNumbers: (organizationId: string, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsNumbersGet"]>;
|
|
246
|
+
};
|
|
247
|
+
public readonly liveCalls: {
|
|
248
|
+
list: (organizationId: string, options?: RequestInit) => ReturnType<LiveCallsApi["organizationsOrganizationIdLiveCallsGet"]>;
|
|
249
|
+
createToken: (organizationId: string, roomName: string, options?: RequestInit) => ReturnType<LiveCallsApi["organizationsOrganizationIdLiveCallsRoomNameTokenPost"]>;
|
|
244
250
|
};
|
|
245
251
|
public readonly voiceUsage: {
|
|
246
252
|
report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
|
|
@@ -304,6 +310,7 @@ export class Api {
|
|
|
304
310
|
private readonly adminPhoneNumbersApi: AdminPhoneNumbersApi;
|
|
305
311
|
private readonly adminSipApi: AdminSIPApi;
|
|
306
312
|
private readonly outboundCallsApi: OutboundCallsApi;
|
|
313
|
+
private readonly liveCallsApi: LiveCallsApi;
|
|
307
314
|
private readonly voiceUsageApi: VoiceUsageApi;
|
|
308
315
|
private readonly embeddingProvidersApi: EmbeddingProvidersApi;
|
|
309
316
|
private readonly llmProvidersApi: LLMProvidersApi;
|
|
@@ -351,6 +358,7 @@ export class Api {
|
|
|
351
358
|
this.adminPhoneNumbersApi = new AdminPhoneNumbersApi(configuration);
|
|
352
359
|
this.adminSipApi = new AdminSIPApi(configuration);
|
|
353
360
|
this.outboundCallsApi = new OutboundCallsApi(configuration);
|
|
361
|
+
this.liveCallsApi = new LiveCallsApi(configuration);
|
|
354
362
|
this.voiceUsageApi = new VoiceUsageApi(configuration);
|
|
355
363
|
this.embeddingProvidersApi = new EmbeddingProvidersApi(configuration);
|
|
356
364
|
this.llmProvidersApi = new LLMProvidersApi(configuration);
|
|
@@ -534,6 +542,12 @@ export class Api {
|
|
|
534
542
|
|
|
535
543
|
this.outboundCalls = {
|
|
536
544
|
create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
|
|
545
|
+
listNumbers: (organizationId, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsNumbersGet({ organizationId }, options),
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
this.liveCalls = {
|
|
549
|
+
list: (organizationId, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsGet({ organizationId }, options),
|
|
550
|
+
createToken: (organizationId, roomName, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsRoomNameTokenPost({ organizationId, roomName }, options),
|
|
537
551
|
};
|
|
538
552
|
|
|
539
553
|
this.voiceUsage = {
|
|
@@ -0,0 +1,144 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
LiveCall,
|
|
19
|
+
LiveCallToken,
|
|
20
|
+
} from '../models/index';
|
|
21
|
+
import {
|
|
22
|
+
LiveCallFromJSON,
|
|
23
|
+
LiveCallToJSON,
|
|
24
|
+
LiveCallTokenFromJSON,
|
|
25
|
+
LiveCallTokenToJSON,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
|
|
28
|
+
export interface OrganizationsOrganizationIdLiveCallsGetRequest {
|
|
29
|
+
organizationId: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface OrganizationsOrganizationIdLiveCallsRoomNameTokenPostRequest {
|
|
33
|
+
organizationId: string;
|
|
34
|
+
roomName: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export class LiveCallsApi extends runtime.BaseAPI {
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Returns the organization\'s live calls, each with its participants (caller, agent, operators). Rooms are attributed to the org by their metadata or by matching the org\'s own agents/trunks (fail-closed).
|
|
44
|
+
* List ongoing calls (live LiveKit rooms) for the organization (app-admin only)
|
|
45
|
+
*/
|
|
46
|
+
async organizationsOrganizationIdLiveCallsGetRaw(requestParameters: OrganizationsOrganizationIdLiveCallsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<LiveCall>>> {
|
|
47
|
+
if (requestParameters['organizationId'] == null) {
|
|
48
|
+
throw new runtime.RequiredError(
|
|
49
|
+
'organizationId',
|
|
50
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdLiveCallsGet().'
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const queryParameters: any = {};
|
|
55
|
+
|
|
56
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
57
|
+
|
|
58
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
59
|
+
const token = this.configuration.accessToken;
|
|
60
|
+
const tokenString = await token("bearerAuth", []);
|
|
61
|
+
|
|
62
|
+
if (tokenString) {
|
|
63
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
let urlPath = `/organizations/{organizationId}/live-calls`;
|
|
68
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
69
|
+
|
|
70
|
+
const response = await this.request({
|
|
71
|
+
path: urlPath,
|
|
72
|
+
method: 'GET',
|
|
73
|
+
headers: headerParameters,
|
|
74
|
+
query: queryParameters,
|
|
75
|
+
}, initOverrides);
|
|
76
|
+
|
|
77
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(LiveCallFromJSON));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Returns the organization\'s live calls, each with its participants (caller, agent, operators). Rooms are attributed to the org by their metadata or by matching the org\'s own agents/trunks (fail-closed).
|
|
82
|
+
* List ongoing calls (live LiveKit rooms) for the organization (app-admin only)
|
|
83
|
+
*/
|
|
84
|
+
async organizationsOrganizationIdLiveCallsGet(requestParameters: OrganizationsOrganizationIdLiveCallsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LiveCall>> {
|
|
85
|
+
const response = await this.organizationsOrganizationIdLiveCallsGetRaw(requestParameters, initOverrides);
|
|
86
|
+
return await response.value();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Returns a LiveKit access token with talk + listen + room-admin grants so an operator can join the call. The room must belong to the organization.
|
|
91
|
+
* Mint an admin access token to join a live call (app-admin only)
|
|
92
|
+
*/
|
|
93
|
+
async organizationsOrganizationIdLiveCallsRoomNameTokenPostRaw(requestParameters: OrganizationsOrganizationIdLiveCallsRoomNameTokenPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveCallToken>> {
|
|
94
|
+
if (requestParameters['organizationId'] == null) {
|
|
95
|
+
throw new runtime.RequiredError(
|
|
96
|
+
'organizationId',
|
|
97
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdLiveCallsRoomNameTokenPost().'
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (requestParameters['roomName'] == null) {
|
|
102
|
+
throw new runtime.RequiredError(
|
|
103
|
+
'roomName',
|
|
104
|
+
'Required parameter "roomName" was null or undefined when calling organizationsOrganizationIdLiveCallsRoomNameTokenPost().'
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const queryParameters: any = {};
|
|
109
|
+
|
|
110
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
111
|
+
|
|
112
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
113
|
+
const token = this.configuration.accessToken;
|
|
114
|
+
const tokenString = await token("bearerAuth", []);
|
|
115
|
+
|
|
116
|
+
if (tokenString) {
|
|
117
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
let urlPath = `/organizations/{organizationId}/live-calls/{roomName}/token`;
|
|
122
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
123
|
+
urlPath = urlPath.replace(`{${"roomName"}}`, encodeURIComponent(String(requestParameters['roomName'])));
|
|
124
|
+
|
|
125
|
+
const response = await this.request({
|
|
126
|
+
path: urlPath,
|
|
127
|
+
method: 'POST',
|
|
128
|
+
headers: headerParameters,
|
|
129
|
+
query: queryParameters,
|
|
130
|
+
}, initOverrides);
|
|
131
|
+
|
|
132
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LiveCallTokenFromJSON(jsonValue));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Returns a LiveKit access token with talk + listen + room-admin grants so an operator can join the call. The room must belong to the organization.
|
|
137
|
+
* Mint an admin access token to join a live call (app-admin only)
|
|
138
|
+
*/
|
|
139
|
+
async organizationsOrganizationIdLiveCallsRoomNameTokenPost(requestParameters: OrganizationsOrganizationIdLiveCallsRoomNameTokenPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveCallToken> {
|
|
140
|
+
const response = await this.organizationsOrganizationIdLiveCallsRoomNameTokenPostRaw(requestParameters, initOverrides);
|
|
141
|
+
return await response.value();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
}
|