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

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 (76) 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/Call.d.ts +8 -0
  14. package/dist/esm/models/Call.js +2 -0
  15. package/dist/esm/models/CallCreate.d.ts +8 -0
  16. package/dist/esm/models/CallCreate.js +2 -0
  17. package/dist/esm/models/CallUpdate.d.ts +8 -0
  18. package/dist/esm/models/CallUpdate.js +2 -0
  19. package/dist/esm/models/Notification.d.ts +120 -0
  20. package/dist/esm/models/Notification.js +91 -0
  21. package/dist/esm/models/NotificationChannel.d.ts +26 -0
  22. package/dist/esm/models/NotificationChannel.js +44 -0
  23. package/dist/esm/models/NotificationCreate.d.ts +78 -0
  24. package/dist/esm/models/NotificationCreate.js +63 -0
  25. package/dist/esm/models/NotificationScope.d.ts +26 -0
  26. package/dist/esm/models/NotificationScope.js +44 -0
  27. package/dist/esm/models/NotificationSeverity.d.ts +27 -0
  28. package/dist/esm/models/NotificationSeverity.js +45 -0
  29. package/dist/esm/models/NotificationType.d.ts +25 -0
  30. package/dist/esm/models/NotificationType.js +43 -0
  31. package/dist/esm/models/NotificationUpdate.d.ts +58 -0
  32. package/dist/esm/models/NotificationUpdate.js +51 -0
  33. package/dist/esm/models/OrganizationsOrganizationIdNotificationsGet200Response.d.ts +39 -0
  34. package/dist/esm/models/OrganizationsOrganizationIdNotificationsGet200Response.js +44 -0
  35. package/dist/esm/models/index.d.ts +8 -0
  36. package/dist/esm/models/index.js +8 -0
  37. package/dist/models/Call.d.ts +8 -0
  38. package/dist/models/Call.js +2 -0
  39. package/dist/models/CallCreate.d.ts +8 -0
  40. package/dist/models/CallCreate.js +2 -0
  41. package/dist/models/CallUpdate.d.ts +8 -0
  42. package/dist/models/CallUpdate.js +2 -0
  43. package/dist/models/Notification.d.ts +120 -0
  44. package/dist/models/Notification.js +98 -0
  45. package/dist/models/NotificationChannel.d.ts +26 -0
  46. package/dist/models/NotificationChannel.js +52 -0
  47. package/dist/models/NotificationCreate.d.ts +78 -0
  48. package/dist/models/NotificationCreate.js +70 -0
  49. package/dist/models/NotificationScope.d.ts +26 -0
  50. package/dist/models/NotificationScope.js +52 -0
  51. package/dist/models/NotificationSeverity.d.ts +27 -0
  52. package/dist/models/NotificationSeverity.js +53 -0
  53. package/dist/models/NotificationType.d.ts +25 -0
  54. package/dist/models/NotificationType.js +51 -0
  55. package/dist/models/NotificationUpdate.d.ts +58 -0
  56. package/dist/models/NotificationUpdate.js +58 -0
  57. package/dist/models/OrganizationsOrganizationIdNotificationsGet200Response.d.ts +39 -0
  58. package/dist/models/OrganizationsOrganizationIdNotificationsGet200Response.js +51 -0
  59. package/dist/models/index.d.ts +8 -0
  60. package/dist/models/index.js +8 -0
  61. package/package.json +1 -1
  62. package/src/api-client.ts +21 -0
  63. package/src/apis/NotificationsApi.ts +509 -0
  64. package/src/apis/index.ts +1 -0
  65. package/src/models/Call.ts +8 -1
  66. package/src/models/CallCreate.ts +8 -1
  67. package/src/models/CallUpdate.ts +8 -1
  68. package/src/models/Notification.ts +217 -0
  69. package/src/models/NotificationChannel.ts +54 -0
  70. package/src/models/NotificationCreate.ts +154 -0
  71. package/src/models/NotificationScope.ts +54 -0
  72. package/src/models/NotificationSeverity.ts +55 -0
  73. package/src/models/NotificationType.ts +53 -0
  74. package/src/models/NotificationUpdate.ts +114 -0
  75. package/src/models/OrganizationsOrganizationIdNotificationsGet200Response.ts +81 -0
  76. package/src/models/index.ts +8 -0
@@ -13,6 +13,7 @@ import { ChatAgentsApi } from "./apis/ChatAgentsApi";
13
13
  import { HistoryApi } from "./apis/HistoryApi";
14
14
  import { InvitationsApi } from "./apis/InvitationsApi";
15
15
  import { MembersApi } from "./apis/MembersApi";
16
+ import { NotificationsApi } from "./apis/NotificationsApi";
16
17
  import { OrganizationsApi } from "./apis/OrganizationsApi";
17
18
  import { PlaygroundApi } from "./apis/PlaygroundApi";
18
19
  import { RAGApi } from "./apis/RAGApi";
@@ -55,6 +56,7 @@ export class Api {
55
56
  this.ragApi = new RAGApi(configuration);
56
57
  this.recordingsApi = new RecordingsApi(configuration);
57
58
  this.sipApi = new SIPApi(configuration);
59
+ this.notificationsApi = new NotificationsApi(configuration);
58
60
  this.subscriptionApi = new SubscriptionApi(configuration);
59
61
  this.embeddingProvidersApi = new EmbeddingProvidersApi(configuration);
60
62
  this.llmProvidersApi = new LLMProvidersApi(configuration);
@@ -147,6 +149,12 @@ export class Api {
147
149
  createPhoneNumber: (phoneNumberCreate, options) => this.sipApi.phoneNumbersPost({ phoneNumberCreate }, options),
148
150
  deletePhoneNumber: (phoneNumberId, options) => this.sipApi.phoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
149
151
  };
152
+ this.notifications = {
153
+ list: (organizationId, filters, options) => this.notificationsApi.organizationsOrganizationIdNotificationsGet({ organizationId, type: filters === null || filters === void 0 ? void 0 : filters.type, severity: filters === null || filters === void 0 ? void 0 : filters.severity, scope: filters === null || filters === void 0 ? void 0 : filters.scope, includeDismissed: filters === null || filters === void 0 ? void 0 : filters.include_dismissed, includeExpired: filters === null || filters === void 0 ? void 0 : filters.include_expired }, options),
154
+ get: (organizationId, notificationId, options) => this.notificationsApi.organizationsOrganizationIdNotificationsNotificationIdGet({ organizationId, notificationId }, options),
155
+ read: (organizationId, notificationId, options) => this.notificationsApi.organizationsOrganizationIdNotificationsNotificationIdReadPost({ organizationId, notificationId }, options),
156
+ dismiss: (organizationId, notificationId, options) => this.notificationsApi.organizationsOrganizationIdNotificationsNotificationIdDismissPost({ organizationId, notificationId }, options),
157
+ };
150
158
  this.subscription = {
151
159
  getStatus: (organizationId, options) => this.subscriptionApi.organizationsOrganizationIdSubscriptionGet({ organizationId }, options),
152
160
  getDetails: (organizationId, options) => this.subscriptionApi.organizationsOrganizationIdSubscriptionDetailsGet({ organizationId }, options),
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Tivadar AI Backend API
3
+ * Unified REST API for Tivadar AI Voice Agents platform
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { Notification, NotificationCreate, NotificationScope, NotificationSeverity, NotificationType, NotificationUpdate, OrganizationsOrganizationIdNotificationsGet200Response } from '../models/index';
14
+ export interface OrganizationsOrganizationIdNotificationsGetRequest {
15
+ organizationId: string;
16
+ type?: NotificationType;
17
+ severity?: NotificationSeverity;
18
+ scope?: NotificationScope;
19
+ includeDismissed?: OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum;
20
+ includeExpired?: OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum;
21
+ }
22
+ export interface OrganizationsOrganizationIdNotificationsNotificationIdDeleteRequest {
23
+ organizationId: string;
24
+ notificationId: string;
25
+ }
26
+ export interface OrganizationsOrganizationIdNotificationsNotificationIdDismissPostRequest {
27
+ organizationId: string;
28
+ notificationId: string;
29
+ }
30
+ export interface OrganizationsOrganizationIdNotificationsNotificationIdGetRequest {
31
+ organizationId: string;
32
+ notificationId: string;
33
+ }
34
+ export interface OrganizationsOrganizationIdNotificationsNotificationIdPutRequest {
35
+ organizationId: string;
36
+ notificationId: string;
37
+ notificationUpdate: NotificationUpdate;
38
+ }
39
+ export interface OrganizationsOrganizationIdNotificationsNotificationIdReadPostRequest {
40
+ organizationId: string;
41
+ notificationId: string;
42
+ }
43
+ export interface OrganizationsOrganizationIdNotificationsPostRequest {
44
+ organizationId: string;
45
+ notificationCreate: NotificationCreate;
46
+ }
47
+ /**
48
+ *
49
+ */
50
+ export declare class NotificationsApi extends runtime.BaseAPI {
51
+ /**
52
+ * 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.
53
+ * List notifications for the current user
54
+ */
55
+ organizationsOrganizationIdNotificationsGetRaw(requestParameters: OrganizationsOrganizationIdNotificationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationsOrganizationIdNotificationsGet200Response>>;
56
+ /**
57
+ * 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.
58
+ * List notifications for the current user
59
+ */
60
+ organizationsOrganizationIdNotificationsGet(requestParameters: OrganizationsOrganizationIdNotificationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationsOrganizationIdNotificationsGet200Response>;
61
+ /**
62
+ * Delete a notification (admin only)
63
+ */
64
+ organizationsOrganizationIdNotificationsNotificationIdDeleteRaw(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
65
+ /**
66
+ * Delete a notification (admin only)
67
+ */
68
+ organizationsOrganizationIdNotificationsNotificationIdDelete(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
69
+ /**
70
+ * Dismisses the notification for the current user. Dismissed notifications are hidden by default.
71
+ * Dismiss a notification
72
+ */
73
+ organizationsOrganizationIdNotificationsNotificationIdDismissPostRaw(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdDismissPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>>;
74
+ /**
75
+ * Dismisses the notification for the current user. Dismissed notifications are hidden by default.
76
+ * Dismiss a notification
77
+ */
78
+ organizationsOrganizationIdNotificationsNotificationIdDismissPost(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdDismissPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification>;
79
+ /**
80
+ * Get a notification by ID
81
+ */
82
+ organizationsOrganizationIdNotificationsNotificationIdGetRaw(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>>;
83
+ /**
84
+ * Get a notification by ID
85
+ */
86
+ organizationsOrganizationIdNotificationsNotificationIdGet(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification>;
87
+ /**
88
+ * Partial update — only provided fields are modified. Content supports markdown.
89
+ * Update a notification (admin only)
90
+ */
91
+ organizationsOrganizationIdNotificationsNotificationIdPutRaw(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>>;
92
+ /**
93
+ * Partial update — only provided fields are modified. Content supports markdown.
94
+ * Update a notification (admin only)
95
+ */
96
+ organizationsOrganizationIdNotificationsNotificationIdPut(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification>;
97
+ /**
98
+ * Marks the notification as read for the current user. Idempotent.
99
+ * Mark a notification as read
100
+ */
101
+ organizationsOrganizationIdNotificationsNotificationIdReadPostRaw(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdReadPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>>;
102
+ /**
103
+ * Marks the notification as read for the current user. Idempotent.
104
+ * Mark a notification as read
105
+ */
106
+ organizationsOrganizationIdNotificationsNotificationIdReadPost(requestParameters: OrganizationsOrganizationIdNotificationsNotificationIdReadPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification>;
107
+ /**
108
+ * 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.
109
+ * Create a notification (admin only)
110
+ */
111
+ organizationsOrganizationIdNotificationsPostRaw(requestParameters: OrganizationsOrganizationIdNotificationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Notification>>;
112
+ /**
113
+ * 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.
114
+ * Create a notification (admin only)
115
+ */
116
+ organizationsOrganizationIdNotificationsPost(requestParameters: OrganizationsOrganizationIdNotificationsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Notification>;
117
+ }
118
+ /**
119
+ * @export
120
+ */
121
+ export declare const OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum: {
122
+ readonly True: "true";
123
+ readonly False: "false";
124
+ };
125
+ export type OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum = typeof OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum[keyof typeof OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum];
126
+ /**
127
+ * @export
128
+ */
129
+ export declare const OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum: {
130
+ readonly True: "true";
131
+ readonly False: "false";
132
+ };
133
+ export type OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum = typeof OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum[keyof typeof OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum];
@@ -0,0 +1,356 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Tivadar AI Backend API
5
+ * Unified REST API for Tivadar AI Voice Agents platform
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { NotificationFromJSON, NotificationCreateToJSON, NotificationUpdateToJSON, OrganizationsOrganizationIdNotificationsGet200ResponseFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class NotificationsApi extends runtime.BaseAPI {
29
+ /**
30
+ * 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.
31
+ * List notifications for the current user
32
+ */
33
+ organizationsOrganizationIdNotificationsGetRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['organizationId'] == null) {
36
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsGet().');
37
+ }
38
+ const queryParameters = {};
39
+ if (requestParameters['type'] != null) {
40
+ queryParameters['type'] = requestParameters['type'];
41
+ }
42
+ if (requestParameters['severity'] != null) {
43
+ queryParameters['severity'] = requestParameters['severity'];
44
+ }
45
+ if (requestParameters['scope'] != null) {
46
+ queryParameters['scope'] = requestParameters['scope'];
47
+ }
48
+ if (requestParameters['includeDismissed'] != null) {
49
+ queryParameters['include_dismissed'] = requestParameters['includeDismissed'];
50
+ }
51
+ if (requestParameters['includeExpired'] != null) {
52
+ queryParameters['include_expired'] = requestParameters['includeExpired'];
53
+ }
54
+ const headerParameters = {};
55
+ if (this.configuration && this.configuration.accessToken) {
56
+ const token = this.configuration.accessToken;
57
+ const tokenString = yield token("bearerAuth", []);
58
+ if (tokenString) {
59
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
60
+ }
61
+ }
62
+ let urlPath = `/organizations/{organizationId}/notifications`;
63
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
64
+ const response = yield this.request({
65
+ path: urlPath,
66
+ method: 'GET',
67
+ headers: headerParameters,
68
+ query: queryParameters,
69
+ }, initOverrides);
70
+ return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationsOrganizationIdNotificationsGet200ResponseFromJSON(jsonValue));
71
+ });
72
+ }
73
+ /**
74
+ * 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.
75
+ * List notifications for the current user
76
+ */
77
+ organizationsOrganizationIdNotificationsGet(requestParameters, initOverrides) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ const response = yield this.organizationsOrganizationIdNotificationsGetRaw(requestParameters, initOverrides);
80
+ return yield response.value();
81
+ });
82
+ }
83
+ /**
84
+ * Delete a notification (admin only)
85
+ */
86
+ organizationsOrganizationIdNotificationsNotificationIdDeleteRaw(requestParameters, initOverrides) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ if (requestParameters['organizationId'] == null) {
89
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDelete().');
90
+ }
91
+ if (requestParameters['notificationId'] == null) {
92
+ throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDelete().');
93
+ }
94
+ const queryParameters = {};
95
+ const headerParameters = {};
96
+ if (this.configuration && this.configuration.accessToken) {
97
+ const token = this.configuration.accessToken;
98
+ const tokenString = yield token("bearerAuth", []);
99
+ if (tokenString) {
100
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
101
+ }
102
+ }
103
+ let urlPath = `/organizations/{organizationId}/notifications/{notificationId}`;
104
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
105
+ urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
106
+ const response = yield this.request({
107
+ path: urlPath,
108
+ method: 'DELETE',
109
+ headers: headerParameters,
110
+ query: queryParameters,
111
+ }, initOverrides);
112
+ return new runtime.VoidApiResponse(response);
113
+ });
114
+ }
115
+ /**
116
+ * Delete a notification (admin only)
117
+ */
118
+ organizationsOrganizationIdNotificationsNotificationIdDelete(requestParameters, initOverrides) {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ yield this.organizationsOrganizationIdNotificationsNotificationIdDeleteRaw(requestParameters, initOverrides);
121
+ });
122
+ }
123
+ /**
124
+ * Dismisses the notification for the current user. Dismissed notifications are hidden by default.
125
+ * Dismiss a notification
126
+ */
127
+ organizationsOrganizationIdNotificationsNotificationIdDismissPostRaw(requestParameters, initOverrides) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ if (requestParameters['organizationId'] == null) {
130
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDismissPost().');
131
+ }
132
+ if (requestParameters['notificationId'] == null) {
133
+ throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDismissPost().');
134
+ }
135
+ const queryParameters = {};
136
+ const headerParameters = {};
137
+ if (this.configuration && this.configuration.accessToken) {
138
+ const token = this.configuration.accessToken;
139
+ const tokenString = yield token("bearerAuth", []);
140
+ if (tokenString) {
141
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
142
+ }
143
+ }
144
+ let urlPath = `/organizations/{organizationId}/notifications/{notificationId}/dismiss`;
145
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
146
+ urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
147
+ const response = yield this.request({
148
+ path: urlPath,
149
+ method: 'POST',
150
+ headers: headerParameters,
151
+ query: queryParameters,
152
+ }, initOverrides);
153
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
154
+ });
155
+ }
156
+ /**
157
+ * Dismisses the notification for the current user. Dismissed notifications are hidden by default.
158
+ * Dismiss a notification
159
+ */
160
+ organizationsOrganizationIdNotificationsNotificationIdDismissPost(requestParameters, initOverrides) {
161
+ return __awaiter(this, void 0, void 0, function* () {
162
+ const response = yield this.organizationsOrganizationIdNotificationsNotificationIdDismissPostRaw(requestParameters, initOverrides);
163
+ return yield response.value();
164
+ });
165
+ }
166
+ /**
167
+ * Get a notification by ID
168
+ */
169
+ organizationsOrganizationIdNotificationsNotificationIdGetRaw(requestParameters, initOverrides) {
170
+ return __awaiter(this, void 0, void 0, function* () {
171
+ if (requestParameters['organizationId'] == null) {
172
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdGet().');
173
+ }
174
+ if (requestParameters['notificationId'] == null) {
175
+ throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdGet().');
176
+ }
177
+ const queryParameters = {};
178
+ const headerParameters = {};
179
+ if (this.configuration && this.configuration.accessToken) {
180
+ const token = this.configuration.accessToken;
181
+ const tokenString = yield token("bearerAuth", []);
182
+ if (tokenString) {
183
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
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
+ const response = yield this.request({
190
+ path: urlPath,
191
+ method: 'GET',
192
+ headers: headerParameters,
193
+ query: queryParameters,
194
+ }, initOverrides);
195
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
196
+ });
197
+ }
198
+ /**
199
+ * Get a notification by ID
200
+ */
201
+ organizationsOrganizationIdNotificationsNotificationIdGet(requestParameters, initOverrides) {
202
+ return __awaiter(this, void 0, void 0, function* () {
203
+ const response = yield this.organizationsOrganizationIdNotificationsNotificationIdGetRaw(requestParameters, initOverrides);
204
+ return yield response.value();
205
+ });
206
+ }
207
+ /**
208
+ * Partial update — only provided fields are modified. Content supports markdown.
209
+ * Update a notification (admin only)
210
+ */
211
+ organizationsOrganizationIdNotificationsNotificationIdPutRaw(requestParameters, initOverrides) {
212
+ return __awaiter(this, void 0, void 0, function* () {
213
+ if (requestParameters['organizationId'] == null) {
214
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdPut().');
215
+ }
216
+ if (requestParameters['notificationId'] == null) {
217
+ throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdPut().');
218
+ }
219
+ if (requestParameters['notificationUpdate'] == null) {
220
+ throw new runtime.RequiredError('notificationUpdate', 'Required parameter "notificationUpdate" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdPut().');
221
+ }
222
+ const queryParameters = {};
223
+ const headerParameters = {};
224
+ headerParameters['Content-Type'] = 'application/json';
225
+ if (this.configuration && this.configuration.accessToken) {
226
+ const token = this.configuration.accessToken;
227
+ const tokenString = yield token("bearerAuth", []);
228
+ if (tokenString) {
229
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
230
+ }
231
+ }
232
+ let urlPath = `/organizations/{organizationId}/notifications/{notificationId}`;
233
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
234
+ urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
235
+ const response = yield this.request({
236
+ path: urlPath,
237
+ method: 'PUT',
238
+ headers: headerParameters,
239
+ query: queryParameters,
240
+ body: NotificationUpdateToJSON(requestParameters['notificationUpdate']),
241
+ }, initOverrides);
242
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
243
+ });
244
+ }
245
+ /**
246
+ * Partial update — only provided fields are modified. Content supports markdown.
247
+ * Update a notification (admin only)
248
+ */
249
+ organizationsOrganizationIdNotificationsNotificationIdPut(requestParameters, initOverrides) {
250
+ return __awaiter(this, void 0, void 0, function* () {
251
+ const response = yield this.organizationsOrganizationIdNotificationsNotificationIdPutRaw(requestParameters, initOverrides);
252
+ return yield response.value();
253
+ });
254
+ }
255
+ /**
256
+ * Marks the notification as read for the current user. Idempotent.
257
+ * Mark a notification as read
258
+ */
259
+ organizationsOrganizationIdNotificationsNotificationIdReadPostRaw(requestParameters, initOverrides) {
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ if (requestParameters['organizationId'] == null) {
262
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdReadPost().');
263
+ }
264
+ if (requestParameters['notificationId'] == null) {
265
+ throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdReadPost().');
266
+ }
267
+ const queryParameters = {};
268
+ const headerParameters = {};
269
+ if (this.configuration && this.configuration.accessToken) {
270
+ const token = this.configuration.accessToken;
271
+ const tokenString = yield token("bearerAuth", []);
272
+ if (tokenString) {
273
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
274
+ }
275
+ }
276
+ let urlPath = `/organizations/{organizationId}/notifications/{notificationId}/read`;
277
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
278
+ urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
279
+ const response = yield this.request({
280
+ path: urlPath,
281
+ method: 'POST',
282
+ headers: headerParameters,
283
+ query: queryParameters,
284
+ }, initOverrides);
285
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
286
+ });
287
+ }
288
+ /**
289
+ * Marks the notification as read for the current user. Idempotent.
290
+ * Mark a notification as read
291
+ */
292
+ organizationsOrganizationIdNotificationsNotificationIdReadPost(requestParameters, initOverrides) {
293
+ return __awaiter(this, void 0, void 0, function* () {
294
+ const response = yield this.organizationsOrganizationIdNotificationsNotificationIdReadPostRaw(requestParameters, initOverrides);
295
+ return yield response.value();
296
+ });
297
+ }
298
+ /**
299
+ * 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.
300
+ * Create a notification (admin only)
301
+ */
302
+ organizationsOrganizationIdNotificationsPostRaw(requestParameters, initOverrides) {
303
+ return __awaiter(this, void 0, void 0, function* () {
304
+ if (requestParameters['organizationId'] == null) {
305
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsPost().');
306
+ }
307
+ if (requestParameters['notificationCreate'] == null) {
308
+ throw new runtime.RequiredError('notificationCreate', 'Required parameter "notificationCreate" was null or undefined when calling organizationsOrganizationIdNotificationsPost().');
309
+ }
310
+ const queryParameters = {};
311
+ const headerParameters = {};
312
+ headerParameters['Content-Type'] = 'application/json';
313
+ if (this.configuration && this.configuration.accessToken) {
314
+ const token = this.configuration.accessToken;
315
+ const tokenString = yield token("bearerAuth", []);
316
+ if (tokenString) {
317
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
318
+ }
319
+ }
320
+ let urlPath = `/organizations/{organizationId}/notifications`;
321
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
322
+ const response = yield this.request({
323
+ path: urlPath,
324
+ method: 'POST',
325
+ headers: headerParameters,
326
+ query: queryParameters,
327
+ body: NotificationCreateToJSON(requestParameters['notificationCreate']),
328
+ }, initOverrides);
329
+ return new runtime.JSONApiResponse(response, (jsonValue) => NotificationFromJSON(jsonValue));
330
+ });
331
+ }
332
+ /**
333
+ * 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.
334
+ * Create a notification (admin only)
335
+ */
336
+ organizationsOrganizationIdNotificationsPost(requestParameters, initOverrides) {
337
+ return __awaiter(this, void 0, void 0, function* () {
338
+ const response = yield this.organizationsOrganizationIdNotificationsPostRaw(requestParameters, initOverrides);
339
+ return yield response.value();
340
+ });
341
+ }
342
+ }
343
+ /**
344
+ * @export
345
+ */
346
+ export const OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum = {
347
+ True: 'true',
348
+ False: 'false'
349
+ };
350
+ /**
351
+ * @export
352
+ */
353
+ export const OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum = {
354
+ True: 'true',
355
+ False: 'false'
356
+ };
@@ -6,6 +6,7 @@ export * from './HistoryApi';
6
6
  export * from './InvitationsApi';
7
7
  export * from './LLMProvidersApi';
8
8
  export * from './MembersApi';
9
+ export * from './NotificationsApi';
9
10
  export * from './OrganizationsApi';
10
11
  export * from './PlaygroundApi';
11
12
  export * from './RAGApi';
@@ -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';
@@ -35,6 +35,14 @@ export interface Call {
35
35
  data?: {
36
36
  [key: string]: any;
37
37
  } | null;
38
+ /**
39
+ *
40
+ * @type {{ [key: string]: any; }}
41
+ * @memberof Call
42
+ */
43
+ metadata?: {
44
+ [key: string]: any;
45
+ } | null;
38
46
  /**
39
47
  *
40
48
  * @type {string}
@@ -32,6 +32,7 @@ export function CallFromJSONTyped(json, ignoreDiscriminator) {
32
32
  'id': json['id'],
33
33
  'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
34
34
  'data': json['data'] == null ? undefined : json['data'],
35
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
35
36
  'caller': json['caller'] == null ? undefined : json['caller'],
36
37
  'sandbox': json['sandbox'] == null ? undefined : json['sandbox'],
37
38
  'created_at': (new Date(json['created_at'])),
@@ -48,6 +49,7 @@ export function CallToJSONTyped(value, ignoreDiscriminator = false) {
48
49
  'id': value['id'],
49
50
  'voice_agent_id': value['voice_agent_id'],
50
51
  'data': value['data'],
52
+ 'metadata': value['metadata'],
51
53
  'caller': value['caller'],
52
54
  'sandbox': value['sandbox'],
53
55
  'created_at': value['created_at'].toISOString(),
@@ -29,6 +29,14 @@ export interface CallCreate {
29
29
  data?: {
30
30
  [key: string]: any;
31
31
  } | null;
32
+ /**
33
+ *
34
+ * @type {{ [key: string]: any; }}
35
+ * @memberof CallCreate
36
+ */
37
+ metadata?: {
38
+ [key: string]: any;
39
+ } | null;
32
40
  /**
33
41
  *
34
42
  * @type {string}
@@ -27,6 +27,7 @@ export function CallCreateFromJSONTyped(json, ignoreDiscriminator) {
27
27
  return {
28
28
  'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
29
29
  'data': json['data'] == null ? undefined : json['data'],
30
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
30
31
  'caller': json['caller'] == null ? undefined : json['caller'],
31
32
  'sandbox': json['sandbox'] == null ? undefined : json['sandbox'],
32
33
  };
@@ -41,6 +42,7 @@ export function CallCreateToJSONTyped(value, ignoreDiscriminator = false) {
41
42
  return {
42
43
  'voice_agent_id': value['voice_agent_id'],
43
44
  'data': value['data'],
45
+ 'metadata': value['metadata'],
44
46
  'caller': value['caller'],
45
47
  'sandbox': value['sandbox'],
46
48
  };
@@ -29,6 +29,14 @@ export interface CallUpdate {
29
29
  data?: {
30
30
  [key: string]: any;
31
31
  } | null;
32
+ /**
33
+ *
34
+ * @type {{ [key: string]: any; }}
35
+ * @memberof CallUpdate
36
+ */
37
+ metadata?: {
38
+ [key: string]: any;
39
+ } | null;
32
40
  /**
33
41
  *
34
42
  * @type {string}
@@ -27,6 +27,7 @@ export function CallUpdateFromJSONTyped(json, ignoreDiscriminator) {
27
27
  return {
28
28
  'voice_agent_id': json['voice_agent_id'] == null ? undefined : json['voice_agent_id'],
29
29
  'data': json['data'] == null ? undefined : json['data'],
30
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
30
31
  'caller': json['caller'] == null ? undefined : json['caller'],
31
32
  'sandbox': json['sandbox'] == null ? undefined : json['sandbox'],
32
33
  };
@@ -41,6 +42,7 @@ export function CallUpdateToJSONTyped(value, ignoreDiscriminator = false) {
41
42
  return {
42
43
  'voice_agent_id': value['voice_agent_id'],
43
44
  'data': value['data'],
45
+ 'metadata': value['metadata'],
44
46
  'caller': value['caller'],
45
47
  'sandbox': value['sandbox'],
46
48
  };