@l7mp/tivadar-ai-api-sdk 0.2.2 → 0.2.4

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 +8 -1
  2. package/dist/api-client.js +7 -0
  3. package/dist/apis/ProfileApi.d.ts +41 -0
  4. package/dist/apis/ProfileApi.js +112 -0
  5. package/dist/apis/RAGApi.d.ts +13 -0
  6. package/dist/apis/RAGApi.js +45 -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 +8 -1
  10. package/dist/esm/api-client.js +7 -0
  11. package/dist/esm/apis/ProfileApi.d.ts +41 -0
  12. package/dist/esm/apis/ProfileApi.js +108 -0
  13. package/dist/esm/apis/RAGApi.d.ts +13 -0
  14. package/dist/esm/apis/RAGApi.js +45 -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/Notification.d.ts +22 -0
  18. package/dist/esm/models/Notification.js +8 -0
  19. package/dist/esm/models/NotificationCreate.d.ts +22 -0
  20. package/dist/esm/models/NotificationCreate.js +6 -0
  21. package/dist/esm/models/NotificationUpdate.d.ts +22 -0
  22. package/dist/esm/models/NotificationUpdate.js +6 -0
  23. package/dist/esm/models/UserPreferences.d.ts +38 -0
  24. package/dist/esm/models/UserPreferences.js +45 -0
  25. package/dist/esm/models/UserPreferencesUpdate.d.ts +32 -0
  26. package/dist/esm/models/UserPreferencesUpdate.js +41 -0
  27. package/dist/esm/models/index.d.ts +2 -0
  28. package/dist/esm/models/index.js +2 -0
  29. package/dist/models/Notification.d.ts +22 -0
  30. package/dist/models/Notification.js +8 -0
  31. package/dist/models/NotificationCreate.d.ts +22 -0
  32. package/dist/models/NotificationCreate.js +6 -0
  33. package/dist/models/NotificationUpdate.d.ts +22 -0
  34. package/dist/models/NotificationUpdate.js +6 -0
  35. package/dist/models/UserPreferences.d.ts +38 -0
  36. package/dist/models/UserPreferences.js +52 -0
  37. package/dist/models/UserPreferencesUpdate.d.ts +32 -0
  38. package/dist/models/UserPreferencesUpdate.js +48 -0
  39. package/dist/models/index.d.ts +2 -0
  40. package/dist/models/index.js +2 -0
  41. package/package.json +1 -1
  42. package/src/api-client.ts +15 -0
  43. package/src/apis/ProfileApi.ts +142 -0
  44. package/src/apis/RAGApi.ts +67 -0
  45. package/src/apis/index.ts +1 -0
  46. package/src/models/Notification.ts +25 -1
  47. package/src/models/NotificationCreate.ts +24 -1
  48. package/src/models/NotificationUpdate.ts +24 -1
  49. package/src/models/UserPreferences.ts +75 -0
  50. package/src/models/UserPreferencesUpdate.ts +66 -0
  51. package/src/models/index.ts +2 -0
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Tivadar AI Backend API
6
+ * Unified REST API for Tivadar AI Voice Agents platform
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfUserPreferencesUpdate = instanceOfUserPreferencesUpdate;
17
+ exports.UserPreferencesUpdateFromJSON = UserPreferencesUpdateFromJSON;
18
+ exports.UserPreferencesUpdateFromJSONTyped = UserPreferencesUpdateFromJSONTyped;
19
+ exports.UserPreferencesUpdateToJSON = UserPreferencesUpdateToJSON;
20
+ exports.UserPreferencesUpdateToJSONTyped = UserPreferencesUpdateToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the UserPreferencesUpdate interface.
23
+ */
24
+ function instanceOfUserPreferencesUpdate(value) {
25
+ return true;
26
+ }
27
+ function UserPreferencesUpdateFromJSON(json) {
28
+ return UserPreferencesUpdateFromJSONTyped(json, false);
29
+ }
30
+ function UserPreferencesUpdateFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'preferred_language': json['preferred_language'] == null ? undefined : json['preferred_language'],
36
+ };
37
+ }
38
+ function UserPreferencesUpdateToJSON(json) {
39
+ return UserPreferencesUpdateToJSONTyped(json, false);
40
+ }
41
+ function UserPreferencesUpdateToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'preferred_language': value['preferred_language'],
47
+ };
48
+ }
@@ -83,6 +83,8 @@ export * from './TtsProviderVoice';
83
83
  export * from './UnpauseSubscriptionResponse';
84
84
  export * from './UpdatePlanRequest';
85
85
  export * from './UpdatePlanResponse';
86
+ export * from './UserPreferences';
87
+ export * from './UserPreferencesUpdate';
86
88
  export * from './VoiceAgent';
87
89
  export * from './VoiceAgentCreate';
88
90
  export * from './VoiceAgentMetadata';
@@ -101,6 +101,8 @@ __exportStar(require("./TtsProviderVoice"), exports);
101
101
  __exportStar(require("./UnpauseSubscriptionResponse"), exports);
102
102
  __exportStar(require("./UpdatePlanRequest"), exports);
103
103
  __exportStar(require("./UpdatePlanResponse"), exports);
104
+ __exportStar(require("./UserPreferences"), exports);
105
+ __exportStar(require("./UserPreferencesUpdate"), exports);
104
106
  __exportStar(require("./VoiceAgent"), exports);
105
107
  __exportStar(require("./VoiceAgentCreate"), exports);
106
108
  __exportStar(require("./VoiceAgentMetadata"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@l7mp/tivadar-ai-api-sdk",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "TypeScript/JavaScript SDK for Tivadar AI Backend API",
5
5
  "author": "L7mp Technologies",
6
6
  "repository": {
package/src/api-client.ts CHANGED
@@ -7,6 +7,7 @@ import { MembersApi } from "./apis/MembersApi";
7
7
  import { NotificationsApi, type OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum, type OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum } from "./apis/NotificationsApi";
8
8
  import { OrganizationsApi } from "./apis/OrganizationsApi";
9
9
  import { PlaygroundApi } from "./apis/PlaygroundApi";
10
+ import { ProfileApi } from "./apis/ProfileApi";
10
11
  import { RAGApi, type OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum } from "./apis/RAGApi";
11
12
  import { RecordingsApi } from "./apis/RecordingsApi";
12
13
  import { SIPApi } from "./apis/SIPApi";
@@ -47,6 +48,7 @@ import type {
47
48
  PauseSubscriptionRequest,
48
49
  BillingPortalRequest,
49
50
  OrganizationsOrganizationIdNotificationsGet200Response,
51
+ UserPreferencesUpdate,
50
52
  } from "./models";
51
53
 
52
54
  export interface ApiClientConfig {
@@ -117,6 +119,10 @@ export class Api {
117
119
  public readonly playground: {
118
120
  sandboxToken: (organizationId: string, voiceAgentId: string, options?: RequestInit) => ReturnType<PlaygroundApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost"]>;
119
121
  };
122
+ public readonly profile: {
123
+ getPreferences: (organizationId: string, options?: RequestInit) => ReturnType<ProfileApi["organizationsOrganizationIdProfilePreferencesGet"]>;
124
+ updatePreferences: (organizationId: string, userPreferencesUpdate: UserPreferencesUpdate, options?: RequestInit) => ReturnType<ProfileApi["organizationsOrganizationIdProfilePreferencesPut"]>;
125
+ };
120
126
  public readonly rag: {
121
127
  list: (organizationId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagGet"]>;
122
128
  create: (organizationId: string, ragConfigCreate: RagConfigCreate, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagPost"]>;
@@ -125,6 +131,7 @@ export class Api {
125
131
  upload: (organizationId: string, ragConfigName: string, file: File, sourceUrl?: string, metadata?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsPost"]>;
126
132
  list: (organizationId: string, ragConfigName: string, status?: OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsGet"]>;
127
133
  get: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet"]>;
134
+ download: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet"]>;
128
135
  replace: (organizationId: string, ragConfigName: string, documentId: string, file: File, sourceUrl?: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut"]>;
129
136
  delete: (organizationId: string, ragConfigName: string, documentId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete"]>;
130
137
  };
@@ -182,6 +189,7 @@ export class Api {
182
189
  private readonly membersApi: MembersApi;
183
190
  private readonly organizationsApi: OrganizationsApi;
184
191
  private readonly playgroundApi: PlaygroundApi;
192
+ private readonly profileApi: ProfileApi;
185
193
  private readonly ragApi: RAGApi;
186
194
  private readonly recordingsApi: RecordingsApi;
187
195
  private readonly sipApi: SIPApi;
@@ -220,6 +228,7 @@ export class Api {
220
228
  this.membersApi = new MembersApi(configuration);
221
229
  this.organizationsApi = new OrganizationsApi(configuration);
222
230
  this.playgroundApi = new PlaygroundApi(configuration);
231
+ this.profileApi = new ProfileApi(configuration);
223
232
  this.ragApi = new RAGApi(configuration);
224
233
  this.recordingsApi = new RecordingsApi(configuration);
225
234
  this.sipApi = new SIPApi(configuration);
@@ -303,6 +312,11 @@ export class Api {
303
312
  sandboxToken: (organizationId, voiceAgentId, options) => this.playgroundApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost({ organizationId, voiceAgentId }, options),
304
313
  };
305
314
 
315
+ this.profile = {
316
+ getPreferences: (organizationId, options) => this.profileApi.organizationsOrganizationIdProfilePreferencesGet({ organizationId }, options),
317
+ updatePreferences: (organizationId, userPreferencesUpdate, options) => this.profileApi.organizationsOrganizationIdProfilePreferencesPut({ organizationId, userPreferencesUpdate }, options),
318
+ };
319
+
306
320
  this.rag = {
307
321
  list: (organizationId, options) => this.ragApi.organizationsOrganizationIdRagGet({ organizationId }, options),
308
322
  create: (organizationId, ragConfigCreate, options) => this.ragApi.organizationsOrganizationIdRagPost({ organizationId, ragConfigCreate }, options),
@@ -311,6 +325,7 @@ export class Api {
311
325
  upload: (organizationId, ragConfigName, file, sourceUrl, metadata, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsPost({ organizationId, ragConfigName, file, sourceUrl, metadata }, options),
312
326
  list: (organizationId, ragConfigName, status, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsGet({ organizationId, ragConfigName, status }, options),
313
327
  get: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdGet({ organizationId, ragConfigName, documentId }, options),
328
+ download: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet({ organizationId, ragConfigName, documentId }, options),
314
329
  replace: (organizationId, ragConfigName, documentId, file, sourceUrl, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPut({ organizationId, ragConfigName, documentId, file, sourceUrl }, options),
315
330
  delete: (organizationId, ragConfigName, documentId, options) => this.ragApi.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdDelete({ organizationId, ragConfigName, documentId }, options),
316
331
  },
@@ -0,0 +1,142 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tivadar AI Backend API
5
+ * Unified REST API for Tivadar AI Voice Agents platform
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ UserPreferences,
19
+ UserPreferencesUpdate,
20
+ } from '../models/index';
21
+ import {
22
+ UserPreferencesFromJSON,
23
+ UserPreferencesToJSON,
24
+ UserPreferencesUpdateFromJSON,
25
+ UserPreferencesUpdateToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface OrganizationsOrganizationIdProfilePreferencesGetRequest {
29
+ organizationId: string;
30
+ }
31
+
32
+ export interface OrganizationsOrganizationIdProfilePreferencesPutRequest {
33
+ organizationId: string;
34
+ userPreferencesUpdate: UserPreferencesUpdate;
35
+ }
36
+
37
+ /**
38
+ *
39
+ */
40
+ export class ProfileApi extends runtime.BaseAPI {
41
+
42
+ /**
43
+ * Get current user preferences
44
+ */
45
+ async organizationsOrganizationIdProfilePreferencesGetRaw(requestParameters: OrganizationsOrganizationIdProfilePreferencesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserPreferences>> {
46
+ if (requestParameters['organizationId'] == null) {
47
+ throw new runtime.RequiredError(
48
+ 'organizationId',
49
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdProfilePreferencesGet().'
50
+ );
51
+ }
52
+
53
+ const queryParameters: any = {};
54
+
55
+ const headerParameters: runtime.HTTPHeaders = {};
56
+
57
+ if (this.configuration && this.configuration.accessToken) {
58
+ const token = this.configuration.accessToken;
59
+ const tokenString = await token("bearerAuth", []);
60
+
61
+ if (tokenString) {
62
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
63
+ }
64
+ }
65
+
66
+ let urlPath = `/organizations/{organizationId}/profile/preferences`;
67
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
68
+
69
+ const response = await this.request({
70
+ path: urlPath,
71
+ method: 'GET',
72
+ headers: headerParameters,
73
+ query: queryParameters,
74
+ }, initOverrides);
75
+
76
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserPreferencesFromJSON(jsonValue));
77
+ }
78
+
79
+ /**
80
+ * Get current user preferences
81
+ */
82
+ async organizationsOrganizationIdProfilePreferencesGet(requestParameters: OrganizationsOrganizationIdProfilePreferencesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreferences> {
83
+ const response = await this.organizationsOrganizationIdProfilePreferencesGetRaw(requestParameters, initOverrides);
84
+ return await response.value();
85
+ }
86
+
87
+ /**
88
+ * Update current user preferences
89
+ */
90
+ async organizationsOrganizationIdProfilePreferencesPutRaw(requestParameters: OrganizationsOrganizationIdProfilePreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserPreferences>> {
91
+ if (requestParameters['organizationId'] == null) {
92
+ throw new runtime.RequiredError(
93
+ 'organizationId',
94
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdProfilePreferencesPut().'
95
+ );
96
+ }
97
+
98
+ if (requestParameters['userPreferencesUpdate'] == null) {
99
+ throw new runtime.RequiredError(
100
+ 'userPreferencesUpdate',
101
+ 'Required parameter "userPreferencesUpdate" was null or undefined when calling organizationsOrganizationIdProfilePreferencesPut().'
102
+ );
103
+ }
104
+
105
+ const queryParameters: any = {};
106
+
107
+ const headerParameters: runtime.HTTPHeaders = {};
108
+
109
+ headerParameters['Content-Type'] = 'application/json';
110
+
111
+ if (this.configuration && this.configuration.accessToken) {
112
+ const token = this.configuration.accessToken;
113
+ const tokenString = await token("bearerAuth", []);
114
+
115
+ if (tokenString) {
116
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
117
+ }
118
+ }
119
+
120
+ let urlPath = `/organizations/{organizationId}/profile/preferences`;
121
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
122
+
123
+ const response = await this.request({
124
+ path: urlPath,
125
+ method: 'PUT',
126
+ headers: headerParameters,
127
+ query: queryParameters,
128
+ body: UserPreferencesUpdateToJSON(requestParameters['userPreferencesUpdate']),
129
+ }, initOverrides);
130
+
131
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserPreferencesFromJSON(jsonValue));
132
+ }
133
+
134
+ /**
135
+ * Update current user preferences
136
+ */
137
+ async organizationsOrganizationIdProfilePreferencesPut(requestParameters: OrganizationsOrganizationIdProfilePreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreferences> {
138
+ const response = await this.organizationsOrganizationIdProfilePreferencesPutRaw(requestParameters, initOverrides);
139
+ return await response.value();
140
+ }
141
+
142
+ }
@@ -60,6 +60,12 @@ export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdG
60
60
  documentId: string;
61
61
  }
62
62
 
63
+ export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest {
64
+ organizationId: string;
65
+ ragConfigName: string;
66
+ documentId: string;
67
+ }
68
+
63
69
  export interface OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdPutRequest {
64
70
  organizationId: string;
65
71
  ragConfigName: string;
@@ -360,6 +366,67 @@ export class RAGApi extends runtime.BaseAPI {
360
366
  return await response.value();
361
367
  }
362
368
 
369
+ /**
370
+ * Download original document file
371
+ */
372
+ async organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
373
+ if (requestParameters['organizationId'] == null) {
374
+ throw new runtime.RequiredError(
375
+ 'organizationId',
376
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().'
377
+ );
378
+ }
379
+
380
+ if (requestParameters['ragConfigName'] == null) {
381
+ throw new runtime.RequiredError(
382
+ 'ragConfigName',
383
+ 'Required parameter "ragConfigName" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().'
384
+ );
385
+ }
386
+
387
+ if (requestParameters['documentId'] == null) {
388
+ throw new runtime.RequiredError(
389
+ 'documentId',
390
+ 'Required parameter "documentId" was null or undefined when calling organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet().'
391
+ );
392
+ }
393
+
394
+ const queryParameters: any = {};
395
+
396
+ const headerParameters: runtime.HTTPHeaders = {};
397
+
398
+ if (this.configuration && this.configuration.accessToken) {
399
+ const token = this.configuration.accessToken;
400
+ const tokenString = await token("bearerAuth", []);
401
+
402
+ if (tokenString) {
403
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
404
+ }
405
+ }
406
+
407
+ let urlPath = `/organizations/{organizationId}/rag/{ragConfigName}/documents/{documentId}/file`;
408
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
409
+ urlPath = urlPath.replace(`{${"ragConfigName"}}`, encodeURIComponent(String(requestParameters['ragConfigName'])));
410
+ urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters['documentId'])));
411
+
412
+ const response = await this.request({
413
+ path: urlPath,
414
+ method: 'GET',
415
+ headers: headerParameters,
416
+ query: queryParameters,
417
+ }, initOverrides);
418
+
419
+ return new runtime.BlobApiResponse(response);
420
+ }
421
+
422
+ /**
423
+ * Download original document file
424
+ */
425
+ async organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGet(requestParameters: OrganizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
426
+ const response = await this.organizationsOrganizationIdRagRagConfigNameDocumentsDocumentIdFileGetRaw(requestParameters, initOverrides);
427
+ return await response.value();
428
+ }
429
+
363
430
  /**
364
431
  * Replace a document in a RAG configuration
365
432
  */
package/src/apis/index.ts CHANGED
@@ -11,6 +11,7 @@ export * from './MembersApi';
11
11
  export * from './NotificationsApi';
12
12
  export * from './OrganizationsApi';
13
13
  export * from './PlaygroundApi';
14
+ export * from './ProfileApi';
14
15
  export * from './RAGApi';
15
16
  export * from './RecordingsApi';
16
17
  export * from './SIPApi';
@@ -114,6 +114,24 @@ export interface Notification {
114
114
  * @memberof Notification
115
115
  */
116
116
  expires_at?: Date | null;
117
+ /**
118
+ * Whether an email should also be sent to recipients
119
+ * @type {boolean}
120
+ * @memberof Notification
121
+ */
122
+ send_email: boolean;
123
+ /**
124
+ * Localized notification title/content variants keyed by language tag (for example en, en-US, hu-HU)
125
+ * @type {{ [key: string]: { [key: string]: any; }; }}
126
+ * @memberof Notification
127
+ */
128
+ localized_content?: { [key: string]: { [key: string]: any; }; } | null;
129
+ /**
130
+ * Fallback language key to use when recipient preferred language translation is missing
131
+ * @type {string}
132
+ * @memberof Notification
133
+ */
134
+ default_language?: string | null;
117
135
  /**
118
136
  *
119
137
  * @type {Date}
@@ -153,6 +171,7 @@ export function instanceOfNotification(value: object): value is Notification {
153
171
  if (!('scope' in value) || value['scope'] === undefined) return false;
154
172
  if (!('title' in value) || value['title'] === undefined) return false;
155
173
  if (!('content' in value) || value['content'] === undefined) return false;
174
+ if (!('send_email' in value) || value['send_email'] === undefined) return false;
156
175
  if (!('created_at' in value) || value['created_at'] === undefined) return false;
157
176
  if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
158
177
  return true;
@@ -179,6 +198,9 @@ export function NotificationFromJSONTyped(json: any, ignoreDiscriminator: boolea
179
198
  'user_id': json['user_id'] == null ? undefined : json['user_id'],
180
199
  'created_by': json['created_by'] == null ? undefined : json['created_by'],
181
200
  'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
201
+ 'send_email': json['send_email'],
202
+ 'localized_content': json['localized_content'] == null ? undefined : json['localized_content'],
203
+ 'default_language': json['default_language'] == null ? undefined : json['default_language'],
182
204
  'created_at': (new Date(json['created_at'])),
183
205
  'updated_at': (new Date(json['updated_at'])),
184
206
  'read_at': json['read_at'] == null ? undefined : (new Date(json['read_at'])),
@@ -208,10 +230,12 @@ export function NotificationToJSONTyped(value?: Notification | null, ignoreDiscr
208
230
  'user_id': value['user_id'],
209
231
  'created_by': value['created_by'],
210
232
  'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
233
+ 'send_email': value['send_email'],
234
+ 'localized_content': value['localized_content'],
235
+ 'default_language': value['default_language'],
211
236
  'created_at': value['created_at'].toISOString(),
212
237
  'updated_at': value['updated_at'].toISOString(),
213
238
  'read_at': value['read_at'] == null ? value['read_at'] : value['read_at'].toISOString(),
214
239
  'dismissed_at': value['dismissed_at'] == null ? value['dismissed_at'] : value['dismissed_at'].toISOString(),
215
240
  };
216
241
  }
217
-
@@ -96,6 +96,24 @@ export interface NotificationCreate {
96
96
  * @memberof NotificationCreate
97
97
  */
98
98
  expires_at?: Date | null;
99
+ /**
100
+ *
101
+ * @type {boolean}
102
+ * @memberof NotificationCreate
103
+ */
104
+ send_email?: boolean;
105
+ /**
106
+ *
107
+ * @type {{ [key: string]: { [key: string]: any; }; }}
108
+ * @memberof NotificationCreate
109
+ */
110
+ localized_content?: { [key: string]: { [key: string]: any; }; } | null;
111
+ /**
112
+ *
113
+ * @type {string}
114
+ * @memberof NotificationCreate
115
+ */
116
+ default_language?: string | null;
99
117
  }
100
118
 
101
119
 
@@ -127,6 +145,9 @@ export function NotificationCreateFromJSONTyped(json: any, ignoreDiscriminator:
127
145
  'content': json['content'],
128
146
  'user_id': json['user_id'] == null ? undefined : json['user_id'],
129
147
  'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
148
+ 'send_email': json['send_email'] == null ? undefined : json['send_email'],
149
+ 'localized_content': json['localized_content'] == null ? undefined : json['localized_content'],
150
+ 'default_language': json['default_language'] == null ? undefined : json['default_language'],
130
151
  };
131
152
  }
132
153
 
@@ -149,6 +170,8 @@ export function NotificationCreateToJSONTyped(value?: NotificationCreate | null,
149
170
  'content': value['content'],
150
171
  'user_id': value['user_id'],
151
172
  'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
173
+ 'send_email': value['send_email'],
174
+ 'localized_content': value['localized_content'],
175
+ 'default_language': value['default_language'],
152
176
  };
153
177
  }
154
-
@@ -64,6 +64,24 @@ export interface NotificationUpdate {
64
64
  * @memberof NotificationUpdate
65
65
  */
66
66
  expires_at?: Date | null;
67
+ /**
68
+ *
69
+ * @type {boolean}
70
+ * @memberof NotificationUpdate
71
+ */
72
+ send_email?: boolean;
73
+ /**
74
+ *
75
+ * @type {{ [key: string]: { [key: string]: any; }; }}
76
+ * @memberof NotificationUpdate
77
+ */
78
+ localized_content?: { [key: string]: { [key: string]: any; }; } | null;
79
+ /**
80
+ *
81
+ * @type {string}
82
+ * @memberof NotificationUpdate
83
+ */
84
+ default_language?: string | null;
67
85
  }
68
86
 
69
87
 
@@ -90,6 +108,9 @@ export function NotificationUpdateFromJSONTyped(json: any, ignoreDiscriminator:
90
108
  'title': json['title'] == null ? undefined : json['title'],
91
109
  'content': json['content'] == null ? undefined : json['content'],
92
110
  'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
111
+ 'send_email': json['send_email'] == null ? undefined : json['send_email'],
112
+ 'localized_content': json['localized_content'] == null ? undefined : json['localized_content'],
113
+ 'default_language': json['default_language'] == null ? undefined : json['default_language'],
93
114
  };
94
115
  }
95
116
 
@@ -109,6 +130,8 @@ export function NotificationUpdateToJSONTyped(value?: NotificationUpdate | null,
109
130
  'title': value['title'],
110
131
  'content': value['content'],
111
132
  'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
133
+ 'send_email': value['send_email'],
134
+ 'localized_content': value['localized_content'],
135
+ 'default_language': value['default_language'],
112
136
  };
113
137
  }
114
-
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tivadar AI Backend API
5
+ * Unified REST API for Tivadar AI Voice Agents platform
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface UserPreferences
20
+ */
21
+ export interface UserPreferences {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof UserPreferences
26
+ */
27
+ user_id: string;
28
+ /**
29
+ * User preferred locale in BCP-47 format (for example en, en-US, hu-HU)
30
+ * @type {string}
31
+ * @memberof UserPreferences
32
+ */
33
+ preferred_language?: string | null;
34
+ }
35
+
36
+
37
+
38
+ /**
39
+ * Check if a given object implements the UserPreferences interface.
40
+ */
41
+ export function instanceOfUserPreferences(value: object): value is UserPreferences {
42
+ if (!('user_id' in value) || value['user_id'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function UserPreferencesFromJSON(json: any): UserPreferences {
47
+ return UserPreferencesFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function UserPreferencesFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreferences {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'user_id': json['user_id'],
57
+ 'preferred_language': json['preferred_language'] == null ? undefined : json['preferred_language'],
58
+ };
59
+ }
60
+
61
+ export function UserPreferencesToJSON(json: any): UserPreferences {
62
+ return UserPreferencesToJSONTyped(json, false);
63
+ }
64
+
65
+ export function UserPreferencesToJSONTyped(value?: UserPreferences | null, ignoreDiscriminator: boolean = false): any {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+
70
+ return {
71
+
72
+ 'user_id': value['user_id'],
73
+ 'preferred_language': value['preferred_language'],
74
+ };
75
+ }
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tivadar AI Backend API
5
+ * Unified REST API for Tivadar AI Voice Agents platform
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface UserPreferencesUpdate
20
+ */
21
+ export interface UserPreferencesUpdate {
22
+ /**
23
+ * User preferred locale in BCP-47 format, or null to unset
24
+ * @type {string}
25
+ * @memberof UserPreferencesUpdate
26
+ */
27
+ preferred_language?: string | null;
28
+ }
29
+
30
+
31
+
32
+ /**
33
+ * Check if a given object implements the UserPreferencesUpdate interface.
34
+ */
35
+ export function instanceOfUserPreferencesUpdate(value: object): value is UserPreferencesUpdate {
36
+ return true;
37
+ }
38
+
39
+ export function UserPreferencesUpdateFromJSON(json: any): UserPreferencesUpdate {
40
+ return UserPreferencesUpdateFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function UserPreferencesUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPreferencesUpdate {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+
49
+ 'preferred_language': json['preferred_language'] == null ? undefined : json['preferred_language'],
50
+ };
51
+ }
52
+
53
+ export function UserPreferencesUpdateToJSON(json: any): UserPreferencesUpdate {
54
+ return UserPreferencesUpdateToJSONTyped(json, false);
55
+ }
56
+
57
+ export function UserPreferencesUpdateToJSONTyped(value?: UserPreferencesUpdate | null, ignoreDiscriminator: boolean = false): any {
58
+ if (value == null) {
59
+ return value;
60
+ }
61
+
62
+ return {
63
+
64
+ 'preferred_language': value['preferred_language'],
65
+ };
66
+ }