@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.
- package/dist/api-client.d.ts +16 -1
- package/dist/api-client.js +9 -0
- package/dist/apis/NotificationsApi.d.ts +133 -0
- package/dist/apis/NotificationsApi.js +360 -0
- package/dist/apis/SIPApi.d.ts +13 -0
- package/dist/apis/SIPApi.js +39 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/api-client.d.ts +16 -1
- package/dist/esm/api-client.js +9 -0
- package/dist/esm/apis/NotificationsApi.d.ts +133 -0
- package/dist/esm/apis/NotificationsApi.js +356 -0
- package/dist/esm/apis/SIPApi.d.ts +13 -0
- package/dist/esm/apis/SIPApi.js +39 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/Notification.d.ts +120 -0
- package/dist/esm/models/Notification.js +91 -0
- package/dist/esm/models/NotificationChannel.d.ts +26 -0
- package/dist/esm/models/NotificationChannel.js +44 -0
- package/dist/esm/models/NotificationCreate.d.ts +78 -0
- package/dist/esm/models/NotificationCreate.js +63 -0
- package/dist/esm/models/NotificationScope.d.ts +26 -0
- package/dist/esm/models/NotificationScope.js +44 -0
- package/dist/esm/models/NotificationSeverity.d.ts +27 -0
- package/dist/esm/models/NotificationSeverity.js +45 -0
- package/dist/esm/models/NotificationType.d.ts +25 -0
- package/dist/esm/models/NotificationType.js +43 -0
- package/dist/esm/models/NotificationUpdate.d.ts +58 -0
- package/dist/esm/models/NotificationUpdate.js +51 -0
- package/dist/esm/models/OrganizationsOrganizationIdNotificationsGet200Response.d.ts +39 -0
- package/dist/esm/models/OrganizationsOrganizationIdNotificationsGet200Response.js +44 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/Notification.d.ts +120 -0
- package/dist/models/Notification.js +98 -0
- package/dist/models/NotificationChannel.d.ts +26 -0
- package/dist/models/NotificationChannel.js +52 -0
- package/dist/models/NotificationCreate.d.ts +78 -0
- package/dist/models/NotificationCreate.js +70 -0
- package/dist/models/NotificationScope.d.ts +26 -0
- package/dist/models/NotificationScope.js +52 -0
- package/dist/models/NotificationSeverity.d.ts +27 -0
- package/dist/models/NotificationSeverity.js +53 -0
- package/dist/models/NotificationType.d.ts +25 -0
- package/dist/models/NotificationType.js +51 -0
- package/dist/models/NotificationUpdate.d.ts +58 -0
- package/dist/models/NotificationUpdate.js +58 -0
- package/dist/models/OrganizationsOrganizationIdNotificationsGet200Response.d.ts +39 -0
- package/dist/models/OrganizationsOrganizationIdNotificationsGet200Response.js +51 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/package.json +1 -1
- package/src/api-client.ts +23 -0
- package/src/apis/NotificationsApi.ts +509 -0
- package/src/apis/SIPApi.ts +51 -0
- package/src/apis/index.ts +1 -0
- package/src/models/Notification.ts +217 -0
- package/src/models/NotificationChannel.ts +54 -0
- package/src/models/NotificationCreate.ts +154 -0
- package/src/models/NotificationScope.ts +54 -0
- package/src/models/NotificationSeverity.ts +55 -0
- package/src/models/NotificationType.ts +53 -0
- package/src/models/NotificationUpdate.ts +114 -0
- package/src/models/OrganizationsOrganizationIdNotificationsGet200Response.ts +81 -0
- package/src/models/index.ts +8 -0
package/dist/api-client.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ChatAgentsApi } from "./apis/ChatAgentsApi";
|
|
|
4
4
|
import { HistoryApi } from "./apis/HistoryApi";
|
|
5
5
|
import { InvitationsApi } from "./apis/InvitationsApi";
|
|
6
6
|
import { MembersApi } from "./apis/MembersApi";
|
|
7
|
+
import { NotificationsApi, type OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum, type OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum } from "./apis/NotificationsApi";
|
|
7
8
|
import { OrganizationsApi } from "./apis/OrganizationsApi";
|
|
8
9
|
import { PlaygroundApi } from "./apis/PlaygroundApi";
|
|
9
10
|
import { RAGApi, type OrganizationsOrganizationIdRagRagConfigNameDocumentsGetStatusEnum } from "./apis/RAGApi";
|
|
@@ -15,7 +16,7 @@ import { STTProvidersApi } from "./apis/STTProvidersApi";
|
|
|
15
16
|
import { TTSProvidersApi } from "./apis/TTSProvidersApi";
|
|
16
17
|
import { SubscriptionApi } from "./apis/SubscriptionApi";
|
|
17
18
|
import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
|
|
18
|
-
import type { CallCreate, CallUpdate, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest } from "./models";
|
|
19
|
+
import type { CallCreate, CallUpdate, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest } from "./models";
|
|
19
20
|
export interface ApiClientConfig {
|
|
20
21
|
baseUrl: string;
|
|
21
22
|
options?: {
|
|
@@ -99,6 +100,7 @@ export declare class Api {
|
|
|
99
100
|
listTrunks: (organizationId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipTrunksGet"]>;
|
|
100
101
|
createTrunk: (organizationId: string, sipTrunkCreate: SipTrunkCreate, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipTrunksPost"]>;
|
|
101
102
|
deleteTrunk: (organizationId: string, trunkId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipTrunksTrunkIdDelete"]>;
|
|
103
|
+
assignPhoneNumber: (organizationId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipPhoneNumbersAssignPost"]>;
|
|
102
104
|
createDispatchRule: (organizationId: string, dispatchRuleCreate: DispatchRuleCreate, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipDispatchRulesPost"]>;
|
|
103
105
|
deleteDispatchRule: (organizationId: string, dispatchId: string, options?: RequestInit) => ReturnType<SIPApi["organizationsOrganizationIdSipDispatchRulesDispatchIdDelete"]>;
|
|
104
106
|
listPhoneNumbers: (includeAssigned?: boolean, options?: RequestInit) => ReturnType<SIPApi["phoneNumbersGet"]>;
|
|
@@ -127,6 +129,18 @@ export declare class Api {
|
|
|
127
129
|
readonly ttsProviders: {
|
|
128
130
|
list: (organizationId: string, options?: RequestInit) => ReturnType<TTSProvidersApi["organizationsOrganizationIdTtsProvidersGet"]>;
|
|
129
131
|
};
|
|
132
|
+
readonly notifications: {
|
|
133
|
+
list: (organizationId: string, filters?: {
|
|
134
|
+
type?: NotificationType;
|
|
135
|
+
severity?: NotificationSeverity;
|
|
136
|
+
scope?: NotificationScope;
|
|
137
|
+
include_dismissed?: OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum;
|
|
138
|
+
include_expired?: OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum;
|
|
139
|
+
}, options?: RequestInit) => ReturnType<NotificationsApi["organizationsOrganizationIdNotificationsGet"]>;
|
|
140
|
+
get: (organizationId: string, notificationId: string, options?: RequestInit) => ReturnType<NotificationsApi["organizationsOrganizationIdNotificationsNotificationIdGet"]>;
|
|
141
|
+
read: (organizationId: string, notificationId: string, options?: RequestInit) => ReturnType<NotificationsApi["organizationsOrganizationIdNotificationsNotificationIdReadPost"]>;
|
|
142
|
+
dismiss: (organizationId: string, notificationId: string, options?: RequestInit) => ReturnType<NotificationsApi["organizationsOrganizationIdNotificationsNotificationIdDismissPost"]>;
|
|
143
|
+
};
|
|
130
144
|
readonly embeddingProviders: {
|
|
131
145
|
list: (organizationId: string, options?: RequestInit) => ReturnType<EmbeddingProvidersApi["organizationsOrganizationIdEmbeddingProvidersGet"]>;
|
|
132
146
|
};
|
|
@@ -142,6 +156,7 @@ export declare class Api {
|
|
|
142
156
|
private readonly ragApi;
|
|
143
157
|
private readonly recordingsApi;
|
|
144
158
|
private readonly sipApi;
|
|
159
|
+
private readonly notificationsApi;
|
|
145
160
|
private readonly subscriptionApi;
|
|
146
161
|
private readonly embeddingProvidersApi;
|
|
147
162
|
private readonly llmProvidersApi;
|
package/dist/api-client.js
CHANGED
|
@@ -16,6 +16,7 @@ const ChatAgentsApi_1 = require("./apis/ChatAgentsApi");
|
|
|
16
16
|
const HistoryApi_1 = require("./apis/HistoryApi");
|
|
17
17
|
const InvitationsApi_1 = require("./apis/InvitationsApi");
|
|
18
18
|
const MembersApi_1 = require("./apis/MembersApi");
|
|
19
|
+
const NotificationsApi_1 = require("./apis/NotificationsApi");
|
|
19
20
|
const OrganizationsApi_1 = require("./apis/OrganizationsApi");
|
|
20
21
|
const PlaygroundApi_1 = require("./apis/PlaygroundApi");
|
|
21
22
|
const RAGApi_1 = require("./apis/RAGApi");
|
|
@@ -58,6 +59,7 @@ class Api {
|
|
|
58
59
|
this.ragApi = new RAGApi_1.RAGApi(configuration);
|
|
59
60
|
this.recordingsApi = new RecordingsApi_1.RecordingsApi(configuration);
|
|
60
61
|
this.sipApi = new SIPApi_1.SIPApi(configuration);
|
|
62
|
+
this.notificationsApi = new NotificationsApi_1.NotificationsApi(configuration);
|
|
61
63
|
this.subscriptionApi = new SubscriptionApi_1.SubscriptionApi(configuration);
|
|
62
64
|
this.embeddingProvidersApi = new EmbeddingProvidersApi_1.EmbeddingProvidersApi(configuration);
|
|
63
65
|
this.llmProvidersApi = new LLMProvidersApi_1.LLMProvidersApi(configuration);
|
|
@@ -143,12 +145,19 @@ class Api {
|
|
|
143
145
|
listTrunks: (organizationId, options) => this.sipApi.organizationsOrganizationIdSipTrunksGet({ organizationId }, options),
|
|
144
146
|
createTrunk: (organizationId, sipTrunkCreate, options) => this.sipApi.organizationsOrganizationIdSipTrunksPost({ organizationId, sipTrunkCreate }, options),
|
|
145
147
|
deleteTrunk: (organizationId, trunkId, options) => this.sipApi.organizationsOrganizationIdSipTrunksTrunkIdDelete({ organizationId, trunkId }, options),
|
|
148
|
+
assignPhoneNumber: (organizationId, options) => this.sipApi.organizationsOrganizationIdSipPhoneNumbersAssignPost({ organizationId }, options),
|
|
146
149
|
createDispatchRule: (organizationId, dispatchRuleCreate, options) => this.sipApi.organizationsOrganizationIdSipDispatchRulesPost({ organizationId, dispatchRuleCreate }, options),
|
|
147
150
|
deleteDispatchRule: (organizationId, dispatchId, options) => this.sipApi.organizationsOrganizationIdSipDispatchRulesDispatchIdDelete({ organizationId, dispatchId }, options),
|
|
148
151
|
listPhoneNumbers: (includeAssigned, options) => this.sipApi.phoneNumbersGet({ includeAssigned }, options),
|
|
149
152
|
createPhoneNumber: (phoneNumberCreate, options) => this.sipApi.phoneNumbersPost({ phoneNumberCreate }, options),
|
|
150
153
|
deletePhoneNumber: (phoneNumberId, options) => this.sipApi.phoneNumbersPhoneNumberIdDelete({ phoneNumberId }, options),
|
|
151
154
|
};
|
|
155
|
+
this.notifications = {
|
|
156
|
+
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),
|
|
157
|
+
get: (organizationId, notificationId, options) => this.notificationsApi.organizationsOrganizationIdNotificationsNotificationIdGet({ organizationId, notificationId }, options),
|
|
158
|
+
read: (organizationId, notificationId, options) => this.notificationsApi.organizationsOrganizationIdNotificationsNotificationIdReadPost({ organizationId, notificationId }, options),
|
|
159
|
+
dismiss: (organizationId, notificationId, options) => this.notificationsApi.organizationsOrganizationIdNotificationsNotificationIdDismissPost({ organizationId, notificationId }, options),
|
|
160
|
+
};
|
|
152
161
|
this.subscription = {
|
|
153
162
|
getStatus: (organizationId, options) => this.subscriptionApi.organizationsOrganizationIdSubscriptionGet({ organizationId }, options),
|
|
154
163
|
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,360 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum = exports.OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum = exports.NotificationsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class NotificationsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* 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.
|
|
34
|
+
* List notifications for the current user
|
|
35
|
+
*/
|
|
36
|
+
organizationsOrganizationIdNotificationsGetRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['organizationId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsGet().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
if (requestParameters['type'] != null) {
|
|
43
|
+
queryParameters['type'] = requestParameters['type'];
|
|
44
|
+
}
|
|
45
|
+
if (requestParameters['severity'] != null) {
|
|
46
|
+
queryParameters['severity'] = requestParameters['severity'];
|
|
47
|
+
}
|
|
48
|
+
if (requestParameters['scope'] != null) {
|
|
49
|
+
queryParameters['scope'] = requestParameters['scope'];
|
|
50
|
+
}
|
|
51
|
+
if (requestParameters['includeDismissed'] != null) {
|
|
52
|
+
queryParameters['include_dismissed'] = requestParameters['includeDismissed'];
|
|
53
|
+
}
|
|
54
|
+
if (requestParameters['includeExpired'] != null) {
|
|
55
|
+
queryParameters['include_expired'] = requestParameters['includeExpired'];
|
|
56
|
+
}
|
|
57
|
+
const headerParameters = {};
|
|
58
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
59
|
+
const token = this.configuration.accessToken;
|
|
60
|
+
const tokenString = yield token("bearerAuth", []);
|
|
61
|
+
if (tokenString) {
|
|
62
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
let urlPath = `/organizations/{organizationId}/notifications`;
|
|
66
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
67
|
+
const response = yield this.request({
|
|
68
|
+
path: urlPath,
|
|
69
|
+
method: 'GET',
|
|
70
|
+
headers: headerParameters,
|
|
71
|
+
query: queryParameters,
|
|
72
|
+
}, initOverrides);
|
|
73
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OrganizationsOrganizationIdNotificationsGet200ResponseFromJSON)(jsonValue));
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 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.
|
|
78
|
+
* List notifications for the current user
|
|
79
|
+
*/
|
|
80
|
+
organizationsOrganizationIdNotificationsGet(requestParameters, initOverrides) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
const response = yield this.organizationsOrganizationIdNotificationsGetRaw(requestParameters, initOverrides);
|
|
83
|
+
return yield response.value();
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Delete a notification (admin only)
|
|
88
|
+
*/
|
|
89
|
+
organizationsOrganizationIdNotificationsNotificationIdDeleteRaw(requestParameters, initOverrides) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
if (requestParameters['organizationId'] == null) {
|
|
92
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDelete().');
|
|
93
|
+
}
|
|
94
|
+
if (requestParameters['notificationId'] == null) {
|
|
95
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDelete().');
|
|
96
|
+
}
|
|
97
|
+
const queryParameters = {};
|
|
98
|
+
const headerParameters = {};
|
|
99
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
100
|
+
const token = this.configuration.accessToken;
|
|
101
|
+
const tokenString = yield token("bearerAuth", []);
|
|
102
|
+
if (tokenString) {
|
|
103
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
let urlPath = `/organizations/{organizationId}/notifications/{notificationId}`;
|
|
107
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
108
|
+
urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
109
|
+
const response = yield this.request({
|
|
110
|
+
path: urlPath,
|
|
111
|
+
method: 'DELETE',
|
|
112
|
+
headers: headerParameters,
|
|
113
|
+
query: queryParameters,
|
|
114
|
+
}, initOverrides);
|
|
115
|
+
return new runtime.VoidApiResponse(response);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Delete a notification (admin only)
|
|
120
|
+
*/
|
|
121
|
+
organizationsOrganizationIdNotificationsNotificationIdDelete(requestParameters, initOverrides) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
yield this.organizationsOrganizationIdNotificationsNotificationIdDeleteRaw(requestParameters, initOverrides);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Dismisses the notification for the current user. Dismissed notifications are hidden by default.
|
|
128
|
+
* Dismiss a notification
|
|
129
|
+
*/
|
|
130
|
+
organizationsOrganizationIdNotificationsNotificationIdDismissPostRaw(requestParameters, initOverrides) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
if (requestParameters['organizationId'] == null) {
|
|
133
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDismissPost().');
|
|
134
|
+
}
|
|
135
|
+
if (requestParameters['notificationId'] == null) {
|
|
136
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdDismissPost().');
|
|
137
|
+
}
|
|
138
|
+
const queryParameters = {};
|
|
139
|
+
const headerParameters = {};
|
|
140
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
141
|
+
const token = this.configuration.accessToken;
|
|
142
|
+
const tokenString = yield token("bearerAuth", []);
|
|
143
|
+
if (tokenString) {
|
|
144
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
let urlPath = `/organizations/{organizationId}/notifications/{notificationId}/dismiss`;
|
|
148
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
149
|
+
urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
150
|
+
const response = yield this.request({
|
|
151
|
+
path: urlPath,
|
|
152
|
+
method: 'POST',
|
|
153
|
+
headers: headerParameters,
|
|
154
|
+
query: queryParameters,
|
|
155
|
+
}, initOverrides);
|
|
156
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NotificationFromJSON)(jsonValue));
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Dismisses the notification for the current user. Dismissed notifications are hidden by default.
|
|
161
|
+
* Dismiss a notification
|
|
162
|
+
*/
|
|
163
|
+
organizationsOrganizationIdNotificationsNotificationIdDismissPost(requestParameters, initOverrides) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
const response = yield this.organizationsOrganizationIdNotificationsNotificationIdDismissPostRaw(requestParameters, initOverrides);
|
|
166
|
+
return yield response.value();
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Get a notification by ID
|
|
171
|
+
*/
|
|
172
|
+
organizationsOrganizationIdNotificationsNotificationIdGetRaw(requestParameters, initOverrides) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
if (requestParameters['organizationId'] == null) {
|
|
175
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdGet().');
|
|
176
|
+
}
|
|
177
|
+
if (requestParameters['notificationId'] == null) {
|
|
178
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdGet().');
|
|
179
|
+
}
|
|
180
|
+
const queryParameters = {};
|
|
181
|
+
const headerParameters = {};
|
|
182
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
183
|
+
const token = this.configuration.accessToken;
|
|
184
|
+
const tokenString = yield token("bearerAuth", []);
|
|
185
|
+
if (tokenString) {
|
|
186
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
let urlPath = `/organizations/{organizationId}/notifications/{notificationId}`;
|
|
190
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
191
|
+
urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
192
|
+
const response = yield this.request({
|
|
193
|
+
path: urlPath,
|
|
194
|
+
method: 'GET',
|
|
195
|
+
headers: headerParameters,
|
|
196
|
+
query: queryParameters,
|
|
197
|
+
}, initOverrides);
|
|
198
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NotificationFromJSON)(jsonValue));
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Get a notification by ID
|
|
203
|
+
*/
|
|
204
|
+
organizationsOrganizationIdNotificationsNotificationIdGet(requestParameters, initOverrides) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
const response = yield this.organizationsOrganizationIdNotificationsNotificationIdGetRaw(requestParameters, initOverrides);
|
|
207
|
+
return yield response.value();
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Partial update — only provided fields are modified. Content supports markdown.
|
|
212
|
+
* Update a notification (admin only)
|
|
213
|
+
*/
|
|
214
|
+
organizationsOrganizationIdNotificationsNotificationIdPutRaw(requestParameters, initOverrides) {
|
|
215
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
216
|
+
if (requestParameters['organizationId'] == null) {
|
|
217
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdPut().');
|
|
218
|
+
}
|
|
219
|
+
if (requestParameters['notificationId'] == null) {
|
|
220
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdPut().');
|
|
221
|
+
}
|
|
222
|
+
if (requestParameters['notificationUpdate'] == null) {
|
|
223
|
+
throw new runtime.RequiredError('notificationUpdate', 'Required parameter "notificationUpdate" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdPut().');
|
|
224
|
+
}
|
|
225
|
+
const queryParameters = {};
|
|
226
|
+
const headerParameters = {};
|
|
227
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
228
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
229
|
+
const token = this.configuration.accessToken;
|
|
230
|
+
const tokenString = yield token("bearerAuth", []);
|
|
231
|
+
if (tokenString) {
|
|
232
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
let urlPath = `/organizations/{organizationId}/notifications/{notificationId}`;
|
|
236
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
237
|
+
urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
238
|
+
const response = yield this.request({
|
|
239
|
+
path: urlPath,
|
|
240
|
+
method: 'PUT',
|
|
241
|
+
headers: headerParameters,
|
|
242
|
+
query: queryParameters,
|
|
243
|
+
body: (0, index_1.NotificationUpdateToJSON)(requestParameters['notificationUpdate']),
|
|
244
|
+
}, initOverrides);
|
|
245
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NotificationFromJSON)(jsonValue));
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Partial update — only provided fields are modified. Content supports markdown.
|
|
250
|
+
* Update a notification (admin only)
|
|
251
|
+
*/
|
|
252
|
+
organizationsOrganizationIdNotificationsNotificationIdPut(requestParameters, initOverrides) {
|
|
253
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
const response = yield this.organizationsOrganizationIdNotificationsNotificationIdPutRaw(requestParameters, initOverrides);
|
|
255
|
+
return yield response.value();
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Marks the notification as read for the current user. Idempotent.
|
|
260
|
+
* Mark a notification as read
|
|
261
|
+
*/
|
|
262
|
+
organizationsOrganizationIdNotificationsNotificationIdReadPostRaw(requestParameters, initOverrides) {
|
|
263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
264
|
+
if (requestParameters['organizationId'] == null) {
|
|
265
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdReadPost().');
|
|
266
|
+
}
|
|
267
|
+
if (requestParameters['notificationId'] == null) {
|
|
268
|
+
throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling organizationsOrganizationIdNotificationsNotificationIdReadPost().');
|
|
269
|
+
}
|
|
270
|
+
const queryParameters = {};
|
|
271
|
+
const headerParameters = {};
|
|
272
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
273
|
+
const token = this.configuration.accessToken;
|
|
274
|
+
const tokenString = yield token("bearerAuth", []);
|
|
275
|
+
if (tokenString) {
|
|
276
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
let urlPath = `/organizations/{organizationId}/notifications/{notificationId}/read`;
|
|
280
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
281
|
+
urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId'])));
|
|
282
|
+
const response = yield this.request({
|
|
283
|
+
path: urlPath,
|
|
284
|
+
method: 'POST',
|
|
285
|
+
headers: headerParameters,
|
|
286
|
+
query: queryParameters,
|
|
287
|
+
}, initOverrides);
|
|
288
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NotificationFromJSON)(jsonValue));
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Marks the notification as read for the current user. Idempotent.
|
|
293
|
+
* Mark a notification as read
|
|
294
|
+
*/
|
|
295
|
+
organizationsOrganizationIdNotificationsNotificationIdReadPost(requestParameters, initOverrides) {
|
|
296
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
297
|
+
const response = yield this.organizationsOrganizationIdNotificationsNotificationIdReadPostRaw(requestParameters, initOverrides);
|
|
298
|
+
return yield response.value();
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* 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.
|
|
303
|
+
* Create a notification (admin only)
|
|
304
|
+
*/
|
|
305
|
+
organizationsOrganizationIdNotificationsPostRaw(requestParameters, initOverrides) {
|
|
306
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
307
|
+
if (requestParameters['organizationId'] == null) {
|
|
308
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdNotificationsPost().');
|
|
309
|
+
}
|
|
310
|
+
if (requestParameters['notificationCreate'] == null) {
|
|
311
|
+
throw new runtime.RequiredError('notificationCreate', 'Required parameter "notificationCreate" was null or undefined when calling organizationsOrganizationIdNotificationsPost().');
|
|
312
|
+
}
|
|
313
|
+
const queryParameters = {};
|
|
314
|
+
const headerParameters = {};
|
|
315
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
316
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
317
|
+
const token = this.configuration.accessToken;
|
|
318
|
+
const tokenString = yield token("bearerAuth", []);
|
|
319
|
+
if (tokenString) {
|
|
320
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
let urlPath = `/organizations/{organizationId}/notifications`;
|
|
324
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
325
|
+
const response = yield this.request({
|
|
326
|
+
path: urlPath,
|
|
327
|
+
method: 'POST',
|
|
328
|
+
headers: headerParameters,
|
|
329
|
+
query: queryParameters,
|
|
330
|
+
body: (0, index_1.NotificationCreateToJSON)(requestParameters['notificationCreate']),
|
|
331
|
+
}, initOverrides);
|
|
332
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NotificationFromJSON)(jsonValue));
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* 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.
|
|
337
|
+
* Create a notification (admin only)
|
|
338
|
+
*/
|
|
339
|
+
organizationsOrganizationIdNotificationsPost(requestParameters, initOverrides) {
|
|
340
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
341
|
+
const response = yield this.organizationsOrganizationIdNotificationsPostRaw(requestParameters, initOverrides);
|
|
342
|
+
return yield response.value();
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
exports.NotificationsApi = NotificationsApi;
|
|
347
|
+
/**
|
|
348
|
+
* @export
|
|
349
|
+
*/
|
|
350
|
+
exports.OrganizationsOrganizationIdNotificationsGetIncludeDismissedEnum = {
|
|
351
|
+
True: 'true',
|
|
352
|
+
False: 'false'
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* @export
|
|
356
|
+
*/
|
|
357
|
+
exports.OrganizationsOrganizationIdNotificationsGetIncludeExpiredEnum = {
|
|
358
|
+
True: 'true',
|
|
359
|
+
False: 'false'
|
|
360
|
+
};
|
package/dist/apis/SIPApi.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export interface OrganizationsOrganizationIdSipDispatchRulesPostRequest {
|
|
|
19
19
|
organizationId: string;
|
|
20
20
|
dispatchRuleCreate: DispatchRuleCreate;
|
|
21
21
|
}
|
|
22
|
+
export interface OrganizationsOrganizationIdSipPhoneNumbersAssignPostRequest {
|
|
23
|
+
organizationId: string;
|
|
24
|
+
}
|
|
22
25
|
export interface OrganizationsOrganizationIdSipTrunksGetRequest {
|
|
23
26
|
organizationId: string;
|
|
24
27
|
}
|
|
@@ -59,6 +62,16 @@ export declare class SIPApi extends runtime.BaseAPI {
|
|
|
59
62
|
* Create a dispatch rule (assign agent to trunk)
|
|
60
63
|
*/
|
|
61
64
|
organizationsOrganizationIdSipDispatchRulesPost(requestParameters: OrganizationsOrganizationIdSipDispatchRulesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationsOrganizationIdSipDispatchRulesPost200Response>;
|
|
65
|
+
/**
|
|
66
|
+
* Automatically picks the first available (unassigned) phone number from the pool, creates a SIP trunk, and assigns it to the organization.
|
|
67
|
+
* Assign an available phone number to the organization
|
|
68
|
+
*/
|
|
69
|
+
organizationsOrganizationIdSipPhoneNumbersAssignPostRaw(requestParameters: OrganizationsOrganizationIdSipPhoneNumbersAssignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SipTrunkWithAgent>>;
|
|
70
|
+
/**
|
|
71
|
+
* Automatically picks the first available (unassigned) phone number from the pool, creates a SIP trunk, and assigns it to the organization.
|
|
72
|
+
* Assign an available phone number to the organization
|
|
73
|
+
*/
|
|
74
|
+
organizationsOrganizationIdSipPhoneNumbersAssignPost(requestParameters: OrganizationsOrganizationIdSipPhoneNumbersAssignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SipTrunkWithAgent>;
|
|
62
75
|
/**
|
|
63
76
|
* List all SIP trunks for an organization
|
|
64
77
|
*/
|