@l7mp/tivadar-ai-api-sdk 0.1.10 → 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 (61) hide show
  1. package/dist/api-client.d.ts +15 -1
  2. package/dist/api-client.js +8 -0
  3. package/dist/apis/NotificationsApi.d.ts +133 -0
  4. package/dist/apis/NotificationsApi.js +360 -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 +15 -1
  8. package/dist/esm/api-client.js +8 -0
  9. package/dist/esm/apis/NotificationsApi.d.ts +133 -0
  10. package/dist/esm/apis/NotificationsApi.js +356 -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/Notification.d.ts +120 -0
  14. package/dist/esm/models/Notification.js +91 -0
  15. package/dist/esm/models/NotificationChannel.d.ts +26 -0
  16. package/dist/esm/models/NotificationChannel.js +44 -0
  17. package/dist/esm/models/NotificationCreate.d.ts +78 -0
  18. package/dist/esm/models/NotificationCreate.js +63 -0
  19. package/dist/esm/models/NotificationScope.d.ts +26 -0
  20. package/dist/esm/models/NotificationScope.js +44 -0
  21. package/dist/esm/models/NotificationSeverity.d.ts +27 -0
  22. package/dist/esm/models/NotificationSeverity.js +45 -0
  23. package/dist/esm/models/NotificationType.d.ts +25 -0
  24. package/dist/esm/models/NotificationType.js +43 -0
  25. package/dist/esm/models/NotificationUpdate.d.ts +58 -0
  26. package/dist/esm/models/NotificationUpdate.js +51 -0
  27. package/dist/esm/models/OrganizationsOrganizationIdNotificationsGet200Response.d.ts +39 -0
  28. package/dist/esm/models/OrganizationsOrganizationIdNotificationsGet200Response.js +44 -0
  29. package/dist/esm/models/index.d.ts +8 -0
  30. package/dist/esm/models/index.js +8 -0
  31. package/dist/models/Notification.d.ts +120 -0
  32. package/dist/models/Notification.js +98 -0
  33. package/dist/models/NotificationChannel.d.ts +26 -0
  34. package/dist/models/NotificationChannel.js +52 -0
  35. package/dist/models/NotificationCreate.d.ts +78 -0
  36. package/dist/models/NotificationCreate.js +70 -0
  37. package/dist/models/NotificationScope.d.ts +26 -0
  38. package/dist/models/NotificationScope.js +52 -0
  39. package/dist/models/NotificationSeverity.d.ts +27 -0
  40. package/dist/models/NotificationSeverity.js +53 -0
  41. package/dist/models/NotificationType.d.ts +25 -0
  42. package/dist/models/NotificationType.js +51 -0
  43. package/dist/models/NotificationUpdate.d.ts +58 -0
  44. package/dist/models/NotificationUpdate.js +58 -0
  45. package/dist/models/OrganizationsOrganizationIdNotificationsGet200Response.d.ts +39 -0
  46. package/dist/models/OrganizationsOrganizationIdNotificationsGet200Response.js +51 -0
  47. package/dist/models/index.d.ts +8 -0
  48. package/dist/models/index.js +8 -0
  49. package/package.json +1 -1
  50. package/src/api-client.ts +21 -0
  51. package/src/apis/NotificationsApi.ts +509 -0
  52. package/src/apis/index.ts +1 -0
  53. package/src/models/Notification.ts +217 -0
  54. package/src/models/NotificationChannel.ts +54 -0
  55. package/src/models/NotificationCreate.ts +154 -0
  56. package/src/models/NotificationScope.ts +54 -0
  57. package/src/models/NotificationSeverity.ts +55 -0
  58. package/src/models/NotificationType.ts +53 -0
  59. package/src/models/NotificationUpdate.ts +114 -0
  60. package/src/models/OrganizationsOrganizationIdNotificationsGet200Response.ts +81 -0
  61. package/src/models/index.ts +8 -0
@@ -0,0 +1,509 @@
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
+ Notification,
19
+ NotificationCreate,
20
+ NotificationScope,
21
+ NotificationSeverity,
22
+ NotificationType,
23
+ NotificationUpdate,
24
+ OrganizationsOrganizationIdNotificationsGet200Response,
25
+ } from '../models/index';
26
+ import {
27
+ NotificationFromJSON,
28
+ NotificationToJSON,
29
+ NotificationCreateFromJSON,
30
+ NotificationCreateToJSON,
31
+ NotificationScopeFromJSON,
32
+ NotificationScopeToJSON,
33
+ NotificationSeverityFromJSON,
34
+ NotificationSeverityToJSON,
35
+ NotificationTypeFromJSON,
36
+ NotificationTypeToJSON,
37
+ NotificationUpdateFromJSON,
38
+ NotificationUpdateToJSON,
39
+ OrganizationsOrganizationIdNotificationsGet200ResponseFromJSON,
40
+ OrganizationsOrganizationIdNotificationsGet200ResponseToJSON,
41
+ } from '../models/index';
42
+
43
+ export interface OrganizationsOrganizationIdNotificationsGetRequest {
44
+ organizationId: string;
45
+ type?: NotificationType;
46
+ severity?: NotificationSeverity;
47
+ scope?: NotificationScope;
48
+ includeDismissed?: OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum;
49
+ includeExpired?: OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum;
50
+ }
51
+
52
+ export interface OrganizationsOrganizationIdNotificationsNotificationIdDeleteRequest {
53
+ organizationId: string;
54
+ notificationId: string;
55
+ }
56
+
57
+ export interface OrganizationsOrganizationIdNotificationsNotificationIdDismissPostRequest {
58
+ organizationId: string;
59
+ notificationId: string;
60
+ }
61
+
62
+ export interface OrganizationsOrganizationIdNotificationsNotificationIdGetRequest {
63
+ organizationId: string;
64
+ notificationId: string;
65
+ }
66
+
67
+ export interface OrganizationsOrganizationIdNotificationsNotificationIdPutRequest {
68
+ organizationId: string;
69
+ notificationId: string;
70
+ notificationUpdate: NotificationUpdate;
71
+ }
72
+
73
+ export interface OrganizationsOrganizationIdNotificationsNotificationIdReadPostRequest {
74
+ organizationId: string;
75
+ notificationId: string;
76
+ }
77
+
78
+ export interface OrganizationsOrganizationIdNotificationsPostRequest {
79
+ organizationId: string;
80
+ notificationCreate: NotificationCreate;
81
+ }
82
+
83
+ /**
84
+ *
85
+ */
86
+ export class NotificationsApi extends runtime.BaseAPI {
87
+
88
+ /**
89
+ * Returns all notifications relevant to the current user within the organization context. Includes global announcements, organization-scoped notifications, and user-specific notifications. Dismissed and expired notifications are excluded by default. Content supports markdown formatting and embedded links.
90
+ * List notifications for the current user
91
+ */
92
+ async organizationsOrganizationIdNotificationsGetRaw(requestParameters: OrganizationsOrganizationIdNotificationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationsOrganizationIdNotificationsGet200Response>> {
93
+ if (requestParameters['organizationId'] == null) {
94
+ throw new runtime.RequiredError(
95
+ 'organizationId',
96
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsGet().'
97
+ );
98
+ }
99
+
100
+ const queryParameters: any = {};
101
+
102
+ if (requestParameters['type'] != null) {
103
+ queryParameters['type'] = requestParameters['type'];
104
+ }
105
+
106
+ if (requestParameters['severity'] != null) {
107
+ queryParameters['severity'] = requestParameters['severity'];
108
+ }
109
+
110
+ if (requestParameters['scope'] != null) {
111
+ queryParameters['scope'] = requestParameters['scope'];
112
+ }
113
+
114
+ if (requestParameters['includeDismissed'] != null) {
115
+ queryParameters['include_dismissed'] = requestParameters['includeDismissed'];
116
+ }
117
+
118
+ if (requestParameters['includeExpired'] != null) {
119
+ queryParameters['include_expired'] = requestParameters['includeExpired'];
120
+ }
121
+
122
+ const headerParameters: runtime.HTTPHeaders = {};
123
+
124
+ if (this.configuration && this.configuration.accessToken) {
125
+ const token = this.configuration.accessToken;
126
+ const tokenString = await token("bearerAuth", []);
127
+
128
+ if (tokenString) {
129
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
130
+ }
131
+ }
132
+
133
+ let urlPath = `/organizations/{organizationId}/notifications`;
134
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
135
+
136
+ const response = await this.request({
137
+ path: urlPath,
138
+ method: 'GET',
139
+ headers: headerParameters,
140
+ query: queryParameters,
141
+ }, initOverrides);
142
+
143
+ return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationsOrganizationIdNotificationsGet200ResponseFromJSON(jsonValue));
144
+ }
145
+
146
+ /**
147
+ * Returns all notifications relevant to the current user within the organization context. Includes global announcements, organization-scoped notifications, and user-specific notifications. Dismissed and expired notifications are excluded by default. Content supports markdown formatting and embedded links.
148
+ * List notifications for the current user
149
+ */
150
+ async organizationsOrganizationIdNotificationsGet(requestParameters: OrganizationsOrganizationIdNotificationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationsOrganizationIdNotificationsGet200Response> {
151
+ const response = await this.organizationsOrganizationIdNotificationsGetRaw(requestParameters, initOverrides);
152
+ return await response.value();
153
+ }
154
+
155
+ /**
156
+ * Delete a notification (admin only)
157
+ */
158
+ async organizationsOrganizationIdNotificationsNotificationIdDeleteRaw(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
159
+ if (requestParameters['organizationId'] == null) {
160
+ throw new runtime.RequiredError(
161
+ 'organizationId',
162
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDelete().'
163
+ );
164
+ }
165
+
166
+ if (requestParameters['notificationId'] == null) {
167
+ throw new runtime.RequiredError(
168
+ 'notificationId',
169
+ 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDelete().'
170
+ );
171
+ }
172
+
173
+ const queryParameters: any = {};
174
+
175
+ const headerParameters: runtime.HTTPHeaders = {};
176
+
177
+ if (this.configuration && this.configuration.accessToken) {
178
+ const token = this.configuration.accessToken;
179
+ const tokenString = await token("bearerAuth", []);
180
+
181
+ if (tokenString) {
182
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
183
+ }
184
+ }
185
+
186
+ let urlPath = `/organizations/{organizationId}/notifications/{notificationId}`;
187
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
188
+ urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
189
+
190
+ const response = await this.request({
191
+ path: urlPath,
192
+ method: 'DELETE',
193
+ headers: headerParameters,
194
+ query: queryParameters,
195
+ }, initOverrides);
196
+
197
+ return new runtime.VoidApiResponse(response);
198
+ }
199
+
200
+ /**
201
+ * Delete a notification (admin only)
202
+ */
203
+ async organizationsOrganizationIdNotificationsNotificationIdDelete(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
204
+ await this.organizationsOrganizationIdNotificationsNotificationIdDeleteRaw(requestParameters, initOverrides);
205
+ }
206
+
207
+ /**
208
+ * Dismisses the notification for the current user. Dismissed notifications are hidden by default.
209
+ * Dismiss a notification
210
+ */
211
+ async organizationsOrganizationIdNotificationsNotificationIdDismissPostRaw(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdDismissPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>> {
212
+ if (requestParameters['organizationId'] == null) {
213
+ throw new runtime.RequiredError(
214
+ 'organizationId',
215
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDismissPost().'
216
+ );
217
+ }
218
+
219
+ if (requestParameters['notificationId'] == null) {
220
+ throw new runtime.RequiredError(
221
+ 'notificationId',
222
+ 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDismissPost().'
223
+ );
224
+ }
225
+
226
+ const queryParameters: any = {};
227
+
228
+ const headerParameters: runtime.HTTPHeaders = {};
229
+
230
+ if (this.configuration && this.configuration.accessToken) {
231
+ const token = this.configuration.accessToken;
232
+ const tokenString = await token("bearerAuth", []);
233
+
234
+ if (tokenString) {
235
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
236
+ }
237
+ }
238
+
239
+ let urlPath = `/organizations/{organizationId}/notifications/{notificationId}/dismiss`;
240
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
241
+ urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
242
+
243
+ const response = await this.request({
244
+ path: urlPath,
245
+ method: 'POST',
246
+ headers: headerParameters,
247
+ query: queryParameters,
248
+ }, initOverrides);
249
+
250
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
251
+ }
252
+
253
+ /**
254
+ * Dismisses the notification for the current user. Dismissed notifications are hidden by default.
255
+ * Dismiss a notification
256
+ */
257
+ async organizationsOrganizationIdNotificationsNotificationIdDismissPost(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdDismissPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification> {
258
+ const response = await this.organizationsOrganizationIdNotificationsNotificationIdDismissPostRaw(requestParameters, initOverrides);
259
+ return await response.value();
260
+ }
261
+
262
+ /**
263
+ * Get a notification by ID
264
+ */
265
+ async organizationsOrganizationIdNotificationsNotificationIdGetRaw(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>> {
266
+ if (requestParameters['organizationId'] == null) {
267
+ throw new runtime.RequiredError(
268
+ 'organizationId',
269
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdGet().'
270
+ );
271
+ }
272
+
273
+ if (requestParameters['notificationId'] == null) {
274
+ throw new runtime.RequiredError(
275
+ 'notificationId',
276
+ 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdGet().'
277
+ );
278
+ }
279
+
280
+ const queryParameters: any = {};
281
+
282
+ const headerParameters: runtime.HTTPHeaders = {};
283
+
284
+ if (this.configuration && this.configuration.accessToken) {
285
+ const token = this.configuration.accessToken;
286
+ const tokenString = await token("bearerAuth", []);
287
+
288
+ if (tokenString) {
289
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
290
+ }
291
+ }
292
+
293
+ let urlPath = `/organizations/{organizationId}/notifications/{notificationId}`;
294
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
295
+ urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
296
+
297
+ const response = await this.request({
298
+ path: urlPath,
299
+ method: 'GET',
300
+ headers: headerParameters,
301
+ query: queryParameters,
302
+ }, initOverrides);
303
+
304
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
305
+ }
306
+
307
+ /**
308
+ * Get a notification by ID
309
+ */
310
+ async organizationsOrganizationIdNotificationsNotificationIdGet(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification> {
311
+ const response = await this.organizationsOrganizationIdNotificationsNotificationIdGetRaw(requestParameters, initOverrides);
312
+ return await response.value();
313
+ }
314
+
315
+ /**
316
+ * Partial update — only provided fields are modified. Content supports markdown.
317
+ * Update a notification (admin only)
318
+ */
319
+ async organizationsOrganizationIdNotificationsNotificationIdPutRaw(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>> {
320
+ if (requestParameters['organizationId'] == null) {
321
+ throw new runtime.RequiredError(
322
+ 'organizationId',
323
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdPut().'
324
+ );
325
+ }
326
+
327
+ if (requestParameters['notificationId'] == null) {
328
+ throw new runtime.RequiredError(
329
+ 'notificationId',
330
+ 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdPut().'
331
+ );
332
+ }
333
+
334
+ if (requestParameters['notificationUpdate'] == null) {
335
+ throw new runtime.RequiredError(
336
+ 'notificationUpdate',
337
+ 'Required parameter "notificationUpdate" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdPut().'
338
+ );
339
+ }
340
+
341
+ const queryParameters: any = {};
342
+
343
+ const headerParameters: runtime.HTTPHeaders = {};
344
+
345
+ headerParameters['Content-Type'] = 'application/json';
346
+
347
+ if (this.configuration && this.configuration.accessToken) {
348
+ const token = this.configuration.accessToken;
349
+ const tokenString = await token("bearerAuth", []);
350
+
351
+ if (tokenString) {
352
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
353
+ }
354
+ }
355
+
356
+ let urlPath = `/organizations/{organizationId}/notifications/{notificationId}`;
357
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
358
+ urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
359
+
360
+ const response = await this.request({
361
+ path: urlPath,
362
+ method: 'PUT',
363
+ headers: headerParameters,
364
+ query: queryParameters,
365
+ body: NotificationUpdateToJSON(requestParameters['notificationUpdate']),
366
+ }, initOverrides);
367
+
368
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
369
+ }
370
+
371
+ /**
372
+ * Partial update — only provided fields are modified. Content supports markdown.
373
+ * Update a notification (admin only)
374
+ */
375
+ async organizationsOrganizationIdNotificationsNotificationIdPut(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification> {
376
+ const response = await this.organizationsOrganizationIdNotificationsNotificationIdPutRaw(requestParameters, initOverrides);
377
+ return await response.value();
378
+ }
379
+
380
+ /**
381
+ * Marks the notification as read for the current user. Idempotent.
382
+ * Mark a notification as read
383
+ */
384
+ async organizationsOrganizationIdNotificationsNotificationIdReadPostRaw(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdReadPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>> {
385
+ if (requestParameters['organizationId'] == null) {
386
+ throw new runtime.RequiredError(
387
+ 'organizationId',
388
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdReadPost().'
389
+ );
390
+ }
391
+
392
+ if (requestParameters['notificationId'] == null) {
393
+ throw new runtime.RequiredError(
394
+ 'notificationId',
395
+ 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdReadPost().'
396
+ );
397
+ }
398
+
399
+ const queryParameters: any = {};
400
+
401
+ const headerParameters: runtime.HTTPHeaders = {};
402
+
403
+ if (this.configuration && this.configuration.accessToken) {
404
+ const token = this.configuration.accessToken;
405
+ const tokenString = await token("bearerAuth", []);
406
+
407
+ if (tokenString) {
408
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
409
+ }
410
+ }
411
+
412
+ let urlPath = `/organizations/{organizationId}/notifications/{notificationId}/read`;
413
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
414
+ urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
415
+
416
+ const response = await this.request({
417
+ path: urlPath,
418
+ method: 'POST',
419
+ headers: headerParameters,
420
+ query: queryParameters,
421
+ }, initOverrides);
422
+
423
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
424
+ }
425
+
426
+ /**
427
+ * Marks the notification as read for the current user. Idempotent.
428
+ * Mark a notification as read
429
+ */
430
+ async organizationsOrganizationIdNotificationsNotificationIdReadPost(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdReadPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification> {
431
+ const response = await this.organizationsOrganizationIdNotificationsNotificationIdReadPostRaw(requestParameters, initOverrides);
432
+ return await response.value();
433
+ }
434
+
435
+ /**
436
+ * Create a new notification or announcement. Only organization admins can create notifications. Content supports markdown formatting and embedded links. Set scope to \'global\' for announcements visible to all users, \'organization\' for org members only, or \'user\' for a specific user.
437
+ * Create a notification (admin only)
438
+ */
439
+ async organizationsOrganizationIdNotificationsPostRaw(requestParameters: OrganizationsOrganizationIdNotificationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>> {
440
+ if (requestParameters['organizationId'] == null) {
441
+ throw new runtime.RequiredError(
442
+ 'organizationId',
443
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsPost().'
444
+ );
445
+ }
446
+
447
+ if (requestParameters['notificationCreate'] == null) {
448
+ throw new runtime.RequiredError(
449
+ 'notificationCreate',
450
+ 'Required parameter "notificationCreate" was null or undefined when calling organizationsOrganizationIdNotificationsPost().'
451
+ );
452
+ }
453
+
454
+ const queryParameters: any = {};
455
+
456
+ const headerParameters: runtime.HTTPHeaders = {};
457
+
458
+ headerParameters['Content-Type'] = 'application/json';
459
+
460
+ if (this.configuration && this.configuration.accessToken) {
461
+ const token = this.configuration.accessToken;
462
+ const tokenString = await token("bearerAuth", []);
463
+
464
+ if (tokenString) {
465
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
466
+ }
467
+ }
468
+
469
+ let urlPath = `/organizations/{organizationId}/notifications`;
470
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
471
+
472
+ const response = await this.request({
473
+ path: urlPath,
474
+ method: 'POST',
475
+ headers: headerParameters,
476
+ query: queryParameters,
477
+ body: NotificationCreateToJSON(requestParameters['notificationCreate']),
478
+ }, initOverrides);
479
+
480
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
481
+ }
482
+
483
+ /**
484
+ * Create a new notification or announcement. Only organization admins can create notifications. Content supports markdown formatting and embedded links. Set scope to \'global\' for announcements visible to all users, \'organization\' for org members only, or \'user\' for a specific user.
485
+ * Create a notification (admin only)
486
+ */
487
+ async organizationsOrganizationIdNotificationsPost(requestParameters: OrganizationsOrganizationIdNotificationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification> {
488
+ const response = await this.organizationsOrganizationIdNotificationsPostRaw(requestParameters, initOverrides);
489
+ return await response.value();
490
+ }
491
+
492
+ }
493
+
494
+ /**
495
+ * @export
496
+ */
497
+ export const OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum = {
498
+ True: 'true',
499
+ False: 'false'
500
+ } as const;
501
+ export type OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum = typeof OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum[keyof typeof OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum];
502
+ /**
503
+ * @export
504
+ */
505
+ export const OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum = {
506
+ True: 'true',
507
+ False: 'false'
508
+ } as const;
509
+ export type OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum = typeof OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum[keyof typeof OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum];
package/src/apis/index.ts CHANGED
@@ -8,6 +8,7 @@ export * from './HistoryApi';
8
8
  export * from './InvitationsApi';
9
9
  export * from './LLMProvidersApi';
10
10
  export * from './MembersApi';
11
+ export * from './NotificationsApi';
11
12
  export * from './OrganizationsApi';
12
13
  export * from './PlaygroundApi';
13
14
  export * from './RAGApi';