@emilgroup/accounting-sdk-node 1.32.1-beta.104 → 1.32.1-beta.106

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 (38) hide show
  1. package/README.md +2 -2
  2. package/api/accounting-configs-api.ts +64 -24
  3. package/api/booking-entries-api.ts +40 -15
  4. package/api/commission-account-mappings-api.ts +64 -24
  5. package/api/financial-accounts-api.ts +40 -15
  6. package/api/financial-transactions-api.ts +16 -6
  7. package/api/health-api.ts +1 -1
  8. package/api/number-ranges-api.ts +32 -12
  9. package/api/personal-accounts-api.ts +32 -12
  10. package/api/product-account-mappings-api.ts +96 -36
  11. package/base.ts +4 -0
  12. package/common.ts +3 -2
  13. package/dist/api/accounting-configs-api.d.ts +8 -8
  14. package/dist/api/accounting-configs-api.js +120 -64
  15. package/dist/api/booking-entries-api.d.ts +5 -5
  16. package/dist/api/booking-entries-api.js +67 -38
  17. package/dist/api/commission-account-mappings-api.d.ts +8 -8
  18. package/dist/api/commission-account-mappings-api.js +108 -61
  19. package/dist/api/financial-accounts-api.d.ts +5 -5
  20. package/dist/api/financial-accounts-api.js +67 -38
  21. package/dist/api/financial-transactions-api.d.ts +2 -2
  22. package/dist/api/financial-transactions-api.js +22 -14
  23. package/dist/api/health-api.d.ts +1 -1
  24. package/dist/api/health-api.js +1 -1
  25. package/dist/api/number-ranges-api.d.ts +4 -4
  26. package/dist/api/number-ranges-api.js +52 -30
  27. package/dist/api/personal-accounts-api.d.ts +4 -4
  28. package/dist/api/personal-accounts-api.js +52 -30
  29. package/dist/api/product-account-mappings-api.d.ts +12 -12
  30. package/dist/api/product-account-mappings-api.js +172 -94
  31. package/dist/base.d.ts +1 -0
  32. package/dist/base.js +3 -0
  33. package/dist/common.d.ts +1 -1
  34. package/dist/common.js +1 -0
  35. package/dist/models/create-booking-entry-request-dto.d.ts +1 -7
  36. package/dist/models/create-booking-entry-request-dto.js +0 -6
  37. package/models/create-booking-entry-request-dto.ts +1 -7
  38. package/package.json +2 -2
@@ -107,9 +107,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
107
107
  createAndEnableSubledger: function (createAndEnableSubledgerRequestDto, authorization, options) {
108
108
  if (options === void 0) { options = {}; }
109
109
  return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
- return __generator(this, function (_a) {
112
- switch (_a.label) {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
111
+ var _a;
112
+ return __generator(this, function (_b) {
113
+ switch (_b.label) {
113
114
  case 0:
114
115
  // verify required parameter 'createAndEnableSubledgerRequestDto' is not null or undefined
115
116
  (0, common_1.assertParamExists)('createAndEnableSubledger', 'createAndEnableSubledgerRequestDto', createAndEnableSubledgerRequestDto);
@@ -124,13 +125,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
124
125
  localVarQueryParameter = {};
125
126
  // authentication bearer required
126
127
  // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
130
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
131
+ ];
128
132
  case 1:
129
133
  // authentication bearer required
130
134
  // http bearer authentication required
131
- _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ _b.sent();
136
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
137
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
138
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
139
+ if (authorizationValue || authorizationKeepEmpty) {
140
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
141
  }
135
142
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
143
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -156,9 +163,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
156
163
  createAndEnableSubledgerFromFile: function (file, authorization, options) {
157
164
  if (options === void 0) { options = {}; }
158
165
  return __awaiter(_this, void 0, void 0, function () {
159
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
166
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
167
+ var _a;
168
+ return __generator(this, function (_b) {
169
+ switch (_b.label) {
162
170
  case 0:
163
171
  // verify required parameter 'file' is not null or undefined
164
172
  (0, common_1.assertParamExists)('createAndEnableSubledgerFromFile', 'file', file);
@@ -174,13 +182,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
174
182
  localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
175
183
  // authentication bearer required
176
184
  // http bearer authentication required
177
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
185
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
186
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
187
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
188
+ ];
178
189
  case 1:
179
190
  // authentication bearer required
180
191
  // http bearer authentication required
181
- _a.sent();
182
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
192
+ _b.sent();
193
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
194
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
195
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
196
+ if (authorizationValue || authorizationKeepEmpty) {
197
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
198
  }
185
199
  if (file !== undefined) {
186
200
  localVarFormParams.append('file', file);
@@ -208,9 +222,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
208
222
  exportAccountingConfig: function (authorization, options) {
209
223
  if (options === void 0) { options = {}; }
210
224
  return __awaiter(_this, void 0, void 0, function () {
211
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
212
- return __generator(this, function (_a) {
213
- switch (_a.label) {
225
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
226
+ var _a;
227
+ return __generator(this, function (_b) {
228
+ switch (_b.label) {
214
229
  case 0:
215
230
  localVarPath = "/accountingservice/v1/subledger/config/export";
216
231
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -223,13 +238,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
223
238
  localVarQueryParameter = {};
224
239
  // authentication bearer required
225
240
  // http bearer authentication required
226
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
241
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
242
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
243
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
244
+ ];
227
245
  case 1:
228
246
  // authentication bearer required
229
247
  // http bearer authentication required
230
- _a.sent();
231
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
232
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
248
+ _b.sent();
249
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
250
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
251
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
252
+ if (authorizationValue || authorizationKeepEmpty) {
253
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
233
254
  }
234
255
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
235
256
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -252,9 +273,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
252
273
  getAccountingCategories: function (authorization, options) {
253
274
  if (options === void 0) { options = {}; }
254
275
  return __awaiter(_this, void 0, void 0, function () {
255
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
256
- return __generator(this, function (_a) {
257
- switch (_a.label) {
276
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
277
+ var _a;
278
+ return __generator(this, function (_b) {
279
+ switch (_b.label) {
258
280
  case 0:
259
281
  localVarPath = "/accountingservice/v1/subledger/categories";
260
282
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -267,13 +289,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
267
289
  localVarQueryParameter = {};
268
290
  // authentication bearer required
269
291
  // http bearer authentication required
270
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
292
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
293
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
294
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
295
+ ];
271
296
  case 1:
272
297
  // authentication bearer required
273
298
  // http bearer authentication required
274
- _a.sent();
275
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
276
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
299
+ _b.sent();
300
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
301
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
302
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
303
+ if (authorizationValue || authorizationKeepEmpty) {
304
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
277
305
  }
278
306
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
279
307
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -296,9 +324,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
296
324
  getActivationSnapshot: function (authorization, options) {
297
325
  if (options === void 0) { options = {}; }
298
326
  return __awaiter(_this, void 0, void 0, function () {
299
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
300
- return __generator(this, function (_a) {
301
- switch (_a.label) {
327
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
328
+ var _a;
329
+ return __generator(this, function (_b) {
330
+ switch (_b.label) {
302
331
  case 0:
303
332
  localVarPath = "/accountingservice/v1/subledger/activation-snapshot";
304
333
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -311,13 +340,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
311
340
  localVarQueryParameter = {};
312
341
  // authentication bearer required
313
342
  // http bearer authentication required
314
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
343
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
344
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
345
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
346
+ ];
315
347
  case 1:
316
348
  // authentication bearer required
317
349
  // http bearer authentication required
318
- _a.sent();
319
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
320
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
350
+ _b.sent();
351
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
352
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
353
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
354
+ if (authorizationValue || authorizationKeepEmpty) {
355
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
321
356
  }
322
357
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
323
358
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -340,9 +375,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
340
375
  resetSubledger: function (authorization, options) {
341
376
  if (options === void 0) { options = {}; }
342
377
  return __awaiter(_this, void 0, void 0, function () {
343
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
344
- return __generator(this, function (_a) {
345
- switch (_a.label) {
378
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
379
+ var _a;
380
+ return __generator(this, function (_b) {
381
+ switch (_b.label) {
346
382
  case 0:
347
383
  localVarPath = "/accountingservice/v1/subledger/reset";
348
384
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -355,13 +391,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
355
391
  localVarQueryParameter = {};
356
392
  // authentication bearer required
357
393
  // http bearer authentication required
358
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
394
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
395
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
396
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
397
+ ];
359
398
  case 1:
360
399
  // authentication bearer required
361
400
  // http bearer authentication required
362
- _a.sent();
363
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
364
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
401
+ _b.sent();
402
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
403
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
404
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
405
+ if (authorizationValue || authorizationKeepEmpty) {
406
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
365
407
  }
366
408
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
367
409
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -385,9 +427,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
385
427
  validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
386
428
  if (options === void 0) { options = {}; }
387
429
  return __awaiter(_this, void 0, void 0, function () {
388
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
389
- return __generator(this, function (_a) {
390
- switch (_a.label) {
430
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
431
+ var _a;
432
+ return __generator(this, function (_b) {
433
+ switch (_b.label) {
391
434
  case 0:
392
435
  // verify required parameter 'validateAccountingConfigRequestDto' is not null or undefined
393
436
  (0, common_1.assertParamExists)('validateAccountingConfig', 'validateAccountingConfigRequestDto', validateAccountingConfigRequestDto);
@@ -402,13 +445,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
402
445
  localVarQueryParameter = {};
403
446
  // authentication bearer required
404
447
  // http bearer authentication required
405
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
448
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
449
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
450
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
451
+ ];
406
452
  case 1:
407
453
  // authentication bearer required
408
454
  // http bearer authentication required
409
- _a.sent();
410
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
411
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
455
+ _b.sent();
456
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
457
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
458
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
459
+ if (authorizationValue || authorizationKeepEmpty) {
460
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
412
461
  }
413
462
  localVarHeaderParameter['Content-Type'] = 'application/json';
414
463
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -434,9 +483,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
434
483
  validateAccountingConfigFromFile: function (file, authorization, options) {
435
484
  if (options === void 0) { options = {}; }
436
485
  return __awaiter(_this, void 0, void 0, function () {
437
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
438
- return __generator(this, function (_a) {
439
- switch (_a.label) {
486
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
487
+ var _a;
488
+ return __generator(this, function (_b) {
489
+ switch (_b.label) {
440
490
  case 0:
441
491
  // verify required parameter 'file' is not null or undefined
442
492
  (0, common_1.assertParamExists)('validateAccountingConfigFromFile', 'file', file);
@@ -452,13 +502,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
452
502
  localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
453
503
  // authentication bearer required
454
504
  // http bearer authentication required
455
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
505
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
506
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
507
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
508
+ ];
456
509
  case 1:
457
510
  // authentication bearer required
458
511
  // http bearer authentication required
459
- _a.sent();
460
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
461
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
512
+ _b.sent();
513
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
514
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
515
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
516
+ if (authorizationValue || authorizationKeepEmpty) {
517
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
462
518
  }
463
519
  if (file !== undefined) {
464
520
  localVarFormParams.append('file', file);
@@ -768,7 +824,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
768
824
  */
769
825
  AccountingConfigsApi.prototype.createAndEnableSubledger = function (requestParameters, options) {
770
826
  var _this = this;
771
- return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
827
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
772
828
  };
773
829
  /**
774
830
  * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -780,7 +836,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
780
836
  */
781
837
  AccountingConfigsApi.prototype.createAndEnableSubledgerFromFile = function (requestParameters, options) {
782
838
  var _this = this;
783
- return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
839
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
784
840
  };
785
841
  /**
786
842
  * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -793,7 +849,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
793
849
  AccountingConfigsApi.prototype.exportAccountingConfig = function (requestParameters, options) {
794
850
  var _this = this;
795
851
  if (requestParameters === void 0) { requestParameters = {}; }
796
- return (0, exports.AccountingConfigsApiFp)(this.configuration).exportAccountingConfig(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
852
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).exportAccountingConfig(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
797
853
  };
798
854
  /**
799
855
  * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -806,7 +862,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
806
862
  AccountingConfigsApi.prototype.getAccountingCategories = function (requestParameters, options) {
807
863
  var _this = this;
808
864
  if (requestParameters === void 0) { requestParameters = {}; }
809
- return (0, exports.AccountingConfigsApiFp)(this.configuration).getAccountingCategories(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
865
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getAccountingCategories(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
810
866
  };
811
867
  /**
812
868
  * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -819,7 +875,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
819
875
  AccountingConfigsApi.prototype.getActivationSnapshot = function (requestParameters, options) {
820
876
  var _this = this;
821
877
  if (requestParameters === void 0) { requestParameters = {}; }
822
- return (0, exports.AccountingConfigsApiFp)(this.configuration).getActivationSnapshot(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
878
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getActivationSnapshot(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
823
879
  };
824
880
  /**
825
881
  * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
@@ -832,7 +888,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
832
888
  AccountingConfigsApi.prototype.resetSubledger = function (requestParameters, options) {
833
889
  var _this = this;
834
890
  if (requestParameters === void 0) { requestParameters = {}; }
835
- return (0, exports.AccountingConfigsApiFp)(this.configuration).resetSubledger(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
891
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).resetSubledger(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
836
892
  };
837
893
  /**
838
894
  * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -844,7 +900,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
844
900
  */
845
901
  AccountingConfigsApi.prototype.validateAccountingConfig = function (requestParameters, options) {
846
902
  var _this = this;
847
- return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
903
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
848
904
  };
849
905
  /**
850
906
  * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -856,7 +912,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
856
912
  */
857
913
  AccountingConfigsApi.prototype.validateAccountingConfigFromFile = function (requestParameters, options) {
858
914
  var _this = this;
859
- return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
915
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
860
916
  };
861
917
  return AccountingConfigsApi;
862
918
  }(base_1.BaseAPI));
@@ -346,7 +346,7 @@ export declare class BookingEntriesApi extends BaseAPI {
346
346
  * @throws {RequiredError}
347
347
  * @memberof BookingEntriesApi
348
348
  */
349
- createBookingEntry(requestParameters: BookingEntriesApiCreateBookingEntryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateBookingEntryResponseClass, any, {}>>;
349
+ createBookingEntry(requestParameters: BookingEntriesApiCreateBookingEntryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateBookingEntryResponseClass, any, {}, any>>;
350
350
  /**
351
351
  * Enters or restates the confirmed opening balance for one or more accounts: a first-time entry for an account with no opening-balance history yet, a restatement for one that already has some. Each item carries the confirmed balance, not the delta; the service derives the delta itself and books it, per account, against the main-ledger bridge account. **Required Permissions** \"accounting-management.financial-accounts.create\"
352
352
  * @summary Update the create or correct opening balance
@@ -355,7 +355,7 @@ export declare class BookingEntriesApi extends BaseAPI {
355
355
  * @throws {RequiredError}
356
356
  * @memberof BookingEntriesApi
357
357
  */
358
- createOrCorrectOpeningBalance(requestParameters: BookingEntriesApiCreateOrCorrectOpeningBalanceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateOrCorrectOpeningBalanceResponseClass, any, {}>>;
358
+ createOrCorrectOpeningBalance(requestParameters: BookingEntriesApiCreateOrCorrectOpeningBalanceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateOrCorrectOpeningBalanceResponseClass, any, {}, any>>;
359
359
  /**
360
360
  * This endpoint gets a booking entry. **Required Permissions** \"accounting-management.entries.view\"
361
361
  * @summary Retrieve the booking entry
@@ -364,7 +364,7 @@ export declare class BookingEntriesApi extends BaseAPI {
364
364
  * @throws {RequiredError}
365
365
  * @memberof BookingEntriesApi
366
366
  */
367
- getBookingEntry(requestParameters: BookingEntriesApiGetBookingEntryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetBookingEntryResponseClass, any, {}>>;
367
+ getBookingEntry(requestParameters: BookingEntriesApiGetBookingEntryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetBookingEntryResponseClass, any, {}, any>>;
368
368
  /**
369
369
  * This endpoint gets booking entries. Without an explicit `order` they come back newest booking date first (`bookingDate:DESC`), with the entry id ascending as the tie-break for same-day bookings. **Required Permissions** \"accounting-management.entries.view\"
370
370
  * @summary List booking entries
@@ -373,7 +373,7 @@ export declare class BookingEntriesApi extends BaseAPI {
373
373
  * @throws {RequiredError}
374
374
  * @memberof BookingEntriesApi
375
375
  */
376
- listBookingEntries(requestParameters?: BookingEntriesApiListBookingEntriesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListBookingEntriesResponseClass, any, {}>>;
376
+ listBookingEntries(requestParameters?: BookingEntriesApiListBookingEntriesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListBookingEntriesResponseClass, any, {}, any>>;
377
377
  /**
378
378
  * This endpoint posts the booking entry for an existing invoice, payment, exceeding credit, credit allocation, commission, claim regulation or payment receipt on demand. A credit allocation books nothing, so it always fails with a precondition error. The entity is fetched from the service that owns it and run through the same posting flow its domain event triggers, so the call is idempotent: an entity that is already posted returns its existing booking entry. When the flow deliberately posts nothing (subledger not active for the booking date, non-positive amount) the call fails with a precondition error carrying the reason. **Required Permissions** \"accounting-management.entries.create\"
379
379
  * @summary Create the booking entry from a source entity
@@ -382,5 +382,5 @@ export declare class BookingEntriesApi extends BaseAPI {
382
382
  * @throws {RequiredError}
383
383
  * @memberof BookingEntriesApi
384
384
  */
385
- postFinancialEvent(requestParameters: BookingEntriesApiPostFinancialEventRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PostFinancialEventResponseClass, any, {}>>;
385
+ postFinancialEvent(requestParameters: BookingEntriesApiPostFinancialEventRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PostFinancialEventResponseClass, any, {}, any>>;
386
386
  }