@l7mp/tivadar-ai-api-sdk 0.2.17 → 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 +6 -0
- package/dist/api-client.js +6 -0
- package/dist/apis/LiveCallsApi.d.ts +45 -0
- package/dist/apis/LiveCallsApi.js +115 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +6 -0
- package/dist/esm/api-client.js +6 -0
- package/dist/esm/apis/LiveCallsApi.d.ts +45 -0
- package/dist/esm/apis/LiveCallsApi.js +111 -0
- 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/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -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/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/api-client.ts +12 -0
- package/src/apis/LiveCallsApi.ts +144 -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/index.ts +3 -0
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';
|
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);
|
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";
|
|
@@ -243,6 +244,10 @@ export class Api {
|
|
|
243
244
|
create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
|
|
244
245
|
listNumbers: (organizationId: string, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsNumbersGet"]>;
|
|
245
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"]>;
|
|
250
|
+
};
|
|
246
251
|
public readonly voiceUsage: {
|
|
247
252
|
report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
|
|
248
253
|
};
|
|
@@ -305,6 +310,7 @@ export class Api {
|
|
|
305
310
|
private readonly adminPhoneNumbersApi: AdminPhoneNumbersApi;
|
|
306
311
|
private readonly adminSipApi: AdminSIPApi;
|
|
307
312
|
private readonly outboundCallsApi: OutboundCallsApi;
|
|
313
|
+
private readonly liveCallsApi: LiveCallsApi;
|
|
308
314
|
private readonly voiceUsageApi: VoiceUsageApi;
|
|
309
315
|
private readonly embeddingProvidersApi: EmbeddingProvidersApi;
|
|
310
316
|
private readonly llmProvidersApi: LLMProvidersApi;
|
|
@@ -352,6 +358,7 @@ export class Api {
|
|
|
352
358
|
this.adminPhoneNumbersApi = new AdminPhoneNumbersApi(configuration);
|
|
353
359
|
this.adminSipApi = new AdminSIPApi(configuration);
|
|
354
360
|
this.outboundCallsApi = new OutboundCallsApi(configuration);
|
|
361
|
+
this.liveCallsApi = new LiveCallsApi(configuration);
|
|
355
362
|
this.voiceUsageApi = new VoiceUsageApi(configuration);
|
|
356
363
|
this.embeddingProvidersApi = new EmbeddingProvidersApi(configuration);
|
|
357
364
|
this.llmProvidersApi = new LLMProvidersApi(configuration);
|
|
@@ -538,6 +545,11 @@ export class Api {
|
|
|
538
545
|
listNumbers: (organizationId, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsNumbersGet({ organizationId }, options),
|
|
539
546
|
};
|
|
540
547
|
|
|
548
|
+
this.liveCalls = {
|
|
549
|
+
list: (organizationId, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsGet({ organizationId }, options),
|
|
550
|
+
createToken: (organizationId, roomName, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsRoomNameTokenPost({ organizationId, roomName }, options),
|
|
551
|
+
};
|
|
552
|
+
|
|
541
553
|
this.voiceUsage = {
|
|
542
554
|
report: (voiceUsageReportRequest, options) => this.voiceUsageApi.voiceUsageReportPost({ voiceUsageReportRequest }, options),
|
|
543
555
|
};
|
|
@@ -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
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './EmbeddingProvidersApi';
|
|
|
11
11
|
export * from './HistoryApi';
|
|
12
12
|
export * from './InvitationsApi';
|
|
13
13
|
export * from './LLMProvidersApi';
|
|
14
|
+
export * from './LiveCallsApi';
|
|
14
15
|
export * from './MembersApi';
|
|
15
16
|
export * from './NotificationsApi';
|
|
16
17
|
export * from './OrganizationsApi';
|
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
import type { LiveCallParticipant } from './LiveCallParticipant';
|
|
17
|
+
import {
|
|
18
|
+
LiveCallParticipantFromJSON,
|
|
19
|
+
LiveCallParticipantFromJSONTyped,
|
|
20
|
+
LiveCallParticipantToJSON,
|
|
21
|
+
LiveCallParticipantToJSONTyped,
|
|
22
|
+
} from './LiveCallParticipant';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface LiveCall
|
|
28
|
+
*/
|
|
29
|
+
export interface LiveCall {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof LiveCall
|
|
34
|
+
*/
|
|
35
|
+
room_name?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof LiveCall
|
|
40
|
+
*/
|
|
41
|
+
room_sid?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof LiveCall
|
|
46
|
+
*/
|
|
47
|
+
started_at?: Date | null;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof LiveCall
|
|
52
|
+
*/
|
|
53
|
+
num_participants?: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Array<LiveCallParticipant>}
|
|
57
|
+
* @memberof LiveCall
|
|
58
|
+
*/
|
|
59
|
+
participants?: Array<LiveCallParticipant>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the LiveCall interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfLiveCall(value: object): value is LiveCall {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function LiveCallFromJSON(json: any): LiveCall {
|
|
70
|
+
return LiveCallFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function LiveCallFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveCall {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'room_name': json['room_name'] == null ? undefined : json['room_name'],
|
|
80
|
+
'room_sid': json['room_sid'] == null ? undefined : json['room_sid'],
|
|
81
|
+
'started_at': json['started_at'] == null ? undefined : (new Date(json['started_at'])),
|
|
82
|
+
'num_participants': json['num_participants'] == null ? undefined : json['num_participants'],
|
|
83
|
+
'participants': json['participants'] == null ? undefined : ((json['participants'] as Array<any>).map(LiveCallParticipantFromJSON)),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function LiveCallToJSON(json: any): LiveCall {
|
|
88
|
+
return LiveCallToJSONTyped(json, false);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function LiveCallToJSONTyped(value?: LiveCall | null, ignoreDiscriminator: boolean = false): any {
|
|
92
|
+
if (value == null) {
|
|
93
|
+
return value;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'room_name': value['room_name'],
|
|
99
|
+
'room_sid': value['room_sid'],
|
|
100
|
+
'started_at': value['started_at'] == null ? value['started_at'] : value['started_at'].toISOString(),
|
|
101
|
+
'num_participants': value['num_participants'],
|
|
102
|
+
'participants': value['participants'] == null ? undefined : ((value['participants'] as Array<any>).map(LiveCallParticipantToJSON)),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
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 LiveCallParticipant
|
|
20
|
+
*/
|
|
21
|
+
export interface LiveCallParticipant {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof LiveCallParticipant
|
|
26
|
+
*/
|
|
27
|
+
identity?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof LiveCallParticipant
|
|
32
|
+
*/
|
|
33
|
+
name?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* LiveKit participant kind.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof LiveCallParticipant
|
|
38
|
+
*/
|
|
39
|
+
kind?: LiveCallParticipantKindEnum;
|
|
40
|
+
/**
|
|
41
|
+
* Interpreted role — sip→caller, agent→agent, standard→operator.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof LiveCallParticipant
|
|
44
|
+
*/
|
|
45
|
+
role?: LiveCallParticipantRoleEnum;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof LiveCallParticipant
|
|
50
|
+
*/
|
|
51
|
+
state?: LiveCallParticipantStateEnum;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof LiveCallParticipant
|
|
56
|
+
*/
|
|
57
|
+
joined_at?: Date | null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export const LiveCallParticipantKindEnum = {
|
|
65
|
+
Standard: 'standard',
|
|
66
|
+
Sip: 'sip',
|
|
67
|
+
Agent: 'agent',
|
|
68
|
+
Ingress: 'ingress',
|
|
69
|
+
Egress: 'egress',
|
|
70
|
+
Unknown: 'unknown'
|
|
71
|
+
} as const;
|
|
72
|
+
export type LiveCallParticipantKindEnum = typeof LiveCallParticipantKindEnum[keyof typeof LiveCallParticipantKindEnum];
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @export
|
|
76
|
+
*/
|
|
77
|
+
export const LiveCallParticipantRoleEnum = {
|
|
78
|
+
Caller: 'caller',
|
|
79
|
+
Agent: 'agent',
|
|
80
|
+
Operator: 'operator',
|
|
81
|
+
Other: 'other'
|
|
82
|
+
} as const;
|
|
83
|
+
export type LiveCallParticipantRoleEnum = typeof LiveCallParticipantRoleEnum[keyof typeof LiveCallParticipantRoleEnum];
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @export
|
|
87
|
+
*/
|
|
88
|
+
export const LiveCallParticipantStateEnum = {
|
|
89
|
+
Joining: 'joining',
|
|
90
|
+
Joined: 'joined',
|
|
91
|
+
Active: 'active',
|
|
92
|
+
Disconnected: 'disconnected',
|
|
93
|
+
Unknown: 'unknown'
|
|
94
|
+
} as const;
|
|
95
|
+
export type LiveCallParticipantStateEnum = typeof LiveCallParticipantStateEnum[keyof typeof LiveCallParticipantStateEnum];
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Check if a given object implements the LiveCallParticipant interface.
|
|
100
|
+
*/
|
|
101
|
+
export function instanceOfLiveCallParticipant(value: object): value is LiveCallParticipant {
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function LiveCallParticipantFromJSON(json: any): LiveCallParticipant {
|
|
106
|
+
return LiveCallParticipantFromJSONTyped(json, false);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function LiveCallParticipantFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveCallParticipant {
|
|
110
|
+
if (json == null) {
|
|
111
|
+
return json;
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
|
|
115
|
+
'identity': json['identity'] == null ? undefined : json['identity'],
|
|
116
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
117
|
+
'kind': json['kind'] == null ? undefined : json['kind'],
|
|
118
|
+
'role': json['role'] == null ? undefined : json['role'],
|
|
119
|
+
'state': json['state'] == null ? undefined : json['state'],
|
|
120
|
+
'joined_at': json['joined_at'] == null ? undefined : (new Date(json['joined_at'])),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function LiveCallParticipantToJSON(json: any): LiveCallParticipant {
|
|
125
|
+
return LiveCallParticipantToJSONTyped(json, false);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function LiveCallParticipantToJSONTyped(value?: LiveCallParticipant | null, ignoreDiscriminator: boolean = false): any {
|
|
129
|
+
if (value == null) {
|
|
130
|
+
return value;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
|
|
135
|
+
'identity': value['identity'],
|
|
136
|
+
'name': value['name'],
|
|
137
|
+
'kind': value['kind'],
|
|
138
|
+
'role': value['role'],
|
|
139
|
+
'state': value['state'],
|
|
140
|
+
'joined_at': value['joined_at'] == null ? value['joined_at'] : value['joined_at'].toISOString(),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
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 LiveCallToken
|
|
20
|
+
*/
|
|
21
|
+
export interface LiveCallToken {
|
|
22
|
+
/**
|
|
23
|
+
* LiveKit access token with talk + listen + room-admin grants.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof LiveCallToken
|
|
26
|
+
*/
|
|
27
|
+
token?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof LiveCallToken
|
|
32
|
+
*/
|
|
33
|
+
room_name?: string;
|
|
34
|
+
/**
|
|
35
|
+
* LiveKit server URL to connect to.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof LiveCallToken
|
|
38
|
+
*/
|
|
39
|
+
url?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the LiveCallToken interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfLiveCallToken(value: object): value is LiveCallToken {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function LiveCallTokenFromJSON(json: any): LiveCallToken {
|
|
50
|
+
return LiveCallTokenFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function LiveCallTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveCallToken {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'token': json['token'] == null ? undefined : json['token'],
|
|
60
|
+
'room_name': json['room_name'] == null ? undefined : json['room_name'],
|
|
61
|
+
'url': json['url'] == null ? undefined : json['url'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function LiveCallTokenToJSON(json: any): LiveCallToken {
|
|
66
|
+
return LiveCallTokenToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function LiveCallTokenToJSONTyped(value?: LiveCallToken | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'token': value['token'],
|
|
77
|
+
'room_name': value['room_name'],
|
|
78
|
+
'url': value['url'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -50,6 +50,9 @@ export * from './InvitationAccept';
|
|
|
50
50
|
export * from './InvitationCreate';
|
|
51
51
|
export * from './InvitationResponse';
|
|
52
52
|
export * from './LifecycleResponse';
|
|
53
|
+
export * from './LiveCall';
|
|
54
|
+
export * from './LiveCallParticipant';
|
|
55
|
+
export * from './LiveCallToken';
|
|
53
56
|
export * from './LlmAgent';
|
|
54
57
|
export * from './LlmAgentInput';
|
|
55
58
|
export * from './LlmAgentUpdateInput';
|