@emilgroup/notification-sdk 0.8.1-beta.5 → 0.8.1-beta.51
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/.openapi-generator/FILES +20 -0
- package/README.md +2 -2
- package/api/email-mailboxes-api.ts +148 -0
- package/api/email-messages-api.ts +40 -28
- package/api/email-subscriptions-api.ts +559 -0
- package/api/email-tracking-api.ts +271 -40
- package/api/email-verifications-api.ts +16 -8
- package/api/layouts-api.ts +56 -36
- package/api/msgraph-webhooks-api.ts +278 -0
- package/api/notification-templates-api.ts +56 -36
- package/api/notifications-api.ts +115 -4
- package/api.ts +6 -0
- package/base.ts +36 -15
- package/configuration.ts +11 -0
- package/dist/api/email-mailboxes-api.d.ts +87 -0
- package/dist/api/email-mailboxes-api.js +218 -0
- package/dist/api/email-messages-api.d.ts +40 -28
- package/dist/api/email-messages-api.js +37 -25
- package/dist/api/email-subscriptions-api.d.ts +319 -0
- package/dist/api/email-subscriptions-api.js +537 -0
- package/dist/api/email-tracking-api.d.ts +170 -40
- package/dist/api/email-tracking-api.js +233 -34
- package/dist/api/email-verifications-api.d.ts +16 -8
- package/dist/api/email-verifications-api.js +16 -8
- package/dist/api/layouts-api.d.ts +56 -36
- package/dist/api/layouts-api.js +52 -32
- package/dist/api/msgraph-webhooks-api.d.ts +168 -0
- package/dist/api/msgraph-webhooks-api.js +305 -0
- package/dist/api/notification-templates-api.d.ts +56 -36
- package/dist/api/notification-templates-api.js +52 -32
- package/dist/api/notifications-api.d.ts +65 -4
- package/dist/api/notifications-api.js +101 -4
- package/dist/api.d.ts +3 -0
- package/dist/api.js +3 -0
- package/dist/base.d.ts +1 -0
- package/dist/base.js +36 -16
- package/dist/configuration.d.ts +9 -0
- package/dist/configuration.js +1 -0
- package/dist/models/assign-email-thread-entity-body-dto.d.ts +43 -0
- package/dist/models/assign-email-thread-entity-body-dto.js +22 -0
- package/dist/models/assign-email-thread-entity-response-class.d.ts +25 -0
- package/dist/models/assign-email-thread-entity-response-class.js +15 -0
- package/dist/models/email-mailbox-class.d.ts +47 -0
- package/dist/models/email-mailbox-class.js +20 -0
- package/dist/models/email-message-class.d.ts +73 -7
- package/dist/models/email-message-class.js +22 -3
- package/dist/models/email-message-summary-class.d.ts +98 -0
- package/dist/models/email-message-summary-class.js +33 -0
- package/dist/models/email-subscription-class.d.ts +104 -0
- package/dist/models/email-subscription-class.js +23 -0
- package/dist/models/email-thread-class.d.ts +37 -5
- package/dist/models/entity-ref-class.d.ts +37 -0
- package/dist/models/entity-ref-class.js +22 -0
- package/dist/models/get-email-subscription-response-class.d.ts +25 -0
- package/dist/models/get-email-subscription-response-class.js +15 -0
- package/dist/models/grpc-send-email-request-dto.d.ts +137 -0
- package/dist/models/grpc-send-email-request-dto.js +22 -0
- package/dist/models/index.d.ts +17 -0
- package/dist/models/index.js +17 -0
- package/dist/models/inline-attachment-dto.d.ts +36 -0
- package/dist/models/inline-attachment-dto.js +15 -0
- package/dist/models/list-email-mailboxes-response-class.d.ts +43 -0
- package/dist/models/list-email-mailboxes-response-class.js +15 -0
- package/dist/models/list-email-subscriptions-response-class.d.ts +43 -0
- package/dist/models/list-email-subscriptions-response-class.js +15 -0
- package/dist/models/reconcile-email-subscriptions-request-dto.d.ts +24 -0
- package/dist/models/reconcile-email-subscriptions-request-dto.js +15 -0
- package/dist/models/reconcile-email-subscriptions-response-class.d.ts +48 -0
- package/dist/models/reconcile-email-subscriptions-response-class.js +15 -0
- package/dist/models/renew-email-subscription-response-class.d.ts +25 -0
- package/dist/models/renew-email-subscription-response-class.js +15 -0
- package/dist/models/send-email-request-dto.d.ts +131 -0
- package/dist/models/send-email-request-dto.js +22 -0
- package/dist/models/send-email-response-class.d.ts +24 -0
- package/dist/models/send-email-response-class.js +15 -0
- package/dist/models/send-notification-request-dto.d.ts +10 -1
- package/dist/models/send-notification-request-dto.js +2 -1
- package/dist/models/unassign-email-thread-entity-response-class.d.ts +25 -0
- package/dist/models/unassign-email-thread-entity-response-class.js +15 -0
- package/models/assign-email-thread-entity-body-dto.ts +52 -0
- package/models/assign-email-thread-entity-response-class.ts +31 -0
- package/models/email-mailbox-class.ts +56 -0
- package/models/email-message-class.ts +78 -8
- package/models/email-message-summary-class.ts +109 -0
- package/models/email-subscription-class.ts +113 -0
- package/models/email-thread-class.ts +37 -5
- package/models/entity-ref-class.ts +46 -0
- package/models/get-email-subscription-response-class.ts +31 -0
- package/models/grpc-send-email-request-dto.ts +144 -0
- package/models/index.ts +17 -0
- package/models/inline-attachment-dto.ts +42 -0
- package/models/list-email-mailboxes-response-class.ts +49 -0
- package/models/list-email-subscriptions-response-class.ts +49 -0
- package/models/reconcile-email-subscriptions-request-dto.ts +30 -0
- package/models/reconcile-email-subscriptions-response-class.ts +54 -0
- package/models/renew-email-subscription-response-class.ts +31 -0
- package/models/send-email-request-dto.ts +138 -0
- package/models/send-email-response-class.ts +30 -0
- package/models/send-notification-request-dto.ts +9 -2
- package/models/unassign-email-thread-entity-response-class.ts +31 -0
- package/package.json +1 -1
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { SendEmailRequestDto } from '../models';
|
|
16
|
+
import { SendEmailResponseClass } from '../models';
|
|
15
17
|
import { SendNotificationRequestDto } from '../models';
|
|
16
18
|
import { SendNotificationResponseClass } from '../models';
|
|
17
19
|
/**
|
|
@@ -20,7 +22,17 @@ import { SendNotificationResponseClass } from '../models';
|
|
|
20
22
|
*/
|
|
21
23
|
export declare const NotificationsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
22
24
|
/**
|
|
23
|
-
*
|
|
25
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
26
|
+
* @summary Send an email without a template
|
|
27
|
+
* @param {SendEmailRequestDto} sendEmailRequestDto
|
|
28
|
+
* @param {string} [authorization] Bearer Token
|
|
29
|
+
* @param {*} [options] Override http request option.
|
|
30
|
+
* @throws {RequiredError}
|
|
31
|
+
*/
|
|
32
|
+
sendEmail: (sendEmailRequestDto: SendEmailRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
33
|
+
/**
|
|
34
|
+
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
35
|
+
* @summary Send a notification
|
|
24
36
|
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
25
37
|
* @param {string} [authorization] Bearer Token
|
|
26
38
|
* @param {*} [options] Override http request option.
|
|
@@ -34,7 +46,17 @@ export declare const NotificationsApiAxiosParamCreator: (configuration?: Configu
|
|
|
34
46
|
*/
|
|
35
47
|
export declare const NotificationsApiFp: (configuration?: Configuration) => {
|
|
36
48
|
/**
|
|
37
|
-
*
|
|
49
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
50
|
+
* @summary Send an email without a template
|
|
51
|
+
* @param {SendEmailRequestDto} sendEmailRequestDto
|
|
52
|
+
* @param {string} [authorization] Bearer Token
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
*/
|
|
56
|
+
sendEmail(sendEmailRequestDto: SendEmailRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SendEmailResponseClass>>;
|
|
57
|
+
/**
|
|
58
|
+
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
59
|
+
* @summary Send a notification
|
|
38
60
|
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
39
61
|
* @param {string} [authorization] Bearer Token
|
|
40
62
|
* @param {*} [options] Override http request option.
|
|
@@ -48,7 +70,17 @@ export declare const NotificationsApiFp: (configuration?: Configuration) => {
|
|
|
48
70
|
*/
|
|
49
71
|
export declare const NotificationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
50
72
|
/**
|
|
51
|
-
*
|
|
73
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
74
|
+
* @summary Send an email without a template
|
|
75
|
+
* @param {SendEmailRequestDto} sendEmailRequestDto
|
|
76
|
+
* @param {string} [authorization] Bearer Token
|
|
77
|
+
* @param {*} [options] Override http request option.
|
|
78
|
+
* @throws {RequiredError}
|
|
79
|
+
*/
|
|
80
|
+
sendEmail(sendEmailRequestDto: SendEmailRequestDto, authorization?: string, options?: any): AxiosPromise<SendEmailResponseClass>;
|
|
81
|
+
/**
|
|
82
|
+
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
83
|
+
* @summary Send a notification
|
|
52
84
|
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
53
85
|
* @param {string} [authorization] Bearer Token
|
|
54
86
|
* @param {*} [options] Override http request option.
|
|
@@ -56,6 +88,25 @@ export declare const NotificationsApiFactory: (configuration?: Configuration, ba
|
|
|
56
88
|
*/
|
|
57
89
|
sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: any): AxiosPromise<SendNotificationResponseClass>;
|
|
58
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* Request parameters for sendEmail operation in NotificationsApi.
|
|
93
|
+
* @export
|
|
94
|
+
* @interface NotificationsApiSendEmailRequest
|
|
95
|
+
*/
|
|
96
|
+
export interface NotificationsApiSendEmailRequest {
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @type {SendEmailRequestDto}
|
|
100
|
+
* @memberof NotificationsApiSendEmail
|
|
101
|
+
*/
|
|
102
|
+
readonly sendEmailRequestDto: SendEmailRequestDto;
|
|
103
|
+
/**
|
|
104
|
+
* Bearer Token
|
|
105
|
+
* @type {string}
|
|
106
|
+
* @memberof NotificationsApiSendEmail
|
|
107
|
+
*/
|
|
108
|
+
readonly authorization?: string;
|
|
109
|
+
}
|
|
59
110
|
/**
|
|
60
111
|
* Request parameters for sendNotification operation in NotificationsApi.
|
|
61
112
|
* @export
|
|
@@ -83,7 +134,17 @@ export interface NotificationsApiSendNotificationRequest {
|
|
|
83
134
|
*/
|
|
84
135
|
export declare class NotificationsApi extends BaseAPI {
|
|
85
136
|
/**
|
|
86
|
-
*
|
|
137
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
138
|
+
* @summary Send an email without a template
|
|
139
|
+
* @param {NotificationsApiSendEmailRequest} requestParameters Request parameters.
|
|
140
|
+
* @param {*} [options] Override http request option.
|
|
141
|
+
* @throws {RequiredError}
|
|
142
|
+
* @memberof NotificationsApi
|
|
143
|
+
*/
|
|
144
|
+
sendEmail(requestParameters: NotificationsApiSendEmailRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SendEmailResponseClass, any, {}>>;
|
|
145
|
+
/**
|
|
146
|
+
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
147
|
+
* @summary Send a notification
|
|
87
148
|
* @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
|
|
88
149
|
* @param {*} [options] Override http request option.
|
|
89
150
|
* @throws {RequiredError}
|
|
@@ -93,7 +93,57 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
|
|
|
93
93
|
var _this = this;
|
|
94
94
|
return {
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
96
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
97
|
+
* @summary Send an email without a template
|
|
98
|
+
* @param {SendEmailRequestDto} sendEmailRequestDto
|
|
99
|
+
* @param {string} [authorization] Bearer Token
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
sendEmail: function (sendEmailRequestDto, authorization, options) {
|
|
104
|
+
if (options === void 0) { options = {}; }
|
|
105
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
106
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
107
|
+
return __generator(this, function (_a) {
|
|
108
|
+
switch (_a.label) {
|
|
109
|
+
case 0:
|
|
110
|
+
// verify required parameter 'sendEmailRequestDto' is not null or undefined
|
|
111
|
+
(0, common_1.assertParamExists)('sendEmail', 'sendEmailRequestDto', sendEmailRequestDto);
|
|
112
|
+
localVarPath = "/notificationservice/v1/notifications/emails";
|
|
113
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
114
|
+
if (configuration) {
|
|
115
|
+
baseOptions = configuration.baseOptions;
|
|
116
|
+
baseAccessToken = configuration.accessToken;
|
|
117
|
+
}
|
|
118
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
119
|
+
localVarHeaderParameter = {};
|
|
120
|
+
localVarQueryParameter = {};
|
|
121
|
+
// authentication bearer required
|
|
122
|
+
// http bearer authentication required
|
|
123
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
124
|
+
case 1:
|
|
125
|
+
// authentication bearer required
|
|
126
|
+
// http bearer authentication required
|
|
127
|
+
_a.sent();
|
|
128
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
129
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
130
|
+
}
|
|
131
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
132
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
133
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
134
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
135
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sendEmailRequestDto, localVarRequestOptions, configuration);
|
|
136
|
+
return [2 /*return*/, {
|
|
137
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
138
|
+
options: localVarRequestOptions,
|
|
139
|
+
}];
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
146
|
+
* @summary Send a notification
|
|
97
147
|
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
98
148
|
* @param {string} [authorization] Bearer Token
|
|
99
149
|
* @param {*} [options] Override http request option.
|
|
@@ -151,7 +201,29 @@ var NotificationsApiFp = function (configuration) {
|
|
|
151
201
|
var localVarAxiosParamCreator = (0, exports.NotificationsApiAxiosParamCreator)(configuration);
|
|
152
202
|
return {
|
|
153
203
|
/**
|
|
154
|
-
*
|
|
204
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
205
|
+
* @summary Send an email without a template
|
|
206
|
+
* @param {SendEmailRequestDto} sendEmailRequestDto
|
|
207
|
+
* @param {string} [authorization] Bearer Token
|
|
208
|
+
* @param {*} [options] Override http request option.
|
|
209
|
+
* @throws {RequiredError}
|
|
210
|
+
*/
|
|
211
|
+
sendEmail: function (sendEmailRequestDto, authorization, options) {
|
|
212
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
213
|
+
var localVarAxiosArgs;
|
|
214
|
+
return __generator(this, function (_a) {
|
|
215
|
+
switch (_a.label) {
|
|
216
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.sendEmail(sendEmailRequestDto, authorization, options)];
|
|
217
|
+
case 1:
|
|
218
|
+
localVarAxiosArgs = _a.sent();
|
|
219
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
},
|
|
224
|
+
/**
|
|
225
|
+
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
226
|
+
* @summary Send a notification
|
|
155
227
|
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
156
228
|
* @param {string} [authorization] Bearer Token
|
|
157
229
|
* @param {*} [options] Override http request option.
|
|
@@ -181,7 +253,19 @@ var NotificationsApiFactory = function (configuration, basePath, axios) {
|
|
|
181
253
|
var localVarFp = (0, exports.NotificationsApiFp)(configuration);
|
|
182
254
|
return {
|
|
183
255
|
/**
|
|
184
|
-
*
|
|
256
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
257
|
+
* @summary Send an email without a template
|
|
258
|
+
* @param {SendEmailRequestDto} sendEmailRequestDto
|
|
259
|
+
* @param {string} [authorization] Bearer Token
|
|
260
|
+
* @param {*} [options] Override http request option.
|
|
261
|
+
* @throws {RequiredError}
|
|
262
|
+
*/
|
|
263
|
+
sendEmail: function (sendEmailRequestDto, authorization, options) {
|
|
264
|
+
return localVarFp.sendEmail(sendEmailRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
265
|
+
},
|
|
266
|
+
/**
|
|
267
|
+
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
268
|
+
* @summary Send a notification
|
|
185
269
|
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
186
270
|
* @param {string} [authorization] Bearer Token
|
|
187
271
|
* @param {*} [options] Override http request option.
|
|
@@ -205,7 +289,20 @@ var NotificationsApi = /** @class */ (function (_super) {
|
|
|
205
289
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
206
290
|
}
|
|
207
291
|
/**
|
|
208
|
-
*
|
|
292
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
293
|
+
* @summary Send an email without a template
|
|
294
|
+
* @param {NotificationsApiSendEmailRequest} requestParameters Request parameters.
|
|
295
|
+
* @param {*} [options] Override http request option.
|
|
296
|
+
* @throws {RequiredError}
|
|
297
|
+
* @memberof NotificationsApi
|
|
298
|
+
*/
|
|
299
|
+
NotificationsApi.prototype.sendEmail = function (requestParameters, options) {
|
|
300
|
+
var _this = this;
|
|
301
|
+
return (0, exports.NotificationsApiFp)(this.configuration).sendEmail(requestParameters.sendEmailRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
305
|
+
* @summary Send a notification
|
|
209
306
|
* @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
|
|
210
307
|
* @param {*} [options] Override http request option.
|
|
211
308
|
* @throws {RequiredError}
|
package/dist/api.d.ts
CHANGED
|
@@ -9,10 +9,13 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
export * from './api/email-mailboxes-api';
|
|
12
13
|
export * from './api/email-messages-api';
|
|
14
|
+
export * from './api/email-subscriptions-api';
|
|
13
15
|
export * from './api/email-tracking-api';
|
|
14
16
|
export * from './api/email-verifications-api';
|
|
15
17
|
export * from './api/health-api';
|
|
16
18
|
export * from './api/layouts-api';
|
|
19
|
+
export * from './api/msgraph-webhooks-api';
|
|
17
20
|
export * from './api/notification-templates-api';
|
|
18
21
|
export * from './api/notifications-api';
|
package/dist/api.js
CHANGED
|
@@ -27,10 +27,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
27
27
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
__exportStar(require("./api/email-mailboxes-api"), exports);
|
|
30
31
|
__exportStar(require("./api/email-messages-api"), exports);
|
|
32
|
+
__exportStar(require("./api/email-subscriptions-api"), exports);
|
|
31
33
|
__exportStar(require("./api/email-tracking-api"), exports);
|
|
32
34
|
__exportStar(require("./api/email-verifications-api"), exports);
|
|
33
35
|
__exportStar(require("./api/health-api"), exports);
|
|
34
36
|
__exportStar(require("./api/layouts-api"), exports);
|
|
37
|
+
__exportStar(require("./api/msgraph-webhooks-api"), exports);
|
|
35
38
|
__exportStar(require("./api/notification-templates-api"), exports);
|
|
36
39
|
__exportStar(require("./api/notifications-api"), exports);
|
package/dist/base.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export declare class BaseAPI {
|
|
|
63
63
|
protected configuration: Configuration | undefined;
|
|
64
64
|
private tokenData?;
|
|
65
65
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
66
|
+
private useCookieAuth;
|
|
66
67
|
selectEnvironment(env: Environment): void;
|
|
67
68
|
selectBasePath(path: string): void;
|
|
68
69
|
getPermissions(): Array<string>;
|
package/dist/base.js
CHANGED
|
@@ -128,10 +128,15 @@ var BaseAPI = /** @class */ (function () {
|
|
|
128
128
|
var accessToken = this.tokenData.accessToken;
|
|
129
129
|
this.configuration = configuration;
|
|
130
130
|
this.basePath = configuration.basePath || this.basePath;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
if (configuration.cookieAuth) {
|
|
132
|
+
this.useCookieAuth();
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
// Use config token if provided, otherwise use tokenData token
|
|
136
|
+
var configToken = this.configuration.accessToken;
|
|
137
|
+
var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
|
|
138
|
+
this.configuration.accessToken = configToken || storedToken;
|
|
139
|
+
}
|
|
135
140
|
}
|
|
136
141
|
else {
|
|
137
142
|
var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
|
|
@@ -143,6 +148,11 @@ var BaseAPI = /** @class */ (function () {
|
|
|
143
148
|
}
|
|
144
149
|
this.attachInterceptor(axios);
|
|
145
150
|
}
|
|
151
|
+
// Cookie mode: the browser sends the HttpOnly access cookie, so no token is read from storage.
|
|
152
|
+
BaseAPI.prototype.useCookieAuth = function () {
|
|
153
|
+
this.configuration.username = this.configuration.username || this.tokenData.username;
|
|
154
|
+
this.configuration.baseOptions = __assign(__assign({}, this.configuration.baseOptions), { withCredentials: true });
|
|
155
|
+
};
|
|
146
156
|
BaseAPI.prototype.selectEnvironment = function (env) {
|
|
147
157
|
this.selectBasePath(env);
|
|
148
158
|
};
|
|
@@ -177,10 +187,12 @@ var BaseAPI = /** @class */ (function () {
|
|
|
177
187
|
response = _b.sent();
|
|
178
188
|
_a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
|
|
179
189
|
this.configuration.username = username;
|
|
180
|
-
this.configuration.accessToken = "Bearer ".concat(accessToken);
|
|
181
190
|
this.tokenData.username = username;
|
|
182
|
-
this.tokenData.accessToken = accessToken;
|
|
183
191
|
this.tokenData.permissions = permissions;
|
|
192
|
+
if (!this.configuration.cookieAuth) {
|
|
193
|
+
this.configuration.accessToken = "Bearer ".concat(accessToken);
|
|
194
|
+
this.tokenData.accessToken = accessToken;
|
|
195
|
+
}
|
|
184
196
|
if (!targetWorkspace) return [3 /*break*/, 3];
|
|
185
197
|
return [4 /*yield*/, this.switchWorkspace(targetWorkspace)];
|
|
186
198
|
case 2:
|
|
@@ -206,10 +218,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
206
218
|
options = {
|
|
207
219
|
method: 'POST',
|
|
208
220
|
url: "".concat(this.configuration.basePath, "/authservice/v1/workspaces/switch"),
|
|
209
|
-
headers: {
|
|
210
|
-
'Content-Type': 'application/json',
|
|
211
|
-
'Authorization': "Bearer ".concat(this.configuration.accessToken),
|
|
212
|
-
},
|
|
221
|
+
headers: __assign({ 'Content-Type': 'application/json' }, (this.configuration.cookieAuth ? {} : { 'Authorization': "Bearer ".concat(this.configuration.accessToken) })),
|
|
213
222
|
data: {
|
|
214
223
|
username: this.configuration.username,
|
|
215
224
|
targetWorkspace: targetWorkspace,
|
|
@@ -220,9 +229,11 @@ var BaseAPI = /** @class */ (function () {
|
|
|
220
229
|
case 1:
|
|
221
230
|
response = _b.sent();
|
|
222
231
|
_a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
|
|
223
|
-
this.configuration.accessToken = "Bearer ".concat(accessToken);
|
|
224
|
-
this.tokenData.accessToken = accessToken;
|
|
225
232
|
this.tokenData.permissions = permissions;
|
|
233
|
+
if (!this.configuration.cookieAuth) {
|
|
234
|
+
this.configuration.accessToken = "Bearer ".concat(accessToken);
|
|
235
|
+
this.tokenData.accessToken = accessToken;
|
|
236
|
+
}
|
|
226
237
|
this.storeTokenData(__assign({}, this.tokenData));
|
|
227
238
|
return [2 /*return*/];
|
|
228
239
|
}
|
|
@@ -265,7 +276,13 @@ var BaseAPI = /** @class */ (function () {
|
|
|
265
276
|
});
|
|
266
277
|
};
|
|
267
278
|
BaseAPI.prototype.storeTokenData = function (tokenData) {
|
|
279
|
+
var _a;
|
|
268
280
|
if (typeof window !== 'undefined') {
|
|
281
|
+
if (tokenData && ((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.cookieAuth)) {
|
|
282
|
+
// Cookie mode saves who is logged in, never the token; a token saved by apps not yet migrated stays.
|
|
283
|
+
var username = tokenData.username, permissions = tokenData.permissions;
|
|
284
|
+
tokenData = __assign(__assign({}, ((0, common_1.defaultStorage)().get(TOKEN_DATA) || {})), { username: username, permissions: permissions });
|
|
285
|
+
}
|
|
269
286
|
(0, common_1.defaultStorage)().set(TOKEN_DATA, tokenData);
|
|
270
287
|
}
|
|
271
288
|
};
|
|
@@ -300,12 +317,15 @@ var BaseAPI = /** @class */ (function () {
|
|
|
300
317
|
return [4 /*yield*/, this.refreshTokenInternal()];
|
|
301
318
|
case 2:
|
|
302
319
|
_a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
|
|
303
|
-
accessToken = "Bearer ".concat(tokenString);
|
|
304
320
|
this.tokenData.permissions = permissions;
|
|
305
321
|
delete originalConfig.headers['Authorization'];
|
|
306
|
-
|
|
307
|
-
this.configuration.
|
|
308
|
-
|
|
322
|
+
// In cookie mode the refresh reply renewed the access cookie, so retry without a header.
|
|
323
|
+
if (!this.configuration.cookieAuth) {
|
|
324
|
+
accessToken = "Bearer ".concat(tokenString);
|
|
325
|
+
originalConfig.headers['Authorization'] = accessToken;
|
|
326
|
+
this.configuration.accessToken = accessToken;
|
|
327
|
+
this.tokenData.accessToken = tokenString;
|
|
328
|
+
}
|
|
309
329
|
this.storeTokenData(this.tokenData);
|
|
310
330
|
return [2 /*return*/, axios(originalConfig)];
|
|
311
331
|
case 3:
|
package/dist/configuration.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface ConfigurationParameters {
|
|
|
17
17
|
basePath?: string;
|
|
18
18
|
baseOptions?: any;
|
|
19
19
|
formDataCtor?: new () => any;
|
|
20
|
+
cookieAuth?: boolean;
|
|
20
21
|
}
|
|
21
22
|
export declare class Configuration {
|
|
22
23
|
/**
|
|
@@ -68,6 +69,14 @@ export declare class Configuration {
|
|
|
68
69
|
* @type {new () => FormData}
|
|
69
70
|
*/
|
|
70
71
|
formDataCtor?: new () => any;
|
|
72
|
+
/**
|
|
73
|
+
* Authenticate with the HttpOnly access cookie instead of a stored token: every call sends credentials.
|
|
74
|
+
* The browser holds one cookie, so use it with one logged-in account; log out through the auth service.
|
|
75
|
+
*
|
|
76
|
+
* @type {boolean}
|
|
77
|
+
* @memberof Configuration
|
|
78
|
+
*/
|
|
79
|
+
cookieAuth?: boolean;
|
|
71
80
|
constructor(param?: ConfigurationParameters);
|
|
72
81
|
/**
|
|
73
82
|
* Check if the given MIME is a JSON MIME.
|
package/dist/configuration.js
CHANGED
|
@@ -24,6 +24,7 @@ var Configuration = /** @class */ (function () {
|
|
|
24
24
|
this.basePath = param.basePath;
|
|
25
25
|
this.baseOptions = param.baseOptions;
|
|
26
26
|
this.formDataCtor = param.formDataCtor;
|
|
27
|
+
this.cookieAuth = param.cookieAuth;
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
30
|
* Check if the given MIME is a JSON MIME.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL NotificationService
|
|
3
|
+
* The EMIL NotificationService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AssignEmailThreadEntityBodyDto
|
|
16
|
+
*/
|
|
17
|
+
export interface AssignEmailThreadEntityBodyDto {
|
|
18
|
+
/**
|
|
19
|
+
* Type of the entity the email thread belongs to
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AssignEmailThreadEntityBodyDto
|
|
22
|
+
*/
|
|
23
|
+
'entityType': AssignEmailThreadEntityBodyDtoEntityTypeEnum;
|
|
24
|
+
/**
|
|
25
|
+
* Code of the entity. Required unless entityNumber is set; takes precedence over entityNumber.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AssignEmailThreadEntityBodyDto
|
|
28
|
+
*/
|
|
29
|
+
'entityCode'?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Number of the entity, e.g. the policy number. Used only when entityCode is not set.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AssignEmailThreadEntityBodyDto
|
|
34
|
+
*/
|
|
35
|
+
'entityNumber'?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const AssignEmailThreadEntityBodyDtoEntityTypeEnum: {
|
|
38
|
+
readonly Claim: "Claim";
|
|
39
|
+
readonly Policy: "Policy";
|
|
40
|
+
readonly Lead: "Lead";
|
|
41
|
+
readonly Partner: "Partner";
|
|
42
|
+
};
|
|
43
|
+
export type AssignEmailThreadEntityBodyDtoEntityTypeEnum = typeof AssignEmailThreadEntityBodyDtoEntityTypeEnum[keyof typeof AssignEmailThreadEntityBodyDtoEntityTypeEnum];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL NotificationService
|
|
6
|
+
* The EMIL NotificationService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AssignEmailThreadEntityBodyDtoEntityTypeEnum = void 0;
|
|
17
|
+
exports.AssignEmailThreadEntityBodyDtoEntityTypeEnum = {
|
|
18
|
+
Claim: 'Claim',
|
|
19
|
+
Policy: 'Policy',
|
|
20
|
+
Lead: 'Lead',
|
|
21
|
+
Partner: 'Partner'
|
|
22
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL NotificationService
|
|
3
|
+
* The EMIL NotificationService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
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 { EmailThreadClass } from './email-thread-class';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AssignEmailThreadEntityResponseClass
|
|
17
|
+
*/
|
|
18
|
+
export interface AssignEmailThreadEntityResponseClass {
|
|
19
|
+
/**
|
|
20
|
+
* The email thread response.
|
|
21
|
+
* @type {EmailThreadClass}
|
|
22
|
+
* @memberof AssignEmailThreadEntityResponseClass
|
|
23
|
+
*/
|
|
24
|
+
'thread': EmailThreadClass;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL NotificationService
|
|
6
|
+
* The EMIL NotificationService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL NotificationService
|
|
3
|
+
* The EMIL NotificationService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface EmailMailboxClass
|
|
16
|
+
*/
|
|
17
|
+
export interface EmailMailboxClass {
|
|
18
|
+
/**
|
|
19
|
+
* Email address of the mailbox, lower-cased. Use it as the `mailbox` filter when listing email threads or messages.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof EmailMailboxClass
|
|
22
|
+
*/
|
|
23
|
+
'address': string;
|
|
24
|
+
/**
|
|
25
|
+
* Transport the mailbox belongs to: a Microsoft 365 mailbox reached through Graph, or the sender address of an SES tenant
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof EmailMailboxClass
|
|
28
|
+
*/
|
|
29
|
+
'provider': EmailMailboxClassProviderEnum;
|
|
30
|
+
/**
|
|
31
|
+
* Number of threads in this mailbox whose latest message is inbound — the total of listing email threads with `mailbox` and `latestDirection==inbound`. Delivery reports (bounces) are not counted.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof EmailMailboxClass
|
|
34
|
+
*/
|
|
35
|
+
'inboundCount': number;
|
|
36
|
+
/**
|
|
37
|
+
* Number of threads in this mailbox whose latest message is outbound — the total of listing email threads with `mailbox` and `latestDirection==outbound`
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof EmailMailboxClass
|
|
40
|
+
*/
|
|
41
|
+
'outboundCount': number;
|
|
42
|
+
}
|
|
43
|
+
export declare const EmailMailboxClassProviderEnum: {
|
|
44
|
+
readonly Ses: "ses";
|
|
45
|
+
readonly Msgraph: "msgraph";
|
|
46
|
+
};
|
|
47
|
+
export type EmailMailboxClassProviderEnum = typeof EmailMailboxClassProviderEnum[keyof typeof EmailMailboxClassProviderEnum];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL NotificationService
|
|
6
|
+
* The EMIL NotificationService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.EmailMailboxClassProviderEnum = void 0;
|
|
17
|
+
exports.EmailMailboxClassProviderEnum = {
|
|
18
|
+
Ses: 'ses',
|
|
19
|
+
Msgraph: 'msgraph'
|
|
20
|
+
};
|