@emilgroup/accounting-sdk 1.34.1-beta.102 → 1.34.1-beta.103

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 +239 -43
  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 +120 -64
  16. package/dist/api/booking-entries-api.d.ts +5 -5
  17. package/dist/api/booking-entries-api.js +67 -38
  18. package/dist/api/commission-account-mappings-api.d.ts +8 -8
  19. package/dist/api/commission-account-mappings-api.js +108 -61
  20. package/dist/api/financial-accounts-api.d.ts +5 -5
  21. package/dist/api/financial-accounts-api.js +67 -38
  22. package/dist/api/financial-transactions-api.d.ts +2 -2
  23. package/dist/api/financial-transactions-api.js +22 -14
  24. package/dist/api/health-api.d.ts +1 -1
  25. package/dist/api/health-api.js +1 -1
  26. package/dist/api/number-ranges-api.d.ts +4 -4
  27. package/dist/api/number-ranges-api.js +52 -30
  28. package/dist/api/personal-accounts-api.d.ts +4 -4
  29. package/dist/api/personal-accounts-api.js +52 -30
  30. package/dist/api/product-account-mappings-api.d.ts +12 -12
  31. package/dist/api/product-account-mappings-api.js +172 -94
  32. package/dist/base.d.ts +26 -0
  33. package/dist/base.js +243 -60
  34. package/dist/common.d.ts +1 -1
  35. package/dist/common.js +1 -0
  36. package/dist/configuration.d.ts +17 -0
  37. package/dist/configuration.js +2 -0
  38. package/package.json +2 -2
@@ -103,9 +103,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
103
103
  createAndEnableSubledger: function (createAndEnableSubledgerRequestDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
107
+ var _a;
108
+ return __generator(this, function (_b) {
109
+ switch (_b.label) {
109
110
  case 0:
110
111
  // verify required parameter 'createAndEnableSubledgerRequestDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('createAndEnableSubledger', 'createAndEnableSubledgerRequestDto', createAndEnableSubledgerRequestDto);
@@ -120,13 +121,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
120
121
  localVarQueryParameter = {};
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
127
+ ];
124
128
  case 1:
125
129
  // authentication bearer required
126
130
  // http bearer authentication required
127
- _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ _b.sent();
132
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
133
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
134
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
135
+ if (authorizationValue || authorizationKeepEmpty) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
137
  }
131
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -152,9 +159,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
152
159
  createAndEnableSubledgerFromFile: function (file, authorization, options) {
153
160
  if (options === void 0) { options = {}; }
154
161
  return __awaiter(_this, void 0, void 0, function () {
155
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
156
- return __generator(this, function (_a) {
157
- switch (_a.label) {
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
163
+ var _a;
164
+ return __generator(this, function (_b) {
165
+ switch (_b.label) {
158
166
  case 0:
159
167
  // verify required parameter 'file' is not null or undefined
160
168
  (0, common_1.assertParamExists)('createAndEnableSubledgerFromFile', 'file', file);
@@ -170,13 +178,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
170
178
  localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
171
179
  // authentication bearer required
172
180
  // http bearer authentication required
173
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
181
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
182
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
183
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
184
+ ];
174
185
  case 1:
175
186
  // authentication bearer required
176
187
  // http bearer authentication required
177
- _a.sent();
178
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
188
+ _b.sent();
189
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
190
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
191
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
192
+ if (authorizationValue || authorizationKeepEmpty) {
193
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
180
194
  }
181
195
  if (file !== undefined) {
182
196
  localVarFormParams.append('file', file);
@@ -203,9 +217,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
203
217
  exportAccountingConfig: function (authorization, options) {
204
218
  if (options === void 0) { options = {}; }
205
219
  return __awaiter(_this, void 0, void 0, function () {
206
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
207
- return __generator(this, function (_a) {
208
- switch (_a.label) {
220
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
221
+ var _a;
222
+ return __generator(this, function (_b) {
223
+ switch (_b.label) {
209
224
  case 0:
210
225
  localVarPath = "/accountingservice/v1/subledger/config/export";
211
226
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -218,13 +233,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
218
233
  localVarQueryParameter = {};
219
234
  // authentication bearer required
220
235
  // http bearer authentication required
221
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
236
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
237
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
238
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
239
+ ];
222
240
  case 1:
223
241
  // authentication bearer required
224
242
  // http bearer authentication required
225
- _a.sent();
226
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
243
+ _b.sent();
244
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
245
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
246
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
247
+ if (authorizationValue || authorizationKeepEmpty) {
248
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
228
249
  }
229
250
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
230
251
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -247,9 +268,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
247
268
  getAccountingCategories: function (authorization, options) {
248
269
  if (options === void 0) { options = {}; }
249
270
  return __awaiter(_this, void 0, void 0, function () {
250
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
251
- return __generator(this, function (_a) {
252
- switch (_a.label) {
271
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
272
+ var _a;
273
+ return __generator(this, function (_b) {
274
+ switch (_b.label) {
253
275
  case 0:
254
276
  localVarPath = "/accountingservice/v1/subledger/categories";
255
277
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -262,13 +284,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
262
284
  localVarQueryParameter = {};
263
285
  // authentication bearer required
264
286
  // http bearer authentication required
265
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
287
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
288
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
289
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
290
+ ];
266
291
  case 1:
267
292
  // authentication bearer required
268
293
  // http bearer authentication required
269
- _a.sent();
270
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
271
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
294
+ _b.sent();
295
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
296
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
297
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
298
+ if (authorizationValue || authorizationKeepEmpty) {
299
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
272
300
  }
273
301
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
274
302
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -291,9 +319,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
291
319
  getActivationSnapshot: function (authorization, options) {
292
320
  if (options === void 0) { options = {}; }
293
321
  return __awaiter(_this, void 0, void 0, function () {
294
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
295
- return __generator(this, function (_a) {
296
- switch (_a.label) {
322
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
323
+ var _a;
324
+ return __generator(this, function (_b) {
325
+ switch (_b.label) {
297
326
  case 0:
298
327
  localVarPath = "/accountingservice/v1/subledger/activation-snapshot";
299
328
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -306,13 +335,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
306
335
  localVarQueryParameter = {};
307
336
  // authentication bearer required
308
337
  // http bearer authentication required
309
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
338
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
339
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
340
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
341
+ ];
310
342
  case 1:
311
343
  // authentication bearer required
312
344
  // http bearer authentication required
313
- _a.sent();
314
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
315
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
345
+ _b.sent();
346
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
347
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
348
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
349
+ if (authorizationValue || authorizationKeepEmpty) {
350
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
316
351
  }
317
352
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
318
353
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -335,9 +370,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
335
370
  resetSubledger: function (authorization, options) {
336
371
  if (options === void 0) { options = {}; }
337
372
  return __awaiter(_this, void 0, void 0, function () {
338
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
339
- return __generator(this, function (_a) {
340
- switch (_a.label) {
373
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
374
+ var _a;
375
+ return __generator(this, function (_b) {
376
+ switch (_b.label) {
341
377
  case 0:
342
378
  localVarPath = "/accountingservice/v1/subledger/reset";
343
379
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -350,13 +386,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
350
386
  localVarQueryParameter = {};
351
387
  // authentication bearer required
352
388
  // http bearer authentication required
353
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
389
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
390
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
391
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
392
+ ];
354
393
  case 1:
355
394
  // authentication bearer required
356
395
  // http bearer authentication required
357
- _a.sent();
358
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
359
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
396
+ _b.sent();
397
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
398
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
399
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
400
+ if (authorizationValue || authorizationKeepEmpty) {
401
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
360
402
  }
361
403
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
362
404
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -380,9 +422,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
380
422
  validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
381
423
  if (options === void 0) { options = {}; }
382
424
  return __awaiter(_this, void 0, void 0, function () {
383
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
384
- return __generator(this, function (_a) {
385
- switch (_a.label) {
425
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
426
+ var _a;
427
+ return __generator(this, function (_b) {
428
+ switch (_b.label) {
386
429
  case 0:
387
430
  // verify required parameter 'validateAccountingConfigRequestDto' is not null or undefined
388
431
  (0, common_1.assertParamExists)('validateAccountingConfig', 'validateAccountingConfigRequestDto', validateAccountingConfigRequestDto);
@@ -397,13 +440,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
397
440
  localVarQueryParameter = {};
398
441
  // authentication bearer required
399
442
  // http bearer authentication required
400
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
443
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
444
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
445
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
446
+ ];
401
447
  case 1:
402
448
  // authentication bearer required
403
449
  // http bearer authentication required
404
- _a.sent();
405
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
406
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
450
+ _b.sent();
451
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
452
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
453
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
454
+ if (authorizationValue || authorizationKeepEmpty) {
455
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
407
456
  }
408
457
  localVarHeaderParameter['Content-Type'] = 'application/json';
409
458
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -429,9 +478,10 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
429
478
  validateAccountingConfigFromFile: function (file, authorization, options) {
430
479
  if (options === void 0) { options = {}; }
431
480
  return __awaiter(_this, void 0, void 0, function () {
432
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
433
- return __generator(this, function (_a) {
434
- switch (_a.label) {
481
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
482
+ var _a;
483
+ return __generator(this, function (_b) {
484
+ switch (_b.label) {
435
485
  case 0:
436
486
  // verify required parameter 'file' is not null or undefined
437
487
  (0, common_1.assertParamExists)('validateAccountingConfigFromFile', 'file', file);
@@ -447,13 +497,19 @@ var AccountingConfigsApiAxiosParamCreator = function (configuration) {
447
497
  localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
448
498
  // authentication bearer required
449
499
  // http bearer authentication required
450
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
500
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
501
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
502
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
503
+ ];
451
504
  case 1:
452
505
  // authentication bearer required
453
506
  // http bearer authentication required
454
- _a.sent();
455
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
456
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
507
+ _b.sent();
508
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
509
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
510
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
511
+ if (authorizationValue || authorizationKeepEmpty) {
512
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
457
513
  }
458
514
  if (file !== undefined) {
459
515
  localVarFormParams.append('file', file);
@@ -762,7 +818,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
762
818
  */
763
819
  AccountingConfigsApi.prototype.createAndEnableSubledger = function (requestParameters, options) {
764
820
  var _this = this;
765
- return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
821
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
766
822
  };
767
823
  /**
768
824
  * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -774,7 +830,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
774
830
  */
775
831
  AccountingConfigsApi.prototype.createAndEnableSubledgerFromFile = function (requestParameters, options) {
776
832
  var _this = this;
777
- return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
833
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
778
834
  };
779
835
  /**
780
836
  * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -787,7 +843,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
787
843
  AccountingConfigsApi.prototype.exportAccountingConfig = function (requestParameters, options) {
788
844
  var _this = this;
789
845
  if (requestParameters === void 0) { requestParameters = {}; }
790
- return (0, exports.AccountingConfigsApiFp)(this.configuration).exportAccountingConfig(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
846
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).exportAccountingConfig(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
791
847
  };
792
848
  /**
793
849
  * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
@@ -800,7 +856,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
800
856
  AccountingConfigsApi.prototype.getAccountingCategories = function (requestParameters, options) {
801
857
  var _this = this;
802
858
  if (requestParameters === void 0) { requestParameters = {}; }
803
- return (0, exports.AccountingConfigsApiFp)(this.configuration).getAccountingCategories(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
859
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getAccountingCategories(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
804
860
  };
805
861
  /**
806
862
  * 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\"
@@ -813,7 +869,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
813
869
  AccountingConfigsApi.prototype.getActivationSnapshot = function (requestParameters, options) {
814
870
  var _this = this;
815
871
  if (requestParameters === void 0) { requestParameters = {}; }
816
- return (0, exports.AccountingConfigsApiFp)(this.configuration).getActivationSnapshot(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
872
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getActivationSnapshot(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
817
873
  };
818
874
  /**
819
875
  * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
@@ -826,7 +882,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
826
882
  AccountingConfigsApi.prototype.resetSubledger = function (requestParameters, options) {
827
883
  var _this = this;
828
884
  if (requestParameters === void 0) { requestParameters = {}; }
829
- return (0, exports.AccountingConfigsApiFp)(this.configuration).resetSubledger(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
885
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).resetSubledger(requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
830
886
  };
831
887
  /**
832
888
  * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -838,7 +894,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
838
894
  */
839
895
  AccountingConfigsApi.prototype.validateAccountingConfig = function (requestParameters, options) {
840
896
  var _this = this;
841
- return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
897
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
842
898
  };
843
899
  /**
844
900
  * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
@@ -850,7 +906,7 @@ var AccountingConfigsApi = /** @class */ (function (_super) {
850
906
  */
851
907
  AccountingConfigsApi.prototype.validateAccountingConfigFromFile = function (requestParameters, options) {
852
908
  var _this = this;
853
- return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
909
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
854
910
  };
855
911
  return AccountingConfigsApi;
856
912
  }(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
  }