@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/api-client.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { AdminSubscriptionsApi } from "./apis/AdminSubscriptionsApi";
|
|
|
21
21
|
import { AdminPhoneNumbersApi } from "./apis/AdminPhoneNumbersApi";
|
|
22
22
|
import { AdminSIPApi } from "./apis/AdminSIPApi";
|
|
23
23
|
import { OutboundCallsApi } from "./apis/OutboundCallsApi";
|
|
24
|
+
import { LiveCallsApi } from "./apis/LiveCallsApi";
|
|
24
25
|
import { VoiceUsageApi } from "./apis/VoiceUsageApi";
|
|
25
26
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
26
27
|
import { ToolsApi } from "./apis/ToolsApi";
|
|
@@ -218,6 +219,10 @@ export declare class Api {
|
|
|
218
219
|
create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
|
|
219
220
|
listNumbers: (organizationId: string, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsNumbersGet"]>;
|
|
220
221
|
};
|
|
222
|
+
readonly liveCalls: {
|
|
223
|
+
list: (organizationId: string, options?: RequestInit) => ReturnType<LiveCallsApi["organizationsOrganizationIdLiveCallsGet"]>;
|
|
224
|
+
createToken: (organizationId: string, roomName: string, options?: RequestInit) => ReturnType<LiveCallsApi["organizationsOrganizationIdLiveCallsRoomNameTokenPost"]>;
|
|
225
|
+
};
|
|
221
226
|
readonly voiceUsage: {
|
|
222
227
|
report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
|
|
223
228
|
};
|
|
@@ -288,6 +293,7 @@ export declare class Api {
|
|
|
288
293
|
private readonly adminPhoneNumbersApi;
|
|
289
294
|
private readonly adminSipApi;
|
|
290
295
|
private readonly outboundCallsApi;
|
|
296
|
+
private readonly liveCallsApi;
|
|
291
297
|
private readonly voiceUsageApi;
|
|
292
298
|
private readonly embeddingProvidersApi;
|
|
293
299
|
private readonly llmProvidersApi;
|
package/dist/api-client.js
CHANGED
|
@@ -33,6 +33,7 @@ const AdminSubscriptionsApi_1 = require("./apis/AdminSubscriptionsApi");
|
|
|
33
33
|
const AdminPhoneNumbersApi_1 = require("./apis/AdminPhoneNumbersApi");
|
|
34
34
|
const AdminSIPApi_1 = require("./apis/AdminSIPApi");
|
|
35
35
|
const OutboundCallsApi_1 = require("./apis/OutboundCallsApi");
|
|
36
|
+
const LiveCallsApi_1 = require("./apis/LiveCallsApi");
|
|
36
37
|
const VoiceUsageApi_1 = require("./apis/VoiceUsageApi");
|
|
37
38
|
const VoiceAgentsApi_1 = require("./apis/VoiceAgentsApi");
|
|
38
39
|
const ToolsApi_1 = require("./apis/ToolsApi");
|
|
@@ -81,6 +82,7 @@ class Api {
|
|
|
81
82
|
this.adminPhoneNumbersApi = new AdminPhoneNumbersApi_1.AdminPhoneNumbersApi(configuration);
|
|
82
83
|
this.adminSipApi = new AdminSIPApi_1.AdminSIPApi(configuration);
|
|
83
84
|
this.outboundCallsApi = new OutboundCallsApi_1.OutboundCallsApi(configuration);
|
|
85
|
+
this.liveCallsApi = new LiveCallsApi_1.LiveCallsApi(configuration);
|
|
84
86
|
this.voiceUsageApi = new VoiceUsageApi_1.VoiceUsageApi(configuration);
|
|
85
87
|
this.embeddingProvidersApi = new EmbeddingProvidersApi_1.EmbeddingProvidersApi(configuration);
|
|
86
88
|
this.llmProvidersApi = new LLMProvidersApi_1.LLMProvidersApi(configuration);
|
|
@@ -247,6 +249,10 @@ class Api {
|
|
|
247
249
|
create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
|
|
248
250
|
listNumbers: (organizationId, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsNumbersGet({ organizationId }, options),
|
|
249
251
|
};
|
|
252
|
+
this.liveCalls = {
|
|
253
|
+
list: (organizationId, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsGet({ organizationId }, options),
|
|
254
|
+
createToken: (organizationId, roomName, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsRoomNameTokenPost({ organizationId, roomName }, options),
|
|
255
|
+
};
|
|
250
256
|
this.voiceUsage = {
|
|
251
257
|
report: (voiceUsageReportRequest, options) => this.voiceUsageApi.voiceUsageReportPost({ voiceUsageReportRequest }, options),
|
|
252
258
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { LiveCall, LiveCallToken } from '../models/index';
|
|
14
|
+
export interface OrganizationsOrganizationIdLiveCallsGetRequest {
|
|
15
|
+
organizationId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface OrganizationsOrganizationIdLiveCallsRoomNameTokenPostRequest {
|
|
18
|
+
organizationId: string;
|
|
19
|
+
roomName: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export declare class LiveCallsApi extends runtime.BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* 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).
|
|
27
|
+
* List ongoing calls (live LiveKit rooms) for the organization (app-admin only)
|
|
28
|
+
*/
|
|
29
|
+
organizationsOrganizationIdLiveCallsGetRaw(requestParameters: OrganizationsOrganizationIdLiveCallsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<LiveCall>>>;
|
|
30
|
+
/**
|
|
31
|
+
* 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).
|
|
32
|
+
* List ongoing calls (live LiveKit rooms) for the organization (app-admin only)
|
|
33
|
+
*/
|
|
34
|
+
organizationsOrganizationIdLiveCallsGet(requestParameters: OrganizationsOrganizationIdLiveCallsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LiveCall>>;
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
* Mint an admin access token to join a live call (app-admin only)
|
|
38
|
+
*/
|
|
39
|
+
organizationsOrganizationIdLiveCallsRoomNameTokenPostRaw(requestParameters: OrganizationsOrganizationIdLiveCallsRoomNameTokenPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveCallToken>>;
|
|
40
|
+
/**
|
|
41
|
+
* 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.
|
|
42
|
+
* Mint an admin access token to join a live call (app-admin only)
|
|
43
|
+
*/
|
|
44
|
+
organizationsOrganizationIdLiveCallsRoomNameTokenPost(requestParameters: OrganizationsOrganizationIdLiveCallsRoomNameTokenPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveCallToken>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.LiveCallsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class LiveCallsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* 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).
|
|
34
|
+
* List ongoing calls (live LiveKit rooms) for the organization (app-admin only)
|
|
35
|
+
*/
|
|
36
|
+
organizationsOrganizationIdLiveCallsGetRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['organizationId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdLiveCallsGet().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
44
|
+
const token = this.configuration.accessToken;
|
|
45
|
+
const tokenString = yield token("bearerAuth", []);
|
|
46
|
+
if (tokenString) {
|
|
47
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
let urlPath = `/organizations/{organizationId}/live-calls`;
|
|
51
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
52
|
+
const response = yield this.request({
|
|
53
|
+
path: urlPath,
|
|
54
|
+
method: 'GET',
|
|
55
|
+
headers: headerParameters,
|
|
56
|
+
query: queryParameters,
|
|
57
|
+
}, initOverrides);
|
|
58
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.LiveCallFromJSON));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 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).
|
|
63
|
+
* List ongoing calls (live LiveKit rooms) for the organization (app-admin only)
|
|
64
|
+
*/
|
|
65
|
+
organizationsOrganizationIdLiveCallsGet(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const response = yield this.organizationsOrganizationIdLiveCallsGetRaw(requestParameters, initOverrides);
|
|
68
|
+
return yield response.value();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 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.
|
|
73
|
+
* Mint an admin access token to join a live call (app-admin only)
|
|
74
|
+
*/
|
|
75
|
+
organizationsOrganizationIdLiveCallsRoomNameTokenPostRaw(requestParameters, initOverrides) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
if (requestParameters['organizationId'] == null) {
|
|
78
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdLiveCallsRoomNameTokenPost().');
|
|
79
|
+
}
|
|
80
|
+
if (requestParameters['roomName'] == null) {
|
|
81
|
+
throw new runtime.RequiredError('roomName', 'Required parameter "roomName" was null or undefined when calling organizationsOrganizationIdLiveCallsRoomNameTokenPost().');
|
|
82
|
+
}
|
|
83
|
+
const queryParameters = {};
|
|
84
|
+
const headerParameters = {};
|
|
85
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
86
|
+
const token = this.configuration.accessToken;
|
|
87
|
+
const tokenString = yield token("bearerAuth", []);
|
|
88
|
+
if (tokenString) {
|
|
89
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
let urlPath = `/organizations/{organizationId}/live-calls/{roomName}/token`;
|
|
93
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
94
|
+
urlPath = urlPath.replace(`{${"roomName"}}`, encodeURIComponent(String(requestParameters['roomName'])));
|
|
95
|
+
const response = yield this.request({
|
|
96
|
+
path: urlPath,
|
|
97
|
+
method: 'POST',
|
|
98
|
+
headers: headerParameters,
|
|
99
|
+
query: queryParameters,
|
|
100
|
+
}, initOverrides);
|
|
101
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.LiveCallTokenFromJSON)(jsonValue));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* 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.
|
|
106
|
+
* Mint an admin access token to join a live call (app-admin only)
|
|
107
|
+
*/
|
|
108
|
+
organizationsOrganizationIdLiveCallsRoomNameTokenPost(requestParameters, initOverrides) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const response = yield this.organizationsOrganizationIdLiveCallsRoomNameTokenPostRaw(requestParameters, initOverrides);
|
|
111
|
+
return yield response.value();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.LiveCallsApi = LiveCallsApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './EmbeddingProvidersApi';
|
|
|
9
9
|
export * from './HistoryApi';
|
|
10
10
|
export * from './InvitationsApi';
|
|
11
11
|
export * from './LLMProvidersApi';
|
|
12
|
+
export * from './LiveCallsApi';
|
|
12
13
|
export * from './MembersApi';
|
|
13
14
|
export * from './NotificationsApi';
|
|
14
15
|
export * from './OrganizationsApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./EmbeddingProvidersApi"), exports);
|
|
|
27
27
|
__exportStar(require("./HistoryApi"), exports);
|
|
28
28
|
__exportStar(require("./InvitationsApi"), exports);
|
|
29
29
|
__exportStar(require("./LLMProvidersApi"), exports);
|
|
30
|
+
__exportStar(require("./LiveCallsApi"), exports);
|
|
30
31
|
__exportStar(require("./MembersApi"), exports);
|
|
31
32
|
__exportStar(require("./NotificationsApi"), exports);
|
|
32
33
|
__exportStar(require("./OrganizationsApi"), exports);
|
package/dist/esm/api-client.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { AdminSubscriptionsApi } from "./apis/AdminSubscriptionsApi";
|
|
|
21
21
|
import { AdminPhoneNumbersApi } from "./apis/AdminPhoneNumbersApi";
|
|
22
22
|
import { AdminSIPApi } from "./apis/AdminSIPApi";
|
|
23
23
|
import { OutboundCallsApi } from "./apis/OutboundCallsApi";
|
|
24
|
+
import { LiveCallsApi } from "./apis/LiveCallsApi";
|
|
24
25
|
import { VoiceUsageApi } from "./apis/VoiceUsageApi";
|
|
25
26
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
26
27
|
import { ToolsApi } from "./apis/ToolsApi";
|
|
@@ -218,6 +219,10 @@ export declare class Api {
|
|
|
218
219
|
create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
|
|
219
220
|
listNumbers: (organizationId: string, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsNumbersGet"]>;
|
|
220
221
|
};
|
|
222
|
+
readonly liveCalls: {
|
|
223
|
+
list: (organizationId: string, options?: RequestInit) => ReturnType<LiveCallsApi["organizationsOrganizationIdLiveCallsGet"]>;
|
|
224
|
+
createToken: (organizationId: string, roomName: string, options?: RequestInit) => ReturnType<LiveCallsApi["organizationsOrganizationIdLiveCallsRoomNameTokenPost"]>;
|
|
225
|
+
};
|
|
221
226
|
readonly voiceUsage: {
|
|
222
227
|
report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
|
|
223
228
|
};
|
|
@@ -288,6 +293,7 @@ export declare class Api {
|
|
|
288
293
|
private readonly adminPhoneNumbersApi;
|
|
289
294
|
private readonly adminSipApi;
|
|
290
295
|
private readonly outboundCallsApi;
|
|
296
|
+
private readonly liveCallsApi;
|
|
291
297
|
private readonly voiceUsageApi;
|
|
292
298
|
private readonly embeddingProvidersApi;
|
|
293
299
|
private readonly llmProvidersApi;
|
package/dist/esm/api-client.js
CHANGED
|
@@ -30,6 +30,7 @@ import { AdminSubscriptionsApi } from "./apis/AdminSubscriptionsApi";
|
|
|
30
30
|
import { AdminPhoneNumbersApi } from "./apis/AdminPhoneNumbersApi";
|
|
31
31
|
import { AdminSIPApi } from "./apis/AdminSIPApi";
|
|
32
32
|
import { OutboundCallsApi } from "./apis/OutboundCallsApi";
|
|
33
|
+
import { LiveCallsApi } from "./apis/LiveCallsApi";
|
|
33
34
|
import { VoiceUsageApi } from "./apis/VoiceUsageApi";
|
|
34
35
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
35
36
|
import { ToolsApi } from "./apis/ToolsApi";
|
|
@@ -78,6 +79,7 @@ export class Api {
|
|
|
78
79
|
this.adminPhoneNumbersApi = new AdminPhoneNumbersApi(configuration);
|
|
79
80
|
this.adminSipApi = new AdminSIPApi(configuration);
|
|
80
81
|
this.outboundCallsApi = new OutboundCallsApi(configuration);
|
|
82
|
+
this.liveCallsApi = new LiveCallsApi(configuration);
|
|
81
83
|
this.voiceUsageApi = new VoiceUsageApi(configuration);
|
|
82
84
|
this.embeddingProvidersApi = new EmbeddingProvidersApi(configuration);
|
|
83
85
|
this.llmProvidersApi = new LLMProvidersApi(configuration);
|
|
@@ -244,6 +246,10 @@ export class Api {
|
|
|
244
246
|
create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
|
|
245
247
|
listNumbers: (organizationId, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsNumbersGet({ organizationId }, options),
|
|
246
248
|
};
|
|
249
|
+
this.liveCalls = {
|
|
250
|
+
list: (organizationId, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsGet({ organizationId }, options),
|
|
251
|
+
createToken: (organizationId, roomName, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsRoomNameTokenPost({ organizationId, roomName }, options),
|
|
252
|
+
};
|
|
247
253
|
this.voiceUsage = {
|
|
248
254
|
report: (voiceUsageReportRequest, options) => this.voiceUsageApi.voiceUsageReportPost({ voiceUsageReportRequest }, options),
|
|
249
255
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { LiveCall, LiveCallToken } from '../models/index';
|
|
14
|
+
export interface OrganizationsOrganizationIdLiveCallsGetRequest {
|
|
15
|
+
organizationId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface OrganizationsOrganizationIdLiveCallsRoomNameTokenPostRequest {
|
|
18
|
+
organizationId: string;
|
|
19
|
+
roomName: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export declare class LiveCallsApi extends runtime.BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* 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).
|
|
27
|
+
* List ongoing calls (live LiveKit rooms) for the organization (app-admin only)
|
|
28
|
+
*/
|
|
29
|
+
organizationsOrganizationIdLiveCallsGetRaw(requestParameters: OrganizationsOrganizationIdLiveCallsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<LiveCall>>>;
|
|
30
|
+
/**
|
|
31
|
+
* 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).
|
|
32
|
+
* List ongoing calls (live LiveKit rooms) for the organization (app-admin only)
|
|
33
|
+
*/
|
|
34
|
+
organizationsOrganizationIdLiveCallsGet(requestParameters: OrganizationsOrganizationIdLiveCallsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LiveCall>>;
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
* Mint an admin access token to join a live call (app-admin only)
|
|
38
|
+
*/
|
|
39
|
+
organizationsOrganizationIdLiveCallsRoomNameTokenPostRaw(requestParameters: OrganizationsOrganizationIdLiveCallsRoomNameTokenPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveCallToken>>;
|
|
40
|
+
/**
|
|
41
|
+
* 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.
|
|
42
|
+
* Mint an admin access token to join a live call (app-admin only)
|
|
43
|
+
*/
|
|
44
|
+
organizationsOrganizationIdLiveCallsRoomNameTokenPost(requestParameters: OrganizationsOrganizationIdLiveCallsRoomNameTokenPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveCallToken>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { LiveCallFromJSON, LiveCallTokenFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class LiveCallsApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* 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).
|
|
31
|
+
* List ongoing calls (live LiveKit rooms) for the organization (app-admin only)
|
|
32
|
+
*/
|
|
33
|
+
organizationsOrganizationIdLiveCallsGetRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['organizationId'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdLiveCallsGet().');
|
|
37
|
+
}
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
const headerParameters = {};
|
|
40
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
41
|
+
const token = this.configuration.accessToken;
|
|
42
|
+
const tokenString = yield token("bearerAuth", []);
|
|
43
|
+
if (tokenString) {
|
|
44
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
let urlPath = `/organizations/{organizationId}/live-calls`;
|
|
48
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
49
|
+
const response = yield this.request({
|
|
50
|
+
path: urlPath,
|
|
51
|
+
method: 'GET',
|
|
52
|
+
headers: headerParameters,
|
|
53
|
+
query: queryParameters,
|
|
54
|
+
}, initOverrides);
|
|
55
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(LiveCallFromJSON));
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 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).
|
|
60
|
+
* List ongoing calls (live LiveKit rooms) for the organization (app-admin only)
|
|
61
|
+
*/
|
|
62
|
+
organizationsOrganizationIdLiveCallsGet(requestParameters, initOverrides) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const response = yield this.organizationsOrganizationIdLiveCallsGetRaw(requestParameters, initOverrides);
|
|
65
|
+
return yield response.value();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 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.
|
|
70
|
+
* Mint an admin access token to join a live call (app-admin only)
|
|
71
|
+
*/
|
|
72
|
+
organizationsOrganizationIdLiveCallsRoomNameTokenPostRaw(requestParameters, initOverrides) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
if (requestParameters['organizationId'] == null) {
|
|
75
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdLiveCallsRoomNameTokenPost().');
|
|
76
|
+
}
|
|
77
|
+
if (requestParameters['roomName'] == null) {
|
|
78
|
+
throw new runtime.RequiredError('roomName', 'Required parameter "roomName" was null or undefined when calling organizationsOrganizationIdLiveCallsRoomNameTokenPost().');
|
|
79
|
+
}
|
|
80
|
+
const queryParameters = {};
|
|
81
|
+
const headerParameters = {};
|
|
82
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
83
|
+
const token = this.configuration.accessToken;
|
|
84
|
+
const tokenString = yield token("bearerAuth", []);
|
|
85
|
+
if (tokenString) {
|
|
86
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
let urlPath = `/organizations/{organizationId}/live-calls/{roomName}/token`;
|
|
90
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
91
|
+
urlPath = urlPath.replace(`{${"roomName"}}`, encodeURIComponent(String(requestParameters['roomName'])));
|
|
92
|
+
const response = yield this.request({
|
|
93
|
+
path: urlPath,
|
|
94
|
+
method: 'POST',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LiveCallTokenFromJSON(jsonValue));
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* 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.
|
|
103
|
+
* Mint an admin access token to join a live call (app-admin only)
|
|
104
|
+
*/
|
|
105
|
+
organizationsOrganizationIdLiveCallsRoomNameTokenPost(requestParameters, initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const response = yield this.organizationsOrganizationIdLiveCallsRoomNameTokenPostRaw(requestParameters, initOverrides);
|
|
108
|
+
return yield response.value();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './EmbeddingProvidersApi';
|
|
|
9
9
|
export * from './HistoryApi';
|
|
10
10
|
export * from './InvitationsApi';
|
|
11
11
|
export * from './LLMProvidersApi';
|
|
12
|
+
export * from './LiveCallsApi';
|
|
12
13
|
export * from './MembersApi';
|
|
13
14
|
export * from './NotificationsApi';
|
|
14
15
|
export * from './OrganizationsApi';
|
package/dist/esm/apis/index.js
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,57 @@
|
|
|
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
|
+
import type { LiveCallParticipant } from './LiveCallParticipant';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface LiveCall
|
|
17
|
+
*/
|
|
18
|
+
export interface LiveCall {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof LiveCall
|
|
23
|
+
*/
|
|
24
|
+
room_name?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof LiveCall
|
|
29
|
+
*/
|
|
30
|
+
room_sid?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Date}
|
|
34
|
+
* @memberof LiveCall
|
|
35
|
+
*/
|
|
36
|
+
started_at?: Date | null;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof LiveCall
|
|
41
|
+
*/
|
|
42
|
+
num_participants?: number;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<LiveCallParticipant>}
|
|
46
|
+
* @memberof LiveCall
|
|
47
|
+
*/
|
|
48
|
+
participants?: Array<LiveCallParticipant>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the LiveCall interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfLiveCall(value: object): value is LiveCall;
|
|
54
|
+
export declare function LiveCallFromJSON(json: any): LiveCall;
|
|
55
|
+
export declare function LiveCallFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveCall;
|
|
56
|
+
export declare function LiveCallToJSON(json: any): LiveCall;
|
|
57
|
+
export declare function LiveCallToJSONTyped(value?: LiveCall | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
import { LiveCallParticipantFromJSON, LiveCallParticipantToJSON, } from './LiveCallParticipant';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the LiveCall interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfLiveCall(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function LiveCallFromJSON(json) {
|
|
22
|
+
return LiveCallFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function LiveCallFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'room_name': json['room_name'] == null ? undefined : json['room_name'],
|
|
30
|
+
'room_sid': json['room_sid'] == null ? undefined : json['room_sid'],
|
|
31
|
+
'started_at': json['started_at'] == null ? undefined : (new Date(json['started_at'])),
|
|
32
|
+
'num_participants': json['num_participants'] == null ? undefined : json['num_participants'],
|
|
33
|
+
'participants': json['participants'] == null ? undefined : (json['participants'].map(LiveCallParticipantFromJSON)),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function LiveCallToJSON(json) {
|
|
37
|
+
return LiveCallToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function LiveCallToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'room_name': value['room_name'],
|
|
45
|
+
'room_sid': value['room_sid'],
|
|
46
|
+
'started_at': value['started_at'] == null ? value['started_at'] : value['started_at'].toISOString(),
|
|
47
|
+
'num_participants': value['num_participants'],
|
|
48
|
+
'participants': value['participants'] == null ? undefined : (value['participants'].map(LiveCallParticipantToJSON)),
|
|
49
|
+
};
|
|
50
|
+
}
|