@l7mp/tivadar-ai-api-sdk 0.2.17 → 0.2.19

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 -3
  2. package/dist/api-client.js +6 -2
  3. package/dist/apis/AdminPhoneNumbersApi.d.ts +1 -26
  4. package/dist/apis/AdminPhoneNumbersApi.js +0 -81
  5. package/dist/apis/LiveCallsApi.d.ts +45 -0
  6. package/dist/apis/LiveCallsApi.js +115 -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 -3
  10. package/dist/esm/api-client.js +6 -2
  11. package/dist/esm/apis/AdminPhoneNumbersApi.d.ts +1 -26
  12. package/dist/esm/apis/AdminPhoneNumbersApi.js +1 -82
  13. package/dist/esm/apis/LiveCallsApi.d.ts +45 -0
  14. package/dist/esm/apis/LiveCallsApi.js +111 -0
  15. package/dist/esm/apis/index.d.ts +1 -0
  16. package/dist/esm/apis/index.js +1 -0
  17. package/dist/esm/models/AdminPhoneNumberUpdate.d.ts +6 -0
  18. package/dist/esm/models/AdminPhoneNumberUpdate.js +2 -0
  19. package/dist/esm/models/LiveCall.d.ts +57 -0
  20. package/dist/esm/models/LiveCall.js +50 -0
  21. package/dist/esm/models/LiveCallParticipant.d.ts +95 -0
  22. package/dist/esm/models/LiveCallParticipant.js +81 -0
  23. package/dist/esm/models/LiveCallToken.d.ts +44 -0
  24. package/dist/esm/models/LiveCallToken.js +45 -0
  25. package/dist/esm/models/PhoneNumberCreate.d.ts +6 -0
  26. package/dist/esm/models/PhoneNumberCreate.js +2 -0
  27. package/dist/esm/models/index.d.ts +3 -1
  28. package/dist/esm/models/index.js +3 -1
  29. package/dist/models/AdminPhoneNumberUpdate.d.ts +6 -0
  30. package/dist/models/AdminPhoneNumberUpdate.js +2 -0
  31. package/dist/models/LiveCall.d.ts +57 -0
  32. package/dist/models/LiveCall.js +57 -0
  33. package/dist/models/LiveCallParticipant.d.ts +95 -0
  34. package/dist/models/LiveCallParticipant.js +89 -0
  35. package/dist/models/LiveCallToken.d.ts +44 -0
  36. package/dist/models/LiveCallToken.js +52 -0
  37. package/dist/models/PhoneNumberCreate.d.ts +6 -0
  38. package/dist/models/PhoneNumberCreate.js +2 -0
  39. package/dist/models/index.d.ts +3 -1
  40. package/dist/models/index.js +3 -1
  41. package/package.json +1 -1
  42. package/src/api-client.ts +12 -5
  43. package/src/apis/AdminPhoneNumbersApi.ts +0 -114
  44. package/src/apis/LiveCallsApi.ts +144 -0
  45. package/src/apis/index.ts +1 -0
  46. package/src/models/AdminPhoneNumberUpdate.ts +8 -0
  47. package/src/models/LiveCall.ts +105 -0
  48. package/src/models/LiveCallParticipant.ts +143 -0
  49. package/src/models/LiveCallToken.ts +81 -0
  50. package/src/models/PhoneNumberCreate.ts +8 -0
  51. package/src/models/index.ts +3 -1
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { AdminPhoneNumberAssignToJSON, AdminPhoneNumberAssignOutboundToJSON, AdminPhoneNumberDetailFromJSON, AdminPhoneNumberUpdateToJSON, AdminPhoneNumbersListResponseFromJSON, PhoneNumberFromJSON, PhoneNumberCreateToJSON, PhoneNumberOrderFromJSON, PhoneNumberOrdersListResponseFromJSON, ProcessOrdersResultFromJSON, } from '../models/index';
24
+ import { AdminPhoneNumberAssignToJSON, AdminPhoneNumberDetailFromJSON, AdminPhoneNumberUpdateToJSON, AdminPhoneNumbersListResponseFromJSON, PhoneNumberFromJSON, PhoneNumberCreateToJSON, PhoneNumberOrderFromJSON, PhoneNumberOrdersListResponseFromJSON, ProcessOrdersResultFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -232,50 +232,6 @@ export class AdminPhoneNumbersApi extends runtime.BaseAPI {
232
232
  return yield response.value();
233
233
  });
234
234
  }
235
- /**
236
- * Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
237
- * Assign an outbound-capable number to an organization (app-admin only)
238
- */
239
- adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters, initOverrides) {
240
- return __awaiter(this, void 0, void 0, function* () {
241
- if (requestParameters['phoneNumberId'] == null) {
242
- throw new runtime.RequiredError('phoneNumberId', 'Required parameter "phoneNumberId" was null or undefined when calling adminPhoneNumbersPhoneNumberIdAssignOutboundPost().');
243
- }
244
- if (requestParameters['adminPhoneNumberAssignOutbound'] == null) {
245
- throw new runtime.RequiredError('adminPhoneNumberAssignOutbound', 'Required parameter "adminPhoneNumberAssignOutbound" was null or undefined when calling adminPhoneNumbersPhoneNumberIdAssignOutboundPost().');
246
- }
247
- const queryParameters = {};
248
- const headerParameters = {};
249
- headerParameters['Content-Type'] = 'application/json';
250
- if (this.configuration && this.configuration.accessToken) {
251
- const token = this.configuration.accessToken;
252
- const tokenString = yield token("bearerAuth", []);
253
- if (tokenString) {
254
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
255
- }
256
- }
257
- let urlPath = `/admin/phone-numbers/{phoneNumberId}/assign-outbound`;
258
- urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
259
- const response = yield this.request({
260
- path: urlPath,
261
- method: 'POST',
262
- headers: headerParameters,
263
- query: queryParameters,
264
- body: AdminPhoneNumberAssignOutboundToJSON(requestParameters['adminPhoneNumberAssignOutbound']),
265
- }, initOverrides);
266
- return new runtime.JSONApiResponse(response, (jsonValue) => AdminPhoneNumberDetailFromJSON(jsonValue));
267
- });
268
- }
269
- /**
270
- * Grants the organization ownership of an outbound number (no inbound trunk). The org can then place outbound calls using it as caller-ID.
271
- * Assign an outbound-capable number to an organization (app-admin only)
272
- */
273
- adminPhoneNumbersPhoneNumberIdAssignOutboundPost(requestParameters, initOverrides) {
274
- return __awaiter(this, void 0, void 0, function* () {
275
- const response = yield this.adminPhoneNumbersPhoneNumberIdAssignOutboundPostRaw(requestParameters, initOverrides);
276
- return yield response.value();
277
- });
278
- }
279
235
  /**
280
236
  * Creates a SIP trunk (and, if an agent is given, a dispatch rule) and links the number.
281
237
  * Assign a phone number to an organization (app-admin only)
@@ -437,43 +393,6 @@ export class AdminPhoneNumbersApi extends runtime.BaseAPI {
437
393
  return yield response.value();
438
394
  });
439
395
  }
440
- /**
441
- * Release an outbound number\'s organization ownership (app-admin only)
442
- */
443
- adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters, initOverrides) {
444
- return __awaiter(this, void 0, void 0, function* () {
445
- if (requestParameters['phoneNumberId'] == null) {
446
- throw new runtime.RequiredError('phoneNumberId', 'Required parameter "phoneNumberId" was null or undefined when calling adminPhoneNumbersPhoneNumberIdUnassignOutboundPost().');
447
- }
448
- const queryParameters = {};
449
- const headerParameters = {};
450
- if (this.configuration && this.configuration.accessToken) {
451
- const token = this.configuration.accessToken;
452
- const tokenString = yield token("bearerAuth", []);
453
- if (tokenString) {
454
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
455
- }
456
- }
457
- let urlPath = `/admin/phone-numbers/{phoneNumberId}/unassign-outbound`;
458
- urlPath = urlPath.replace(`{${"phoneNumberId"}}`, encodeURIComponent(String(requestParameters['phoneNumberId'])));
459
- const response = yield this.request({
460
- path: urlPath,
461
- method: 'POST',
462
- headers: headerParameters,
463
- query: queryParameters,
464
- }, initOverrides);
465
- return new runtime.JSONApiResponse(response, (jsonValue) => AdminPhoneNumberDetailFromJSON(jsonValue));
466
- });
467
- }
468
- /**
469
- * Release an outbound number\'s organization ownership (app-admin only)
470
- */
471
- adminPhoneNumbersPhoneNumberIdUnassignOutboundPost(requestParameters, initOverrides) {
472
- return __awaiter(this, void 0, void 0, function* () {
473
- const response = yield this.adminPhoneNumbersPhoneNumberIdUnassignOutboundPostRaw(requestParameters, initOverrides);
474
- return yield response.value();
475
- });
476
- }
477
396
  /**
478
397
  * Deletes the LiveKit dispatch rule + trunk and frees the number back to the pool.
479
398
  * Release a phone number from its organization (app-admin only)
@@ -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
+ }
@@ -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';
@@ -45,6 +45,12 @@ export interface AdminPhoneNumberUpdate {
45
45
  * @memberof AdminPhoneNumberUpdate
46
46
  */
47
47
  auth_password?: string;
48
+ /**
49
+ * Associate the outbound number with an org (uuid), or null to clear.
50
+ * @type {string}
51
+ * @memberof AdminPhoneNumberUpdate
52
+ */
53
+ outbound_organization_id?: string | null;
48
54
  }
49
55
  /**
50
56
  * Check if a given object implements the AdminPhoneNumberUpdate interface.
@@ -30,6 +30,7 @@ export function AdminPhoneNumberUpdateFromJSONTyped(json, ignoreDiscriminator) {
30
30
  'sip_address': json['sip_address'] == null ? undefined : json['sip_address'],
31
31
  'auth_username': json['auth_username'] == null ? undefined : json['auth_username'],
32
32
  'auth_password': json['auth_password'] == null ? undefined : json['auth_password'],
33
+ 'outbound_organization_id': json['outbound_organization_id'] == null ? undefined : json['outbound_organization_id'],
33
34
  };
34
35
  }
35
36
  export function AdminPhoneNumberUpdateToJSON(json) {
@@ -45,5 +46,6 @@ export function AdminPhoneNumberUpdateToJSONTyped(value, ignoreDiscriminator = f
45
46
  'sip_address': value['sip_address'],
46
47
  'auth_username': value['auth_username'],
47
48
  'auth_password': value['auth_password'],
49
+ 'outbound_organization_id': value['outbound_organization_id'],
48
50
  };
49
51
  }
@@ -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
+ }
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Tivadar AI Backend API
3
+ * Unified REST API for Tivadar AI Voice Agents platform
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface LiveCallParticipant
16
+ */
17
+ export interface LiveCallParticipant {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof LiveCallParticipant
22
+ */
23
+ identity?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof LiveCallParticipant
28
+ */
29
+ name?: string | null;
30
+ /**
31
+ * LiveKit participant kind.
32
+ * @type {string}
33
+ * @memberof LiveCallParticipant
34
+ */
35
+ kind?: LiveCallParticipantKindEnum;
36
+ /**
37
+ * Interpreted role — sip→caller, agent→agent, standard→operator.
38
+ * @type {string}
39
+ * @memberof LiveCallParticipant
40
+ */
41
+ role?: LiveCallParticipantRoleEnum;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof LiveCallParticipant
46
+ */
47
+ state?: LiveCallParticipantStateEnum;
48
+ /**
49
+ *
50
+ * @type {Date}
51
+ * @memberof LiveCallParticipant
52
+ */
53
+ joined_at?: Date | null;
54
+ }
55
+ /**
56
+ * @export
57
+ */
58
+ export declare const LiveCallParticipantKindEnum: {
59
+ readonly Standard: "standard";
60
+ readonly Sip: "sip";
61
+ readonly Agent: "agent";
62
+ readonly Ingress: "ingress";
63
+ readonly Egress: "egress";
64
+ readonly Unknown: "unknown";
65
+ };
66
+ export type LiveCallParticipantKindEnum = typeof LiveCallParticipantKindEnum[keyof typeof LiveCallParticipantKindEnum];
67
+ /**
68
+ * @export
69
+ */
70
+ export declare const LiveCallParticipantRoleEnum: {
71
+ readonly Caller: "caller";
72
+ readonly Agent: "agent";
73
+ readonly Operator: "operator";
74
+ readonly Other: "other";
75
+ };
76
+ export type LiveCallParticipantRoleEnum = typeof LiveCallParticipantRoleEnum[keyof typeof LiveCallParticipantRoleEnum];
77
+ /**
78
+ * @export
79
+ */
80
+ export declare const LiveCallParticipantStateEnum: {
81
+ readonly Joining: "joining";
82
+ readonly Joined: "joined";
83
+ readonly Active: "active";
84
+ readonly Disconnected: "disconnected";
85
+ readonly Unknown: "unknown";
86
+ };
87
+ export type LiveCallParticipantStateEnum = typeof LiveCallParticipantStateEnum[keyof typeof LiveCallParticipantStateEnum];
88
+ /**
89
+ * Check if a given object implements the LiveCallParticipant interface.
90
+ */
91
+ export declare function instanceOfLiveCallParticipant(value: object): value is LiveCallParticipant;
92
+ export declare function LiveCallParticipantFromJSON(json: any): LiveCallParticipant;
93
+ export declare function LiveCallParticipantFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveCallParticipant;
94
+ export declare function LiveCallParticipantToJSON(json: any): LiveCallParticipant;
95
+ export declare function LiveCallParticipantToJSONTyped(value?: LiveCallParticipant | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,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
+ * @export
16
+ */
17
+ export const LiveCallParticipantKindEnum = {
18
+ Standard: 'standard',
19
+ Sip: 'sip',
20
+ Agent: 'agent',
21
+ Ingress: 'ingress',
22
+ Egress: 'egress',
23
+ Unknown: 'unknown'
24
+ };
25
+ /**
26
+ * @export
27
+ */
28
+ export const LiveCallParticipantRoleEnum = {
29
+ Caller: 'caller',
30
+ Agent: 'agent',
31
+ Operator: 'operator',
32
+ Other: 'other'
33
+ };
34
+ /**
35
+ * @export
36
+ */
37
+ export const LiveCallParticipantStateEnum = {
38
+ Joining: 'joining',
39
+ Joined: 'joined',
40
+ Active: 'active',
41
+ Disconnected: 'disconnected',
42
+ Unknown: 'unknown'
43
+ };
44
+ /**
45
+ * Check if a given object implements the LiveCallParticipant interface.
46
+ */
47
+ export function instanceOfLiveCallParticipant(value) {
48
+ return true;
49
+ }
50
+ export function LiveCallParticipantFromJSON(json) {
51
+ return LiveCallParticipantFromJSONTyped(json, false);
52
+ }
53
+ export function LiveCallParticipantFromJSONTyped(json, ignoreDiscriminator) {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+ 'identity': json['identity'] == null ? undefined : json['identity'],
59
+ 'name': json['name'] == null ? undefined : json['name'],
60
+ 'kind': json['kind'] == null ? undefined : json['kind'],
61
+ 'role': json['role'] == null ? undefined : json['role'],
62
+ 'state': json['state'] == null ? undefined : json['state'],
63
+ 'joined_at': json['joined_at'] == null ? undefined : (new Date(json['joined_at'])),
64
+ };
65
+ }
66
+ export function LiveCallParticipantToJSON(json) {
67
+ return LiveCallParticipantToJSONTyped(json, false);
68
+ }
69
+ export function LiveCallParticipantToJSONTyped(value, ignoreDiscriminator = false) {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+ return {
74
+ 'identity': value['identity'],
75
+ 'name': value['name'],
76
+ 'kind': value['kind'],
77
+ 'role': value['role'],
78
+ 'state': value['state'],
79
+ 'joined_at': value['joined_at'] == null ? value['joined_at'] : value['joined_at'].toISOString(),
80
+ };
81
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Tivadar AI Backend API
3
+ * Unified REST API for Tivadar AI Voice Agents platform
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface LiveCallToken
16
+ */
17
+ export interface LiveCallToken {
18
+ /**
19
+ * LiveKit access token with talk + listen + room-admin grants.
20
+ * @type {string}
21
+ * @memberof LiveCallToken
22
+ */
23
+ token?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof LiveCallToken
28
+ */
29
+ room_name?: string;
30
+ /**
31
+ * LiveKit server URL to connect to.
32
+ * @type {string}
33
+ * @memberof LiveCallToken
34
+ */
35
+ url?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the LiveCallToken interface.
39
+ */
40
+ export declare function instanceOfLiveCallToken(value: object): value is LiveCallToken;
41
+ export declare function LiveCallTokenFromJSON(json: any): LiveCallToken;
42
+ export declare function LiveCallTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiveCallToken;
43
+ export declare function LiveCallTokenToJSON(json: any): LiveCallToken;
44
+ export declare function LiveCallTokenToJSONTyped(value?: LiveCallToken | null, ignoreDiscriminator?: boolean): any;