@emilgroup/accounting-sdk-node 1.32.1-beta.81 → 1.32.1-beta.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -107,9 +107,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
107
107
  createBookingEntry: function (createBookingEntryRequestDto, 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, authorizationValue, 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 'createBookingEntryRequestDto' is not null or undefined
115
116
  (0, common_1.assertParamExists)('createBookingEntry', 'createBookingEntryRequestDto', createBookingEntryRequestDto);
@@ -125,14 +126,17 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
125
126
  // authentication bearer required
126
127
  // http bearer authentication required
127
128
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
128
- // Only Authorization falls back to the configured token; an empty value is never sent.
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.
129
131
  ];
130
132
  case 1:
131
133
  // authentication bearer required
132
134
  // http bearer authentication required
133
- _a.sent();
134
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
135
- if (authorizationValue) {
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) {
136
140
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
137
141
  }
138
142
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -159,9 +163,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
159
163
  createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
160
164
  if (options === void 0) { options = {}; }
161
165
  return __awaiter(_this, void 0, void 0, function () {
162
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
163
- return __generator(this, function (_a) {
164
- switch (_a.label) {
166
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
167
+ var _a;
168
+ return __generator(this, function (_b) {
169
+ switch (_b.label) {
165
170
  case 0:
166
171
  // verify required parameter 'createOrCorrectOpeningBalanceDto' is not null or undefined
167
172
  (0, common_1.assertParamExists)('createOrCorrectOpeningBalance', 'createOrCorrectOpeningBalanceDto', createOrCorrectOpeningBalanceDto);
@@ -177,14 +182,17 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
177
182
  // authentication bearer required
178
183
  // http bearer authentication required
179
184
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
180
- // Only Authorization falls back to the configured token; an empty value is never sent.
185
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
186
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
181
187
  ];
182
188
  case 1:
183
189
  // authentication bearer required
184
190
  // http bearer authentication required
185
- _a.sent();
186
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
187
- if (authorizationValue) {
191
+ _b.sent();
192
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
193
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
194
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
195
+ if (authorizationValue || authorizationKeepEmpty) {
188
196
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
189
197
  }
190
198
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -212,9 +220,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
212
220
  getBookingEntry: function (code, expand, authorization, options) {
213
221
  if (options === void 0) { options = {}; }
214
222
  return __awaiter(_this, void 0, void 0, function () {
215
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
216
- return __generator(this, function (_a) {
217
- switch (_a.label) {
223
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
224
+ var _a;
225
+ return __generator(this, function (_b) {
226
+ switch (_b.label) {
218
227
  case 0:
219
228
  // verify required parameter 'code' is not null or undefined
220
229
  (0, common_1.assertParamExists)('getBookingEntry', 'code', code);
@@ -236,12 +245,14 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
236
245
  case 1:
237
246
  // authentication bearer required
238
247
  // http bearer authentication required
239
- _a.sent();
248
+ _b.sent();
240
249
  if (expand !== undefined) {
241
250
  localVarQueryParameter['expand'] = expand;
242
251
  }
243
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
244
- if (authorizationValue) {
252
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
253
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
254
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
255
+ if (authorizationValue || authorizationKeepEmpty) {
245
256
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
246
257
  }
247
258
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -272,9 +283,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
272
283
  listBookingEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
273
284
  if (options === void 0) { options = {}; }
274
285
  return __awaiter(_this, void 0, void 0, function () {
275
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
276
- return __generator(this, function (_a) {
277
- switch (_a.label) {
286
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
287
+ var _a;
288
+ return __generator(this, function (_b) {
289
+ switch (_b.label) {
278
290
  case 0:
279
291
  localVarPath = "/accountingservice/v1/booking-entries";
280
292
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -291,7 +303,7 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
291
303
  case 1:
292
304
  // authentication bearer required
293
305
  // http bearer authentication required
294
- _a.sent();
306
+ _b.sent();
295
307
  if (pageSize !== undefined) {
296
308
  localVarQueryParameter['pageSize'] = pageSize;
297
309
  }
@@ -313,8 +325,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
313
325
  if (filters !== undefined) {
314
326
  localVarQueryParameter['filters'] = filters;
315
327
  }
316
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
317
- if (authorizationValue) {
328
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
329
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
330
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
331
+ if (authorizationValue || authorizationKeepEmpty) {
318
332
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
319
333
  }
320
334
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -339,9 +353,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
339
353
  postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
340
354
  if (options === void 0) { options = {}; }
341
355
  return __awaiter(_this, void 0, void 0, function () {
342
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
343
- return __generator(this, function (_a) {
344
- switch (_a.label) {
356
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
357
+ var _a;
358
+ return __generator(this, function (_b) {
359
+ switch (_b.label) {
345
360
  case 0:
346
361
  // verify required parameter 'postFinancialEventRequestDto' is not null or undefined
347
362
  (0, common_1.assertParamExists)('postFinancialEvent', 'postFinancialEventRequestDto', postFinancialEventRequestDto);
@@ -357,14 +372,17 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
357
372
  // authentication bearer required
358
373
  // http bearer authentication required
359
374
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
360
- // Only Authorization falls back to the configured token; an empty value is never sent.
375
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
376
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
361
377
  ];
362
378
  case 1:
363
379
  // authentication bearer required
364
380
  // http bearer authentication required
365
- _a.sent();
366
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
367
- if (authorizationValue) {
381
+ _b.sent();
382
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
383
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
384
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
385
+ if (authorizationValue || authorizationKeepEmpty) {
368
386
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
369
387
  }
370
388
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -108,9 +108,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
108
108
  deleteCommissionAgreementAccount: function (commissionAgreementCode, commissionType, authorization, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
112
- return __generator(this, function (_a) {
113
- switch (_a.label) {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
112
+ var _a;
113
+ return __generator(this, function (_b) {
114
+ switch (_b.label) {
114
115
  case 0:
115
116
  // verify required parameter 'commissionAgreementCode' is not null or undefined
116
117
  (0, common_1.assertParamExists)('deleteCommissionAgreementAccount', 'commissionAgreementCode', commissionAgreementCode);
@@ -130,14 +131,17 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
130
131
  // authentication bearer required
131
132
  // http bearer authentication required
132
133
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
133
- // Only Authorization falls back to the configured token; an empty value is never sent.
134
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
135
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
134
136
  ];
135
137
  case 1:
136
138
  // authentication bearer required
137
139
  // http bearer authentication required
138
- _a.sent();
139
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
140
- if (authorizationValue) {
140
+ _b.sent();
141
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
142
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
143
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
144
+ if (authorizationValue || authorizationKeepEmpty) {
141
145
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
142
146
  }
143
147
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -162,9 +166,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
162
166
  deleteCommissionTypeAccount: function (commissionType, authorization, options) {
163
167
  if (options === void 0) { options = {}; }
164
168
  return __awaiter(_this, void 0, void 0, function () {
165
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
166
- return __generator(this, function (_a) {
167
- switch (_a.label) {
169
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
170
+ var _a;
171
+ return __generator(this, function (_b) {
172
+ switch (_b.label) {
168
173
  case 0:
169
174
  // verify required parameter 'commissionType' is not null or undefined
170
175
  (0, common_1.assertParamExists)('deleteCommissionTypeAccount', 'commissionType', commissionType);
@@ -181,14 +186,17 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
181
186
  // authentication bearer required
182
187
  // http bearer authentication required
183
188
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
184
- // Only Authorization falls back to the configured token; an empty value is never sent.
189
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
190
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
185
191
  ];
186
192
  case 1:
187
193
  // authentication bearer required
188
194
  // http bearer authentication required
189
- _a.sent();
190
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
191
- if (authorizationValue) {
195
+ _b.sent();
196
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
197
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
198
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
199
+ if (authorizationValue || authorizationKeepEmpty) {
192
200
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
193
201
  }
194
202
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -213,9 +221,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
213
221
  getCommissionAgreementAccountMapping: function (commissionAgreementCode, authorization, options) {
214
222
  if (options === void 0) { options = {}; }
215
223
  return __awaiter(_this, void 0, void 0, function () {
216
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
217
- return __generator(this, function (_a) {
218
- switch (_a.label) {
224
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
225
+ var _a;
226
+ return __generator(this, function (_b) {
227
+ switch (_b.label) {
219
228
  case 0:
220
229
  // verify required parameter 'commissionAgreementCode' is not null or undefined
221
230
  (0, common_1.assertParamExists)('getCommissionAgreementAccountMapping', 'commissionAgreementCode', commissionAgreementCode);
@@ -232,14 +241,17 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
232
241
  // authentication bearer required
233
242
  // http bearer authentication required
234
243
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
235
- // Only Authorization falls back to the configured token; an empty value is never sent.
244
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
245
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
236
246
  ];
237
247
  case 1:
238
248
  // authentication bearer required
239
249
  // http bearer authentication required
240
- _a.sent();
241
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
242
- if (authorizationValue) {
250
+ _b.sent();
251
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
252
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
253
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
254
+ if (authorizationValue || authorizationKeepEmpty) {
243
255
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
244
256
  }
245
257
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -270,9 +282,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
270
282
  listCommissionAccountMappings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
271
283
  if (options === void 0) { options = {}; }
272
284
  return __awaiter(_this, void 0, void 0, function () {
273
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
274
- return __generator(this, function (_a) {
275
- switch (_a.label) {
285
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
286
+ var _a;
287
+ return __generator(this, function (_b) {
288
+ switch (_b.label) {
276
289
  case 0:
277
290
  localVarPath = "/accountingservice/v1/commission-account-mappings";
278
291
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -289,7 +302,7 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
289
302
  case 1:
290
303
  // authentication bearer required
291
304
  // http bearer authentication required
292
- _a.sent();
305
+ _b.sent();
293
306
  if (pageSize !== undefined) {
294
307
  localVarQueryParameter['pageSize'] = pageSize;
295
308
  }
@@ -311,8 +324,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
311
324
  if (filters !== undefined) {
312
325
  localVarQueryParameter['filters'] = filters;
313
326
  }
314
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
315
- if (authorizationValue) {
327
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
328
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
329
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
330
+ if (authorizationValue || authorizationKeepEmpty) {
316
331
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
317
332
  }
318
333
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -343,9 +358,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
343
358
  listCommissionAgreementsWithAccountMappings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
344
359
  if (options === void 0) { options = {}; }
345
360
  return __awaiter(_this, void 0, void 0, function () {
346
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
347
- return __generator(this, function (_a) {
348
- switch (_a.label) {
361
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
362
+ var _a;
363
+ return __generator(this, function (_b) {
364
+ switch (_b.label) {
349
365
  case 0:
350
366
  localVarPath = "/accountingservice/v1/commission-account-mappings/agreements";
351
367
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -362,7 +378,7 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
362
378
  case 1:
363
379
  // authentication bearer required
364
380
  // http bearer authentication required
365
- _a.sent();
381
+ _b.sent();
366
382
  if (pageSize !== undefined) {
367
383
  localVarQueryParameter['pageSize'] = pageSize;
368
384
  }
@@ -384,8 +400,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
384
400
  if (filters !== undefined) {
385
401
  localVarQueryParameter['filters'] = filters;
386
402
  }
387
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
388
- if (authorizationValue) {
403
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
404
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
405
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
406
+ if (authorizationValue || authorizationKeepEmpty) {
389
407
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
390
408
  }
391
409
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -416,9 +434,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
416
434
  listCommissionTypeAccountMappings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
417
435
  if (options === void 0) { options = {}; }
418
436
  return __awaiter(_this, void 0, void 0, function () {
419
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
420
- return __generator(this, function (_a) {
421
- switch (_a.label) {
437
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
438
+ var _a;
439
+ return __generator(this, function (_b) {
440
+ switch (_b.label) {
422
441
  case 0:
423
442
  localVarPath = "/accountingservice/v1/commission-account-mappings/types";
424
443
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -435,7 +454,7 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
435
454
  case 1:
436
455
  // authentication bearer required
437
456
  // http bearer authentication required
438
- _a.sent();
457
+ _b.sent();
439
458
  if (pageSize !== undefined) {
440
459
  localVarQueryParameter['pageSize'] = pageSize;
441
460
  }
@@ -457,8 +476,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
457
476
  if (filters !== undefined) {
458
477
  localVarQueryParameter['filters'] = filters;
459
478
  }
460
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
461
- if (authorizationValue) {
479
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
480
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
481
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
482
+ if (authorizationValue || authorizationKeepEmpty) {
462
483
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
463
484
  }
464
485
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -485,9 +506,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
485
506
  updateCommissionAgreementAccount: function (commissionAgreementCode, commissionType, updateCommissionAgreementAccountBodyDto, authorization, options) {
486
507
  if (options === void 0) { options = {}; }
487
508
  return __awaiter(_this, void 0, void 0, function () {
488
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
489
- return __generator(this, function (_a) {
490
- switch (_a.label) {
509
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
510
+ var _a;
511
+ return __generator(this, function (_b) {
512
+ switch (_b.label) {
491
513
  case 0:
492
514
  // verify required parameter 'commissionAgreementCode' is not null or undefined
493
515
  (0, common_1.assertParamExists)('updateCommissionAgreementAccount', 'commissionAgreementCode', commissionAgreementCode);
@@ -509,14 +531,17 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
509
531
  // authentication bearer required
510
532
  // http bearer authentication required
511
533
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
512
- // Only Authorization falls back to the configured token; an empty value is never sent.
534
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
535
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
513
536
  ];
514
537
  case 1:
515
538
  // authentication bearer required
516
539
  // http bearer authentication required
517
- _a.sent();
518
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
519
- if (authorizationValue) {
540
+ _b.sent();
541
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
542
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
543
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
544
+ if (authorizationValue || authorizationKeepEmpty) {
520
545
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
521
546
  }
522
547
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -544,9 +569,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
544
569
  updateCommissionTypeAccount: function (commissionType, updateCommissionTypeAccountBodyDto, authorization, options) {
545
570
  if (options === void 0) { options = {}; }
546
571
  return __awaiter(_this, void 0, void 0, function () {
547
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
548
- return __generator(this, function (_a) {
549
- switch (_a.label) {
572
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
573
+ var _a;
574
+ return __generator(this, function (_b) {
575
+ switch (_b.label) {
550
576
  case 0:
551
577
  // verify required parameter 'commissionType' is not null or undefined
552
578
  (0, common_1.assertParamExists)('updateCommissionTypeAccount', 'commissionType', commissionType);
@@ -565,14 +591,17 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
565
591
  // authentication bearer required
566
592
  // http bearer authentication required
567
593
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
568
- // Only Authorization falls back to the configured token; an empty value is never sent.
594
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
595
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
569
596
  ];
570
597
  case 1:
571
598
  // authentication bearer required
572
599
  // http bearer authentication required
573
- _a.sent();
574
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
575
- if (authorizationValue) {
600
+ _b.sent();
601
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
602
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
603
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
604
+ if (authorizationValue || authorizationKeepEmpty) {
576
605
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
577
606
  }
578
607
  localVarHeaderParameter['Content-Type'] = 'application/json';