@l7mp/tivadar-ai-api-sdk 0.1.9 → 0.2.1

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 (66) hide show
  1. package/dist/api-client.d.ts +16 -1
  2. package/dist/api-client.js +9 -0
  3. package/dist/apis/NotificationsApi.d.ts +133 -0
  4. package/dist/apis/NotificationsApi.js +360 -0
  5. package/dist/apis/SIPApi.d.ts +13 -0
  6. package/dist/apis/SIPApi.js +39 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/api-client.d.ts +16 -1
  10. package/dist/esm/api-client.js +9 -0
  11. package/dist/esm/apis/NotificationsApi.d.ts +133 -0
  12. package/dist/esm/apis/NotificationsApi.js +356 -0
  13. package/dist/esm/apis/SIPApi.d.ts +13 -0
  14. package/dist/esm/apis/SIPApi.js +39 -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 +120 -0
  18. package/dist/esm/models/Notification.js +91 -0
  19. package/dist/esm/models/NotificationChannel.d.ts +26 -0
  20. package/dist/esm/models/NotificationChannel.js +44 -0
  21. package/dist/esm/models/NotificationCreate.d.ts +78 -0
  22. package/dist/esm/models/NotificationCreate.js +63 -0
  23. package/dist/esm/models/NotificationScope.d.ts +26 -0
  24. package/dist/esm/models/NotificationScope.js +44 -0
  25. package/dist/esm/models/NotificationSeverity.d.ts +27 -0
  26. package/dist/esm/models/NotificationSeverity.js +45 -0
  27. package/dist/esm/models/NotificationType.d.ts +25 -0
  28. package/dist/esm/models/NotificationType.js +43 -0
  29. package/dist/esm/models/NotificationUpdate.d.ts +58 -0
  30. package/dist/esm/models/NotificationUpdate.js +51 -0
  31. package/dist/esm/models/OrganizationsOrganizationIdNotificationsGet200Response.d.ts +39 -0
  32. package/dist/esm/models/OrganizationsOrganizationIdNotificationsGet200Response.js +44 -0
  33. package/dist/esm/models/index.d.ts +8 -0
  34. package/dist/esm/models/index.js +8 -0
  35. package/dist/models/Notification.d.ts +120 -0
  36. package/dist/models/Notification.js +98 -0
  37. package/dist/models/NotificationChannel.d.ts +26 -0
  38. package/dist/models/NotificationChannel.js +52 -0
  39. package/dist/models/NotificationCreate.d.ts +78 -0
  40. package/dist/models/NotificationCreate.js +70 -0
  41. package/dist/models/NotificationScope.d.ts +26 -0
  42. package/dist/models/NotificationScope.js +52 -0
  43. package/dist/models/NotificationSeverity.d.ts +27 -0
  44. package/dist/models/NotificationSeverity.js +53 -0
  45. package/dist/models/NotificationType.d.ts +25 -0
  46. package/dist/models/NotificationType.js +51 -0
  47. package/dist/models/NotificationUpdate.d.ts +58 -0
  48. package/dist/models/NotificationUpdate.js +58 -0
  49. package/dist/models/OrganizationsOrganizationIdNotificationsGet200Response.d.ts +39 -0
  50. package/dist/models/OrganizationsOrganizationIdNotificationsGet200Response.js +51 -0
  51. package/dist/models/index.d.ts +8 -0
  52. package/dist/models/index.js +8 -0
  53. package/package.json +1 -1
  54. package/src/api-client.ts +23 -0
  55. package/src/apis/NotificationsApi.ts +509 -0
  56. package/src/apis/SIPApi.ts +51 -0
  57. package/src/apis/index.ts +1 -0
  58. package/src/models/Notification.ts +217 -0
  59. package/src/models/NotificationChannel.ts +54 -0
  60. package/src/models/NotificationCreate.ts +154 -0
  61. package/src/models/NotificationScope.ts +54 -0
  62. package/src/models/NotificationSeverity.ts +55 -0
  63. package/src/models/NotificationType.ts +53 -0
  64. package/src/models/NotificationUpdate.ts +114 -0
  65. package/src/models/OrganizationsOrganizationIdNotificationsGet200Response.ts +81 -0
  66. package/src/models/index.ts +8 -0
@@ -0,0 +1,217 @@
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
+ import type { NotificationChannel } from './NotificationChannel';
17
+ import {
18
+ NotificationChannelFromJSON,
19
+ NotificationChannelFromJSONTyped,
20
+ NotificationChannelToJSON,
21
+ NotificationChannelToJSONTyped,
22
+ } from './NotificationChannel';
23
+ import type { NotificationType } from './NotificationType';
24
+ import {
25
+ NotificationTypeFromJSON,
26
+ NotificationTypeFromJSONTyped,
27
+ NotificationTypeToJSON,
28
+ NotificationTypeToJSONTyped,
29
+ } from './NotificationType';
30
+ import type { NotificationScope } from './NotificationScope';
31
+ import {
32
+ NotificationScopeFromJSON,
33
+ NotificationScopeFromJSONTyped,
34
+ NotificationScopeToJSON,
35
+ NotificationScopeToJSONTyped,
36
+ } from './NotificationScope';
37
+ import type { NotificationSeverity } from './NotificationSeverity';
38
+ import {
39
+ NotificationSeverityFromJSON,
40
+ NotificationSeverityFromJSONTyped,
41
+ NotificationSeverityToJSON,
42
+ NotificationSeverityToJSONTyped,
43
+ } from './NotificationSeverity';
44
+
45
+ /**
46
+ *
47
+ * @export
48
+ * @interface Notification
49
+ */
50
+ export interface Notification {
51
+ /**
52
+ *
53
+ * @type {string}
54
+ * @memberof Notification
55
+ */
56
+ id: string;
57
+ /**
58
+ *
59
+ * @type {NotificationType}
60
+ * @memberof Notification
61
+ */
62
+ type: NotificationType;
63
+ /**
64
+ *
65
+ * @type {NotificationSeverity}
66
+ * @memberof Notification
67
+ */
68
+ severity: NotificationSeverity;
69
+ /**
70
+ *
71
+ * @type {NotificationChannel}
72
+ * @memberof Notification
73
+ */
74
+ channel: NotificationChannel;
75
+ /**
76
+ *
77
+ * @type {NotificationScope}
78
+ * @memberof Notification
79
+ */
80
+ scope: NotificationScope;
81
+ /**
82
+ *
83
+ * @type {string}
84
+ * @memberof Notification
85
+ */
86
+ title: string;
87
+ /**
88
+ * Supports markdown formatting and embedded links
89
+ * @type {string}
90
+ * @memberof Notification
91
+ */
92
+ content: string;
93
+ /**
94
+ *
95
+ * @type {string}
96
+ * @memberof Notification
97
+ */
98
+ organization_id?: string | null;
99
+ /**
100
+ *
101
+ * @type {string}
102
+ * @memberof Notification
103
+ */
104
+ user_id?: string | null;
105
+ /**
106
+ *
107
+ * @type {string}
108
+ * @memberof Notification
109
+ */
110
+ created_by?: string | null;
111
+ /**
112
+ *
113
+ * @type {Date}
114
+ * @memberof Notification
115
+ */
116
+ expires_at?: Date | null;
117
+ /**
118
+ *
119
+ * @type {Date}
120
+ * @memberof Notification
121
+ */
122
+ created_at: Date;
123
+ /**
124
+ *
125
+ * @type {Date}
126
+ * @memberof Notification
127
+ */
128
+ updated_at: Date;
129
+ /**
130
+ * When the current user read this notification (present in list responses)
131
+ * @type {Date}
132
+ * @memberof Notification
133
+ */
134
+ read_at?: Date | null;
135
+ /**
136
+ * When the current user dismissed this notification (present in list responses)
137
+ * @type {Date}
138
+ * @memberof Notification
139
+ */
140
+ dismissed_at?: Date | null;
141
+ }
142
+
143
+
144
+
145
+ /**
146
+ * Check if a given object implements the Notification interface.
147
+ */
148
+ export function instanceOfNotification(value: object): value is Notification {
149
+ if (!('id' in value) || value['id'] === undefined) return false;
150
+ if (!('type' in value) || value['type'] === undefined) return false;
151
+ if (!('severity' in value) || value['severity'] === undefined) return false;
152
+ if (!('channel' in value) || value['channel'] === undefined) return false;
153
+ if (!('scope' in value) || value['scope'] === undefined) return false;
154
+ if (!('title' in value) || value['title'] === undefined) return false;
155
+ if (!('content' in value) || value['content'] === undefined) return false;
156
+ if (!('created_at' in value) || value['created_at'] === undefined) return false;
157
+ if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
158
+ return true;
159
+ }
160
+
161
+ export function NotificationFromJSON(json: any): Notification {
162
+ return NotificationFromJSONTyped(json, false);
163
+ }
164
+
165
+ export function NotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Notification {
166
+ if (json == null) {
167
+ return json;
168
+ }
169
+ return {
170
+
171
+ 'id': json['id'],
172
+ 'type': NotificationTypeFromJSON(json['type']),
173
+ 'severity': NotificationSeverityFromJSON(json['severity']),
174
+ 'channel': NotificationChannelFromJSON(json['channel']),
175
+ 'scope': NotificationScopeFromJSON(json['scope']),
176
+ 'title': json['title'],
177
+ 'content': json['content'],
178
+ 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'],
179
+ 'user_id': json['user_id'] == null ? undefined : json['user_id'],
180
+ 'created_by': json['created_by'] == null ? undefined : json['created_by'],
181
+ 'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
182
+ 'created_at': (new Date(json['created_at'])),
183
+ 'updated_at': (new Date(json['updated_at'])),
184
+ 'read_at': json['read_at'] == null ? undefined : (new Date(json['read_at'])),
185
+ 'dismissed_at': json['dismissed_at'] == null ? undefined : (new Date(json['dismissed_at'])),
186
+ };
187
+ }
188
+
189
+ export function NotificationToJSON(json: any): Notification {
190
+ return NotificationToJSONTyped(json, false);
191
+ }
192
+
193
+ export function NotificationToJSONTyped(value?: Notification | null, ignoreDiscriminator: boolean = false): any {
194
+ if (value == null) {
195
+ return value;
196
+ }
197
+
198
+ return {
199
+
200
+ 'id': value['id'],
201
+ 'type': NotificationTypeToJSON(value['type']),
202
+ 'severity': NotificationSeverityToJSON(value['severity']),
203
+ 'channel': NotificationChannelToJSON(value['channel']),
204
+ 'scope': NotificationScopeToJSON(value['scope']),
205
+ 'title': value['title'],
206
+ 'content': value['content'],
207
+ 'organization_id': value['organization_id'],
208
+ 'user_id': value['user_id'],
209
+ 'created_by': value['created_by'],
210
+ 'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
211
+ 'created_at': value['created_at'].toISOString(),
212
+ 'updated_at': value['updated_at'].toISOString(),
213
+ 'read_at': value['read_at'] == null ? value['read_at'] : value['read_at'].toISOString(),
214
+ 'dismissed_at': value['dismissed_at'] == null ? value['dismissed_at'] : value['dismissed_at'].toISOString(),
215
+ };
216
+ }
217
+
@@ -0,0 +1,54 @@
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
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const NotificationChannel = {
21
+ Email: 'email',
22
+ Ui: 'ui',
23
+ Both: 'both'
24
+ } as const;
25
+ export type NotificationChannel = typeof NotificationChannel[keyof typeof NotificationChannel];
26
+
27
+
28
+ export function instanceOfNotificationChannel(value: any): boolean {
29
+ for (const key in NotificationChannel) {
30
+ if (Object.prototype.hasOwnProperty.call(NotificationChannel, key)) {
31
+ if (NotificationChannel[key as keyof typeof NotificationChannel] === value) {
32
+ return true;
33
+ }
34
+ }
35
+ }
36
+ return false;
37
+ }
38
+
39
+ export function NotificationChannelFromJSON(json: any): NotificationChannel {
40
+ return NotificationChannelFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function NotificationChannelFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationChannel {
44
+ return json as NotificationChannel;
45
+ }
46
+
47
+ export function NotificationChannelToJSON(value?: NotificationChannel | null): any {
48
+ return value as any;
49
+ }
50
+
51
+ export function NotificationChannelToJSONTyped(value: any, ignoreDiscriminator: boolean): NotificationChannel {
52
+ return value as NotificationChannel;
53
+ }
54
+
@@ -0,0 +1,154 @@
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
+ import type { NotificationChannel } from './NotificationChannel';
17
+ import {
18
+ NotificationChannelFromJSON,
19
+ NotificationChannelFromJSONTyped,
20
+ NotificationChannelToJSON,
21
+ NotificationChannelToJSONTyped,
22
+ } from './NotificationChannel';
23
+ import type { NotificationType } from './NotificationType';
24
+ import {
25
+ NotificationTypeFromJSON,
26
+ NotificationTypeFromJSONTyped,
27
+ NotificationTypeToJSON,
28
+ NotificationTypeToJSONTyped,
29
+ } from './NotificationType';
30
+ import type { NotificationScope } from './NotificationScope';
31
+ import {
32
+ NotificationScopeFromJSON,
33
+ NotificationScopeFromJSONTyped,
34
+ NotificationScopeToJSON,
35
+ NotificationScopeToJSONTyped,
36
+ } from './NotificationScope';
37
+ import type { NotificationSeverity } from './NotificationSeverity';
38
+ import {
39
+ NotificationSeverityFromJSON,
40
+ NotificationSeverityFromJSONTyped,
41
+ NotificationSeverityToJSON,
42
+ NotificationSeverityToJSONTyped,
43
+ } from './NotificationSeverity';
44
+
45
+ /**
46
+ *
47
+ * @export
48
+ * @interface NotificationCreate
49
+ */
50
+ export interface NotificationCreate {
51
+ /**
52
+ *
53
+ * @type {NotificationType}
54
+ * @memberof NotificationCreate
55
+ */
56
+ type?: NotificationType;
57
+ /**
58
+ *
59
+ * @type {NotificationSeverity}
60
+ * @memberof NotificationCreate
61
+ */
62
+ severity?: NotificationSeverity;
63
+ /**
64
+ *
65
+ * @type {NotificationChannel}
66
+ * @memberof NotificationCreate
67
+ */
68
+ channel?: NotificationChannel;
69
+ /**
70
+ *
71
+ * @type {NotificationScope}
72
+ * @memberof NotificationCreate
73
+ */
74
+ scope?: NotificationScope;
75
+ /**
76
+ *
77
+ * @type {string}
78
+ * @memberof NotificationCreate
79
+ */
80
+ title: string;
81
+ /**
82
+ * Supports markdown formatting and embedded links
83
+ * @type {string}
84
+ * @memberof NotificationCreate
85
+ */
86
+ content: string;
87
+ /**
88
+ * Required when scope is 'user'
89
+ * @type {string}
90
+ * @memberof NotificationCreate
91
+ */
92
+ user_id?: string | null;
93
+ /**
94
+ *
95
+ * @type {Date}
96
+ * @memberof NotificationCreate
97
+ */
98
+ expires_at?: Date | null;
99
+ }
100
+
101
+
102
+
103
+ /**
104
+ * Check if a given object implements the NotificationCreate interface.
105
+ */
106
+ export function instanceOfNotificationCreate(value: object): value is NotificationCreate {
107
+ if (!('title' in value) || value['title'] === undefined) return false;
108
+ if (!('content' in value) || value['content'] === undefined) return false;
109
+ return true;
110
+ }
111
+
112
+ export function NotificationCreateFromJSON(json: any): NotificationCreate {
113
+ return NotificationCreateFromJSONTyped(json, false);
114
+ }
115
+
116
+ export function NotificationCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationCreate {
117
+ if (json == null) {
118
+ return json;
119
+ }
120
+ return {
121
+
122
+ 'type': json['type'] == null ? undefined : NotificationTypeFromJSON(json['type']),
123
+ 'severity': json['severity'] == null ? undefined : NotificationSeverityFromJSON(json['severity']),
124
+ 'channel': json['channel'] == null ? undefined : NotificationChannelFromJSON(json['channel']),
125
+ 'scope': json['scope'] == null ? undefined : NotificationScopeFromJSON(json['scope']),
126
+ 'title': json['title'],
127
+ 'content': json['content'],
128
+ 'user_id': json['user_id'] == null ? undefined : json['user_id'],
129
+ 'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
130
+ };
131
+ }
132
+
133
+ export function NotificationCreateToJSON(json: any): NotificationCreate {
134
+ return NotificationCreateToJSONTyped(json, false);
135
+ }
136
+
137
+ export function NotificationCreateToJSONTyped(value?: NotificationCreate | null, ignoreDiscriminator: boolean = false): any {
138
+ if (value == null) {
139
+ return value;
140
+ }
141
+
142
+ return {
143
+
144
+ 'type': NotificationTypeToJSON(value['type']),
145
+ 'severity': NotificationSeverityToJSON(value['severity']),
146
+ 'channel': NotificationChannelToJSON(value['channel']),
147
+ 'scope': NotificationScopeToJSON(value['scope']),
148
+ 'title': value['title'],
149
+ 'content': value['content'],
150
+ 'user_id': value['user_id'],
151
+ 'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
152
+ };
153
+ }
154
+
@@ -0,0 +1,54 @@
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
+ /**
17
+ * 'global' targets all users, 'organization' targets org members, 'user' targets a specific user
18
+ * @export
19
+ */
20
+ export const NotificationScope = {
21
+ Global: 'global',
22
+ Organization: 'organization',
23
+ User: 'user'
24
+ } as const;
25
+ export type NotificationScope = typeof NotificationScope[keyof typeof NotificationScope];
26
+
27
+
28
+ export function instanceOfNotificationScope(value: any): boolean {
29
+ for (const key in NotificationScope) {
30
+ if (Object.prototype.hasOwnProperty.call(NotificationScope, key)) {
31
+ if (NotificationScope[key as keyof typeof NotificationScope] === value) {
32
+ return true;
33
+ }
34
+ }
35
+ }
36
+ return false;
37
+ }
38
+
39
+ export function NotificationScopeFromJSON(json: any): NotificationScope {
40
+ return NotificationScopeFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function NotificationScopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationScope {
44
+ return json as NotificationScope;
45
+ }
46
+
47
+ export function NotificationScopeToJSON(value?: NotificationScope | null): any {
48
+ return value as any;
49
+ }
50
+
51
+ export function NotificationScopeToJSONTyped(value: any, ignoreDiscriminator: boolean): NotificationScope {
52
+ return value as NotificationScope;
53
+ }
54
+
@@ -0,0 +1,55 @@
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
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const NotificationSeverity = {
21
+ Danger: 'danger',
22
+ Warning: 'warning',
23
+ Info: 'info',
24
+ Notification: 'notification'
25
+ } as const;
26
+ export type NotificationSeverity = typeof NotificationSeverity[keyof typeof NotificationSeverity];
27
+
28
+
29
+ export function instanceOfNotificationSeverity(value: any): boolean {
30
+ for (const key in NotificationSeverity) {
31
+ if (Object.prototype.hasOwnProperty.call(NotificationSeverity, key)) {
32
+ if (NotificationSeverity[key as keyof typeof NotificationSeverity] === value) {
33
+ return true;
34
+ }
35
+ }
36
+ }
37
+ return false;
38
+ }
39
+
40
+ export function NotificationSeverityFromJSON(json: any): NotificationSeverity {
41
+ return NotificationSeverityFromJSONTyped(json, false);
42
+ }
43
+
44
+ export function NotificationSeverityFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationSeverity {
45
+ return json as NotificationSeverity;
46
+ }
47
+
48
+ export function NotificationSeverityToJSON(value?: NotificationSeverity | null): any {
49
+ return value as any;
50
+ }
51
+
52
+ export function NotificationSeverityToJSONTyped(value: any, ignoreDiscriminator: boolean): NotificationSeverity {
53
+ return value as NotificationSeverity;
54
+ }
55
+
@@ -0,0 +1,53 @@
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
+ /**
17
+ * 'announcement' for admin-created, 'system' for automatic notifications
18
+ * @export
19
+ */
20
+ export const NotificationType = {
21
+ Announcement: 'announcement',
22
+ System: 'system'
23
+ } as const;
24
+ export type NotificationType = typeof NotificationType[keyof typeof NotificationType];
25
+
26
+
27
+ export function instanceOfNotificationType(value: any): boolean {
28
+ for (const key in NotificationType) {
29
+ if (Object.prototype.hasOwnProperty.call(NotificationType, key)) {
30
+ if (NotificationType[key as keyof typeof NotificationType] === value) {
31
+ return true;
32
+ }
33
+ }
34
+ }
35
+ return false;
36
+ }
37
+
38
+ export function NotificationTypeFromJSON(json: any): NotificationType {
39
+ return NotificationTypeFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function NotificationTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationType {
43
+ return json as NotificationType;
44
+ }
45
+
46
+ export function NotificationTypeToJSON(value?: NotificationType | null): any {
47
+ return value as any;
48
+ }
49
+
50
+ export function NotificationTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): NotificationType {
51
+ return value as NotificationType;
52
+ }
53
+
@@ -0,0 +1,114 @@
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
+ import type { NotificationChannel } from './NotificationChannel';
17
+ import {
18
+ NotificationChannelFromJSON,
19
+ NotificationChannelFromJSONTyped,
20
+ NotificationChannelToJSON,
21
+ NotificationChannelToJSONTyped,
22
+ } from './NotificationChannel';
23
+ import type { NotificationSeverity } from './NotificationSeverity';
24
+ import {
25
+ NotificationSeverityFromJSON,
26
+ NotificationSeverityFromJSONTyped,
27
+ NotificationSeverityToJSON,
28
+ NotificationSeverityToJSONTyped,
29
+ } from './NotificationSeverity';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface NotificationUpdate
35
+ */
36
+ export interface NotificationUpdate {
37
+ /**
38
+ *
39
+ * @type {NotificationSeverity}
40
+ * @memberof NotificationUpdate
41
+ */
42
+ severity?: NotificationSeverity;
43
+ /**
44
+ *
45
+ * @type {NotificationChannel}
46
+ * @memberof NotificationUpdate
47
+ */
48
+ channel?: NotificationChannel;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof NotificationUpdate
53
+ */
54
+ title?: string;
55
+ /**
56
+ *
57
+ * @type {string}
58
+ * @memberof NotificationUpdate
59
+ */
60
+ content?: string;
61
+ /**
62
+ *
63
+ * @type {Date}
64
+ * @memberof NotificationUpdate
65
+ */
66
+ expires_at?: Date | null;
67
+ }
68
+
69
+
70
+
71
+ /**
72
+ * Check if a given object implements the NotificationUpdate interface.
73
+ */
74
+ export function instanceOfNotificationUpdate(value: object): value is NotificationUpdate {
75
+ return true;
76
+ }
77
+
78
+ export function NotificationUpdateFromJSON(json: any): NotificationUpdate {
79
+ return NotificationUpdateFromJSONTyped(json, false);
80
+ }
81
+
82
+ export function NotificationUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationUpdate {
83
+ if (json == null) {
84
+ return json;
85
+ }
86
+ return {
87
+
88
+ 'severity': json['severity'] == null ? undefined : NotificationSeverityFromJSON(json['severity']),
89
+ 'channel': json['channel'] == null ? undefined : NotificationChannelFromJSON(json['channel']),
90
+ 'title': json['title'] == null ? undefined : json['title'],
91
+ 'content': json['content'] == null ? undefined : json['content'],
92
+ 'expires_at': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
93
+ };
94
+ }
95
+
96
+ export function NotificationUpdateToJSON(json: any): NotificationUpdate {
97
+ return NotificationUpdateToJSONTyped(json, false);
98
+ }
99
+
100
+ export function NotificationUpdateToJSONTyped(value?: NotificationUpdate | null, ignoreDiscriminator: boolean = false): any {
101
+ if (value == null) {
102
+ return value;
103
+ }
104
+
105
+ return {
106
+
107
+ 'severity': NotificationSeverityToJSON(value['severity']),
108
+ 'channel': NotificationChannelToJSON(value['channel']),
109
+ 'title': value['title'],
110
+ 'content': value['content'],
111
+ 'expires_at': value['expires_at'] == null ? value['expires_at'] : value['expires_at'].toISOString(),
112
+ };
113
+ }
114
+