@emilgroup/accounting-sdk 1.34.1-beta.82 → 1.34.1-beta.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,9 +103,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
103
103
  createBookingEntry: function (createBookingEntryRequestDto, 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, authorizationValue, 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 'createBookingEntryRequestDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('createBookingEntry', 'createBookingEntryRequestDto', createBookingEntryRequestDto);
@@ -121,14 +122,17 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
124
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
124
- // Only Authorization falls back to the configured token; an empty value is never sent.
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.
125
127
  ];
126
128
  case 1:
127
129
  // authentication bearer required
128
130
  // http bearer authentication required
129
- _a.sent();
130
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
131
- if (authorizationValue) {
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) {
132
136
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
133
137
  }
134
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -155,9 +159,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
155
159
  createOrCorrectOpeningBalance: function (createOrCorrectOpeningBalanceDto, authorization, options) {
156
160
  if (options === void 0) { options = {}; }
157
161
  return __awaiter(_this, void 0, void 0, function () {
158
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
159
- return __generator(this, function (_a) {
160
- switch (_a.label) {
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
163
+ var _a;
164
+ return __generator(this, function (_b) {
165
+ switch (_b.label) {
161
166
  case 0:
162
167
  // verify required parameter 'createOrCorrectOpeningBalanceDto' is not null or undefined
163
168
  (0, common_1.assertParamExists)('createOrCorrectOpeningBalance', 'createOrCorrectOpeningBalanceDto', createOrCorrectOpeningBalanceDto);
@@ -173,14 +178,17 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
173
178
  // authentication bearer required
174
179
  // http bearer authentication required
175
180
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
176
- // Only Authorization falls back to the configured token; an empty value is never sent.
181
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
182
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
177
183
  ];
178
184
  case 1:
179
185
  // authentication bearer required
180
186
  // http bearer authentication required
181
- _a.sent();
182
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
183
- if (authorizationValue) {
187
+ _b.sent();
188
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
189
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
190
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
191
+ if (authorizationValue || authorizationKeepEmpty) {
184
192
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
185
193
  }
186
194
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -208,9 +216,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
208
216
  getBookingEntry: function (code, expand, authorization, options) {
209
217
  if (options === void 0) { options = {}; }
210
218
  return __awaiter(_this, void 0, void 0, function () {
211
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
212
- return __generator(this, function (_a) {
213
- switch (_a.label) {
219
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
220
+ var _a;
221
+ return __generator(this, function (_b) {
222
+ switch (_b.label) {
214
223
  case 0:
215
224
  // verify required parameter 'code' is not null or undefined
216
225
  (0, common_1.assertParamExists)('getBookingEntry', 'code', code);
@@ -232,12 +241,14 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
232
241
  case 1:
233
242
  // authentication bearer required
234
243
  // http bearer authentication required
235
- _a.sent();
244
+ _b.sent();
236
245
  if (expand !== undefined) {
237
246
  localVarQueryParameter['expand'] = expand;
238
247
  }
239
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
240
- if (authorizationValue) {
248
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
249
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
250
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
251
+ if (authorizationValue || authorizationKeepEmpty) {
241
252
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
242
253
  }
243
254
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -268,9 +279,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
268
279
  listBookingEntries: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
269
280
  if (options === void 0) { options = {}; }
270
281
  return __awaiter(_this, void 0, void 0, function () {
271
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
272
- return __generator(this, function (_a) {
273
- switch (_a.label) {
282
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
283
+ var _a;
284
+ return __generator(this, function (_b) {
285
+ switch (_b.label) {
274
286
  case 0:
275
287
  localVarPath = "/accountingservice/v1/booking-entries";
276
288
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -287,7 +299,7 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
287
299
  case 1:
288
300
  // authentication bearer required
289
301
  // http bearer authentication required
290
- _a.sent();
302
+ _b.sent();
291
303
  if (pageSize !== undefined) {
292
304
  localVarQueryParameter['pageSize'] = pageSize;
293
305
  }
@@ -309,8 +321,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
309
321
  if (filters !== undefined) {
310
322
  localVarQueryParameter['filters'] = filters;
311
323
  }
312
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
313
- if (authorizationValue) {
324
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
325
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
326
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
327
+ if (authorizationValue || authorizationKeepEmpty) {
314
328
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
315
329
  }
316
330
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -335,9 +349,10 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
335
349
  postFinancialEvent: function (postFinancialEventRequestDto, authorization, options) {
336
350
  if (options === void 0) { options = {}; }
337
351
  return __awaiter(_this, void 0, void 0, function () {
338
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
339
- return __generator(this, function (_a) {
340
- switch (_a.label) {
352
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
353
+ var _a;
354
+ return __generator(this, function (_b) {
355
+ switch (_b.label) {
341
356
  case 0:
342
357
  // verify required parameter 'postFinancialEventRequestDto' is not null or undefined
343
358
  (0, common_1.assertParamExists)('postFinancialEvent', 'postFinancialEventRequestDto', postFinancialEventRequestDto);
@@ -353,14 +368,17 @@ var BookingEntriesApiAxiosParamCreator = function (configuration) {
353
368
  // authentication bearer required
354
369
  // http bearer authentication required
355
370
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
356
- // Only Authorization falls back to the configured token; an empty value is never sent.
371
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
372
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
357
373
  ];
358
374
  case 1:
359
375
  // authentication bearer required
360
376
  // http bearer authentication required
361
- _a.sent();
362
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
363
- if (authorizationValue) {
377
+ _b.sent();
378
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
379
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
380
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
381
+ if (authorizationValue || authorizationKeepEmpty) {
364
382
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
365
383
  }
366
384
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -104,9 +104,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
104
104
  deleteCommissionAgreementAccount: function (commissionAgreementCode, commissionType, authorization, options) {
105
105
  if (options === void 0) { options = {}; }
106
106
  return __awaiter(_this, void 0, void 0, function () {
107
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
108
+ var _a;
109
+ return __generator(this, function (_b) {
110
+ switch (_b.label) {
110
111
  case 0:
111
112
  // verify required parameter 'commissionAgreementCode' is not null or undefined
112
113
  (0, common_1.assertParamExists)('deleteCommissionAgreementAccount', 'commissionAgreementCode', commissionAgreementCode);
@@ -126,14 +127,17 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
126
127
  // authentication bearer required
127
128
  // http bearer authentication required
128
129
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
- // Only Authorization falls back to the configured token; an empty value is never sent.
130
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
131
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
130
132
  ];
131
133
  case 1:
132
134
  // authentication bearer required
133
135
  // http bearer authentication required
134
- _a.sent();
135
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
136
- if (authorizationValue) {
136
+ _b.sent();
137
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
138
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
139
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
140
+ if (authorizationValue || authorizationKeepEmpty) {
137
141
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
138
142
  }
139
143
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -158,9 +162,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
158
162
  deleteCommissionTypeAccount: function (commissionType, authorization, options) {
159
163
  if (options === void 0) { options = {}; }
160
164
  return __awaiter(_this, void 0, void 0, function () {
161
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
162
- return __generator(this, function (_a) {
163
- switch (_a.label) {
165
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
166
+ var _a;
167
+ return __generator(this, function (_b) {
168
+ switch (_b.label) {
164
169
  case 0:
165
170
  // verify required parameter 'commissionType' is not null or undefined
166
171
  (0, common_1.assertParamExists)('deleteCommissionTypeAccount', 'commissionType', commissionType);
@@ -177,14 +182,17 @@ var CommissionAccountMappingsApiAxiosParamCreator = 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
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -209,9 +217,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
209
217
  getCommissionAgreementAccountMapping: function (commissionAgreementCode, authorization, options) {
210
218
  if (options === void 0) { options = {}; }
211
219
  return __awaiter(_this, void 0, void 0, function () {
212
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
213
- return __generator(this, function (_a) {
214
- 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) {
215
224
  case 0:
216
225
  // verify required parameter 'commissionAgreementCode' is not null or undefined
217
226
  (0, common_1.assertParamExists)('getCommissionAgreementAccountMapping', 'commissionAgreementCode', commissionAgreementCode);
@@ -228,14 +237,17 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
228
237
  // authentication bearer required
229
238
  // http bearer authentication required
230
239
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
231
- // Only Authorization falls back to the configured token; an empty value is never sent.
240
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
241
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
232
242
  ];
233
243
  case 1:
234
244
  // authentication bearer required
235
245
  // http bearer authentication required
236
- _a.sent();
237
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
238
- if (authorizationValue) {
246
+ _b.sent();
247
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
248
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
249
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
250
+ if (authorizationValue || authorizationKeepEmpty) {
239
251
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
240
252
  }
241
253
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -266,9 +278,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
266
278
  listCommissionAccountMappings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
267
279
  if (options === void 0) { options = {}; }
268
280
  return __awaiter(_this, void 0, void 0, function () {
269
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
270
- return __generator(this, function (_a) {
271
- switch (_a.label) {
281
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
282
+ var _a;
283
+ return __generator(this, function (_b) {
284
+ switch (_b.label) {
272
285
  case 0:
273
286
  localVarPath = "/accountingservice/v1/commission-account-mappings";
274
287
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -285,7 +298,7 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
285
298
  case 1:
286
299
  // authentication bearer required
287
300
  // http bearer authentication required
288
- _a.sent();
301
+ _b.sent();
289
302
  if (pageSize !== undefined) {
290
303
  localVarQueryParameter['pageSize'] = pageSize;
291
304
  }
@@ -307,8 +320,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
307
320
  if (filters !== undefined) {
308
321
  localVarQueryParameter['filters'] = filters;
309
322
  }
310
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
311
- if (authorizationValue) {
323
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
324
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
325
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
326
+ if (authorizationValue || authorizationKeepEmpty) {
312
327
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
313
328
  }
314
329
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -339,9 +354,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
339
354
  listCommissionAgreementsWithAccountMappings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
340
355
  if (options === void 0) { options = {}; }
341
356
  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) {
357
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
358
+ var _a;
359
+ return __generator(this, function (_b) {
360
+ switch (_b.label) {
345
361
  case 0:
346
362
  localVarPath = "/accountingservice/v1/commission-account-mappings/agreements";
347
363
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -358,7 +374,7 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
358
374
  case 1:
359
375
  // authentication bearer required
360
376
  // http bearer authentication required
361
- _a.sent();
377
+ _b.sent();
362
378
  if (pageSize !== undefined) {
363
379
  localVarQueryParameter['pageSize'] = pageSize;
364
380
  }
@@ -380,8 +396,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
380
396
  if (filters !== undefined) {
381
397
  localVarQueryParameter['filters'] = filters;
382
398
  }
383
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
384
- if (authorizationValue) {
399
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
400
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
401
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
402
+ if (authorizationValue || authorizationKeepEmpty) {
385
403
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
386
404
  }
387
405
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -412,9 +430,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
412
430
  listCommissionTypeAccountMappings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
413
431
  if (options === void 0) { options = {}; }
414
432
  return __awaiter(_this, void 0, void 0, function () {
415
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
416
- return __generator(this, function (_a) {
417
- switch (_a.label) {
433
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
434
+ var _a;
435
+ return __generator(this, function (_b) {
436
+ switch (_b.label) {
418
437
  case 0:
419
438
  localVarPath = "/accountingservice/v1/commission-account-mappings/types";
420
439
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -431,7 +450,7 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
431
450
  case 1:
432
451
  // authentication bearer required
433
452
  // http bearer authentication required
434
- _a.sent();
453
+ _b.sent();
435
454
  if (pageSize !== undefined) {
436
455
  localVarQueryParameter['pageSize'] = pageSize;
437
456
  }
@@ -453,8 +472,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
453
472
  if (filters !== undefined) {
454
473
  localVarQueryParameter['filters'] = filters;
455
474
  }
456
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
457
- if (authorizationValue) {
475
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
476
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
477
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
478
+ if (authorizationValue || authorizationKeepEmpty) {
458
479
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
459
480
  }
460
481
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -481,9 +502,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
481
502
  updateCommissionAgreementAccount: function (commissionAgreementCode, commissionType, updateCommissionAgreementAccountBodyDto, authorization, options) {
482
503
  if (options === void 0) { options = {}; }
483
504
  return __awaiter(_this, void 0, void 0, function () {
484
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
485
- return __generator(this, function (_a) {
486
- switch (_a.label) {
505
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
506
+ var _a;
507
+ return __generator(this, function (_b) {
508
+ switch (_b.label) {
487
509
  case 0:
488
510
  // verify required parameter 'commissionAgreementCode' is not null or undefined
489
511
  (0, common_1.assertParamExists)('updateCommissionAgreementAccount', 'commissionAgreementCode', commissionAgreementCode);
@@ -505,14 +527,17 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
505
527
  // authentication bearer required
506
528
  // http bearer authentication required
507
529
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
508
- // Only Authorization falls back to the configured token; an empty value is never sent.
530
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
531
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
509
532
  ];
510
533
  case 1:
511
534
  // authentication bearer required
512
535
  // http bearer authentication required
513
- _a.sent();
514
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
515
- if (authorizationValue) {
536
+ _b.sent();
537
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
538
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
539
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
540
+ if (authorizationValue || authorizationKeepEmpty) {
516
541
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
517
542
  }
518
543
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -540,9 +565,10 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
540
565
  updateCommissionTypeAccount: function (commissionType, updateCommissionTypeAccountBodyDto, authorization, options) {
541
566
  if (options === void 0) { options = {}; }
542
567
  return __awaiter(_this, void 0, void 0, function () {
543
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
544
- return __generator(this, function (_a) {
545
- switch (_a.label) {
568
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
569
+ var _a;
570
+ return __generator(this, function (_b) {
571
+ switch (_b.label) {
546
572
  case 0:
547
573
  // verify required parameter 'commissionType' is not null or undefined
548
574
  (0, common_1.assertParamExists)('updateCommissionTypeAccount', 'commissionType', commissionType);
@@ -561,14 +587,17 @@ var CommissionAccountMappingsApiAxiosParamCreator = function (configuration) {
561
587
  // authentication bearer required
562
588
  // http bearer authentication required
563
589
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
564
- // Only Authorization falls back to the configured token; an empty value is never sent.
590
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
591
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
565
592
  ];
566
593
  case 1:
567
594
  // authentication bearer required
568
595
  // http bearer authentication required
569
- _a.sent();
570
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
571
- if (authorizationValue) {
596
+ _b.sent();
597
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
598
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
599
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
600
+ if (authorizationValue || authorizationKeepEmpty) {
572
601
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
573
602
  }
574
603
  localVarHeaderParameter['Content-Type'] = 'application/json';