@emilgroup/accounting-sdk 1.34.1-beta.76 → 1.34.1-beta.77

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.
Files changed (70) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/README.md +2 -2
  3. package/api/accounting-configs-api.ts +32 -16
  4. package/api/booking-entries-api.ts +24 -14
  5. package/api/commission-account-mappings-api.ts +32 -16
  6. package/api/financial-accounts-api.ts +20 -10
  7. package/api/financial-transactions-api.ts +8 -4
  8. package/api/number-ranges-api.ts +16 -8
  9. package/api/personal-accounts-api.ts +16 -8
  10. package/api/product-account-mappings-api.ts +265 -20
  11. package/base.ts +174 -41
  12. package/common.ts +3 -2
  13. package/configuration.ts +20 -0
  14. package/dist/api/accounting-configs-api.d.ts +8 -8
  15. package/dist/api/accounting-configs-api.js +56 -32
  16. package/dist/api/booking-entries-api.d.ts +9 -9
  17. package/dist/api/booking-entries-api.js +33 -22
  18. package/dist/api/commission-account-mappings-api.d.ts +8 -8
  19. package/dist/api/commission-account-mappings-api.js +47 -29
  20. package/dist/api/financial-accounts-api.d.ts +5 -5
  21. package/dist/api/financial-accounts-api.js +29 -18
  22. package/dist/api/financial-transactions-api.d.ts +2 -2
  23. package/dist/api/financial-transactions-api.js +8 -6
  24. package/dist/api/health-api.d.ts +1 -1
  25. package/dist/api/number-ranges-api.d.ts +4 -4
  26. package/dist/api/number-ranges-api.js +22 -14
  27. package/dist/api/personal-accounts-api.d.ts +4 -4
  28. package/dist/api/personal-accounts-api.js +22 -14
  29. package/dist/api/product-account-mappings-api.d.ts +131 -10
  30. package/dist/api/product-account-mappings-api.js +261 -38
  31. package/dist/base.d.ts +24 -0
  32. package/dist/base.js +178 -59
  33. package/dist/common.d.ts +1 -1
  34. package/dist/common.js +1 -0
  35. package/dist/configuration.d.ts +17 -0
  36. package/dist/configuration.js +2 -0
  37. package/dist/models/account-mapping-class.d.ts +2 -0
  38. package/dist/models/account-mapping-class.js +3 -1
  39. package/dist/models/accounting-config-data-dto-default-account-mappings.d.ts +2 -0
  40. package/dist/models/accounting-config-data-dto-default-account-mappings.js +3 -1
  41. package/dist/models/booking-entry-class.d.ts +16 -2
  42. package/dist/models/booking-entry-class.js +3 -1
  43. package/dist/models/create-booking-entry-request-dto.d.ts +3 -2
  44. package/dist/models/create-booking-entry-request-dto.js +3 -2
  45. package/dist/models/create-financial-account-request-dto.d.ts +2 -0
  46. package/dist/models/create-financial-account-request-dto.js +3 -1
  47. package/dist/models/financial-transaction-class.d.ts +6 -0
  48. package/dist/models/financial-transaction-data-dto.d.ts +6 -0
  49. package/dist/models/index.d.ts +2 -0
  50. package/dist/models/index.js +2 -0
  51. package/dist/models/post-financial-event-request-dto.d.ts +3 -2
  52. package/dist/models/post-financial-event-request-dto.js +1 -0
  53. package/dist/models/product-account-mapping-detail-class.d.ts +6 -0
  54. package/dist/models/product-risk-carrier-class.d.ts +42 -0
  55. package/dist/models/product-risk-carrier-class.js +15 -0
  56. package/dist/models/put-product-risk-carrier-body-dto.d.ts +24 -0
  57. package/dist/models/put-product-risk-carrier-body-dto.js +15 -0
  58. package/models/account-mapping-class.ts +3 -1
  59. package/models/accounting-config-data-dto-default-account-mappings.ts +3 -1
  60. package/models/booking-entry-class.ts +17 -3
  61. package/models/create-booking-entry-request-dto.ts +4 -3
  62. package/models/create-financial-account-request-dto.ts +3 -1
  63. package/models/financial-transaction-class.ts +6 -0
  64. package/models/financial-transaction-data-dto.ts +6 -0
  65. package/models/index.ts +2 -0
  66. package/models/post-financial-event-request-dto.ts +3 -2
  67. package/models/product-account-mapping-detail-class.ts +6 -0
  68. package/models/product-risk-carrier-class.ts +48 -0
  69. package/models/put-product-risk-carrier-body-dto.ts +30 -0
  70. package/package.json +2 -2
@@ -106,7 +106,7 @@ 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, headersFromBaseOptions;
109
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
110
110
  return __generator(this, function (_a) {
111
111
  switch (_a.label) {
112
112
  case 0:
@@ -133,13 +133,16 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
133
133
  localVarQueryParameter = {};
134
134
  // authentication bearer required
135
135
  // http bearer authentication required
136
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
136
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
137
+ // Only Authorization falls back to the configured token; an empty value is never sent.
138
+ ];
137
139
  case 1:
138
140
  // authentication bearer required
139
141
  // http bearer authentication required
140
142
  _a.sent();
141
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
142
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
143
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
144
+ if (authorizationValue) {
145
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
143
146
  }
144
147
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
145
148
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -164,7 +167,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
164
167
  deleteProductCategoryAccount: function (productCode, category, authorization, options) {
165
168
  if (options === void 0) { options = {}; }
166
169
  return __awaiter(_this, void 0, void 0, function () {
167
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
170
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
168
171
  return __generator(this, function (_a) {
169
172
  switch (_a.label) {
170
173
  case 0:
@@ -185,13 +188,67 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
185
188
  localVarQueryParameter = {};
186
189
  // authentication bearer required
187
190
  // http bearer authentication required
188
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
191
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
192
+ // Only Authorization falls back to the configured token; an empty value is never sent.
193
+ ];
189
194
  case 1:
190
195
  // authentication bearer required
191
196
  // http bearer authentication required
192
197
  _a.sent();
193
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
194
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
198
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
199
+ if (authorizationValue) {
200
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
201
+ }
202
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
203
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
204
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
205
+ return [2 /*return*/, {
206
+ url: (0, common_1.toPathString)(localVarUrlObj),
207
+ options: localVarRequestOptions,
208
+ }];
209
+ }
210
+ });
211
+ });
212
+ },
213
+ /**
214
+ * Permanently deletes the Product Risk Carrier. Supply the unique code that was returned when you created the Product Risk Carrier and this will delete it. **Required Permissions** \"accounting-management.financial-accounts.delete\"
215
+ * @summary Delete the Product Risk Carrier
216
+ * @param {string} productCode
217
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ */
221
+ deleteProductRiskCarrier: function (productCode, authorization, options) {
222
+ if (options === void 0) { options = {}; }
223
+ return __awaiter(_this, void 0, void 0, function () {
224
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
225
+ return __generator(this, function (_a) {
226
+ switch (_a.label) {
227
+ case 0:
228
+ // verify required parameter 'productCode' is not null or undefined
229
+ (0, common_1.assertParamExists)('deleteProductRiskCarrier', 'productCode', productCode);
230
+ localVarPath = "/accountingservice/v1/product-account-mappings/products/{productCode}/risk-carrier"
231
+ .replace("{".concat("productCode", "}"), encodeURIComponent(String(productCode)));
232
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
233
+ if (configuration) {
234
+ baseOptions = configuration.baseOptions;
235
+ baseAccessToken = configuration.accessToken;
236
+ }
237
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
238
+ localVarHeaderParameter = {};
239
+ localVarQueryParameter = {};
240
+ // authentication bearer required
241
+ // http bearer authentication required
242
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
243
+ // Only Authorization falls back to the configured token; an empty value is never sent.
244
+ ];
245
+ case 1:
246
+ // authentication bearer required
247
+ // http bearer authentication required
248
+ _a.sent();
249
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
250
+ if (authorizationValue) {
251
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
195
252
  }
196
253
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
197
254
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -217,7 +274,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
217
274
  deleteProductVersionCategoryAccount: function (productCode, productVersionCode, category, authorization, options) {
218
275
  if (options === void 0) { options = {}; }
219
276
  return __awaiter(_this, void 0, void 0, function () {
220
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
277
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
221
278
  return __generator(this, function (_a) {
222
279
  switch (_a.label) {
223
280
  case 0:
@@ -241,13 +298,16 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
241
298
  localVarQueryParameter = {};
242
299
  // authentication bearer required
243
300
  // http bearer authentication required
244
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
301
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
302
+ // Only Authorization falls back to the configured token; an empty value is never sent.
303
+ ];
245
304
  case 1:
246
305
  // authentication bearer required
247
306
  // http bearer authentication required
248
307
  _a.sent();
249
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
250
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
308
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
309
+ if (authorizationValue) {
310
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
251
311
  }
252
312
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
253
313
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -271,7 +331,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
271
331
  getProductAccountMapping: function (productCode, authorization, options) {
272
332
  if (options === void 0) { options = {}; }
273
333
  return __awaiter(_this, void 0, void 0, function () {
274
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
334
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
275
335
  return __generator(this, function (_a) {
276
336
  switch (_a.label) {
277
337
  case 0:
@@ -289,13 +349,16 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
289
349
  localVarQueryParameter = {};
290
350
  // authentication bearer required
291
351
  // http bearer authentication required
292
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
352
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
353
+ // Only Authorization falls back to the configured token; an empty value is never sent.
354
+ ];
293
355
  case 1:
294
356
  // authentication bearer required
295
357
  // http bearer authentication required
296
358
  _a.sent();
297
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
298
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
359
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
360
+ if (authorizationValue) {
361
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
299
362
  }
300
363
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
301
364
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -320,7 +383,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
320
383
  getProductVersionAccountMapping: function (productCode, productVersionCode, authorization, options) {
321
384
  if (options === void 0) { options = {}; }
322
385
  return __awaiter(_this, void 0, void 0, function () {
323
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
386
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
324
387
  return __generator(this, function (_a) {
325
388
  switch (_a.label) {
326
389
  case 0:
@@ -341,13 +404,16 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
341
404
  localVarQueryParameter = {};
342
405
  // authentication bearer required
343
406
  // http bearer authentication required
344
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
407
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
408
+ // Only Authorization falls back to the configured token; an empty value is never sent.
409
+ ];
345
410
  case 1:
346
411
  // authentication bearer required
347
412
  // http bearer authentication required
348
413
  _a.sent();
349
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
350
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
414
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
415
+ if (authorizationValue) {
416
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
351
417
  }
352
418
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
353
419
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -377,7 +443,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
377
443
  listProductAccountMappings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
378
444
  if (options === void 0) { options = {}; }
379
445
  return __awaiter(_this, void 0, void 0, function () {
380
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
446
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
381
447
  return __generator(this, function (_a) {
382
448
  switch (_a.label) {
383
449
  case 0:
@@ -418,8 +484,9 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
418
484
  if (filters !== undefined) {
419
485
  localVarQueryParameter['filters'] = filters;
420
486
  }
421
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
422
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
487
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
488
+ if (authorizationValue) {
489
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
423
490
  }
424
491
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
425
492
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -449,7 +516,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
449
516
  listProductsWithAccountMappings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
450
517
  if (options === void 0) { options = {}; }
451
518
  return __awaiter(_this, void 0, void 0, function () {
452
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
519
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
453
520
  return __generator(this, function (_a) {
454
521
  switch (_a.label) {
455
522
  case 0:
@@ -490,8 +557,9 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
490
557
  if (filters !== undefined) {
491
558
  localVarQueryParameter['filters'] = filters;
492
559
  }
493
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
494
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
560
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
561
+ if (authorizationValue) {
562
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
495
563
  }
496
564
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
497
565
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -519,7 +587,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
519
587
  putPremiumItemAccount: function (productCode, productVersionCode, premiumFormulaCode, category, putPremiumItemAccountBodyDto, authorization, options) {
520
588
  if (options === void 0) { options = {}; }
521
589
  return __awaiter(_this, void 0, void 0, function () {
522
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
590
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
523
591
  return __generator(this, function (_a) {
524
592
  switch (_a.label) {
525
593
  case 0:
@@ -548,13 +616,16 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
548
616
  localVarQueryParameter = {};
549
617
  // authentication bearer required
550
618
  // http bearer authentication required
551
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
619
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
620
+ // Only Authorization falls back to the configured token; an empty value is never sent.
621
+ ];
552
622
  case 1:
553
623
  // authentication bearer required
554
624
  // http bearer authentication required
555
625
  _a.sent();
556
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
557
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
626
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
627
+ if (authorizationValue) {
628
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
558
629
  }
559
630
  localVarHeaderParameter['Content-Type'] = 'application/json';
560
631
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -582,7 +653,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
582
653
  putProductCategoryAccount: function (productCode, category, putProductCategoryAccountBodyDto, authorization, options) {
583
654
  if (options === void 0) { options = {}; }
584
655
  return __awaiter(_this, void 0, void 0, function () {
585
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
656
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
586
657
  return __generator(this, function (_a) {
587
658
  switch (_a.label) {
588
659
  case 0:
@@ -605,13 +676,16 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
605
676
  localVarQueryParameter = {};
606
677
  // authentication bearer required
607
678
  // http bearer authentication required
608
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
679
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
680
+ // Only Authorization falls back to the configured token; an empty value is never sent.
681
+ ];
609
682
  case 1:
610
683
  // authentication bearer required
611
684
  // http bearer authentication required
612
685
  _a.sent();
613
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
614
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
686
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
687
+ if (authorizationValue) {
688
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
615
689
  }
616
690
  localVarHeaderParameter['Content-Type'] = 'application/json';
617
691
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -626,6 +700,62 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
626
700
  });
627
701
  });
628
702
  },
703
+ /**
704
+ * Updates the specified Product Risk Carrier by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"accounting-management.financial-accounts.update\"
705
+ * @summary Update the Product Risk Carrier
706
+ * @param {string} productCode
707
+ * @param {PutProductRiskCarrierBodyDto} putProductRiskCarrierBodyDto
708
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
709
+ * @param {*} [options] Override http request option.
710
+ * @throws {RequiredError}
711
+ */
712
+ putProductRiskCarrier: function (productCode, putProductRiskCarrierBodyDto, authorization, options) {
713
+ if (options === void 0) { options = {}; }
714
+ return __awaiter(_this, void 0, void 0, function () {
715
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
716
+ return __generator(this, function (_a) {
717
+ switch (_a.label) {
718
+ case 0:
719
+ // verify required parameter 'productCode' is not null or undefined
720
+ (0, common_1.assertParamExists)('putProductRiskCarrier', 'productCode', productCode);
721
+ // verify required parameter 'putProductRiskCarrierBodyDto' is not null or undefined
722
+ (0, common_1.assertParamExists)('putProductRiskCarrier', 'putProductRiskCarrierBodyDto', putProductRiskCarrierBodyDto);
723
+ localVarPath = "/accountingservice/v1/product-account-mappings/products/{productCode}/risk-carrier"
724
+ .replace("{".concat("productCode", "}"), encodeURIComponent(String(productCode)));
725
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
726
+ if (configuration) {
727
+ baseOptions = configuration.baseOptions;
728
+ baseAccessToken = configuration.accessToken;
729
+ }
730
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
731
+ localVarHeaderParameter = {};
732
+ localVarQueryParameter = {};
733
+ // authentication bearer required
734
+ // http bearer authentication required
735
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
736
+ // Only Authorization falls back to the configured token; an empty value is never sent.
737
+ ];
738
+ case 1:
739
+ // authentication bearer required
740
+ // http bearer authentication required
741
+ _a.sent();
742
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
743
+ if (authorizationValue) {
744
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
745
+ }
746
+ localVarHeaderParameter['Content-Type'] = 'application/json';
747
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
748
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
749
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
750
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(putProductRiskCarrierBodyDto, localVarRequestOptions, configuration);
751
+ return [2 /*return*/, {
752
+ url: (0, common_1.toPathString)(localVarUrlObj),
753
+ options: localVarRequestOptions,
754
+ }];
755
+ }
756
+ });
757
+ });
758
+ },
629
759
  /**
630
760
  * Updates the specified Product Version Category Account by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"accounting-management.financial-accounts.update\"
631
761
  * @summary Update the Product Version Category Account
@@ -640,7 +770,7 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
640
770
  putProductVersionCategoryAccount: function (productCode, productVersionCode, category, putProductVersionCategoryAccountBodyDto, authorization, options) {
641
771
  if (options === void 0) { options = {}; }
642
772
  return __awaiter(_this, void 0, void 0, function () {
643
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
773
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
644
774
  return __generator(this, function (_a) {
645
775
  switch (_a.label) {
646
776
  case 0:
@@ -666,13 +796,16 @@ var ProductAccountMappingsApiAxiosParamCreator = function (configuration) {
666
796
  localVarQueryParameter = {};
667
797
  // authentication bearer required
668
798
  // http bearer authentication required
669
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
799
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
800
+ // Only Authorization falls back to the configured token; an empty value is never sent.
801
+ ];
670
802
  case 1:
671
803
  // authentication bearer required
672
804
  // http bearer authentication required
673
805
  _a.sent();
674
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
675
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
806
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
807
+ if (authorizationValue) {
808
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
676
809
  }
677
810
  localVarHeaderParameter['Content-Type'] = 'application/json';
678
811
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -743,6 +876,27 @@ var ProductAccountMappingsApiFp = function (configuration) {
743
876
  });
744
877
  });
745
878
  },
879
+ /**
880
+ * Permanently deletes the Product Risk Carrier. Supply the unique code that was returned when you created the Product Risk Carrier and this will delete it. **Required Permissions** \"accounting-management.financial-accounts.delete\"
881
+ * @summary Delete the Product Risk Carrier
882
+ * @param {string} productCode
883
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
884
+ * @param {*} [options] Override http request option.
885
+ * @throws {RequiredError}
886
+ */
887
+ deleteProductRiskCarrier: function (productCode, authorization, options) {
888
+ return __awaiter(this, void 0, void 0, function () {
889
+ var localVarAxiosArgs;
890
+ return __generator(this, function (_a) {
891
+ switch (_a.label) {
892
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteProductRiskCarrier(productCode, authorization, options)];
893
+ case 1:
894
+ localVarAxiosArgs = _a.sent();
895
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
896
+ }
897
+ });
898
+ });
899
+ },
746
900
  /**
747
901
  * Permanently deletes the Product Version Category Account. Supply the unique code that was returned when you created the Product Version Category Account and this will delete it. **Required Permissions** \"accounting-management.financial-accounts.delete\"
748
902
  * @summary Delete the Product Version Category Account
@@ -911,6 +1065,28 @@ var ProductAccountMappingsApiFp = function (configuration) {
911
1065
  });
912
1066
  });
913
1067
  },
1068
+ /**
1069
+ * Updates the specified Product Risk Carrier by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"accounting-management.financial-accounts.update\"
1070
+ * @summary Update the Product Risk Carrier
1071
+ * @param {string} productCode
1072
+ * @param {PutProductRiskCarrierBodyDto} putProductRiskCarrierBodyDto
1073
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1074
+ * @param {*} [options] Override http request option.
1075
+ * @throws {RequiredError}
1076
+ */
1077
+ putProductRiskCarrier: function (productCode, putProductRiskCarrierBodyDto, authorization, options) {
1078
+ return __awaiter(this, void 0, void 0, function () {
1079
+ var localVarAxiosArgs;
1080
+ return __generator(this, function (_a) {
1081
+ switch (_a.label) {
1082
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.putProductRiskCarrier(productCode, putProductRiskCarrierBodyDto, authorization, options)];
1083
+ case 1:
1084
+ localVarAxiosArgs = _a.sent();
1085
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1086
+ }
1087
+ });
1088
+ });
1089
+ },
914
1090
  /**
915
1091
  * Updates the specified Product Version Category Account by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"accounting-management.financial-accounts.update\"
916
1092
  * @summary Update the Product Version Category Account
@@ -971,6 +1147,17 @@ var ProductAccountMappingsApiFactory = function (configuration, basePath, axios)
971
1147
  deleteProductCategoryAccount: function (productCode, category, authorization, options) {
972
1148
  return localVarFp.deleteProductCategoryAccount(productCode, category, authorization, options).then(function (request) { return request(axios, basePath); });
973
1149
  },
1150
+ /**
1151
+ * Permanently deletes the Product Risk Carrier. Supply the unique code that was returned when you created the Product Risk Carrier and this will delete it. **Required Permissions** \"accounting-management.financial-accounts.delete\"
1152
+ * @summary Delete the Product Risk Carrier
1153
+ * @param {string} productCode
1154
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1155
+ * @param {*} [options] Override http request option.
1156
+ * @throws {RequiredError}
1157
+ */
1158
+ deleteProductRiskCarrier: function (productCode, authorization, options) {
1159
+ return localVarFp.deleteProductRiskCarrier(productCode, authorization, options).then(function (request) { return request(axios, basePath); });
1160
+ },
974
1161
  /**
975
1162
  * Permanently deletes the Product Version Category Account. Supply the unique code that was returned when you created the Product Version Category Account and this will delete it. **Required Permissions** \"accounting-management.financial-accounts.delete\"
976
1163
  * @summary Delete the Product Version Category Account
@@ -1069,6 +1256,18 @@ var ProductAccountMappingsApiFactory = function (configuration, basePath, axios)
1069
1256
  putProductCategoryAccount: function (productCode, category, putProductCategoryAccountBodyDto, authorization, options) {
1070
1257
  return localVarFp.putProductCategoryAccount(productCode, category, putProductCategoryAccountBodyDto, authorization, options).then(function (request) { return request(axios, basePath); });
1071
1258
  },
1259
+ /**
1260
+ * Updates the specified Product Risk Carrier by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"accounting-management.financial-accounts.update\"
1261
+ * @summary Update the Product Risk Carrier
1262
+ * @param {string} productCode
1263
+ * @param {PutProductRiskCarrierBodyDto} putProductRiskCarrierBodyDto
1264
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1265
+ * @param {*} [options] Override http request option.
1266
+ * @throws {RequiredError}
1267
+ */
1268
+ putProductRiskCarrier: function (productCode, putProductRiskCarrierBodyDto, authorization, options) {
1269
+ return localVarFp.putProductRiskCarrier(productCode, putProductRiskCarrierBodyDto, authorization, options).then(function (request) { return request(axios, basePath); });
1270
+ },
1072
1271
  /**
1073
1272
  * Updates the specified Product Version Category Account by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"accounting-management.financial-accounts.update\"
1074
1273
  * @summary Update the Product Version Category Account
@@ -1121,6 +1320,18 @@ var ProductAccountMappingsApi = /** @class */ (function (_super) {
1121
1320
  var _this = this;
1122
1321
  return (0, exports.ProductAccountMappingsApiFp)(this.configuration).deleteProductCategoryAccount(requestParameters.productCode, requestParameters.category, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1123
1322
  };
1323
+ /**
1324
+ * Permanently deletes the Product Risk Carrier. Supply the unique code that was returned when you created the Product Risk Carrier and this will delete it. **Required Permissions** \"accounting-management.financial-accounts.delete\"
1325
+ * @summary Delete the Product Risk Carrier
1326
+ * @param {ProductAccountMappingsApiDeleteProductRiskCarrierRequest} requestParameters Request parameters.
1327
+ * @param {*} [options] Override http request option.
1328
+ * @throws {RequiredError}
1329
+ * @memberof ProductAccountMappingsApi
1330
+ */
1331
+ ProductAccountMappingsApi.prototype.deleteProductRiskCarrier = function (requestParameters, options) {
1332
+ var _this = this;
1333
+ return (0, exports.ProductAccountMappingsApiFp)(this.configuration).deleteProductRiskCarrier(requestParameters.productCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1334
+ };
1124
1335
  /**
1125
1336
  * Permanently deletes the Product Version Category Account. Supply the unique code that was returned when you created the Product Version Category Account and this will delete it. **Required Permissions** \"accounting-management.financial-accounts.delete\"
1126
1337
  * @summary Delete the Product Version Category Account
@@ -1207,6 +1418,18 @@ var ProductAccountMappingsApi = /** @class */ (function (_super) {
1207
1418
  var _this = this;
1208
1419
  return (0, exports.ProductAccountMappingsApiFp)(this.configuration).putProductCategoryAccount(requestParameters.productCode, requestParameters.category, requestParameters.putProductCategoryAccountBodyDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1209
1420
  };
1421
+ /**
1422
+ * Updates the specified Product Risk Carrier by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"accounting-management.financial-accounts.update\"
1423
+ * @summary Update the Product Risk Carrier
1424
+ * @param {ProductAccountMappingsApiPutProductRiskCarrierRequest} requestParameters Request parameters.
1425
+ * @param {*} [options] Override http request option.
1426
+ * @throws {RequiredError}
1427
+ * @memberof ProductAccountMappingsApi
1428
+ */
1429
+ ProductAccountMappingsApi.prototype.putProductRiskCarrier = function (requestParameters, options) {
1430
+ var _this = this;
1431
+ return (0, exports.ProductAccountMappingsApiFp)(this.configuration).putProductRiskCarrier(requestParameters.productCode, requestParameters.putProductRiskCarrierBodyDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1432
+ };
1210
1433
  /**
1211
1434
  * Updates the specified Product Version Category Account by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"accounting-management.financial-accounts.update\"
1212
1435
  * @summary Update the Product Version Category Account
package/dist/base.d.ts CHANGED
@@ -22,9 +22,19 @@ export declare const COLLECTION_FORMATS: {
22
22
  tsv: string;
23
23
  pipes: string;
24
24
  };
25
+ export interface SessionClass {
26
+ sub: string;
27
+ username?: string;
28
+ email?: string;
29
+ tenantSlug?: string;
30
+ permissions?: string;
31
+ expiresAt?: number;
32
+ }
25
33
  export interface LoginClass {
26
34
  accessToken: string;
27
35
  permissions: string;
36
+ authMode?: string;
37
+ session?: SessionClass;
28
38
  }
29
39
  export interface SwitchWorkspaceRequest {
30
40
  username: string;
@@ -33,6 +43,8 @@ export interface SwitchWorkspaceRequest {
33
43
  export interface SwitchWorkspaceResponseClass {
34
44
  accessToken: string;
35
45
  permissions: string;
46
+ authMode?: string;
47
+ session?: SessionClass;
36
48
  }
37
49
  export declare enum Environment {
38
50
  Production = "https://apiv2.emil.de",
@@ -63,6 +75,18 @@ export declare class BaseAPI {
63
75
  protected configuration: Configuration | undefined;
64
76
  private tokenData?;
65
77
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
78
+ private sessionAccount;
79
+ private authBasePath;
80
+ private usesSession;
81
+ private useSessionAuth;
82
+ private useHeaderAuth;
83
+ private applyTokenReply;
84
+ private sessionHeaders;
85
+ private withCurrentAuth;
86
+ private canRetryWithToken;
87
+ private canResend;
88
+ private switchToToken;
89
+ private retryWithToken;
66
90
  selectEnvironment(env: Environment): void;
67
91
  selectBasePath(path: string): void;
68
92
  getPermissions(): Array<string>;