@emilgroup/accounting-sdk 1.34.1-beta.81 → 1.34.1-beta.83
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/accounting-configs-api.ts +48 -24
- package/api/booking-entries-api.ts +30 -15
- package/api/commission-account-mappings-api.ts +48 -24
- package/api/financial-accounts-api.ts +30 -15
- package/api/financial-transactions-api.ts +12 -6
- package/api/number-ranges-api.ts +24 -12
- package/api/personal-accounts-api.ts +24 -12
- package/api/product-account-mappings-api.ts +72 -36
- package/base.ts +14 -0
- package/dist/api/accounting-configs-api.js +88 -56
- package/dist/api/booking-entries-api.js +51 -33
- package/dist/api/commission-account-mappings-api.js +82 -53
- package/dist/api/financial-accounts-api.js +51 -33
- package/dist/api/financial-transactions-api.js +18 -12
- package/dist/api/number-ranges-api.js +40 -26
- package/dist/api/personal-accounts-api.js +40 -26
- package/dist/api/product-account-mappings-api.js +128 -82
- package/dist/base.js +15 -1
- package/dist/models/accounting-config-data-class.d.ts +6 -0
- package/dist/models/accounting-config-data-dto.d.ts +6 -0
- package/models/accounting-config-data-class.ts +6 -0
- package/models/accounting-config-data-dto.ts +6 -0
- package/package.json +1 -1
|
@@ -106,9 +106,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
106
106
|
deletePremiumItemAccount: function (productCode, productVersionCode, premiumFormulaCode, category, authorization, options) {
|
|
107
107
|
if (options === void 0) { options = {}; }
|
|
108
108
|
return __awaiter(_this, void 0, void 0, function () {
|
|
109
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
110
|
+
var _a;
|
|
111
|
+
return __generator(this, function (_b) {
|
|
112
|
+
switch (_b.label) {
|
|
112
113
|
case 0:
|
|
113
114
|
// verify required parameter 'productCode' is not null or undefined
|
|
114
115
|
(0, common_1.assertParamExists)('deletePremiumItemAccount', 'productCode', productCode);
|
|
@@ -134,14 +135,17 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
134
135
|
// authentication bearer required
|
|
135
136
|
// http bearer authentication required
|
|
136
137
|
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
137
|
-
// Only Authorization falls back to the configured token
|
|
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.
|
|
138
140
|
];
|
|
139
141
|
case 1:
|
|
140
142
|
// authentication bearer required
|
|
141
143
|
// http bearer authentication required
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
_b.sent();
|
|
145
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
146
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
147
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
148
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
145
149
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
146
150
|
}
|
|
147
151
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -167,9 +171,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
167
171
|
deleteProductCategoryAccount: function (productCode, category, authorization, options) {
|
|
168
172
|
if (options === void 0) { options = {}; }
|
|
169
173
|
return __awaiter(_this, void 0, void 0, function () {
|
|
170
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
171
|
-
|
|
172
|
-
|
|
174
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
175
|
+
var _a;
|
|
176
|
+
return __generator(this, function (_b) {
|
|
177
|
+
switch (_b.label) {
|
|
173
178
|
case 0:
|
|
174
179
|
// verify required parameter 'productCode' is not null or undefined
|
|
175
180
|
(0, common_1.assertParamExists)('deleteProductCategoryAccount', 'productCode', productCode);
|
|
@@ -189,14 +194,17 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
189
194
|
// authentication bearer required
|
|
190
195
|
// http bearer authentication required
|
|
191
196
|
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
192
|
-
// Only Authorization falls back to the configured token
|
|
197
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
198
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
193
199
|
];
|
|
194
200
|
case 1:
|
|
195
201
|
// authentication bearer required
|
|
196
202
|
// http bearer authentication required
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
203
|
+
_b.sent();
|
|
204
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
205
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
206
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
207
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
200
208
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
201
209
|
}
|
|
202
210
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -221,9 +229,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
221
229
|
deleteProductRiskCarrier: function (productCode, authorization, options) {
|
|
222
230
|
if (options === void 0) { options = {}; }
|
|
223
231
|
return __awaiter(_this, void 0, void 0, function () {
|
|
224
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
225
|
-
|
|
226
|
-
|
|
232
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
233
|
+
var _a;
|
|
234
|
+
return __generator(this, function (_b) {
|
|
235
|
+
switch (_b.label) {
|
|
227
236
|
case 0:
|
|
228
237
|
// verify required parameter 'productCode' is not null or undefined
|
|
229
238
|
(0, common_1.assertParamExists)('deleteProductRiskCarrier', 'productCode', productCode);
|
|
@@ -240,14 +249,17 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
240
249
|
// authentication bearer required
|
|
241
250
|
// http bearer authentication required
|
|
242
251
|
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
243
|
-
// Only Authorization falls back to the configured token
|
|
252
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
253
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
244
254
|
];
|
|
245
255
|
case 1:
|
|
246
256
|
// authentication bearer required
|
|
247
257
|
// http bearer authentication required
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
258
|
+
_b.sent();
|
|
259
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
260
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
261
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
262
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
251
263
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
252
264
|
}
|
|
253
265
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -274,9 +286,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
274
286
|
deleteProductVersionCategoryAccount: function (productCode, productVersionCode, category, authorization, options) {
|
|
275
287
|
if (options === void 0) { options = {}; }
|
|
276
288
|
return __awaiter(_this, void 0, void 0, function () {
|
|
277
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
278
|
-
|
|
279
|
-
|
|
289
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
290
|
+
var _a;
|
|
291
|
+
return __generator(this, function (_b) {
|
|
292
|
+
switch (_b.label) {
|
|
280
293
|
case 0:
|
|
281
294
|
// verify required parameter 'productCode' is not null or undefined
|
|
282
295
|
(0, common_1.assertParamExists)('deleteProductVersionCategoryAccount', 'productCode', productCode);
|
|
@@ -299,14 +312,17 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
299
312
|
// authentication bearer required
|
|
300
313
|
// http bearer authentication required
|
|
301
314
|
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
302
|
-
// Only Authorization falls back to the configured token
|
|
315
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
316
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
303
317
|
];
|
|
304
318
|
case 1:
|
|
305
319
|
// authentication bearer required
|
|
306
320
|
// http bearer authentication required
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
321
|
+
_b.sent();
|
|
322
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
323
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
324
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
325
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
310
326
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
311
327
|
}
|
|
312
328
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -331,9 +347,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
331
347
|
getProductAccountMapping: function (productCode, authorization, options) {
|
|
332
348
|
if (options === void 0) { options = {}; }
|
|
333
349
|
return __awaiter(_this, void 0, void 0, function () {
|
|
334
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
335
|
-
|
|
336
|
-
|
|
350
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
351
|
+
var _a;
|
|
352
|
+
return __generator(this, function (_b) {
|
|
353
|
+
switch (_b.label) {
|
|
337
354
|
case 0:
|
|
338
355
|
// verify required parameter 'productCode' is not null or undefined
|
|
339
356
|
(0, common_1.assertParamExists)('getProductAccountMapping', 'productCode', productCode);
|
|
@@ -350,14 +367,17 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
350
367
|
// authentication bearer required
|
|
351
368
|
// http bearer authentication required
|
|
352
369
|
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
353
|
-
// Only Authorization falls back to the configured token
|
|
370
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
371
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
354
372
|
];
|
|
355
373
|
case 1:
|
|
356
374
|
// authentication bearer required
|
|
357
375
|
// http bearer authentication required
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
376
|
+
_b.sent();
|
|
377
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
378
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
379
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
380
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
361
381
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
362
382
|
}
|
|
363
383
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -383,9 +403,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
383
403
|
getProductVersionAccountMapping: function (productCode, productVersionCode, authorization, options) {
|
|
384
404
|
if (options === void 0) { options = {}; }
|
|
385
405
|
return __awaiter(_this, void 0, void 0, function () {
|
|
386
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
387
|
-
|
|
388
|
-
|
|
406
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
407
|
+
var _a;
|
|
408
|
+
return __generator(this, function (_b) {
|
|
409
|
+
switch (_b.label) {
|
|
389
410
|
case 0:
|
|
390
411
|
// verify required parameter 'productCode' is not null or undefined
|
|
391
412
|
(0, common_1.assertParamExists)('getProductVersionAccountMapping', 'productCode', productCode);
|
|
@@ -405,14 +426,17 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
405
426
|
// authentication bearer required
|
|
406
427
|
// http bearer authentication required
|
|
407
428
|
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
408
|
-
// Only Authorization falls back to the configured token
|
|
429
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
430
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
409
431
|
];
|
|
410
432
|
case 1:
|
|
411
433
|
// authentication bearer required
|
|
412
434
|
// http bearer authentication required
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
435
|
+
_b.sent();
|
|
436
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
437
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
438
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
439
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
416
440
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
417
441
|
}
|
|
418
442
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -443,9 +467,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
443
467
|
listProductAccountMappings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
444
468
|
if (options === void 0) { options = {}; }
|
|
445
469
|
return __awaiter(_this, void 0, void 0, function () {
|
|
446
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
447
|
-
|
|
448
|
-
|
|
470
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
471
|
+
var _a;
|
|
472
|
+
return __generator(this, function (_b) {
|
|
473
|
+
switch (_b.label) {
|
|
449
474
|
case 0:
|
|
450
475
|
localVarPath = "/accountingservice/v1/product-account-mappings";
|
|
451
476
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -462,7 +487,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
462
487
|
case 1:
|
|
463
488
|
// authentication bearer required
|
|
464
489
|
// http bearer authentication required
|
|
465
|
-
|
|
490
|
+
_b.sent();
|
|
466
491
|
if (pageSize !== undefined) {
|
|
467
492
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
468
493
|
}
|
|
@@ -484,8 +509,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
484
509
|
if (filters !== undefined) {
|
|
485
510
|
localVarQueryParameter['filters'] = filters;
|
|
486
511
|
}
|
|
487
|
-
|
|
488
|
-
|
|
512
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
513
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
514
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
515
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
489
516
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
490
517
|
}
|
|
491
518
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -516,9 +543,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
516
543
|
listProductsWithAccountMappings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
517
544
|
if (options === void 0) { options = {}; }
|
|
518
545
|
return __awaiter(_this, void 0, void 0, function () {
|
|
519
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
520
|
-
|
|
521
|
-
|
|
546
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
547
|
+
var _a;
|
|
548
|
+
return __generator(this, function (_b) {
|
|
549
|
+
switch (_b.label) {
|
|
522
550
|
case 0:
|
|
523
551
|
localVarPath = "/accountingservice/v1/product-account-mappings/products";
|
|
524
552
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -535,7 +563,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
535
563
|
case 1:
|
|
536
564
|
// authentication bearer required
|
|
537
565
|
// http bearer authentication required
|
|
538
|
-
|
|
566
|
+
_b.sent();
|
|
539
567
|
if (pageSize !== undefined) {
|
|
540
568
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
541
569
|
}
|
|
@@ -557,8 +585,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
557
585
|
if (filters !== undefined) {
|
|
558
586
|
localVarQueryParameter['filters'] = filters;
|
|
559
587
|
}
|
|
560
|
-
|
|
561
|
-
|
|
588
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
589
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
590
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
591
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
562
592
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
563
593
|
}
|
|
564
594
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -587,9 +617,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
587
617
|
putPremiumItemAccount: function (productCode, productVersionCode, premiumFormulaCode, category, putPremiumItemAccountBodyDto, authorization, options) {
|
|
588
618
|
if (options === void 0) { options = {}; }
|
|
589
619
|
return __awaiter(_this, void 0, void 0, function () {
|
|
590
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
591
|
-
|
|
592
|
-
|
|
620
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
621
|
+
var _a;
|
|
622
|
+
return __generator(this, function (_b) {
|
|
623
|
+
switch (_b.label) {
|
|
593
624
|
case 0:
|
|
594
625
|
// verify required parameter 'productCode' is not null or undefined
|
|
595
626
|
(0, common_1.assertParamExists)('putPremiumItemAccount', 'productCode', productCode);
|
|
@@ -617,14 +648,17 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
617
648
|
// authentication bearer required
|
|
618
649
|
// http bearer authentication required
|
|
619
650
|
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
620
|
-
// Only Authorization falls back to the configured token
|
|
651
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
652
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
621
653
|
];
|
|
622
654
|
case 1:
|
|
623
655
|
// authentication bearer required
|
|
624
656
|
// http bearer authentication required
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
657
|
+
_b.sent();
|
|
658
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
659
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
660
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
661
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
628
662
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
629
663
|
}
|
|
630
664
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -653,9 +687,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
653
687
|
putProductCategoryAccount: function (productCode, category, putProductCategoryAccountBodyDto, authorization, options) {
|
|
654
688
|
if (options === void 0) { options = {}; }
|
|
655
689
|
return __awaiter(_this, void 0, void 0, function () {
|
|
656
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
657
|
-
|
|
658
|
-
|
|
690
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
691
|
+
var _a;
|
|
692
|
+
return __generator(this, function (_b) {
|
|
693
|
+
switch (_b.label) {
|
|
659
694
|
case 0:
|
|
660
695
|
// verify required parameter 'productCode' is not null or undefined
|
|
661
696
|
(0, common_1.assertParamExists)('putProductCategoryAccount', 'productCode', productCode);
|
|
@@ -677,14 +712,17 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
677
712
|
// authentication bearer required
|
|
678
713
|
// http bearer authentication required
|
|
679
714
|
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
680
|
-
// Only Authorization falls back to the configured token
|
|
715
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
716
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
681
717
|
];
|
|
682
718
|
case 1:
|
|
683
719
|
// authentication bearer required
|
|
684
720
|
// http bearer authentication required
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
721
|
+
_b.sent();
|
|
722
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
723
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
724
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
725
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
688
726
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
689
727
|
}
|
|
690
728
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -712,9 +750,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
712
750
|
putProductRiskCarrier: function (productCode, putProductRiskCarrierBodyDto, authorization, options) {
|
|
713
751
|
if (options === void 0) { options = {}; }
|
|
714
752
|
return __awaiter(_this, void 0, void 0, function () {
|
|
715
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
716
|
-
|
|
717
|
-
|
|
753
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
754
|
+
var _a;
|
|
755
|
+
return __generator(this, function (_b) {
|
|
756
|
+
switch (_b.label) {
|
|
718
757
|
case 0:
|
|
719
758
|
// verify required parameter 'productCode' is not null or undefined
|
|
720
759
|
(0, common_1.assertParamExists)('putProductRiskCarrier', 'productCode', productCode);
|
|
@@ -733,14 +772,17 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
733
772
|
// authentication bearer required
|
|
734
773
|
// http bearer authentication required
|
|
735
774
|
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
736
|
-
// Only Authorization falls back to the configured token
|
|
775
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
776
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
737
777
|
];
|
|
738
778
|
case 1:
|
|
739
779
|
// authentication bearer required
|
|
740
780
|
// http bearer authentication required
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
781
|
+
_b.sent();
|
|
782
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
783
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
784
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
785
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
744
786
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
745
787
|
}
|
|
746
788
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -770,9 +812,10 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
770
812
|
putProductVersionCategoryAccount: function (productCode, productVersionCode, category, putProductVersionCategoryAccountBodyDto, authorization, options) {
|
|
771
813
|
if (options === void 0) { options = {}; }
|
|
772
814
|
return __awaiter(_this, void 0, void 0, function () {
|
|
773
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
|
|
774
|
-
|
|
775
|
-
|
|
815
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
816
|
+
var _a;
|
|
817
|
+
return __generator(this, function (_b) {
|
|
818
|
+
switch (_b.label) {
|
|
776
819
|
case 0:
|
|
777
820
|
// verify required parameter 'productCode' is not null or undefined
|
|
778
821
|
(0, common_1.assertParamExists)('putProductVersionCategoryAccount', 'productCode', productCode);
|
|
@@ -797,14 +840,17 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
|
|
|
797
840
|
// authentication bearer required
|
|
798
841
|
// http bearer authentication required
|
|
799
842
|
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
800
|
-
// Only Authorization falls back to the configured token
|
|
843
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
844
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
801
845
|
];
|
|
802
846
|
case 1:
|
|
803
847
|
// authentication bearer required
|
|
804
848
|
// http bearer authentication required
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
849
|
+
_b.sent();
|
|
850
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
851
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
852
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
853
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
808
854
|
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
809
855
|
}
|
|
810
856
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
package/dist/base.js
CHANGED
|
@@ -142,6 +142,15 @@ var BaseAPI = /** @class */ (function () {
|
|
|
142
142
|
this.axios = axios;
|
|
143
143
|
this.loadTokenData();
|
|
144
144
|
if (configuration) {
|
|
145
|
+
// Two accounts in one browser share APP_TOKEN: never take the token or session account saved for
|
|
146
|
+
// another account. The mode stays (an app naming its account keeps its session). Saved with the next refresh.
|
|
147
|
+
var ownUser = configuration.username;
|
|
148
|
+
var storedUser = this.tokenData.username;
|
|
149
|
+
if (ownUser && storedUser && ownUser.toLowerCase() !== storedUser.toLowerCase()) {
|
|
150
|
+
delete this.tokenData.accessToken;
|
|
151
|
+
delete this.tokenData.sub;
|
|
152
|
+
this.tokenData.username = ownUser;
|
|
153
|
+
}
|
|
145
154
|
var accessToken = this.tokenData.accessToken;
|
|
146
155
|
this.configuration = configuration;
|
|
147
156
|
this.basePath = configuration.basePath || this.basePath;
|
|
@@ -452,7 +461,12 @@ var BaseAPI = /** @class */ (function () {
|
|
|
452
461
|
_retry = true;
|
|
453
462
|
this.applyTokenReply(reply);
|
|
454
463
|
this.storeTokenData(this.tokenData);
|
|
455
|
-
|
|
464
|
+
// The limit is for refreshes that do not help; one that worked starts the count again.
|
|
465
|
+
// Not awaited, so a failed retry reaches the app as the same axios error as before.
|
|
466
|
+
return [2 /*return*/, axios.request(__assign({}, this.withCurrentAuth(originalConfig))).then(function (retried) {
|
|
467
|
+
_retry_count = 0;
|
|
468
|
+
return retried;
|
|
469
|
+
})];
|
|
456
470
|
case 9:
|
|
457
471
|
_error_2 = _a.sent();
|
|
458
472
|
if (_error_2.response && _error_2.response.data) {
|
|
@@ -35,4 +35,10 @@ export interface AccountingConfigDataClass {
|
|
|
35
35
|
* @memberof AccountingConfigDataClass
|
|
36
36
|
*/
|
|
37
37
|
'accountingConfiguration'?: AccountingConfigurationClass;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {Array<object>}
|
|
41
|
+
* @memberof AccountingConfigDataClass
|
|
42
|
+
*/
|
|
43
|
+
'personalAccountRanges': Array<object>;
|
|
38
44
|
}
|
|
@@ -35,4 +35,10 @@ export interface AccountingConfigDataDto {
|
|
|
35
35
|
* @memberof AccountingConfigDataDto
|
|
36
36
|
*/
|
|
37
37
|
'accountingConfiguration'?: AccountingConfigDataDtoAccountingConfiguration;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {Array<object>}
|
|
41
|
+
* @memberof AccountingConfigDataDto
|
|
42
|
+
*/
|
|
43
|
+
'personalAccountRanges': Array<object>;
|
|
38
44
|
}
|
|
@@ -40,5 +40,11 @@ export interface AccountingConfigDataClass {
|
|
|
40
40
|
* @memberof AccountingConfigDataClass
|
|
41
41
|
*/
|
|
42
42
|
'accountingConfiguration'?: AccountingConfigurationClass;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<object>}
|
|
46
|
+
* @memberof AccountingConfigDataClass
|
|
47
|
+
*/
|
|
48
|
+
'personalAccountRanges': Array<object>;
|
|
43
49
|
}
|
|
44
50
|
|
|
@@ -40,5 +40,11 @@ export interface AccountingConfigDataDto {
|
|
|
40
40
|
* @memberof AccountingConfigDataDto
|
|
41
41
|
*/
|
|
42
42
|
'accountingConfiguration'?: AccountingConfigDataDtoAccountingConfiguration;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<object>}
|
|
46
|
+
* @memberof AccountingConfigDataDto
|
|
47
|
+
*/
|
|
48
|
+
'personalAccountRanges': Array<object>;
|
|
43
49
|
}
|
|
44
50
|
|