@l7mp/tivadar-ai-api-sdk 0.2.3 → 0.2.5

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 (61) hide show
  1. package/dist/api-client.d.ts +7 -1
  2. package/dist/api-client.js +6 -0
  3. package/dist/apis/ProfileApi.d.ts +41 -0
  4. package/dist/apis/ProfileApi.js +112 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/api-client.d.ts +7 -1
  8. package/dist/esm/api-client.js +6 -0
  9. package/dist/esm/apis/ProfileApi.d.ts +41 -0
  10. package/dist/esm/apis/ProfileApi.js +108 -0
  11. package/dist/esm/apis/index.d.ts +1 -0
  12. package/dist/esm/apis/index.js +1 -0
  13. package/dist/esm/models/CalendarEvent.d.ts +6 -0
  14. package/dist/esm/models/CalendarEvent.js +2 -0
  15. package/dist/esm/models/CalendarEventCreate.d.ts +6 -0
  16. package/dist/esm/models/CalendarEventCreate.js +2 -0
  17. package/dist/esm/models/CalendarEventUpdate.d.ts +6 -0
  18. package/dist/esm/models/CalendarEventUpdate.js +2 -0
  19. package/dist/esm/models/Notification.d.ts +22 -0
  20. package/dist/esm/models/Notification.js +8 -0
  21. package/dist/esm/models/NotificationCreate.d.ts +22 -0
  22. package/dist/esm/models/NotificationCreate.js +6 -0
  23. package/dist/esm/models/NotificationUpdate.d.ts +22 -0
  24. package/dist/esm/models/NotificationUpdate.js +6 -0
  25. package/dist/esm/models/UserPreferences.d.ts +38 -0
  26. package/dist/esm/models/UserPreferences.js +45 -0
  27. package/dist/esm/models/UserPreferencesUpdate.d.ts +32 -0
  28. package/dist/esm/models/UserPreferencesUpdate.js +41 -0
  29. package/dist/esm/models/index.d.ts +2 -0
  30. package/dist/esm/models/index.js +2 -0
  31. package/dist/models/CalendarEvent.d.ts +6 -0
  32. package/dist/models/CalendarEvent.js +2 -0
  33. package/dist/models/CalendarEventCreate.d.ts +6 -0
  34. package/dist/models/CalendarEventCreate.js +2 -0
  35. package/dist/models/CalendarEventUpdate.d.ts +6 -0
  36. package/dist/models/CalendarEventUpdate.js +2 -0
  37. package/dist/models/Notification.d.ts +22 -0
  38. package/dist/models/Notification.js +8 -0
  39. package/dist/models/NotificationCreate.d.ts +22 -0
  40. package/dist/models/NotificationCreate.js +6 -0
  41. package/dist/models/NotificationUpdate.d.ts +22 -0
  42. package/dist/models/NotificationUpdate.js +6 -0
  43. package/dist/models/UserPreferences.d.ts +38 -0
  44. package/dist/models/UserPreferences.js +52 -0
  45. package/dist/models/UserPreferencesUpdate.d.ts +32 -0
  46. package/dist/models/UserPreferencesUpdate.js +48 -0
  47. package/dist/models/index.d.ts +2 -0
  48. package/dist/models/index.js +2 -0
  49. package/package.json +1 -1
  50. package/src/api-client.ts +13 -0
  51. package/src/apis/ProfileApi.ts +142 -0
  52. package/src/apis/index.ts +1 -0
  53. package/src/models/CalendarEvent.ts +8 -1
  54. package/src/models/CalendarEventCreate.ts +8 -1
  55. package/src/models/CalendarEventUpdate.ts +8 -1
  56. package/src/models/Notification.ts +25 -1
  57. package/src/models/NotificationCreate.ts +24 -1
  58. package/src/models/NotificationUpdate.ts +24 -1
  59. package/src/models/UserPreferences.ts +75 -0
  60. package/src/models/UserPreferencesUpdate.ts +66 -0
  61. 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.3",
3
+ "version": "0.2.5",
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"]>;
@@ -183,6 +189,7 @@ export class Api {
183
189
  private readonly membersApi: MembersApi;
184
190
  private readonly organizationsApi: OrganizationsApi;
185
191
  private readonly playgroundApi: PlaygroundApi;
192
+ private readonly profileApi: ProfileApi;
186
193
  private readonly ragApi: RAGApi;
187
194
  private readonly recordingsApi: RecordingsApi;
188
195
  private readonly sipApi: SIPApi;
@@ -221,6 +228,7 @@ export class Api {
221
228
  this.membersApi = new MembersApi(configuration);
222
229
  this.organizationsApi = new OrganizationsApi(configuration);
223
230
  this.playgroundApi = new PlaygroundApi(configuration);
231
+ this.profileApi = new ProfileApi(configuration);
224
232
  this.ragApi = new RAGApi(configuration);
225
233
  this.recordingsApi = new RecordingsApi(configuration);
226
234
  this.sipApi = new SIPApi(configuration);
@@ -304,6 +312,11 @@ export class Api {
304
312
  sandboxToken: (organizationId, voiceAgentId, options) => this.playgroundApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost({ organizationId, voiceAgentId }, options),
305
313
  };
306
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
+
307
320
  this.rag = {
308
321
  list: (organizationId, options) => this.ragApi.organizationsOrganizationIdRagGet({ organizationId }, options),
309
322
  create: (organizationId, ragConfigCreate, options) => this.ragApi.organizationsOrganizationIdRagPost({ organizationId, ragConfigCreate }, options),
@@ -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
+ }
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';
@@ -37,6 +37,12 @@ export interface CalendarEvent {
37
37
  * @memberof CalendarEvent
38
38
  */
39
39
  description?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof CalendarEvent
44
+ */
45
+ caller?: string | null;
40
46
  /**
41
47
  *
42
48
  * @type {Date}
@@ -82,6 +88,7 @@ export function CalendarEventFromJSONTyped(json: any, ignoreDiscriminator: boole
82
88
  'id': json['id'],
83
89
  'name': json['name'],
84
90
  'description': json['description'] == null ? undefined : json['description'],
91
+ 'caller': json['caller'] == null ? undefined : json['caller'],
85
92
  'start_time': (new Date(json['start_time'])),
86
93
  'end_time': (new Date(json['end_time'])),
87
94
  'calendar_id': json['calendar_id'],
@@ -102,9 +109,9 @@ export function CalendarEventToJSONTyped(value?: CalendarEvent | null, ignoreDis
102
109
  'id': value['id'],
103
110
  'name': value['name'],
104
111
  'description': value['description'],
112
+ 'caller': value['caller'],
105
113
  'start_time': value['start_time'].toISOString(),
106
114
  'end_time': value['end_time'].toISOString(),
107
115
  'calendar_id': value['calendar_id'],
108
116
  };
109
117
  }
110
-
@@ -31,6 +31,12 @@ export interface CalendarEventCreate {
31
31
  * @memberof CalendarEventCreate
32
32
  */
33
33
  description?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof CalendarEventCreate
38
+ */
39
+ caller?: string | null;
34
40
  /**
35
41
  *
36
42
  * @type {Date}
@@ -67,6 +73,7 @@ export function CalendarEventCreateFromJSONTyped(json: any, ignoreDiscriminator:
67
73
 
68
74
  'name': json['name'],
69
75
  'description': json['description'] == null ? undefined : json['description'],
76
+ 'caller': json['caller'] == null ? undefined : json['caller'],
70
77
  'start_time': (new Date(json['start_time'])),
71
78
  'end_time': (new Date(json['end_time'])),
72
79
  };
@@ -85,8 +92,8 @@ export function CalendarEventCreateToJSONTyped(value?: CalendarEventCreate | nul
85
92
 
86
93
  'name': value['name'],
87
94
  'description': value['description'],
95
+ 'caller': value['caller'],
88
96
  'start_time': value['start_time'].toISOString(),
89
97
  'end_time': value['end_time'].toISOString(),
90
98
  };
91
99
  }
92
-
@@ -31,6 +31,12 @@ export interface CalendarEventUpdate {
31
31
  * @memberof CalendarEventUpdate
32
32
  */
33
33
  description?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof CalendarEventUpdate
38
+ */
39
+ caller?: string | null;
34
40
  /**
35
41
  *
36
42
  * @type {Date}
@@ -64,6 +70,7 @@ export function CalendarEventUpdateFromJSONTyped(json: any, ignoreDiscriminator:
64
70
 
65
71
  'name': json['name'] == null ? undefined : json['name'],
66
72
  'description': json['description'] == null ? undefined : json['description'],
73
+ 'caller': json['caller'] == null ? undefined : json['caller'],
67
74
  'start_time': json['start_time'] == null ? undefined : (new Date(json['start_time'])),
68
75
  'end_time': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
69
76
  };
@@ -82,8 +89,8 @@ export function CalendarEventUpdateToJSONTyped(value?: CalendarEventUpdate | nul
82
89
 
83
90
  'name': value['name'],
84
91
  'description': value['description'],
92
+ 'caller': value['caller'],
85
93
  'start_time': value['start_time'] == null ? value['start_time'] : value['start_time'].toISOString(),
86
94
  'end_time': value['end_time'] == null ? value['end_time'] : value['end_time'].toISOString(),
87
95
  };
88
96
  }
89
-
@@ -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
+ }
@@ -85,6 +85,8 @@ export * from './TtsProviderVoice';
85
85
  export * from './UnpauseSubscriptionResponse';
86
86
  export * from './UpdatePlanRequest';
87
87
  export * from './UpdatePlanResponse';
88
+ export * from './UserPreferences';
89
+ export * from './UserPreferencesUpdate';
88
90
  export * from './VoiceAgent';
89
91
  export * from './VoiceAgentCreate';
90
92
  export * from './VoiceAgentMetadata';