@emilgroup/discount-sdk-node 1.12.1-beta.15 → 1.12.1-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api/campaigns-api.ts +88 -33
- package/api/health-api.ts +1 -1
- package/api/policy-vouchers-api.ts +64 -24
- package/api/vouchers-api.ts +40 -15
- package/base.ts +4 -0
- package/common.ts +3 -2
- package/dist/api/campaigns-api.d.ts +11 -11
- package/dist/api/campaigns-api.js +153 -85
- package/dist/api/health-api.d.ts +1 -1
- package/dist/api/health-api.js +1 -1
- package/dist/api/policy-vouchers-api.d.ts +8 -8
- package/dist/api/policy-vouchers-api.js +112 -62
- package/dist/api/vouchers-api.d.ts +5 -5
- package/dist/api/vouchers-api.js +67 -38
- package/dist/base.d.ts +1 -0
- package/dist/base.js +3 -0
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/discount-sdk-node@1.12.1-beta.
|
|
20
|
+
npm install @emilgroup/discount-sdk-node@1.12.1-beta.18 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/discount-sdk-node@1.12.1-beta.
|
|
24
|
+
yarn add @emilgroup/discount-sdk-node@1.12.1-beta.18
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `CampaignApi`.
|
package/api/campaigns-api.ts
CHANGED
|
@@ -79,8 +79,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
79
79
|
// http bearer authentication required
|
|
80
80
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
83
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
84
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
85
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
86
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
87
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
88
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
|
|
@@ -130,8 +135,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
130
135
|
// http bearer authentication required
|
|
131
136
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
132
137
|
|
|
133
|
-
|
|
134
|
-
|
|
138
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
139
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
140
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
141
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
142
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
143
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
144
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
135
145
|
}
|
|
136
146
|
|
|
137
147
|
|
|
@@ -178,8 +188,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
178
188
|
// http bearer authentication required
|
|
179
189
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
180
190
|
|
|
181
|
-
|
|
182
|
-
|
|
191
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
192
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
193
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
194
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
195
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
196
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
197
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
183
198
|
}
|
|
184
199
|
|
|
185
200
|
|
|
@@ -227,8 +242,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
227
242
|
// http bearer authentication required
|
|
228
243
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
229
244
|
|
|
230
|
-
|
|
231
|
-
|
|
245
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
246
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
247
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
248
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
249
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
250
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
251
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
232
252
|
}
|
|
233
253
|
|
|
234
254
|
|
|
@@ -272,8 +292,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
272
292
|
// http bearer authentication required
|
|
273
293
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
274
294
|
|
|
275
|
-
|
|
276
|
-
|
|
295
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
296
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
297
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
298
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
299
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
300
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
301
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
277
302
|
}
|
|
278
303
|
|
|
279
304
|
|
|
@@ -322,8 +347,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
322
347
|
localVarQueryParameter['expand'] = expand;
|
|
323
348
|
}
|
|
324
349
|
|
|
325
|
-
|
|
326
|
-
|
|
350
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
351
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
352
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
353
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
354
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
355
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
356
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
327
357
|
}
|
|
328
358
|
|
|
329
359
|
|
|
@@ -398,8 +428,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
398
428
|
localVarQueryParameter['filters'] = filters;
|
|
399
429
|
}
|
|
400
430
|
|
|
401
|
-
|
|
402
|
-
|
|
431
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
432
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
433
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
434
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
435
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
436
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
437
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
403
438
|
}
|
|
404
439
|
|
|
405
440
|
|
|
@@ -474,8 +509,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
474
509
|
localVarQueryParameter['filters'] = filters;
|
|
475
510
|
}
|
|
476
511
|
|
|
477
|
-
|
|
478
|
-
|
|
512
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
513
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
514
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
515
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
516
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
517
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
518
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
479
519
|
}
|
|
480
520
|
|
|
481
521
|
|
|
@@ -522,8 +562,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
522
562
|
// http bearer authentication required
|
|
523
563
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
524
564
|
|
|
525
|
-
|
|
526
|
-
|
|
565
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
566
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
567
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
568
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
569
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
570
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
571
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
527
572
|
}
|
|
528
573
|
|
|
529
574
|
|
|
@@ -573,8 +618,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
573
618
|
// http bearer authentication required
|
|
574
619
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
575
620
|
|
|
576
|
-
|
|
577
|
-
|
|
621
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
622
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
623
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
624
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
625
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
626
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
627
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
578
628
|
}
|
|
579
629
|
|
|
580
630
|
|
|
@@ -621,8 +671,13 @@ export const CampaignsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
621
671
|
// http bearer authentication required
|
|
622
672
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
623
673
|
|
|
624
|
-
|
|
625
|
-
|
|
674
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
675
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
676
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
677
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
678
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
679
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
680
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
626
681
|
}
|
|
627
682
|
|
|
628
683
|
|
|
@@ -1312,7 +1367,7 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1312
1367
|
* @memberof CampaignsApi
|
|
1313
1368
|
*/
|
|
1314
1369
|
public createCampaign(requestParameters: CampaignsApiCreateCampaignRequest, options?: AxiosRequestConfig) {
|
|
1315
|
-
return CampaignsApiFp(this.configuration).createCampaign(requestParameters.createCampaignRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1370
|
+
return CampaignsApiFp(this.configuration).createCampaign(requestParameters.createCampaignRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1316
1371
|
}
|
|
1317
1372
|
|
|
1318
1373
|
/**
|
|
@@ -1324,7 +1379,7 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1324
1379
|
* @memberof CampaignsApi
|
|
1325
1380
|
*/
|
|
1326
1381
|
public createEligibleAccount(requestParameters: CampaignsApiCreateEligibleAccountRequest, options?: AxiosRequestConfig) {
|
|
1327
|
-
return CampaignsApiFp(this.configuration).createEligibleAccount(requestParameters.code, requestParameters.createEligibleAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1382
|
+
return CampaignsApiFp(this.configuration).createEligibleAccount(requestParameters.code, requestParameters.createEligibleAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1328
1383
|
}
|
|
1329
1384
|
|
|
1330
1385
|
/**
|
|
@@ -1336,7 +1391,7 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1336
1391
|
* @memberof CampaignsApi
|
|
1337
1392
|
*/
|
|
1338
1393
|
public deleteCampaign(requestParameters: CampaignsApiDeleteCampaignRequest, options?: AxiosRequestConfig) {
|
|
1339
|
-
return CampaignsApiFp(this.configuration).deleteCampaign(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1394
|
+
return CampaignsApiFp(this.configuration).deleteCampaign(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1340
1395
|
}
|
|
1341
1396
|
|
|
1342
1397
|
/**
|
|
@@ -1348,7 +1403,7 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1348
1403
|
* @memberof CampaignsApi
|
|
1349
1404
|
*/
|
|
1350
1405
|
public deleteEligibleAccount(requestParameters: CampaignsApiDeleteEligibleAccountRequest, options?: AxiosRequestConfig) {
|
|
1351
|
-
return CampaignsApiFp(this.configuration).deleteEligibleAccount(requestParameters.code, requestParameters.accountCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1406
|
+
return CampaignsApiFp(this.configuration).deleteEligibleAccount(requestParameters.code, requestParameters.accountCode, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1352
1407
|
}
|
|
1353
1408
|
|
|
1354
1409
|
/**
|
|
@@ -1360,7 +1415,7 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1360
1415
|
* @memberof CampaignsApi
|
|
1361
1416
|
*/
|
|
1362
1417
|
public deleteEligibleAccounts(requestParameters: CampaignsApiDeleteEligibleAccountsRequest, options?: AxiosRequestConfig) {
|
|
1363
|
-
return CampaignsApiFp(this.configuration).deleteEligibleAccounts(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1418
|
+
return CampaignsApiFp(this.configuration).deleteEligibleAccounts(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1364
1419
|
}
|
|
1365
1420
|
|
|
1366
1421
|
/**
|
|
@@ -1372,7 +1427,7 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1372
1427
|
* @memberof CampaignsApi
|
|
1373
1428
|
*/
|
|
1374
1429
|
public getCampaign(requestParameters: CampaignsApiGetCampaignRequest, options?: AxiosRequestConfig) {
|
|
1375
|
-
return CampaignsApiFp(this.configuration).getCampaign(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
1430
|
+
return CampaignsApiFp(this.configuration).getCampaign(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1376
1431
|
}
|
|
1377
1432
|
|
|
1378
1433
|
/**
|
|
@@ -1384,7 +1439,7 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1384
1439
|
* @memberof CampaignsApi
|
|
1385
1440
|
*/
|
|
1386
1441
|
public listCampaigns(requestParameters: CampaignsApiListCampaignsRequest = {}, options?: AxiosRequestConfig) {
|
|
1387
|
-
return CampaignsApiFp(this.configuration).listCampaigns(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
1442
|
+
return CampaignsApiFp(this.configuration).listCampaigns(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1388
1443
|
}
|
|
1389
1444
|
|
|
1390
1445
|
/**
|
|
@@ -1396,7 +1451,7 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1396
1451
|
* @memberof CampaignsApi
|
|
1397
1452
|
*/
|
|
1398
1453
|
public listEligibleAccounts(requestParameters: CampaignsApiListEligibleAccountsRequest = {}, options?: AxiosRequestConfig) {
|
|
1399
|
-
return CampaignsApiFp(this.configuration).listEligibleAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
1454
|
+
return CampaignsApiFp(this.configuration).listEligibleAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1400
1455
|
}
|
|
1401
1456
|
|
|
1402
1457
|
/**
|
|
@@ -1408,7 +1463,7 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1408
1463
|
* @memberof CampaignsApi
|
|
1409
1464
|
*/
|
|
1410
1465
|
public updateCampaign(requestParameters: CampaignsApiUpdateCampaignRequest, options?: AxiosRequestConfig) {
|
|
1411
|
-
return CampaignsApiFp(this.configuration).updateCampaign(requestParameters.code, requestParameters.updateCampaignRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1466
|
+
return CampaignsApiFp(this.configuration).updateCampaign(requestParameters.code, requestParameters.updateCampaignRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1412
1467
|
}
|
|
1413
1468
|
|
|
1414
1469
|
/**
|
|
@@ -1420,7 +1475,7 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1420
1475
|
* @memberof CampaignsApi
|
|
1421
1476
|
*/
|
|
1422
1477
|
public updateCampaignStatus(requestParameters: CampaignsApiUpdateCampaignStatusRequest, options?: AxiosRequestConfig) {
|
|
1423
|
-
return CampaignsApiFp(this.configuration).updateCampaignStatus(requestParameters.code, requestParameters.updateCampaignStatusRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1478
|
+
return CampaignsApiFp(this.configuration).updateCampaignStatus(requestParameters.code, requestParameters.updateCampaignStatusRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1424
1479
|
}
|
|
1425
1480
|
|
|
1426
1481
|
/**
|
|
@@ -1432,6 +1487,6 @@ export class CampaignsApi extends BaseAPI {
|
|
|
1432
1487
|
* @memberof CampaignsApi
|
|
1433
1488
|
*/
|
|
1434
1489
|
public uploadEligibleAccounts(requestParameters: CampaignsApiUploadEligibleAccountsRequest, options?: AxiosRequestConfig) {
|
|
1435
|
-
return CampaignsApiFp(this.configuration).uploadEligibleAccounts(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1490
|
+
return CampaignsApiFp(this.configuration).uploadEligibleAccounts(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1436
1491
|
}
|
|
1437
1492
|
}
|
package/api/health-api.ts
CHANGED
|
@@ -123,6 +123,6 @@ export class HealthApi extends BaseAPI {
|
|
|
123
123
|
* @memberof HealthApi
|
|
124
124
|
*/
|
|
125
125
|
public check(options?: AxiosRequestConfig) {
|
|
126
|
-
return HealthApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
|
|
126
|
+
return HealthApiFp(this.configuration).check(this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -83,8 +83,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
83
83
|
// http bearer authentication required
|
|
84
84
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
87
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
88
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
89
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
90
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
91
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
92
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
|
|
@@ -130,8 +135,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
130
135
|
// http bearer authentication required
|
|
131
136
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
132
137
|
|
|
133
|
-
|
|
134
|
-
|
|
138
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
139
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
140
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
141
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
142
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
143
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
144
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
135
145
|
}
|
|
136
146
|
|
|
137
147
|
|
|
@@ -177,8 +187,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
177
187
|
// http bearer authentication required
|
|
178
188
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
179
189
|
|
|
180
|
-
|
|
181
|
-
|
|
190
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
191
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
192
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
193
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
194
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
195
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
196
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
182
197
|
}
|
|
183
198
|
|
|
184
199
|
|
|
@@ -225,8 +240,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
225
240
|
// http bearer authentication required
|
|
226
241
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
227
242
|
|
|
228
|
-
|
|
229
|
-
|
|
243
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
244
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
245
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
246
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
247
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
248
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
249
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
230
250
|
}
|
|
231
251
|
|
|
232
252
|
|
|
@@ -275,8 +295,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
275
295
|
localVarQueryParameter['expand'] = expand;
|
|
276
296
|
}
|
|
277
297
|
|
|
278
|
-
|
|
279
|
-
|
|
298
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
299
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
300
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
301
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
302
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
303
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
304
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
280
305
|
}
|
|
281
306
|
|
|
282
307
|
|
|
@@ -351,8 +376,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
351
376
|
localVarQueryParameter['filters'] = filters;
|
|
352
377
|
}
|
|
353
378
|
|
|
354
|
-
|
|
355
|
-
|
|
379
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
380
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
381
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
382
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
383
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
384
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
385
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
356
386
|
}
|
|
357
387
|
|
|
358
388
|
|
|
@@ -395,8 +425,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
395
425
|
// http bearer authentication required
|
|
396
426
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
397
427
|
|
|
398
|
-
|
|
399
|
-
|
|
428
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
429
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
430
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
431
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
432
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
433
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
434
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
400
435
|
}
|
|
401
436
|
|
|
402
437
|
|
|
@@ -442,8 +477,13 @@ export const PolicyVouchersApiAxiosParamCreator = function (configuration?: Conf
|
|
|
442
477
|
// http bearer authentication required
|
|
443
478
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
444
479
|
|
|
445
|
-
|
|
446
|
-
|
|
480
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
481
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
482
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
483
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
484
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
485
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
486
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
447
487
|
}
|
|
448
488
|
|
|
449
489
|
|
|
@@ -914,7 +954,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
914
954
|
* @memberof PolicyVouchersApi
|
|
915
955
|
*/
|
|
916
956
|
public chargePolicyVoucher(requestParameters: PolicyVouchersApiChargePolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
917
|
-
return PolicyVouchersApiFp(this.configuration).chargePolicyVoucher(requestParameters.chargePolicyVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
957
|
+
return PolicyVouchersApiFp(this.configuration).chargePolicyVoucher(requestParameters.chargePolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
918
958
|
}
|
|
919
959
|
|
|
920
960
|
/**
|
|
@@ -926,7 +966,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
926
966
|
* @memberof PolicyVouchersApi
|
|
927
967
|
*/
|
|
928
968
|
public checkAccountEligibility(requestParameters: PolicyVouchersApiCheckAccountEligibilityRequest, options?: AxiosRequestConfig) {
|
|
929
|
-
return PolicyVouchersApiFp(this.configuration).checkAccountEligibility(requestParameters.checkAccountEligibilityRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
969
|
+
return PolicyVouchersApiFp(this.configuration).checkAccountEligibility(requestParameters.checkAccountEligibilityRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
930
970
|
}
|
|
931
971
|
|
|
932
972
|
/**
|
|
@@ -938,7 +978,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
938
978
|
* @memberof PolicyVouchersApi
|
|
939
979
|
*/
|
|
940
980
|
public createPolicyVoucher(requestParameters: PolicyVouchersApiCreatePolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
941
|
-
return PolicyVouchersApiFp(this.configuration).createPolicyVoucher(requestParameters.createPolicyVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
981
|
+
return PolicyVouchersApiFp(this.configuration).createPolicyVoucher(requestParameters.createPolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
942
982
|
}
|
|
943
983
|
|
|
944
984
|
/**
|
|
@@ -950,7 +990,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
950
990
|
* @memberof PolicyVouchersApi
|
|
951
991
|
*/
|
|
952
992
|
public deletePolicyVoucher(requestParameters: PolicyVouchersApiDeletePolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
953
|
-
return PolicyVouchersApiFp(this.configuration).deletePolicyVoucher(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
993
|
+
return PolicyVouchersApiFp(this.configuration).deletePolicyVoucher(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
954
994
|
}
|
|
955
995
|
|
|
956
996
|
/**
|
|
@@ -962,7 +1002,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
962
1002
|
* @memberof PolicyVouchersApi
|
|
963
1003
|
*/
|
|
964
1004
|
public getPolicyVoucher(requestParameters: PolicyVouchersApiGetPolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
965
|
-
return PolicyVouchersApiFp(this.configuration).getPolicyVoucher(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
1005
|
+
return PolicyVouchersApiFp(this.configuration).getPolicyVoucher(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
966
1006
|
}
|
|
967
1007
|
|
|
968
1008
|
/**
|
|
@@ -974,7 +1014,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
974
1014
|
* @memberof PolicyVouchersApi
|
|
975
1015
|
*/
|
|
976
1016
|
public listPolicyVouchers(requestParameters: PolicyVouchersApiListPolicyVouchersRequest = {}, options?: AxiosRequestConfig) {
|
|
977
|
-
return PolicyVouchersApiFp(this.configuration).listPolicyVouchers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
1017
|
+
return PolicyVouchersApiFp(this.configuration).listPolicyVouchers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
978
1018
|
}
|
|
979
1019
|
|
|
980
1020
|
/**
|
|
@@ -986,7 +1026,7 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
986
1026
|
* @memberof PolicyVouchersApi
|
|
987
1027
|
*/
|
|
988
1028
|
public redeemPolicyVoucher(requestParameters: PolicyVouchersApiRedeemPolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
989
|
-
return PolicyVouchersApiFp(this.configuration).redeemPolicyVoucher(requestParameters.redeemPolicyVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1029
|
+
return PolicyVouchersApiFp(this.configuration).redeemPolicyVoucher(requestParameters.redeemPolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
990
1030
|
}
|
|
991
1031
|
|
|
992
1032
|
/**
|
|
@@ -998,6 +1038,6 @@ export class PolicyVouchersApi extends BaseAPI {
|
|
|
998
1038
|
* @memberof PolicyVouchersApi
|
|
999
1039
|
*/
|
|
1000
1040
|
public withdrawPolicyVoucher(requestParameters: PolicyVouchersApiWithdrawPolicyVoucherRequest, options?: AxiosRequestConfig) {
|
|
1001
|
-
return PolicyVouchersApiFp(this.configuration).withdrawPolicyVoucher(requestParameters.withdrawPolicyVoucherRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1041
|
+
return PolicyVouchersApiFp(this.configuration).withdrawPolicyVoucher(requestParameters.withdrawPolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
1002
1042
|
}
|
|
1003
1043
|
}
|