@emilgroup/notification-sdk 0.8.1-beta.61 → 0.8.1-beta.62

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 (53) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/README.md +2 -2
  3. package/api/email-mailboxes-api.ts +4 -2
  4. package/api/email-messages-api.ts +146 -16
  5. package/api/email-subscriptions-api.ts +24 -12
  6. package/api/email-tracking-api.ts +32 -20
  7. package/api/email-verifications-api.ts +8 -4
  8. package/api/layouts-api.ts +20 -10
  9. package/api/notification-templates-api.ts +20 -10
  10. package/api/notifications-api.ts +8 -4
  11. package/base.ts +174 -41
  12. package/common.ts +3 -2
  13. package/configuration.ts +20 -0
  14. package/dist/api/email-mailboxes-api.d.ts +1 -1
  15. package/dist/api/email-mailboxes-api.js +7 -4
  16. package/dist/api/email-messages-api.d.ts +78 -12
  17. package/dist/api/email-messages-api.js +133 -21
  18. package/dist/api/email-subscriptions-api.d.ts +6 -6
  19. package/dist/api/email-subscriptions-api.js +39 -23
  20. package/dist/api/email-tracking-api.d.ts +14 -14
  21. package/dist/api/email-tracking-api.js +42 -28
  22. package/dist/api/email-verifications-api.d.ts +2 -2
  23. package/dist/api/email-verifications-api.js +14 -8
  24. package/dist/api/health-api.d.ts +1 -1
  25. package/dist/api/layouts-api.d.ts +5 -5
  26. package/dist/api/layouts-api.js +29 -18
  27. package/dist/api/msgraph-webhooks-api.d.ts +2 -2
  28. package/dist/api/notification-templates-api.d.ts +5 -5
  29. package/dist/api/notification-templates-api.js +29 -18
  30. package/dist/api/notifications-api.d.ts +2 -2
  31. package/dist/api/notifications-api.js +14 -8
  32. package/dist/base.d.ts +24 -0
  33. package/dist/base.js +178 -59
  34. package/dist/common.d.ts +1 -1
  35. package/dist/common.js +1 -0
  36. package/dist/configuration.d.ts +17 -0
  37. package/dist/configuration.js +2 -0
  38. package/dist/models/email-message-class.d.ts +23 -0
  39. package/dist/models/email-message-class.js +5 -1
  40. package/dist/models/email-message-summary-class.d.ts +17 -0
  41. package/dist/models/email-message-summary-class.js +5 -1
  42. package/dist/models/index.d.ts +2 -0
  43. package/dist/models/index.js +2 -0
  44. package/dist/models/resend-email-message-body-dto.d.ts +30 -0
  45. package/dist/models/resend-email-message-body-dto.js +15 -0
  46. package/dist/models/resend-email-message-response-class.d.ts +25 -0
  47. package/dist/models/resend-email-message-response-class.js +15 -0
  48. package/models/email-message-class.ts +24 -0
  49. package/models/email-message-summary-class.ts +18 -0
  50. package/models/index.ts +2 -0
  51. package/models/resend-email-message-body-dto.ts +36 -0
  52. package/models/resend-email-message-response-class.ts +31 -0
  53. package/package.json +2 -2
@@ -353,7 +353,7 @@ export declare class LayoutsApi extends BaseAPI {
353
353
  * @throws {RequiredError}
354
354
  * @memberof LayoutsApi
355
355
  */
356
- createLayout(requestParameters: LayoutsApiCreateLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateLayoutResponseClass, any, {}>>;
356
+ createLayout(requestParameters: LayoutsApiCreateLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateLayoutResponseClass, any, {}, any>>;
357
357
  /**
358
358
  * Permanently deletes the layout with the given id. **Required Permissions** \"notification-management.email-templates.delete\"
359
359
  * @summary Delete the layout
@@ -362,7 +362,7 @@ export declare class LayoutsApi extends BaseAPI {
362
362
  * @throws {RequiredError}
363
363
  * @memberof LayoutsApi
364
364
  */
365
- deleteLayout(requestParameters: LayoutsApiDeleteLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}>>;
365
+ deleteLayout(requestParameters: LayoutsApiDeleteLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}, any>>;
366
366
  /**
367
367
  * Retrieves the details of the layout with the given id. **Required Permissions** \"notification-management.email-templates.view\"
368
368
  * @summary Retrieve the layout
@@ -371,7 +371,7 @@ export declare class LayoutsApi extends BaseAPI {
371
371
  * @throws {RequiredError}
372
372
  * @memberof LayoutsApi
373
373
  */
374
- getLayout(requestParameters: LayoutsApiGetLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetLayoutResponseClass, any, {}>>;
374
+ getLayout(requestParameters: LayoutsApiGetLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetLayoutResponseClass, any, {}, any>>;
375
375
  /**
376
376
  * Returns a list of layouts. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-templates.view\"
377
377
  * @summary List layouts
@@ -380,7 +380,7 @@ export declare class LayoutsApi extends BaseAPI {
380
380
  * @throws {RequiredError}
381
381
  * @memberof LayoutsApi
382
382
  */
383
- listLayouts(requestParameters?: LayoutsApiListLayoutsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListLayoutsResponseClass, any, {}>>;
383
+ listLayouts(requestParameters?: LayoutsApiListLayoutsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListLayoutsResponseClass, any, {}, any>>;
384
384
  /**
385
385
  * Updates the specified layout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"notification-management.email-templates.update\"
386
386
  * @summary Update the layout
@@ -389,5 +389,5 @@ export declare class LayoutsApi extends BaseAPI {
389
389
  * @throws {RequiredError}
390
390
  * @memberof LayoutsApi
391
391
  */
392
- updateLayout(requestParameters: LayoutsApiUpdateLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateLayoutResponseClass, any, {}>>;
392
+ updateLayout(requestParameters: LayoutsApiUpdateLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateLayoutResponseClass, any, {}, any>>;
393
393
  }
@@ -103,7 +103,7 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
103
103
  createLayout: function (createLayoutRequestDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
107
107
  return __generator(this, function (_a) {
108
108
  switch (_a.label) {
109
109
  case 0:
@@ -120,13 +120,16 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
120
120
  localVarQueryParameter = {};
121
121
  // authentication bearer required
122
122
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
124
+ // Only Authorization falls back to the configured token; an empty value is never sent.
125
+ ];
124
126
  case 1:
125
127
  // authentication bearer required
126
128
  // http bearer authentication required
127
129
  _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
131
+ if (authorizationValue) {
132
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
133
  }
131
134
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
135
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -152,7 +155,7 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
152
155
  deleteLayout: function (id, authorization, options) {
153
156
  if (options === void 0) { options = {}; }
154
157
  return __awaiter(_this, void 0, void 0, function () {
155
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
158
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
156
159
  return __generator(this, function (_a) {
157
160
  switch (_a.label) {
158
161
  case 0:
@@ -170,13 +173,16 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
170
173
  localVarQueryParameter = {};
171
174
  // authentication bearer required
172
175
  // http bearer authentication required
173
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
177
+ // Only Authorization falls back to the configured token; an empty value is never sent.
178
+ ];
174
179
  case 1:
175
180
  // authentication bearer required
176
181
  // http bearer authentication required
177
182
  _a.sent();
178
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
184
+ if (authorizationValue) {
185
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
180
186
  }
181
187
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
188
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -201,7 +207,7 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
201
207
  getLayout: function (id, id2, authorization, options) {
202
208
  if (options === void 0) { options = {}; }
203
209
  return __awaiter(_this, void 0, void 0, function () {
204
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
210
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
205
211
  return __generator(this, function (_a) {
206
212
  switch (_a.label) {
207
213
  case 0:
@@ -229,8 +235,9 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
229
235
  if (id2 !== undefined) {
230
236
  localVarQueryParameter['id'] = id2;
231
237
  }
232
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
233
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
238
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
239
+ if (authorizationValue) {
240
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
234
241
  }
235
242
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
236
243
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -260,7 +267,7 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
260
267
  listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
261
268
  if (options === void 0) { options = {}; }
262
269
  return __awaiter(_this, void 0, void 0, function () {
263
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
270
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
264
271
  return __generator(this, function (_a) {
265
272
  switch (_a.label) {
266
273
  case 0:
@@ -301,8 +308,9 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
301
308
  if (filters !== undefined) {
302
309
  localVarQueryParameter['filters'] = filters;
303
310
  }
304
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
305
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
311
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
312
+ if (authorizationValue) {
313
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
306
314
  }
307
315
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
308
316
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -327,7 +335,7 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
327
335
  updateLayout: function (id, updateLayoutRequestDto, authorization, options) {
328
336
  if (options === void 0) { options = {}; }
329
337
  return __awaiter(_this, void 0, void 0, function () {
330
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
338
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
331
339
  return __generator(this, function (_a) {
332
340
  switch (_a.label) {
333
341
  case 0:
@@ -347,13 +355,16 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
347
355
  localVarQueryParameter = {};
348
356
  // authentication bearer required
349
357
  // http bearer authentication required
350
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
358
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
359
+ // Only Authorization falls back to the configured token; an empty value is never sent.
360
+ ];
351
361
  case 1:
352
362
  // authentication bearer required
353
363
  // http bearer authentication required
354
364
  _a.sent();
355
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
356
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
365
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
366
+ if (authorizationValue) {
367
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
357
368
  }
358
369
  localVarHeaderParameter['Content-Type'] = 'application/json';
359
370
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -155,7 +155,7 @@ export declare class MSGraphWebhooksApi extends BaseAPI {
155
155
  * @throws {RequiredError}
156
156
  * @memberof MSGraphWebhooksApi
157
157
  */
158
- receiveLifecycle(requestParameters: MSGraphWebhooksApiReceiveLifecycleRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
158
+ receiveLifecycle(requestParameters: MSGraphWebhooksApiReceiveLifecycleRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
159
159
  /**
160
160
  * Public route called by Microsoft Graph. Echoes `validationToken` as text/plain, otherwise enqueues the notifications and answers 202. See docs/webhooks/msgraph.md. **Required Permissions** none
161
161
  * @summary Receive Microsoft Graph change notifications
@@ -164,5 +164,5 @@ export declare class MSGraphWebhooksApi extends BaseAPI {
164
164
  * @throws {RequiredError}
165
165
  * @memberof MSGraphWebhooksApi
166
166
  */
167
- receiveNotifications(requestParameters: MSGraphWebhooksApiReceiveNotificationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
167
+ receiveNotifications(requestParameters: MSGraphWebhooksApiReceiveNotificationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
168
168
  }
@@ -362,7 +362,7 @@ export declare class NotificationTemplatesApi extends BaseAPI {
362
362
  * @throws {RequiredError}
363
363
  * @memberof NotificationTemplatesApi
364
364
  */
365
- createNotificationTemplate(requestParameters: NotificationTemplatesApiCreateNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateNotificationTemplateResponseClass, any, {}>>;
365
+ createNotificationTemplate(requestParameters: NotificationTemplatesApiCreateNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateNotificationTemplateResponseClass, any, {}, any>>;
366
366
  /**
367
367
  * Permanently deletes the notification template with the given id. **Required Permissions** \"notification-management.email-templates.delete\"
368
368
  * @summary Delete the notification template
@@ -371,7 +371,7 @@ export declare class NotificationTemplatesApi extends BaseAPI {
371
371
  * @throws {RequiredError}
372
372
  * @memberof NotificationTemplatesApi
373
373
  */
374
- deleteNotificationTemplate(requestParameters: NotificationTemplatesApiDeleteNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}>>;
374
+ deleteNotificationTemplate(requestParameters: NotificationTemplatesApiDeleteNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}, any>>;
375
375
  /**
376
376
  * Retrieves the details of the notification template with the given id. **Required Permissions** \"notification-management.email-templates.view\"
377
377
  * @summary Retrieve the notification template
@@ -380,7 +380,7 @@ export declare class NotificationTemplatesApi extends BaseAPI {
380
380
  * @throws {RequiredError}
381
381
  * @memberof NotificationTemplatesApi
382
382
  */
383
- getNotificationTemplate(requestParameters: NotificationTemplatesApiGetNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetNotificationTemplateResponseClass, any, {}>>;
383
+ getNotificationTemplate(requestParameters: NotificationTemplatesApiGetNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetNotificationTemplateResponseClass, any, {}, any>>;
384
384
  /**
385
385
  * Returns a list of notification templates. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-templates.view\"
386
386
  * @summary List notification templates
@@ -389,7 +389,7 @@ export declare class NotificationTemplatesApi extends BaseAPI {
389
389
  * @throws {RequiredError}
390
390
  * @memberof NotificationTemplatesApi
391
391
  */
392
- listNotificationTemplates(requestParameters?: NotificationTemplatesApiListNotificationTemplatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListNotificationTemplatesResponseClass, any, {}>>;
392
+ listNotificationTemplates(requestParameters?: NotificationTemplatesApiListNotificationTemplatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListNotificationTemplatesResponseClass, any, {}, any>>;
393
393
  /**
394
394
  * Updates the specified notification template by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"notification-management.email-templates.update\"
395
395
  * @summary Update the notification template
@@ -398,5 +398,5 @@ export declare class NotificationTemplatesApi extends BaseAPI {
398
398
  * @throws {RequiredError}
399
399
  * @memberof NotificationTemplatesApi
400
400
  */
401
- updateNotificationTemplate(requestParameters: NotificationTemplatesApiUpdateNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateNotificationTemplateResponseClass, any, {}>>;
401
+ updateNotificationTemplate(requestParameters: NotificationTemplatesApiUpdateNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateNotificationTemplateResponseClass, any, {}, any>>;
402
402
  }
@@ -103,7 +103,7 @@ var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
103
103
  createNotificationTemplate: function (createNotificationTemplateRequestDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
107
107
  return __generator(this, function (_a) {
108
108
  switch (_a.label) {
109
109
  case 0:
@@ -120,13 +120,16 @@ var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
120
120
  localVarQueryParameter = {};
121
121
  // authentication bearer required
122
122
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
124
+ // Only Authorization falls back to the configured token; an empty value is never sent.
125
+ ];
124
126
  case 1:
125
127
  // authentication bearer required
126
128
  // http bearer authentication required
127
129
  _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
131
+ if (authorizationValue) {
132
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
133
  }
131
134
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
135
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -152,7 +155,7 @@ var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
152
155
  deleteNotificationTemplate: function (id, authorization, options) {
153
156
  if (options === void 0) { options = {}; }
154
157
  return __awaiter(_this, void 0, void 0, function () {
155
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
158
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
156
159
  return __generator(this, function (_a) {
157
160
  switch (_a.label) {
158
161
  case 0:
@@ -170,13 +173,16 @@ var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
170
173
  localVarQueryParameter = {};
171
174
  // authentication bearer required
172
175
  // http bearer authentication required
173
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
177
+ // Only Authorization falls back to the configured token; an empty value is never sent.
178
+ ];
174
179
  case 1:
175
180
  // authentication bearer required
176
181
  // http bearer authentication required
177
182
  _a.sent();
178
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
184
+ if (authorizationValue) {
185
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
180
186
  }
181
187
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
188
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -202,7 +208,7 @@ var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
202
208
  getNotificationTemplate: function (id, id2, authorization, expand, options) {
203
209
  if (options === void 0) { options = {}; }
204
210
  return __awaiter(_this, void 0, void 0, function () {
205
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
211
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
206
212
  return __generator(this, function (_a) {
207
213
  switch (_a.label) {
208
214
  case 0:
@@ -233,8 +239,9 @@ var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
233
239
  if (expand !== undefined) {
234
240
  localVarQueryParameter['expand'] = expand;
235
241
  }
236
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
237
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
242
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
243
+ if (authorizationValue) {
244
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
238
245
  }
239
246
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
240
247
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -264,7 +271,7 @@ var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
264
271
  listNotificationTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
265
272
  if (options === void 0) { options = {}; }
266
273
  return __awaiter(_this, void 0, void 0, function () {
267
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
274
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
268
275
  return __generator(this, function (_a) {
269
276
  switch (_a.label) {
270
277
  case 0:
@@ -305,8 +312,9 @@ var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
305
312
  if (filters !== undefined) {
306
313
  localVarQueryParameter['filters'] = filters;
307
314
  }
308
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
309
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
315
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
316
+ if (authorizationValue) {
317
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
310
318
  }
311
319
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
312
320
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -331,7 +339,7 @@ var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
331
339
  updateNotificationTemplate: function (id, updateNotificationTemplateRequestDto, authorization, options) {
332
340
  if (options === void 0) { options = {}; }
333
341
  return __awaiter(_this, void 0, void 0, function () {
334
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
342
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
335
343
  return __generator(this, function (_a) {
336
344
  switch (_a.label) {
337
345
  case 0:
@@ -351,13 +359,16 @@ var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
351
359
  localVarQueryParameter = {};
352
360
  // authentication bearer required
353
361
  // http bearer authentication required
354
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
362
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
363
+ // Only Authorization falls back to the configured token; an empty value is never sent.
364
+ ];
355
365
  case 1:
356
366
  // authentication bearer required
357
367
  // http bearer authentication required
358
368
  _a.sent();
359
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
360
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
369
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
370
+ if (authorizationValue) {
371
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
361
372
  }
362
373
  localVarHeaderParameter['Content-Type'] = 'application/json';
363
374
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -141,7 +141,7 @@ export declare class NotificationsApi extends BaseAPI {
141
141
  * @throws {RequiredError}
142
142
  * @memberof NotificationsApi
143
143
  */
144
- sendEmail(requestParameters: NotificationsApiSendEmailRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SendEmailResponseClass, any, {}>>;
144
+ sendEmail(requestParameters: NotificationsApiSendEmailRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SendEmailResponseClass, any, {}, any>>;
145
145
  /**
146
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
147
  * @summary Send a notification
@@ -150,5 +150,5 @@ export declare class NotificationsApi extends BaseAPI {
150
150
  * @throws {RequiredError}
151
151
  * @memberof NotificationsApi
152
152
  */
153
- sendNotification(requestParameters: NotificationsApiSendNotificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SendNotificationResponseClass, any, {}>>;
153
+ sendNotification(requestParameters: NotificationsApiSendNotificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SendNotificationResponseClass, any, {}, any>>;
154
154
  }
@@ -103,7 +103,7 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
103
103
  sendEmail: function (sendEmailRequestDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
107
107
  return __generator(this, function (_a) {
108
108
  switch (_a.label) {
109
109
  case 0:
@@ -120,13 +120,16 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
120
120
  localVarQueryParameter = {};
121
121
  // authentication bearer required
122
122
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
124
+ // Only Authorization falls back to the configured token; an empty value is never sent.
125
+ ];
124
126
  case 1:
125
127
  // authentication bearer required
126
128
  // http bearer authentication required
127
129
  _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
131
+ if (authorizationValue) {
132
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
133
  }
131
134
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
135
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -152,7 +155,7 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
152
155
  sendNotification: function (sendNotificationRequestDto, authorization, options) {
153
156
  if (options === void 0) { options = {}; }
154
157
  return __awaiter(_this, void 0, void 0, function () {
155
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
158
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
156
159
  return __generator(this, function (_a) {
157
160
  switch (_a.label) {
158
161
  case 0:
@@ -169,13 +172,16 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
169
172
  localVarQueryParameter = {};
170
173
  // authentication bearer required
171
174
  // http bearer authentication required
172
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
175
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
176
+ // Only Authorization falls back to the configured token; an empty value is never sent.
177
+ ];
173
178
  case 1:
174
179
  // authentication bearer required
175
180
  // http bearer authentication required
176
181
  _a.sent();
177
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
178
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
182
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
183
+ if (authorizationValue) {
184
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
179
185
  }
180
186
  localVarHeaderParameter['Content-Type'] = 'application/json';
181
187
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
package/dist/base.d.ts CHANGED
@@ -22,9 +22,19 @@ export declare const COLLECTION_FORMATS: {
22
22
  tsv: string;
23
23
  pipes: string;
24
24
  };
25
+ export interface SessionClass {
26
+ sub: string;
27
+ username?: string;
28
+ email?: string;
29
+ tenantSlug?: string;
30
+ permissions?: string;
31
+ expiresAt?: number;
32
+ }
25
33
  export interface LoginClass {
26
34
  accessToken: string;
27
35
  permissions: string;
36
+ authMode?: string;
37
+ session?: SessionClass;
28
38
  }
29
39
  export interface SwitchWorkspaceRequest {
30
40
  username: string;
@@ -33,6 +43,8 @@ export interface SwitchWorkspaceRequest {
33
43
  export interface SwitchWorkspaceResponseClass {
34
44
  accessToken: string;
35
45
  permissions: string;
46
+ authMode?: string;
47
+ session?: SessionClass;
36
48
  }
37
49
  export declare enum Environment {
38
50
  Production = "https://apiv2.emil.de",
@@ -63,6 +75,18 @@ export declare class BaseAPI {
63
75
  protected configuration: Configuration | undefined;
64
76
  private tokenData?;
65
77
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
78
+ private sessionAccount;
79
+ private authBasePath;
80
+ private usesSession;
81
+ private useSessionAuth;
82
+ private useHeaderAuth;
83
+ private applyTokenReply;
84
+ private sessionHeaders;
85
+ private withCurrentAuth;
86
+ private canRetryWithToken;
87
+ private canResend;
88
+ private switchToToken;
89
+ private retryWithToken;
66
90
  selectEnvironment(env: Environment): void;
67
91
  selectBasePath(path: string): void;
68
92
  getPermissions(): Array<string>;