@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 EmailMessagesApiAxiosParamCreator = function (configuration) {
104
104
  downloadAttachment: function (code, attachmentId, 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)('downloadAttachment', 'code', code);
@@ -126,14 +127,17 @@ var EmailMessagesApiAxiosParamCreator = function (configuration) {
126
127
  // authentication bearer required
127
128
  // http bearer authentication required
128
129
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
- // Only Authorization falls back to the configured token; an empty value is never sent.
130
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
131
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
130
132
  ];
131
133
  case 1:
132
134
  // authentication bearer required
133
135
  // http bearer authentication required
134
- _a.sent();
135
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
136
- if (authorizationValue) {
136
+ _b.sent();
137
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
138
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
139
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
140
+ if (authorizationValue || authorizationKeepEmpty) {
137
141
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
138
142
  }
139
143
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -158,9 +162,10 @@ var EmailMessagesApiAxiosParamCreator = function (configuration) {
158
162
  getMessage: function (code, authorization, options) {
159
163
  if (options === void 0) { options = {}; }
160
164
  return __awaiter(_this, void 0, void 0, function () {
161
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
162
- return __generator(this, function (_a) {
163
- switch (_a.label) {
165
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
166
+ var _a;
167
+ return __generator(this, function (_b) {
168
+ switch (_b.label) {
164
169
  case 0:
165
170
  // verify required parameter 'code' is not null or undefined
166
171
  (0, common_1.assertParamExists)('getMessage', 'code', code);
@@ -177,14 +182,17 @@ var EmailMessagesApiAxiosParamCreator = function (configuration) {
177
182
  // authentication bearer required
178
183
  // http bearer authentication required
179
184
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
180
- // Only Authorization falls back to the configured token; an empty value is never sent.
185
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
186
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
181
187
  ];
182
188
  case 1:
183
189
  // authentication bearer required
184
190
  // http bearer authentication required
185
- _a.sent();
186
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
187
- if (authorizationValue) {
191
+ _b.sent();
192
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
193
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
194
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
195
+ if (authorizationValue || authorizationKeepEmpty) {
188
196
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
189
197
  }
190
198
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -209,9 +217,10 @@ var EmailMessagesApiAxiosParamCreator = function (configuration) {
209
217
  listAttachments: function (code, authorization, options) {
210
218
  if (options === void 0) { options = {}; }
211
219
  return __awaiter(_this, void 0, void 0, function () {
212
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
213
- return __generator(this, function (_a) {
214
- switch (_a.label) {
220
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
221
+ var _a;
222
+ return __generator(this, function (_b) {
223
+ switch (_b.label) {
215
224
  case 0:
216
225
  // verify required parameter 'code' is not null or undefined
217
226
  (0, common_1.assertParamExists)('listAttachments', 'code', code);
@@ -228,14 +237,17 @@ var EmailMessagesApiAxiosParamCreator = function (configuration) {
228
237
  // authentication bearer required
229
238
  // http bearer authentication required
230
239
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
231
- // Only Authorization falls back to the configured token; an empty value is never sent.
240
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
241
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
232
242
  ];
233
243
  case 1:
234
244
  // authentication bearer required
235
245
  // http bearer authentication required
236
- _a.sent();
237
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
238
- if (authorizationValue) {
246
+ _b.sent();
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) {
239
251
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
240
252
  }
241
253
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -266,9 +278,10 @@ var EmailMessagesApiAxiosParamCreator = function (configuration) {
266
278
  listEmailMessages: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
267
279
  if (options === void 0) { options = {}; }
268
280
  return __awaiter(_this, void 0, void 0, function () {
269
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
270
- return __generator(this, function (_a) {
271
- 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) {
272
285
  case 0:
273
286
  localVarPath = "/notificationservice/v1/email-messages";
274
287
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -285,7 +298,7 @@ var EmailMessagesApiAxiosParamCreator = function (configuration) {
285
298
  case 1:
286
299
  // authentication bearer required
287
300
  // http bearer authentication required
288
- _a.sent();
301
+ _b.sent();
289
302
  if (pageSize !== undefined) {
290
303
  localVarQueryParameter['pageSize'] = pageSize;
291
304
  }
@@ -307,8 +320,10 @@ var EmailMessagesApiAxiosParamCreator = function (configuration) {
307
320
  if (filters !== undefined) {
308
321
  localVarQueryParameter['filters'] = filters;
309
322
  }
310
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
311
- 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) {
312
327
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
313
328
  }
314
329
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -334,9 +349,10 @@ var EmailMessagesApiAxiosParamCreator = function (configuration) {
334
349
  resendMessage: function (code, resendEmailMessageBodyDto, authorization, options) {
335
350
  if (options === void 0) { options = {}; }
336
351
  return __awaiter(_this, void 0, void 0, function () {
337
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
338
- return __generator(this, function (_a) {
339
- 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) {
340
356
  case 0:
341
357
  // verify required parameter 'code' is not null or undefined
342
358
  (0, common_1.assertParamExists)('resendMessage', 'code', code);
@@ -355,14 +371,17 @@ var EmailMessagesApiAxiosParamCreator = function (configuration) {
355
371
  // authentication bearer required
356
372
  // http bearer authentication required
357
373
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
358
- // 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.
359
376
  ];
360
377
  case 1:
361
378
  // authentication bearer required
362
379
  // http bearer authentication required
363
- _a.sent();
364
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
365
- 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) {
366
385
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
367
386
  }
368
387
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -598,7 +617,7 @@ var EmailMessagesApi = /** @class */ (function (_super) {
598
617
  */
599
618
  EmailMessagesApi.prototype.downloadAttachment = function (requestParameters, options) {
600
619
  var _this = this;
601
- return (0, exports.EmailMessagesApiFp)(this.configuration).downloadAttachment(requestParameters.code, requestParameters.attachmentId, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
620
+ return (0, exports.EmailMessagesApiFp)(this.configuration).downloadAttachment(requestParameters.code, requestParameters.attachmentId, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
602
621
  };
603
622
  /**
604
623
  * Retrieves the details of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
@@ -610,7 +629,7 @@ var EmailMessagesApi = /** @class */ (function (_super) {
610
629
  */
611
630
  EmailMessagesApi.prototype.getMessage = function (requestParameters, options) {
612
631
  var _this = this;
613
- return (0, exports.EmailMessagesApiFp)(this.configuration).getMessage(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
632
+ return (0, exports.EmailMessagesApiFp)(this.configuration).getMessage(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
614
633
  };
615
634
  /**
616
635
  * Returns the attachments of the email message with the given code. **Required Permissions** \"notification-management.email-messages.view\"
@@ -622,7 +641,7 @@ var EmailMessagesApi = /** @class */ (function (_super) {
622
641
  */
623
642
  EmailMessagesApi.prototype.listAttachments = function (requestParameters, options) {
624
643
  var _this = this;
625
- return (0, exports.EmailMessagesApiFp)(this.configuration).listAttachments(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
644
+ return (0, exports.EmailMessagesApiFp)(this.configuration).listAttachments(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
626
645
  };
627
646
  /**
628
647
  * Returns a list of sent and received email messages. For more information about pagination, read the Pagination documentation. **Required Permissions** \"notification-management.email-messages.view\"
@@ -635,7 +654,7 @@ var EmailMessagesApi = /** @class */ (function (_super) {
635
654
  EmailMessagesApi.prototype.listEmailMessages = function (requestParameters, options) {
636
655
  var _this = this;
637
656
  if (requestParameters === void 0) { requestParameters = {}; }
638
- return (0, exports.EmailMessagesApiFp)(this.configuration).listEmailMessages(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.EmailMessagesApiFp)(this.configuration).listEmailMessages(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); });
639
658
  };
640
659
  /**
641
660
  * Sends an outgoing email with delivery status bounced or failed again, as a new email in the same thread, and returns the new email. A bounced email is resent to the recipient that bounced, or to newAddress when the address is corrected; pass recipient when more than one recipient bounced. A failed email is resent to all its original recipients; recipient and newAddress are not allowed for it. The original email is not changed and can be resent again. The new email starts as pending and carries resentFromMessageCode, resendReason and, for a bounce, resentOriginalRecipient. **Required Permissions** \"notification-management.email-messages.create\"
@@ -647,7 +666,7 @@ var EmailMessagesApi = /** @class */ (function (_super) {
647
666
  */
648
667
  EmailMessagesApi.prototype.resendMessage = function (requestParameters, options) {
649
668
  var _this = this;
650
- return (0, exports.EmailMessagesApiFp)(this.configuration).resendMessage(requestParameters.code, requestParameters.resendEmailMessageBodyDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
669
+ return (0, exports.EmailMessagesApiFp)(this.configuration).resendMessage(requestParameters.code, requestParameters.resendEmailMessageBodyDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
651
670
  };
652
671
  return EmailMessagesApi;
653
672
  }(base_1.BaseAPI));
@@ -103,9 +103,10 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
103
103
  catchUpEmailSubscription: function (id, 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 'id' is not null or undefined
111
112
  (0, common_1.assertParamExists)('catchUpEmailSubscription', 'id', id);
@@ -122,14 +123,17 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
122
123
  // authentication bearer required
123
124
  // http bearer authentication required
124
125
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
- // Only Authorization falls back to the configured token; an empty value is never sent.
126
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
127
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
126
128
  ];
127
129
  case 1:
128
130
  // authentication bearer required
129
131
  // http bearer authentication required
130
- _a.sent();
131
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
132
- if (authorizationValue) {
132
+ _b.sent();
133
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
134
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
135
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
136
+ if (authorizationValue || authorizationKeepEmpty) {
133
137
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
138
  }
135
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -154,9 +158,10 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
154
158
  catchUpEmailSubscriptions: function (catchUpEmailSubscriptionsRequestDto, authorization, options) {
155
159
  if (options === void 0) { options = {}; }
156
160
  return __awaiter(_this, void 0, void 0, function () {
157
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
158
- return __generator(this, function (_a) {
159
- switch (_a.label) {
161
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
162
+ var _a;
163
+ return __generator(this, function (_b) {
164
+ switch (_b.label) {
160
165
  case 0:
161
166
  // verify required parameter 'catchUpEmailSubscriptionsRequestDto' is not null or undefined
162
167
  (0, common_1.assertParamExists)('catchUpEmailSubscriptions', 'catchUpEmailSubscriptionsRequestDto', catchUpEmailSubscriptionsRequestDto);
@@ -172,14 +177,17 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
172
177
  // authentication bearer required
173
178
  // http bearer authentication required
174
179
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
175
- // Only Authorization falls back to the configured token; an empty value is never sent.
180
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
181
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
176
182
  ];
177
183
  case 1:
178
184
  // authentication bearer required
179
185
  // http bearer authentication required
180
- _a.sent();
181
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
182
- if (authorizationValue) {
186
+ _b.sent();
187
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
188
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
189
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
190
+ if (authorizationValue || authorizationKeepEmpty) {
183
191
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
192
  }
185
193
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -206,9 +214,10 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
206
214
  getEmailSubscription: function (id, authorization, options) {
207
215
  if (options === void 0) { options = {}; }
208
216
  return __awaiter(_this, void 0, void 0, function () {
209
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
210
- return __generator(this, function (_a) {
211
- switch (_a.label) {
217
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
218
+ var _a;
219
+ return __generator(this, function (_b) {
220
+ switch (_b.label) {
212
221
  case 0:
213
222
  // verify required parameter 'id' is not null or undefined
214
223
  (0, common_1.assertParamExists)('getEmailSubscription', 'id', id);
@@ -225,14 +234,17 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
225
234
  // authentication bearer required
226
235
  // http bearer authentication required
227
236
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
228
- // Only Authorization falls back to the configured token; an empty value is never sent.
237
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
238
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
229
239
  ];
230
240
  case 1:
231
241
  // authentication bearer required
232
242
  // http bearer authentication required
233
- _a.sent();
234
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
235
- if (authorizationValue) {
243
+ _b.sent();
244
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
245
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
246
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
247
+ if (authorizationValue || authorizationKeepEmpty) {
236
248
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
237
249
  }
238
250
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -263,9 +275,10 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
263
275
  listEmailSubscriptions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
264
276
  if (options === void 0) { options = {}; }
265
277
  return __awaiter(_this, void 0, void 0, function () {
266
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
267
- return __generator(this, function (_a) {
268
- switch (_a.label) {
278
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
279
+ var _a;
280
+ return __generator(this, function (_b) {
281
+ switch (_b.label) {
269
282
  case 0:
270
283
  localVarPath = "/notificationservice/v1/email-subscriptions";
271
284
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -282,7 +295,7 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
282
295
  case 1:
283
296
  // authentication bearer required
284
297
  // http bearer authentication required
285
- _a.sent();
298
+ _b.sent();
286
299
  if (pageSize !== undefined) {
287
300
  localVarQueryParameter['pageSize'] = pageSize;
288
301
  }
@@ -304,8 +317,10 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
304
317
  if (filters !== undefined) {
305
318
  localVarQueryParameter['filters'] = filters;
306
319
  }
307
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
308
- if (authorizationValue) {
320
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
321
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
322
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
323
+ if (authorizationValue || authorizationKeepEmpty) {
309
324
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
310
325
  }
311
326
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -330,9 +345,10 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
330
345
  reconcileEmailSubscriptions: function (reconcileEmailSubscriptionsRequestDto, authorization, options) {
331
346
  if (options === void 0) { options = {}; }
332
347
  return __awaiter(_this, void 0, void 0, function () {
333
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
334
- return __generator(this, function (_a) {
335
- switch (_a.label) {
348
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
349
+ var _a;
350
+ return __generator(this, function (_b) {
351
+ switch (_b.label) {
336
352
  case 0:
337
353
  // verify required parameter 'reconcileEmailSubscriptionsRequestDto' is not null or undefined
338
354
  (0, common_1.assertParamExists)('reconcileEmailSubscriptions', 'reconcileEmailSubscriptionsRequestDto', reconcileEmailSubscriptionsRequestDto);
@@ -348,14 +364,17 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
348
364
  // authentication bearer required
349
365
  // http bearer authentication required
350
366
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
351
- // Only Authorization falls back to the configured token; an empty value is never sent.
367
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
368
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
352
369
  ];
353
370
  case 1:
354
371
  // authentication bearer required
355
372
  // http bearer authentication required
356
- _a.sent();
357
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
358
- if (authorizationValue) {
373
+ _b.sent();
374
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
375
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
376
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
377
+ if (authorizationValue || authorizationKeepEmpty) {
359
378
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
360
379
  }
361
380
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -382,9 +401,10 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
382
401
  renewEmailSubscription: function (id, authorization, options) {
383
402
  if (options === void 0) { options = {}; }
384
403
  return __awaiter(_this, void 0, void 0, function () {
385
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
386
- return __generator(this, function (_a) {
387
- switch (_a.label) {
404
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
405
+ var _a;
406
+ return __generator(this, function (_b) {
407
+ switch (_b.label) {
388
408
  case 0:
389
409
  // verify required parameter 'id' is not null or undefined
390
410
  (0, common_1.assertParamExists)('renewEmailSubscription', 'id', id);
@@ -401,14 +421,17 @@ var EmailSubscriptionsApiAxiosParamCreator = function (configuration) {
401
421
  // authentication bearer required
402
422
  // http bearer authentication required
403
423
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
404
- // Only Authorization falls back to the configured token; an empty value is never sent.
424
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
425
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
405
426
  ];
406
427
  case 1:
407
428
  // authentication bearer required
408
429
  // http bearer authentication required
409
- _a.sent();
410
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
411
- if (authorizationValue) {
430
+ _b.sent();
431
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
432
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
433
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
434
+ if (authorizationValue || authorizationKeepEmpty) {
412
435
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
413
436
  }
414
437
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -670,7 +693,7 @@ var EmailSubscriptionsApi = /** @class */ (function (_super) {
670
693
  */
671
694
  EmailSubscriptionsApi.prototype.catchUpEmailSubscription = function (requestParameters, options) {
672
695
  var _this = this;
673
- return (0, exports.EmailSubscriptionsApiFp)(this.configuration).catchUpEmailSubscription(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
696
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).catchUpEmailSubscription(requestParameters.id, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
674
697
  };
675
698
  /**
676
699
  * Queues a catch-up for every subscription of the email channel: Microsoft Graph is asked for every change since the last catch-up, and mail that never arrived through a notification is ingested. Returns straight away with how many catch-ups were queued. **Required Permissions** \"tenant-management.settings.update\"
@@ -682,7 +705,7 @@ var EmailSubscriptionsApi = /** @class */ (function (_super) {
682
705
  */
683
706
  EmailSubscriptionsApi.prototype.catchUpEmailSubscriptions = function (requestParameters, options) {
684
707
  var _this = this;
685
- return (0, exports.EmailSubscriptionsApiFp)(this.configuration).catchUpEmailSubscriptions(requestParameters.catchUpEmailSubscriptionsRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
708
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).catchUpEmailSubscriptions(requestParameters.catchUpEmailSubscriptionsRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
686
709
  };
687
710
  /**
688
711
  * Retrieves the email subscription with the given id. **Required Permissions** \"tenant-management.settings.view\"
@@ -694,7 +717,7 @@ var EmailSubscriptionsApi = /** @class */ (function (_super) {
694
717
  */
695
718
  EmailSubscriptionsApi.prototype.getEmailSubscription = function (requestParameters, options) {
696
719
  var _this = this;
697
- return (0, exports.EmailSubscriptionsApiFp)(this.configuration).getEmailSubscription(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
720
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).getEmailSubscription(requestParameters.id, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
698
721
  };
699
722
  /**
700
723
  * Returns the Microsoft Graph mail subscriptions of the tenant, one per mailbox and folder of the email channel, with their status, expiry and last error. For more information about pagination, read the Pagination documentation. **Required Permissions** \"tenant-management.settings.view\"
@@ -707,7 +730,7 @@ var EmailSubscriptionsApi = /** @class */ (function (_super) {
707
730
  EmailSubscriptionsApi.prototype.listEmailSubscriptions = function (requestParameters, options) {
708
731
  var _this = this;
709
732
  if (requestParameters === void 0) { requestParameters = {}; }
710
- return (0, exports.EmailSubscriptionsApiFp)(this.configuration).listEmailSubscriptions(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); });
733
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).listEmailSubscriptions(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); });
711
734
  };
712
735
  /**
713
736
  * Brings the subscriptions in line with the mailboxes and folders of the email channel: creates the missing ones, deletes the ones no longer configured and recreates expired or failed ones. Returns how many subscriptions each step touched. **Required Permissions** \"tenant-management.settings.update\"
@@ -719,7 +742,7 @@ var EmailSubscriptionsApi = /** @class */ (function (_super) {
719
742
  */
720
743
  EmailSubscriptionsApi.prototype.reconcileEmailSubscriptions = function (requestParameters, options) {
721
744
  var _this = this;
722
- return (0, exports.EmailSubscriptionsApiFp)(this.configuration).reconcileEmailSubscriptions(requestParameters.reconcileEmailSubscriptionsRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
745
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).reconcileEmailSubscriptions(requestParameters.reconcileEmailSubscriptionsRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
723
746
  };
724
747
  /**
725
748
  * Renews the subscription in Microsoft Graph right away and returns it with its new expiry. A pending or failed subscription, or one Graph no longer knows, is created again. Fails with 503 when Graph rejects the call; the error is kept on the subscription. **Required Permissions** \"tenant-management.settings.update\"
@@ -731,7 +754,7 @@ var EmailSubscriptionsApi = /** @class */ (function (_super) {
731
754
  */
732
755
  EmailSubscriptionsApi.prototype.renewEmailSubscription = function (requestParameters, options) {
733
756
  var _this = this;
734
- return (0, exports.EmailSubscriptionsApiFp)(this.configuration).renewEmailSubscription(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
757
+ return (0, exports.EmailSubscriptionsApiFp)(this.configuration).renewEmailSubscription(requestParameters.id, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
735
758
  };
736
759
  return EmailSubscriptionsApi;
737
760
  }(base_1.BaseAPI));