@emilgroup/notification-sdk 0.8.1-beta.63 → 0.8.1-beta.65

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.
@@ -104,9 +104,10 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
104
104
  assignEntity: function (code, assignEmailThreadEntityBodyDto, authorization, options) {
105
105
  if (options === void 0) { options = {}; }
106
106
  return __awaiter(_this, void 0, void 0, function () {
107
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
108
+ var _a;
109
+ return __generator(this, function (_b) {
110
+ switch (_b.label) {
110
111
  case 0:
111
112
  // verify required parameter 'code' is not null or undefined
112
113
  (0, common_1.assertParamExists)('assignEntity', 'code', code);
@@ -125,14 +126,17 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
125
126
  // authentication bearer required
126
127
  // http bearer authentication required
127
128
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
128
- // Only Authorization falls back to the configured token; an empty value is never sent.
129
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
130
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
129
131
  ];
130
132
  case 1:
131
133
  // authentication bearer required
132
134
  // http bearer authentication required
133
- _a.sent();
134
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
135
- if (authorizationValue) {
135
+ _b.sent();
136
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
137
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
138
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
139
+ if (authorizationValue || authorizationKeepEmpty) {
136
140
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
137
141
  }
138
142
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -159,9 +163,10 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
159
163
  closeThread: function (code, authorization, options) {
160
164
  if (options === void 0) { options = {}; }
161
165
  return __awaiter(_this, void 0, void 0, function () {
162
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
163
- return __generator(this, function (_a) {
164
- switch (_a.label) {
166
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
167
+ var _a;
168
+ return __generator(this, function (_b) {
169
+ switch (_b.label) {
165
170
  case 0:
166
171
  // verify required parameter 'code' is not null or undefined
167
172
  (0, common_1.assertParamExists)('closeThread', 'code', code);
@@ -178,14 +183,17 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
178
183
  // authentication bearer required
179
184
  // http bearer authentication required
180
185
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
181
- // Only Authorization falls back to the configured token; an empty value is never sent.
186
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
187
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
182
188
  ];
183
189
  case 1:
184
190
  // authentication bearer required
185
191
  // http bearer authentication required
186
- _a.sent();
187
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
188
- if (authorizationValue) {
192
+ _b.sent();
193
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
194
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
195
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
196
+ if (authorizationValue || authorizationKeepEmpty) {
189
197
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
190
198
  }
191
199
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -210,9 +218,10 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
210
218
  getThread: function (code, authorization, options) {
211
219
  if (options === void 0) { options = {}; }
212
220
  return __awaiter(_this, void 0, void 0, function () {
213
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
214
- return __generator(this, function (_a) {
215
- switch (_a.label) {
221
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
222
+ var _a;
223
+ return __generator(this, function (_b) {
224
+ switch (_b.label) {
216
225
  case 0:
217
226
  // verify required parameter 'code' is not null or undefined
218
227
  (0, common_1.assertParamExists)('getThread', 'code', code);
@@ -229,14 +238,17 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
229
238
  // authentication bearer required
230
239
  // http bearer authentication required
231
240
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
232
- // Only Authorization falls back to the configured token; an empty value is never sent.
241
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
242
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
233
243
  ];
234
244
  case 1:
235
245
  // authentication bearer required
236
246
  // http bearer authentication required
237
- _a.sent();
238
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
239
- if (authorizationValue) {
247
+ _b.sent();
248
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
249
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
250
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
251
+ if (authorizationValue || authorizationKeepEmpty) {
240
252
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
241
253
  }
242
254
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -265,9 +277,10 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
265
277
  listMessages: function (code, authorization, filter, filters, order, expand, options) {
266
278
  if (options === void 0) { options = {}; }
267
279
  return __awaiter(_this, void 0, void 0, function () {
268
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
269
- return __generator(this, function (_a) {
270
- switch (_a.label) {
280
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
281
+ var _a;
282
+ return __generator(this, function (_b) {
283
+ switch (_b.label) {
271
284
  case 0:
272
285
  // verify required parameter 'code' is not null or undefined
273
286
  (0, common_1.assertParamExists)('listMessages', 'code', code);
@@ -287,7 +300,7 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
287
300
  case 1:
288
301
  // authentication bearer required
289
302
  // http bearer authentication required
290
- _a.sent();
303
+ _b.sent();
291
304
  if (filter !== undefined) {
292
305
  localVarQueryParameter['filter'] = filter;
293
306
  }
@@ -300,8 +313,10 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
300
313
  if (expand !== undefined) {
301
314
  localVarQueryParameter['expand'] = expand;
302
315
  }
303
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
304
- if (authorizationValue) {
316
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
317
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
318
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
319
+ if (authorizationValue || authorizationKeepEmpty) {
305
320
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
306
321
  }
307
322
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -332,9 +347,10 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
332
347
  listThreads: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
333
348
  if (options === void 0) { options = {}; }
334
349
  return __awaiter(_this, void 0, void 0, function () {
335
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
336
- return __generator(this, function (_a) {
337
- switch (_a.label) {
350
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
351
+ var _a;
352
+ return __generator(this, function (_b) {
353
+ switch (_b.label) {
338
354
  case 0:
339
355
  localVarPath = "/notificationservice/v1/email-threads";
340
356
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -351,7 +367,7 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
351
367
  case 1:
352
368
  // authentication bearer required
353
369
  // http bearer authentication required
354
- _a.sent();
370
+ _b.sent();
355
371
  if (pageSize !== undefined) {
356
372
  localVarQueryParameter['pageSize'] = pageSize;
357
373
  }
@@ -373,8 +389,10 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
373
389
  if (filters !== undefined) {
374
390
  localVarQueryParameter['filters'] = filters;
375
391
  }
376
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
377
- if (authorizationValue) {
392
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
393
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
394
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
395
+ if (authorizationValue || authorizationKeepEmpty) {
378
396
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
379
397
  }
380
398
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -399,9 +417,10 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
399
417
  unassignEntity: function (code, authorization, options) {
400
418
  if (options === void 0) { options = {}; }
401
419
  return __awaiter(_this, void 0, void 0, function () {
402
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
403
- return __generator(this, function (_a) {
404
- switch (_a.label) {
420
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
421
+ var _a;
422
+ return __generator(this, function (_b) {
423
+ switch (_b.label) {
405
424
  case 0:
406
425
  // verify required parameter 'code' is not null or undefined
407
426
  (0, common_1.assertParamExists)('unassignEntity', 'code', code);
@@ -418,14 +437,17 @@ var EmailTrackingApiAxiosParamCreator = function (configuration) {
418
437
  // authentication bearer required
419
438
  // http bearer authentication required
420
439
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
421
- // Only Authorization falls back to the configured token; an empty value is never sent.
440
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
441
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
422
442
  ];
423
443
  case 1:
424
444
  // authentication bearer required
425
445
  // http bearer authentication required
426
- _a.sent();
427
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
428
- if (authorizationValue) {
446
+ _b.sent();
447
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
448
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
449
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
450
+ if (authorizationValue || authorizationKeepEmpty) {
429
451
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
430
452
  }
431
453
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -697,7 +719,7 @@ var EmailTrackingApi = /** @class */ (function (_super) {
697
719
  */
698
720
  EmailTrackingApi.prototype.assignEntity = function (requestParameters, options) {
699
721
  var _this = this;
700
- return (0, exports.EmailTrackingApiFp)(this.configuration).assignEntity(requestParameters.code, requestParameters.assignEmailThreadEntityBodyDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
722
+ return (0, exports.EmailTrackingApiFp)(this.configuration).assignEntity(requestParameters.code, requestParameters.assignEmailThreadEntityBodyDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
701
723
  };
702
724
  /**
703
725
  * Closes the email thread with the given code and returns the updated thread. **Required Permissions** \"notification-management.email-messages.update\"
@@ -709,7 +731,7 @@ var EmailTrackingApi = /** @class */ (function (_super) {
709
731
  */
710
732
  EmailTrackingApi.prototype.closeThread = function (requestParameters, options) {
711
733
  var _this = this;
712
- return (0, exports.EmailTrackingApiFp)(this.configuration).closeThread(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
734
+ return (0, exports.EmailTrackingApiFp)(this.configuration).closeThread(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
713
735
  };
714
736
  /**
715
737
  * Retrieves the details of the email thread with the given code. **Required Permissions** \"notification-management.email-messages.view\"
@@ -721,7 +743,7 @@ var EmailTrackingApi = /** @class */ (function (_super) {
721
743
  */
722
744
  EmailTrackingApi.prototype.getThread = function (requestParameters, options) {
723
745
  var _this = this;
724
- return (0, exports.EmailTrackingApiFp)(this.configuration).getThread(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
746
+ return (0, exports.EmailTrackingApiFp)(this.configuration).getThread(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
725
747
  };
726
748
  /**
727
749
  * Returns the email messages of the email thread with the given code. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
@@ -733,7 +755,7 @@ var EmailTrackingApi = /** @class */ (function (_super) {
733
755
  */
734
756
  EmailTrackingApi.prototype.listMessages = function (requestParameters, options) {
735
757
  var _this = this;
736
- return (0, exports.EmailTrackingApiFp)(this.configuration).listMessages(requestParameters.code, requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
758
+ return (0, exports.EmailTrackingApiFp)(this.configuration).listMessages(requestParameters.code, requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.order, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
737
759
  };
738
760
  /**
739
761
  * Returns a list of email threads, newest first. A thread groups an email with its replies; each item carries the newest message of the thread in latestMessage and the number of messages in messageCount. Threads without a message yet are not listed. Filter on the newest message with latestDirection (inbox tabs), latestDeliveryStatus or latestWorkflowStatus (use latestWorkflowStatus==$null for threads whose newest message has no workflow). Add expand=messages to get every message of each thread, without bodies. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
@@ -746,7 +768,7 @@ var EmailTrackingApi = /** @class */ (function (_super) {
746
768
  EmailTrackingApi.prototype.listThreads = function (requestParameters, options) {
747
769
  var _this = this;
748
770
  if (requestParameters === void 0) { requestParameters = {}; }
749
- return (0, exports.EmailTrackingApiFp)(this.configuration).listThreads(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
771
+ return (0, exports.EmailTrackingApiFp)(this.configuration).listThreads(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
750
772
  };
751
773
  /**
752
774
  * Removes the entity link from the email thread and every message in it, and marks the messages as unassigned. **Required Permissions** \"notification-management.email-messages.update\"
@@ -758,7 +780,7 @@ var EmailTrackingApi = /** @class */ (function (_super) {
758
780
  */
759
781
  EmailTrackingApi.prototype.unassignEntity = function (requestParameters, options) {
760
782
  var _this = this;
761
- return (0, exports.EmailTrackingApiFp)(this.configuration).unassignEntity(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
783
+ return (0, exports.EmailTrackingApiFp)(this.configuration).unassignEntity(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
762
784
  };
763
785
  return EmailTrackingApi;
764
786
  }(base_1.BaseAPI));
@@ -103,9 +103,10 @@ var EmailVerificationsApiAxiosParamCreator = function (configuration) {
103
103
  completeEmailVerification: function (completeEmailVerificationDto, 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, authorizationValue, headersFromBaseOptions;
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
107
+ var _a;
108
+ return __generator(this, function (_b) {
109
+ switch (_b.label) {
109
110
  case 0:
110
111
  // verify required parameter 'completeEmailVerificationDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('completeEmailVerification', 'completeEmailVerificationDto', completeEmailVerificationDto);
@@ -121,14 +122,17 @@ var EmailVerificationsApiAxiosParamCreator = function (configuration) {
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
124
  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
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
125
127
  ];
126
128
  case 1:
127
129
  // authentication bearer required
128
130
  // http bearer authentication required
129
- _a.sent();
130
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
131
- if (authorizationValue) {
131
+ _b.sent();
132
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
133
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
134
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
135
+ if (authorizationValue || authorizationKeepEmpty) {
132
136
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
133
137
  }
134
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -155,9 +159,10 @@ var EmailVerificationsApiAxiosParamCreator = function (configuration) {
155
159
  initiateEmailVerification: function (initiateEmailVerificationDto, authorization, options) {
156
160
  if (options === void 0) { options = {}; }
157
161
  return __awaiter(_this, void 0, void 0, function () {
158
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
159
- return __generator(this, function (_a) {
160
- switch (_a.label) {
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
163
+ var _a;
164
+ return __generator(this, function (_b) {
165
+ switch (_b.label) {
161
166
  case 0:
162
167
  // verify required parameter 'initiateEmailVerificationDto' is not null or undefined
163
168
  (0, common_1.assertParamExists)('initiateEmailVerification', 'initiateEmailVerificationDto', initiateEmailVerificationDto);
@@ -173,14 +178,17 @@ var EmailVerificationsApiAxiosParamCreator = function (configuration) {
173
178
  // authentication bearer required
174
179
  // http bearer authentication required
175
180
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
176
- // Only Authorization falls back to the configured token; an empty value is never sent.
181
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
182
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
177
183
  ];
178
184
  case 1:
179
185
  // authentication bearer required
180
186
  // http bearer authentication required
181
- _a.sent();
182
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
183
- if (authorizationValue) {
187
+ _b.sent();
188
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
189
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
190
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
191
+ if (authorizationValue || authorizationKeepEmpty) {
184
192
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
185
193
  }
186
194
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -304,7 +312,7 @@ var EmailVerificationsApi = /** @class */ (function (_super) {
304
312
  */
305
313
  EmailVerificationsApi.prototype.completeEmailVerification = function (requestParameters, options) {
306
314
  var _this = this;
307
- return (0, exports.EmailVerificationsApiFp)(this.configuration).completeEmailVerification(requestParameters.completeEmailVerificationDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
315
+ return (0, exports.EmailVerificationsApiFp)(this.configuration).completeEmailVerification(requestParameters.completeEmailVerificationDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
308
316
  };
309
317
  /**
310
318
  * Sends a verification token to the given email address. Use the complete endpoint to verify the token. **Required Permissions** none
@@ -316,7 +324,7 @@ var EmailVerificationsApi = /** @class */ (function (_super) {
316
324
  */
317
325
  EmailVerificationsApi.prototype.initiateEmailVerification = function (requestParameters, options) {
318
326
  var _this = this;
319
- return (0, exports.EmailVerificationsApiFp)(this.configuration).initiateEmailVerification(requestParameters.initiateEmailVerificationDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
327
+ return (0, exports.EmailVerificationsApiFp)(this.configuration).initiateEmailVerification(requestParameters.initiateEmailVerificationDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
320
328
  };
321
329
  return EmailVerificationsApi;
322
330
  }(base_1.BaseAPI));
@@ -193,7 +193,7 @@ var HealthApi = /** @class */ (function (_super) {
193
193
  */
194
194
  HealthApi.prototype.check = function (options) {
195
195
  var _this = this;
196
- return (0, exports.HealthApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
196
+ return (0, exports.HealthApiFp)(this.configuration).check(this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
197
197
  };
198
198
  return HealthApi;
199
199
  }(base_1.BaseAPI));
@@ -103,9 +103,10 @@ 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, authorizationValue, headersFromBaseOptions;
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
107
+ var _a;
108
+ return __generator(this, function (_b) {
109
+ switch (_b.label) {
109
110
  case 0:
110
111
  // verify required parameter 'createLayoutRequestDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('createLayout', 'createLayoutRequestDto', createLayoutRequestDto);
@@ -121,14 +122,17 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
124
  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
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
125
127
  ];
126
128
  case 1:
127
129
  // authentication bearer required
128
130
  // http bearer authentication required
129
- _a.sent();
130
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
131
- if (authorizationValue) {
131
+ _b.sent();
132
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
133
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
134
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
135
+ if (authorizationValue || authorizationKeepEmpty) {
132
136
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
133
137
  }
134
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -155,9 +159,10 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
155
159
  deleteLayout: function (id, authorization, options) {
156
160
  if (options === void 0) { options = {}; }
157
161
  return __awaiter(_this, void 0, void 0, function () {
158
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
159
- return __generator(this, function (_a) {
160
- switch (_a.label) {
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
163
+ var _a;
164
+ return __generator(this, function (_b) {
165
+ switch (_b.label) {
161
166
  case 0:
162
167
  // verify required parameter 'id' is not null or undefined
163
168
  (0, common_1.assertParamExists)('deleteLayout', 'id', id);
@@ -174,14 +179,17 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
174
179
  // authentication bearer required
175
180
  // http bearer authentication required
176
181
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
177
- // Only Authorization falls back to the configured token; an empty value is never sent.
182
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
183
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
178
184
  ];
179
185
  case 1:
180
186
  // authentication bearer required
181
187
  // http bearer authentication required
182
- _a.sent();
183
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
184
- if (authorizationValue) {
188
+ _b.sent();
189
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
190
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
191
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
192
+ if (authorizationValue || authorizationKeepEmpty) {
185
193
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
186
194
  }
187
195
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -207,9 +215,10 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
207
215
  getLayout: function (id, id2, authorization, options) {
208
216
  if (options === void 0) { options = {}; }
209
217
  return __awaiter(_this, void 0, void 0, function () {
210
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
211
- return __generator(this, function (_a) {
212
- switch (_a.label) {
218
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
219
+ var _a;
220
+ return __generator(this, function (_b) {
221
+ switch (_b.label) {
213
222
  case 0:
214
223
  // verify required parameter 'id' is not null or undefined
215
224
  (0, common_1.assertParamExists)('getLayout', 'id', id);
@@ -231,12 +240,14 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
231
240
  case 1:
232
241
  // authentication bearer required
233
242
  // http bearer authentication required
234
- _a.sent();
243
+ _b.sent();
235
244
  if (id2 !== undefined) {
236
245
  localVarQueryParameter['id'] = id2;
237
246
  }
238
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
239
- if (authorizationValue) {
247
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
248
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
249
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
250
+ if (authorizationValue || authorizationKeepEmpty) {
240
251
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
241
252
  }
242
253
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -267,9 +278,10 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
267
278
  listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
268
279
  if (options === void 0) { options = {}; }
269
280
  return __awaiter(_this, void 0, void 0, function () {
270
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
271
- return __generator(this, function (_a) {
272
- switch (_a.label) {
281
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
282
+ var _a;
283
+ return __generator(this, function (_b) {
284
+ switch (_b.label) {
273
285
  case 0:
274
286
  localVarPath = "/notificationservice/v1/layouts";
275
287
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -286,7 +298,7 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
286
298
  case 1:
287
299
  // authentication bearer required
288
300
  // http bearer authentication required
289
- _a.sent();
301
+ _b.sent();
290
302
  if (pageSize !== undefined) {
291
303
  localVarQueryParameter['pageSize'] = pageSize;
292
304
  }
@@ -308,8 +320,10 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
308
320
  if (filters !== undefined) {
309
321
  localVarQueryParameter['filters'] = filters;
310
322
  }
311
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
312
- if (authorizationValue) {
323
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
324
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
325
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
326
+ if (authorizationValue || authorizationKeepEmpty) {
313
327
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
314
328
  }
315
329
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -335,9 +349,10 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
335
349
  updateLayout: function (id, updateLayoutRequestDto, authorization, options) {
336
350
  if (options === void 0) { options = {}; }
337
351
  return __awaiter(_this, void 0, void 0, function () {
338
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
339
- return __generator(this, function (_a) {
340
- switch (_a.label) {
352
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
353
+ var _a;
354
+ return __generator(this, function (_b) {
355
+ switch (_b.label) {
341
356
  case 0:
342
357
  // verify required parameter 'id' is not null or undefined
343
358
  (0, common_1.assertParamExists)('updateLayout', 'id', id);
@@ -356,14 +371,17 @@ var LayoutsApiAxiosParamCreator = function (configuration) {
356
371
  // authentication bearer required
357
372
  // http bearer authentication required
358
373
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
359
- // Only Authorization falls back to the configured token; an empty value is never sent.
374
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
375
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
360
376
  ];
361
377
  case 1:
362
378
  // authentication bearer required
363
379
  // http bearer authentication required
364
- _a.sent();
365
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
366
- if (authorizationValue) {
380
+ _b.sent();
381
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
382
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
383
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
384
+ if (authorizationValue || authorizationKeepEmpty) {
367
385
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
368
386
  }
369
387
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -599,7 +617,7 @@ var LayoutsApi = /** @class */ (function (_super) {
599
617
  */
600
618
  LayoutsApi.prototype.createLayout = function (requestParameters, options) {
601
619
  var _this = this;
602
- return (0, exports.LayoutsApiFp)(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
620
+ return (0, exports.LayoutsApiFp)(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
603
621
  };
604
622
  /**
605
623
  * Permanently deletes the layout with the given id. **Required Permissions** \"notification-management.email-templates.delete\"
@@ -611,7 +629,7 @@ var LayoutsApi = /** @class */ (function (_super) {
611
629
  */
612
630
  LayoutsApi.prototype.deleteLayout = function (requestParameters, options) {
613
631
  var _this = this;
614
- return (0, exports.LayoutsApiFp)(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
632
+ return (0, exports.LayoutsApiFp)(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
615
633
  };
616
634
  /**
617
635
  * Retrieves the details of the layout with the given id. **Required Permissions** \"notification-management.email-templates.view\"
@@ -623,7 +641,7 @@ var LayoutsApi = /** @class */ (function (_super) {
623
641
  */
624
642
  LayoutsApi.prototype.getLayout = function (requestParameters, options) {
625
643
  var _this = this;
626
- return (0, exports.LayoutsApiFp)(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
644
+ return (0, exports.LayoutsApiFp)(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
627
645
  };
628
646
  /**
629
647
  * Returns a list of layouts. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-templates.view\"
@@ -636,7 +654,7 @@ var LayoutsApi = /** @class */ (function (_super) {
636
654
  LayoutsApi.prototype.listLayouts = function (requestParameters, options) {
637
655
  var _this = this;
638
656
  if (requestParameters === void 0) { requestParameters = {}; }
639
- return (0, exports.LayoutsApiFp)(this.configuration).listLayouts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
657
+ return (0, exports.LayoutsApiFp)(this.configuration).listLayouts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
640
658
  };
641
659
  /**
642
660
  * 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\"
@@ -648,7 +666,7 @@ var LayoutsApi = /** @class */ (function (_super) {
648
666
  */
649
667
  LayoutsApi.prototype.updateLayout = function (requestParameters, options) {
650
668
  var _this = this;
651
- return (0, exports.LayoutsApiFp)(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
669
+ return (0, exports.LayoutsApiFp)(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
652
670
  };
653
671
  return LayoutsApi;
654
672
  }(base_1.BaseAPI));