@emilgroup/discount-sdk-node 1.12.1-beta.18 → 1.12.1-beta.19

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.
@@ -107,10 +107,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
107
107
  createCampaign: function (createCampaignRequestDto, authorization, options) {
108
108
  if (options === void 0) { options = {}; }
109
109
  return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
111
- var _a;
112
- return __generator(this, function (_b) {
113
- switch (_b.label) {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
114
113
  case 0:
115
114
  // verify required parameter 'createCampaignRequestDto' is not null or undefined
116
115
  (0, common_1.assertParamExists)('createCampaign', 'createCampaignRequestDto', createCampaignRequestDto);
@@ -125,19 +124,13 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
125
124
  localVarQueryParameter = {};
126
125
  // authentication bearer required
127
126
  // http bearer authentication required
128
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
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.
131
- ];
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
132
128
  case 1:
133
129
  // authentication bearer required
134
130
  // http bearer authentication required
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) {
140
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
141
134
  }
142
135
  localVarHeaderParameter['Content-Type'] = 'application/json';
143
136
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -164,10 +157,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
164
157
  createEligibleAccount: function (code, createEligibleAccountRequestDto, authorization, options) {
165
158
  if (options === void 0) { options = {}; }
166
159
  return __awaiter(_this, void 0, void 0, function () {
167
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
168
- var _a;
169
- return __generator(this, function (_b) {
170
- switch (_b.label) {
160
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
161
+ return __generator(this, function (_a) {
162
+ switch (_a.label) {
171
163
  case 0:
172
164
  // verify required parameter 'code' is not null or undefined
173
165
  (0, common_1.assertParamExists)('createEligibleAccount', 'code', code);
@@ -185,19 +177,13 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
185
177
  localVarQueryParameter = {};
186
178
  // authentication bearer required
187
179
  // http bearer authentication required
188
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
189
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
190
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
191
- ];
180
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
192
181
  case 1:
193
182
  // authentication bearer required
194
183
  // http bearer authentication required
195
- _b.sent();
196
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
197
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
198
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
199
- if (authorizationValue || authorizationKeepEmpty) {
200
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
+ _a.sent();
185
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
186
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
201
187
  }
202
188
  localVarHeaderParameter['Content-Type'] = 'application/json';
203
189
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -223,10 +209,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
223
209
  deleteCampaign: function (code, authorization, options) {
224
210
  if (options === void 0) { options = {}; }
225
211
  return __awaiter(_this, void 0, void 0, function () {
226
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
227
- var _a;
228
- return __generator(this, function (_b) {
229
- switch (_b.label) {
212
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
213
+ return __generator(this, function (_a) {
214
+ switch (_a.label) {
230
215
  case 0:
231
216
  // verify required parameter 'code' is not null or undefined
232
217
  (0, common_1.assertParamExists)('deleteCampaign', 'code', code);
@@ -242,19 +227,13 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
242
227
  localVarQueryParameter = {};
243
228
  // authentication bearer required
244
229
  // http bearer authentication required
245
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
246
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
247
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
248
- ];
230
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
249
231
  case 1:
250
232
  // authentication bearer required
251
233
  // http bearer authentication required
252
- _b.sent();
253
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
254
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
255
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
256
- if (authorizationValue || authorizationKeepEmpty) {
257
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
234
+ _a.sent();
235
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
236
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
258
237
  }
259
238
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
260
239
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -279,10 +258,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
279
258
  deleteEligibleAccount: function (code, accountCode, authorization, options) {
280
259
  if (options === void 0) { options = {}; }
281
260
  return __awaiter(_this, void 0, void 0, function () {
282
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
283
- var _a;
284
- return __generator(this, function (_b) {
285
- switch (_b.label) {
261
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
262
+ return __generator(this, function (_a) {
263
+ switch (_a.label) {
286
264
  case 0:
287
265
  // verify required parameter 'code' is not null or undefined
288
266
  (0, common_1.assertParamExists)('deleteEligibleAccount', 'code', code);
@@ -301,19 +279,13 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
301
279
  localVarQueryParameter = {};
302
280
  // authentication bearer required
303
281
  // http bearer authentication required
304
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
305
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
306
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
307
- ];
282
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
308
283
  case 1:
309
284
  // authentication bearer required
310
285
  // http bearer authentication required
311
- _b.sent();
312
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
313
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
314
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
315
- if (authorizationValue || authorizationKeepEmpty) {
316
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
286
+ _a.sent();
287
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
288
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
317
289
  }
318
290
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
319
291
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -337,10 +309,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
337
309
  deleteEligibleAccounts: function (code, authorization, options) {
338
310
  if (options === void 0) { options = {}; }
339
311
  return __awaiter(_this, void 0, void 0, function () {
340
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
341
- var _a;
342
- return __generator(this, function (_b) {
343
- switch (_b.label) {
312
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
313
+ return __generator(this, function (_a) {
314
+ switch (_a.label) {
344
315
  case 0:
345
316
  // verify required parameter 'code' is not null or undefined
346
317
  (0, common_1.assertParamExists)('deleteEligibleAccounts', 'code', code);
@@ -356,19 +327,13 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
356
327
  localVarQueryParameter = {};
357
328
  // authentication bearer required
358
329
  // http bearer authentication required
359
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
360
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
361
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
362
- ];
330
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
363
331
  case 1:
364
332
  // authentication bearer required
365
333
  // http bearer authentication required
366
- _b.sent();
367
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
368
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
369
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
370
- if (authorizationValue || authorizationKeepEmpty) {
371
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
334
+ _a.sent();
335
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
336
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
372
337
  }
373
338
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
374
339
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -393,10 +358,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
393
358
  getCampaign: function (code, authorization, expand, options) {
394
359
  if (options === void 0) { options = {}; }
395
360
  return __awaiter(_this, void 0, void 0, function () {
396
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
397
- var _a;
398
- return __generator(this, function (_b) {
399
- switch (_b.label) {
361
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
362
+ return __generator(this, function (_a) {
363
+ switch (_a.label) {
400
364
  case 0:
401
365
  // verify required parameter 'code' is not null or undefined
402
366
  (0, common_1.assertParamExists)('getCampaign', 'code', code);
@@ -416,15 +380,12 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
416
380
  case 1:
417
381
  // authentication bearer required
418
382
  // http bearer authentication required
419
- _b.sent();
383
+ _a.sent();
420
384
  if (expand !== undefined) {
421
385
  localVarQueryParameter['expand'] = expand;
422
386
  }
423
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
424
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
425
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
426
- if (authorizationValue || authorizationKeepEmpty) {
427
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
387
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
388
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
428
389
  }
429
390
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
430
391
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -454,10 +415,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
454
415
  listCampaigns: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
455
416
  if (options === void 0) { options = {}; }
456
417
  return __awaiter(_this, void 0, void 0, function () {
457
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
458
- var _a;
459
- return __generator(this, function (_b) {
460
- switch (_b.label) {
418
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
419
+ return __generator(this, function (_a) {
420
+ switch (_a.label) {
461
421
  case 0:
462
422
  localVarPath = "/discountservice/v1/campaigns";
463
423
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -474,7 +434,7 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
474
434
  case 1:
475
435
  // authentication bearer required
476
436
  // http bearer authentication required
477
- _b.sent();
437
+ _a.sent();
478
438
  if (pageSize !== undefined) {
479
439
  localVarQueryParameter['pageSize'] = pageSize;
480
440
  }
@@ -496,11 +456,8 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
496
456
  if (filters !== undefined) {
497
457
  localVarQueryParameter['filters'] = filters;
498
458
  }
499
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
500
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
501
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
502
- if (authorizationValue || authorizationKeepEmpty) {
503
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
459
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
460
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
504
461
  }
505
462
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
506
463
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -530,10 +487,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
530
487
  listEligibleAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
531
488
  if (options === void 0) { options = {}; }
532
489
  return __awaiter(_this, void 0, void 0, function () {
533
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
534
- var _a;
535
- return __generator(this, function (_b) {
536
- switch (_b.label) {
490
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
491
+ return __generator(this, function (_a) {
492
+ switch (_a.label) {
537
493
  case 0:
538
494
  localVarPath = "/discountservice/v1/campaigns/eligible-accounts";
539
495
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -550,7 +506,7 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
550
506
  case 1:
551
507
  // authentication bearer required
552
508
  // http bearer authentication required
553
- _b.sent();
509
+ _a.sent();
554
510
  if (pageSize !== undefined) {
555
511
  localVarQueryParameter['pageSize'] = pageSize;
556
512
  }
@@ -572,11 +528,8 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
572
528
  if (filters !== undefined) {
573
529
  localVarQueryParameter['filters'] = filters;
574
530
  }
575
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
576
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
577
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
578
- if (authorizationValue || authorizationKeepEmpty) {
579
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
531
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
532
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
580
533
  }
581
534
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
582
535
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -601,10 +554,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
601
554
  updateCampaign: function (code, updateCampaignRequestDto, authorization, options) {
602
555
  if (options === void 0) { options = {}; }
603
556
  return __awaiter(_this, void 0, void 0, function () {
604
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
605
- var _a;
606
- return __generator(this, function (_b) {
607
- switch (_b.label) {
557
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
558
+ return __generator(this, function (_a) {
559
+ switch (_a.label) {
608
560
  case 0:
609
561
  // verify required parameter 'code' is not null or undefined
610
562
  (0, common_1.assertParamExists)('updateCampaign', 'code', code);
@@ -622,19 +574,13 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
622
574
  localVarQueryParameter = {};
623
575
  // authentication bearer required
624
576
  // http bearer authentication required
625
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
626
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
627
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
628
- ];
577
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
629
578
  case 1:
630
579
  // authentication bearer required
631
580
  // http bearer authentication required
632
- _b.sent();
633
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
634
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
635
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
636
- if (authorizationValue || authorizationKeepEmpty) {
637
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
581
+ _a.sent();
582
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
583
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
638
584
  }
639
585
  localVarHeaderParameter['Content-Type'] = 'application/json';
640
586
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -661,10 +607,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
661
607
  updateCampaignStatus: function (code, updateCampaignStatusRequestDto, authorization, options) {
662
608
  if (options === void 0) { options = {}; }
663
609
  return __awaiter(_this, void 0, void 0, function () {
664
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
665
- var _a;
666
- return __generator(this, function (_b) {
667
- switch (_b.label) {
610
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
611
+ return __generator(this, function (_a) {
612
+ switch (_a.label) {
668
613
  case 0:
669
614
  // verify required parameter 'code' is not null or undefined
670
615
  (0, common_1.assertParamExists)('updateCampaignStatus', 'code', code);
@@ -682,19 +627,13 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
682
627
  localVarQueryParameter = {};
683
628
  // authentication bearer required
684
629
  // http bearer authentication required
685
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
686
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
687
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
688
- ];
630
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
689
631
  case 1:
690
632
  // authentication bearer required
691
633
  // http bearer authentication required
692
- _b.sent();
693
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
694
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
695
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
696
- if (authorizationValue || authorizationKeepEmpty) {
697
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
634
+ _a.sent();
635
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
636
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
698
637
  }
699
638
  localVarHeaderParameter['Content-Type'] = 'application/json';
700
639
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -720,10 +659,9 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
720
659
  uploadEligibleAccounts: function (code, authorization, options) {
721
660
  if (options === void 0) { options = {}; }
722
661
  return __awaiter(_this, void 0, void 0, function () {
723
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
724
- var _a;
725
- return __generator(this, function (_b) {
726
- switch (_b.label) {
662
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
663
+ return __generator(this, function (_a) {
664
+ switch (_a.label) {
727
665
  case 0:
728
666
  // verify required parameter 'code' is not null or undefined
729
667
  (0, common_1.assertParamExists)('uploadEligibleAccounts', 'code', code);
@@ -739,19 +677,13 @@ var CampaignsApiAxiosParamCreator = function (configuration) {
739
677
  localVarQueryParameter = {};
740
678
  // authentication bearer required
741
679
  // http bearer authentication required
742
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
743
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
744
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
745
- ];
680
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
746
681
  case 1:
747
682
  // authentication bearer required
748
683
  // http bearer authentication required
749
- _b.sent();
750
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
751
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
752
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
753
- if (authorizationValue || authorizationKeepEmpty) {
754
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
684
+ _a.sent();
685
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
686
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
755
687
  }
756
688
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
757
689
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -1194,7 +1126,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1194
1126
  */
1195
1127
  CampaignsApi.prototype.createCampaign = function (requestParameters, options) {
1196
1128
  var _this = this;
1197
- return (0, exports.CampaignsApiFp)(this.configuration).createCampaign(requestParameters.createCampaignRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1129
+ return (0, exports.CampaignsApiFp)(this.configuration).createCampaign(requestParameters.createCampaignRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1198
1130
  };
1199
1131
  /**
1200
1132
  * Creates an account that is eligible to redeem a vouchers from a specific campaign.
@@ -1206,7 +1138,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1206
1138
  */
1207
1139
  CampaignsApi.prototype.createEligibleAccount = function (requestParameters, options) {
1208
1140
  var _this = this;
1209
- return (0, exports.CampaignsApiFp)(this.configuration).createEligibleAccount(requestParameters.code, requestParameters.createEligibleAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1141
+ return (0, exports.CampaignsApiFp)(this.configuration).createEligibleAccount(requestParameters.code, requestParameters.createEligibleAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1210
1142
  };
1211
1143
  /**
1212
1144
  * Removes a campaign and its associated vouchers. This will prevent any further voucher redemptions.
@@ -1218,7 +1150,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1218
1150
  */
1219
1151
  CampaignsApi.prototype.deleteCampaign = function (requestParameters, options) {
1220
1152
  var _this = this;
1221
- return (0, exports.CampaignsApiFp)(this.configuration).deleteCampaign(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1153
+ return (0, exports.CampaignsApiFp)(this.configuration).deleteCampaign(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1222
1154
  };
1223
1155
  /**
1224
1156
  * Removes an eligible account from a campaign. This will prevent the account from using the assigned voucher code for discounts when the campaign is released.
@@ -1230,7 +1162,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1230
1162
  */
1231
1163
  CampaignsApi.prototype.deleteEligibleAccount = function (requestParameters, options) {
1232
1164
  var _this = this;
1233
- return (0, exports.CampaignsApiFp)(this.configuration).deleteEligibleAccount(requestParameters.code, requestParameters.accountCode, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1165
+ return (0, exports.CampaignsApiFp)(this.configuration).deleteEligibleAccount(requestParameters.code, requestParameters.accountCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1234
1166
  };
1235
1167
  /**
1236
1168
  * Removes all eligible accounts from a campaign. This will prevent these accounts from using their assigned voucher codes for discounts when the campaign is released.
@@ -1242,7 +1174,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1242
1174
  */
1243
1175
  CampaignsApi.prototype.deleteEligibleAccounts = function (requestParameters, options) {
1244
1176
  var _this = this;
1245
- return (0, exports.CampaignsApiFp)(this.configuration).deleteEligibleAccounts(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1177
+ return (0, exports.CampaignsApiFp)(this.configuration).deleteEligibleAccounts(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1246
1178
  };
1247
1179
  /**
1248
1180
  * Retrieves detailed information about a specific campaign.
@@ -1254,7 +1186,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1254
1186
  */
1255
1187
  CampaignsApi.prototype.getCampaign = function (requestParameters, options) {
1256
1188
  var _this = this;
1257
- return (0, exports.CampaignsApiFp)(this.configuration).getCampaign(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1189
+ return (0, exports.CampaignsApiFp)(this.configuration).getCampaign(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
1258
1190
  };
1259
1191
  /**
1260
1192
  * Retrieves a list of campaigns.
@@ -1267,7 +1199,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1267
1199
  CampaignsApi.prototype.listCampaigns = function (requestParameters, options) {
1268
1200
  var _this = this;
1269
1201
  if (requestParameters === void 0) { requestParameters = {}; }
1270
- return (0, exports.CampaignsApiFp)(this.configuration).listCampaigns(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); });
1202
+ return (0, exports.CampaignsApiFp)(this.configuration).listCampaigns(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); });
1271
1203
  };
1272
1204
  /**
1273
1205
  * Retrieves a list of eligible accounts.
@@ -1280,7 +1212,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1280
1212
  CampaignsApi.prototype.listEligibleAccounts = function (requestParameters, options) {
1281
1213
  var _this = this;
1282
1214
  if (requestParameters === void 0) { requestParameters = {}; }
1283
- return (0, exports.CampaignsApiFp)(this.configuration).listEligibleAccounts(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); });
1215
+ return (0, exports.CampaignsApiFp)(this.configuration).listEligibleAccounts(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); });
1284
1216
  };
1285
1217
  /**
1286
1218
  * Updates the data of an existing campaign. Only DRAFT campaigns can be updated.
@@ -1292,7 +1224,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1292
1224
  */
1293
1225
  CampaignsApi.prototype.updateCampaign = function (requestParameters, options) {
1294
1226
  var _this = this;
1295
- return (0, exports.CampaignsApiFp)(this.configuration).updateCampaign(requestParameters.code, requestParameters.updateCampaignRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1227
+ return (0, exports.CampaignsApiFp)(this.configuration).updateCampaign(requestParameters.code, requestParameters.updateCampaignRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1296
1228
  };
1297
1229
  /**
1298
1230
  * Updates the status of a campaign, which affects whether vouchers can be redeemed.
@@ -1304,7 +1236,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1304
1236
  */
1305
1237
  CampaignsApi.prototype.updateCampaignStatus = function (requestParameters, options) {
1306
1238
  var _this = this;
1307
- return (0, exports.CampaignsApiFp)(this.configuration).updateCampaignStatus(requestParameters.code, requestParameters.updateCampaignStatusRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1239
+ return (0, exports.CampaignsApiFp)(this.configuration).updateCampaignStatus(requestParameters.code, requestParameters.updateCampaignStatusRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1308
1240
  };
1309
1241
  /**
1310
1242
  * Uploads accounts that are eligible to redeem vouchers from a specific campaign using a CSV file. The CSV file must contain a header row with the following columns: partnerNumber, voucherCode. Separate each column with a comma.
@@ -1316,7 +1248,7 @@ var CampaignsApi = /** @class */ (function (_super) {
1316
1248
  */
1317
1249
  CampaignsApi.prototype.uploadEligibleAccounts = function (requestParameters, options) {
1318
1250
  var _this = this;
1319
- return (0, exports.CampaignsApiFp)(this.configuration).uploadEligibleAccounts(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1251
+ return (0, exports.CampaignsApiFp)(this.configuration).uploadEligibleAccounts(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1320
1252
  };
1321
1253
  return CampaignsApi;
1322
1254
  }(base_1.BaseAPI));
@@ -66,5 +66,5 @@ export declare class HealthApi extends BaseAPI {
66
66
  * @throws {RequiredError}
67
67
  * @memberof HealthApi
68
68
  */
69
- check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}, any>>;
69
+ check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}>>;
70
70
  }
@@ -197,7 +197,7 @@ var HealthApi = /** @class */ (function (_super) {
197
197
  */
198
198
  HealthApi.prototype.check = function (options) {
199
199
  var _this = this;
200
- return (0, exports.HealthApiFp)(this.configuration).check(this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
200
+ return (0, exports.HealthApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
201
201
  };
202
202
  return HealthApi;
203
203
  }(base_1.BaseAPI));
@@ -488,7 +488,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
488
488
  * @throws {RequiredError}
489
489
  * @memberof PolicyVouchersApi
490
490
  */
491
- chargePolicyVoucher(requestParameters: PolicyVouchersApiChargePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ChargePolicyVoucherResponseClass, any, {}, any>>;
491
+ chargePolicyVoucher(requestParameters: PolicyVouchersApiChargePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ChargePolicyVoucherResponseClass, any, {}>>;
492
492
  /**
493
493
  * This will check if the account is eligible for a specific voucher.
494
494
  * @summary Checks the account eligibility.
@@ -497,7 +497,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
497
497
  * @throws {RequiredError}
498
498
  * @memberof PolicyVouchersApi
499
499
  */
500
- checkAccountEligibility(requestParameters: PolicyVouchersApiCheckAccountEligibilityRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CheckAccountEligibilityResponseClass, any, {}, any>>;
500
+ checkAccountEligibility(requestParameters: PolicyVouchersApiCheckAccountEligibilityRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CheckAccountEligibilityResponseClass, any, {}>>;
501
501
  /**
502
502
  * This will create an policy voucher.
503
503
  * @summary Create the policy voucher
@@ -506,7 +506,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
506
506
  * @throws {RequiredError}
507
507
  * @memberof PolicyVouchersApi
508
508
  */
509
- createPolicyVoucher(requestParameters: PolicyVouchersApiCreatePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePolicyVoucherResponseClass, any, {}, any>>;
509
+ createPolicyVoucher(requestParameters: PolicyVouchersApiCreatePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePolicyVoucherResponseClass, any, {}>>;
510
510
  /**
511
511
  * This will delete an policy voucher.
512
512
  * @summary Delete the policy voucher
@@ -515,7 +515,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
515
515
  * @throws {RequiredError}
516
516
  * @memberof PolicyVouchersApi
517
517
  */
518
- deletePolicyVoucher(requestParameters: PolicyVouchersApiDeletePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
518
+ deletePolicyVoucher(requestParameters: PolicyVouchersApiDeletePolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
519
519
  /**
520
520
  * This will get an policy voucher.
521
521
  * @summary Retrieve the policy voucher
@@ -524,7 +524,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
524
524
  * @throws {RequiredError}
525
525
  * @memberof PolicyVouchersApi
526
526
  */
527
- getPolicyVoucher(requestParameters: PolicyVouchersApiGetPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPolicyVoucherResponseClass, any, {}, any>>;
527
+ getPolicyVoucher(requestParameters: PolicyVouchersApiGetPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPolicyVoucherResponseClass, any, {}>>;
528
528
  /**
529
529
  * Returns a list of policy vouchers you have previously created. The policy vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
530
530
  * @summary List policy vouchers
@@ -533,7 +533,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
533
533
  * @throws {RequiredError}
534
534
  * @memberof PolicyVouchersApi
535
535
  */
536
- listPolicyVouchers(requestParameters?: PolicyVouchersApiListPolicyVouchersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPolicyVouchersResponseClass, any, {}, any>>;
536
+ listPolicyVouchers(requestParameters?: PolicyVouchersApiListPolicyVouchersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPolicyVouchersResponseClass, any, {}>>;
537
537
  /**
538
538
  * This will redeem the policy voucher.
539
539
  * @summary Redeems the policy voucher.
@@ -542,7 +542,7 @@ export declare class PolicyVouchersApi extends BaseAPI {
542
542
  * @throws {RequiredError}
543
543
  * @memberof PolicyVouchersApi
544
544
  */
545
- redeemPolicyVoucher(requestParameters: PolicyVouchersApiRedeemPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RedeemPolicyVoucherResponseClass, any, {}, any>>;
545
+ redeemPolicyVoucher(requestParameters: PolicyVouchersApiRedeemPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RedeemPolicyVoucherResponseClass, any, {}>>;
546
546
  /**
547
547
  * This will withdraw the policy voucher.
548
548
  * @summary Withdraws the policy voucher.
@@ -551,5 +551,5 @@ export declare class PolicyVouchersApi extends BaseAPI {
551
551
  * @throws {RequiredError}
552
552
  * @memberof PolicyVouchersApi
553
553
  */
554
- withdrawPolicyVoucher(requestParameters: PolicyVouchersApiWithdrawPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WithdrawPolicyVoucherResponseClass, any, {}, any>>;
554
+ withdrawPolicyVoucher(requestParameters: PolicyVouchersApiWithdrawPolicyVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WithdrawPolicyVoucherResponseClass, any, {}>>;
555
555
  }