@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.
Files changed (51) hide show
  1. package/dist/api-client.d.ts +7 -0
  2. package/dist/api-client.js +7 -0
  3. package/dist/apis/LiveCallsApi.d.ts +45 -0
  4. package/dist/apis/LiveCallsApi.js +115 -0
  5. package/dist/apis/OutboundCallsApi.d.ts +14 -1
  6. package/dist/apis/OutboundCallsApi.js +39 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/api-client.d.ts +7 -0
  10. package/dist/esm/api-client.js +7 -0
  11. package/dist/esm/apis/LiveCallsApi.d.ts +45 -0
  12. package/dist/esm/apis/LiveCallsApi.js +111 -0
  13. package/dist/esm/apis/OutboundCallsApi.d.ts +14 -1
  14. package/dist/esm/apis/OutboundCallsApi.js +40 -1
  15. package/dist/esm/apis/index.d.ts +1 -0
  16. package/dist/esm/apis/index.js +1 -0
  17. package/dist/esm/models/LiveCall.d.ts +57 -0
  18. package/dist/esm/models/LiveCall.js +50 -0
  19. package/dist/esm/models/LiveCallParticipant.d.ts +95 -0
  20. package/dist/esm/models/LiveCallParticipant.js +81 -0
  21. package/dist/esm/models/LiveCallToken.d.ts +44 -0
  22. package/dist/esm/models/LiveCallToken.js +45 -0
  23. package/dist/esm/models/OutboundCallRequest.d.ts +6 -0
  24. package/dist/esm/models/OutboundCallRequest.js +2 -0
  25. package/dist/esm/models/OutboundNumber.d.ts +38 -0
  26. package/dist/esm/models/OutboundNumber.js +43 -0
  27. package/dist/esm/models/index.d.ts +4 -0
  28. package/dist/esm/models/index.js +4 -0
  29. package/dist/models/LiveCall.d.ts +57 -0
  30. package/dist/models/LiveCall.js +57 -0
  31. package/dist/models/LiveCallParticipant.d.ts +95 -0
  32. package/dist/models/LiveCallParticipant.js +89 -0
  33. package/dist/models/LiveCallToken.d.ts +44 -0
  34. package/dist/models/LiveCallToken.js +52 -0
  35. package/dist/models/OutboundCallRequest.d.ts +6 -0
  36. package/dist/models/OutboundCallRequest.js +2 -0
  37. package/dist/models/OutboundNumber.d.ts +38 -0
  38. package/dist/models/OutboundNumber.js +50 -0
  39. package/dist/models/index.d.ts +4 -0
  40. package/dist/models/index.js +4 -0
  41. package/package.json +1 -1
  42. package/src/api-client.ts +14 -0
  43. package/src/apis/LiveCallsApi.ts +144 -0
  44. package/src/apis/OutboundCallsApi.ts +54 -0
  45. package/src/apis/index.ts +1 -0
  46. package/src/models/LiveCall.ts +105 -0
  47. package/src/models/LiveCallParticipant.ts +143 -0
  48. package/src/models/LiveCallToken.ts +81 -0
  49. package/src/models/OutboundCallRequest.ts +8 -0
  50. package/src/models/OutboundNumber.ts +73 -0
  51. package/src/models/index.ts +4 -0
@@ -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";
@@ -216,6 +217,11 @@ export declare class Api {
216
217
  };
217
218
  readonly outboundCalls: {
218
219
  create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
220
+ listNumbers: (organizationId: string, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsNumbersGet"]>;
221
+ };
222
+ readonly liveCalls: {
223
+ list: (organizationId: string, options?: RequestInit) => ReturnType<LiveCallsApi["organizationsOrganizationIdLiveCallsGet"]>;
224
+ createToken: (organizationId: string, roomName: string, options?: RequestInit) => ReturnType<LiveCallsApi["organizationsOrganizationIdLiveCallsRoomNameTokenPost"]>;
219
225
  };
220
226
  readonly voiceUsage: {
221
227
  report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
@@ -287,6 +293,7 @@ export declare class Api {
287
293
  private readonly adminPhoneNumbersApi;
288
294
  private readonly adminSipApi;
289
295
  private readonly outboundCallsApi;
296
+ private readonly liveCallsApi;
290
297
  private readonly voiceUsageApi;
291
298
  private readonly embeddingProvidersApi;
292
299
  private readonly llmProvidersApi;
@@ -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);
@@ -245,6 +247,11 @@ class Api {
245
247
  };
246
248
  this.outboundCalls = {
247
249
  create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
250
+ listNumbers: (organizationId, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsNumbersGet({ organizationId }, options),
251
+ };
252
+ this.liveCalls = {
253
+ list: (organizationId, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsGet({ organizationId }, options),
254
+ createToken: (organizationId, roomName, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsRoomNameTokenPost({ organizationId, roomName }, options),
248
255
  };
249
256
  this.voiceUsage = {
250
257
  report: (voiceUsageReportRequest, options) => this.voiceUsageApi.voiceUsageReportPost({ voiceUsageReportRequest }, options),
@@ -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;
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { OutboundCall, OutboundCallRequest } from '../models/index';
13
+ import type { OutboundCall, OutboundCallRequest, OutboundNumber } from '../models/index';
14
+ export interface OrganizationsOrganizationIdOutboundCallsNumbersGetRequest {
15
+ organizationId: string;
16
+ }
14
17
  export interface OrganizationsOrganizationIdOutboundCallsPostRequest {
15
18
  organizationId: string;
16
19
  outboundCallRequest: OutboundCallRequest;
@@ -19,6 +22,16 @@ export interface OrganizationsOrganizationIdOutboundCallsPostRequest {
19
22
  *
20
23
  */
21
24
  export declare class OutboundCallsApi extends runtime.BaseAPI {
25
+ /**
26
+ * Returns the outbound-ready numbers assigned to the organization, for selecting which one to use as caller-ID (From) when placing a call. Requires the `outbound_calls` feature.
27
+ * List the organization\'s outbound-capable caller-ID numbers
28
+ */
29
+ organizationsOrganizationIdOutboundCallsNumbersGetRaw(requestParameters: OrganizationsOrganizationIdOutboundCallsNumbersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OutboundNumber>>>;
30
+ /**
31
+ * Returns the outbound-ready numbers assigned to the organization, for selecting which one to use as caller-ID (From) when placing a call. Requires the `outbound_calls` feature.
32
+ * List the organization\'s outbound-capable caller-ID numbers
33
+ */
34
+ organizationsOrganizationIdOutboundCallsNumbersGet(requestParameters: OrganizationsOrganizationIdOutboundCallsNumbersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OutboundNumber>>;
22
35
  /**
23
36
  * Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
24
37
  * Place an outbound call with a voice agent
@@ -29,6 +29,45 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class OutboundCallsApi extends runtime.BaseAPI {
32
+ /**
33
+ * Returns the outbound-ready numbers assigned to the organization, for selecting which one to use as caller-ID (From) when placing a call. Requires the `outbound_calls` feature.
34
+ * List the organization\'s outbound-capable caller-ID numbers
35
+ */
36
+ organizationsOrganizationIdOutboundCallsNumbersGetRaw(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 organizationsOrganizationIdOutboundCallsNumbersGet().');
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}/outbound-calls/numbers`;
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.OutboundNumberFromJSON));
59
+ });
60
+ }
61
+ /**
62
+ * Returns the outbound-ready numbers assigned to the organization, for selecting which one to use as caller-ID (From) when placing a call. Requires the `outbound_calls` feature.
63
+ * List the organization\'s outbound-capable caller-ID numbers
64
+ */
65
+ organizationsOrganizationIdOutboundCallsNumbersGet(requestParameters, initOverrides) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const response = yield this.organizationsOrganizationIdOutboundCallsNumbersGetRaw(requestParameters, initOverrides);
68
+ return yield response.value();
69
+ });
70
+ }
32
71
  /**
33
72
  * Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
34
73
  * Place an outbound call with a voice agent
@@ -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';
@@ -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);
@@ -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";
@@ -216,6 +217,11 @@ export declare class Api {
216
217
  };
217
218
  readonly outboundCalls: {
218
219
  create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
220
+ listNumbers: (organizationId: string, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsNumbersGet"]>;
221
+ };
222
+ readonly liveCalls: {
223
+ list: (organizationId: string, options?: RequestInit) => ReturnType<LiveCallsApi["organizationsOrganizationIdLiveCallsGet"]>;
224
+ createToken: (organizationId: string, roomName: string, options?: RequestInit) => ReturnType<LiveCallsApi["organizationsOrganizationIdLiveCallsRoomNameTokenPost"]>;
219
225
  };
220
226
  readonly voiceUsage: {
221
227
  report: (voiceUsageReportRequest: VoiceUsageReportRequest, options?: RequestInit) => ReturnType<VoiceUsageApi["voiceUsageReportPost"]>;
@@ -287,6 +293,7 @@ export declare class Api {
287
293
  private readonly adminPhoneNumbersApi;
288
294
  private readonly adminSipApi;
289
295
  private readonly outboundCallsApi;
296
+ private readonly liveCallsApi;
290
297
  private readonly voiceUsageApi;
291
298
  private readonly embeddingProvidersApi;
292
299
  private readonly llmProvidersApi;
@@ -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);
@@ -242,6 +244,11 @@ export class Api {
242
244
  };
243
245
  this.outboundCalls = {
244
246
  create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
247
+ listNumbers: (organizationId, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsNumbersGet({ organizationId }, options),
248
+ };
249
+ this.liveCalls = {
250
+ list: (organizationId, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsGet({ organizationId }, options),
251
+ createToken: (organizationId, roomName, options) => this.liveCallsApi.organizationsOrganizationIdLiveCallsRoomNameTokenPost({ organizationId, roomName }, options),
245
252
  };
246
253
  this.voiceUsage = {
247
254
  report: (voiceUsageReportRequest, options) => this.voiceUsageApi.voiceUsageReportPost({ voiceUsageReportRequest }, options),
@@ -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
+ }
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { OutboundCall, OutboundCallRequest } from '../models/index';
13
+ import type { OutboundCall, OutboundCallRequest, OutboundNumber } from '../models/index';
14
+ export interface OrganizationsOrganizationIdOutboundCallsNumbersGetRequest {
15
+ organizationId: string;
16
+ }
14
17
  export interface OrganizationsOrganizationIdOutboundCallsPostRequest {
15
18
  organizationId: string;
16
19
  outboundCallRequest: OutboundCallRequest;
@@ -19,6 +22,16 @@ export interface OrganizationsOrganizationIdOutboundCallsPostRequest {
19
22
  *
20
23
  */
21
24
  export declare class OutboundCallsApi extends runtime.BaseAPI {
25
+ /**
26
+ * Returns the outbound-ready numbers assigned to the organization, for selecting which one to use as caller-ID (From) when placing a call. Requires the `outbound_calls` feature.
27
+ * List the organization\'s outbound-capable caller-ID numbers
28
+ */
29
+ organizationsOrganizationIdOutboundCallsNumbersGetRaw(requestParameters: OrganizationsOrganizationIdOutboundCallsNumbersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OutboundNumber>>>;
30
+ /**
31
+ * Returns the outbound-ready numbers assigned to the organization, for selecting which one to use as caller-ID (From) when placing a call. Requires the `outbound_calls` feature.
32
+ * List the organization\'s outbound-capable caller-ID numbers
33
+ */
34
+ organizationsOrganizationIdOutboundCallsNumbersGet(requestParameters: OrganizationsOrganizationIdOutboundCallsNumbersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OutboundNumber>>;
22
35
  /**
23
36
  * Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
24
37
  * Place an outbound call with a voice agent
@@ -21,11 +21,50 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { OutboundCallFromJSON, OutboundCallRequestToJSON, } from '../models/index';
24
+ import { OutboundCallFromJSON, OutboundCallRequestToJSON, OutboundNumberFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class OutboundCallsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Returns the outbound-ready numbers assigned to the organization, for selecting which one to use as caller-ID (From) when placing a call. Requires the `outbound_calls` feature.
31
+ * List the organization\'s outbound-capable caller-ID numbers
32
+ */
33
+ organizationsOrganizationIdOutboundCallsNumbersGetRaw(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 organizationsOrganizationIdOutboundCallsNumbersGet().');
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}/outbound-calls/numbers`;
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(OutboundNumberFromJSON));
56
+ });
57
+ }
58
+ /**
59
+ * Returns the outbound-ready numbers assigned to the organization, for selecting which one to use as caller-ID (From) when placing a call. Requires the `outbound_calls` feature.
60
+ * List the organization\'s outbound-capable caller-ID numbers
61
+ */
62
+ organizationsOrganizationIdOutboundCallsNumbersGet(requestParameters, initOverrides) {
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ const response = yield this.organizationsOrganizationIdOutboundCallsNumbersGetRaw(requestParameters, initOverrides);
65
+ return yield response.value();
66
+ });
67
+ }
29
68
  /**
30
69
  * Dials a destination (a phonebook entry or a custom number) using one of the organization\'s voice agents. The caller-ID (From) is the org\'s assigned outbound-capable number. Requires the `outbound_calls` feature (business + enterprise plans).
31
70
  * Place an outbound call with a voice agent
@@ -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';
@@ -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';