@emilgroup/document-sdk-node 1.49.1-beta.35 → 1.49.1-beta.37

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,10 +107,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
107
107
  createDocument: function (createDocumentRequestDto, 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, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
111
- var _a;
112
- return __generator(this, function (_b) {
113
- switch (_b.label) {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
114
113
  case 0:
115
114
  // verify required parameter 'createDocumentRequestDto' is not null or undefined
116
115
  (0, common_1.assertParamExists)('createDocument', 'createDocumentRequestDto', createDocumentRequestDto);
@@ -125,19 +124,13 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
125
124
  localVarQueryParameter = {};
126
125
  // authentication bearer required
127
126
  // http bearer authentication required
128
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
130
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
131
- ];
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
132
128
  case 1:
133
129
  // authentication bearer required
134
130
  // http bearer authentication required
135
- _b.sent();
136
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
137
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
138
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
139
- if (authorizationValue || authorizationKeepEmpty) {
140
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
141
134
  }
142
135
  localVarHeaderParameter['Content-Type'] = 'application/json';
143
136
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -163,10 +156,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
163
156
  createPresignedPost: function (createPresignedPostRequestDto, authorization, options) {
164
157
  if (options === void 0) { options = {}; }
165
158
  return __awaiter(_this, void 0, void 0, function () {
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) {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
170
162
  case 0:
171
163
  // verify required parameter 'createPresignedPostRequestDto' is not null or undefined
172
164
  (0, common_1.assertParamExists)('createPresignedPost', 'createPresignedPostRequestDto', createPresignedPostRequestDto);
@@ -181,19 +173,13 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
181
173
  localVarQueryParameter = {};
182
174
  // authentication bearer required
183
175
  // http bearer authentication required
184
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
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.
187
- ];
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
188
177
  case 1:
189
178
  // authentication bearer required
190
179
  // http bearer authentication required
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) {
196
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
180
+ _a.sent();
181
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
197
183
  }
198
184
  localVarHeaderParameter['Content-Type'] = 'application/json';
199
185
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -219,10 +205,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
219
205
  createQrBillDocument: function (createQrBillDocumentRequestDto, authorization, options) {
220
206
  if (options === void 0) { options = {}; }
221
207
  return __awaiter(_this, void 0, void 0, function () {
222
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
223
- var _a;
224
- return __generator(this, function (_b) {
225
- switch (_b.label) {
208
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
+ return __generator(this, function (_a) {
210
+ switch (_a.label) {
226
211
  case 0:
227
212
  // verify required parameter 'createQrBillDocumentRequestDto' is not null or undefined
228
213
  (0, common_1.assertParamExists)('createQrBillDocument', 'createQrBillDocumentRequestDto', createQrBillDocumentRequestDto);
@@ -237,19 +222,13 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
237
222
  localVarQueryParameter = {};
238
223
  // authentication bearer required
239
224
  // http bearer authentication required
240
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
241
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
242
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
243
- ];
225
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
244
226
  case 1:
245
227
  // authentication bearer required
246
228
  // http bearer authentication required
247
- _b.sent();
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) {
252
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
229
+ _a.sent();
230
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
253
232
  }
254
233
  localVarHeaderParameter['Content-Type'] = 'application/json';
255
234
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -275,10 +254,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
275
254
  deleteDocument: function (code, authorization, options) {
276
255
  if (options === void 0) { options = {}; }
277
256
  return __awaiter(_this, void 0, void 0, function () {
278
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
279
- var _a;
280
- return __generator(this, function (_b) {
281
- switch (_b.label) {
257
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
258
+ return __generator(this, function (_a) {
259
+ switch (_a.label) {
282
260
  case 0:
283
261
  // verify required parameter 'code' is not null or undefined
284
262
  (0, common_1.assertParamExists)('deleteDocument', 'code', code);
@@ -294,19 +272,13 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
294
272
  localVarQueryParameter = {};
295
273
  // authentication bearer required
296
274
  // http bearer authentication required
297
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
298
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
299
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
300
- ];
275
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
301
276
  case 1:
302
277
  // authentication bearer required
303
278
  // http bearer authentication required
304
- _b.sent();
305
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
306
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
307
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
308
- if (authorizationValue || authorizationKeepEmpty) {
309
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
279
+ _a.sent();
280
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
281
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
310
282
  }
311
283
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
312
284
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -331,10 +303,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
331
303
  exportDocument: function (code, exportDocumentRequestDto, authorization, options) {
332
304
  if (options === void 0) { options = {}; }
333
305
  return __awaiter(_this, void 0, void 0, function () {
334
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
335
- var _a;
336
- return __generator(this, function (_b) {
337
- switch (_b.label) {
306
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
307
+ return __generator(this, function (_a) {
308
+ switch (_a.label) {
338
309
  case 0:
339
310
  // verify required parameter 'code' is not null or undefined
340
311
  (0, common_1.assertParamExists)('exportDocument', 'code', code);
@@ -352,19 +323,13 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
352
323
  localVarQueryParameter = {};
353
324
  // authentication bearer required
354
325
  // http bearer authentication required
355
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
356
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
357
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
358
- ];
326
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
359
327
  case 1:
360
328
  // authentication bearer required
361
329
  // http bearer authentication required
362
- _b.sent();
363
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
364
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
365
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
366
- if (authorizationValue || authorizationKeepEmpty) {
367
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
330
+ _a.sent();
331
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
332
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
368
333
  }
369
334
  localVarHeaderParameter['Content-Type'] = 'application/json';
370
335
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -391,10 +356,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
391
356
  getDocumentDownloadUrl: function (code, authorization, contentDisposition, options) {
392
357
  if (options === void 0) { options = {}; }
393
358
  return __awaiter(_this, void 0, void 0, function () {
394
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
395
- var _a;
396
- return __generator(this, function (_b) {
397
- switch (_b.label) {
359
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
360
+ return __generator(this, function (_a) {
361
+ switch (_a.label) {
398
362
  case 0:
399
363
  // verify required parameter 'code' is not null or undefined
400
364
  (0, common_1.assertParamExists)('getDocumentDownloadUrl', 'code', code);
@@ -414,15 +378,12 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
414
378
  case 1:
415
379
  // authentication bearer required
416
380
  // http bearer authentication required
417
- _b.sent();
381
+ _a.sent();
418
382
  if (contentDisposition !== undefined) {
419
383
  localVarQueryParameter['contentDisposition'] = contentDisposition;
420
384
  }
421
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
422
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
423
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
424
- if (authorizationValue || authorizationKeepEmpty) {
425
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
385
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
386
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
426
387
  }
427
388
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
428
389
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -447,10 +408,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
447
408
  getSignedS3keyUrl: function (s3Key, authorization, contentDisposition, options) {
448
409
  if (options === void 0) { options = {}; }
449
410
  return __awaiter(_this, void 0, void 0, function () {
450
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
451
- var _a;
452
- return __generator(this, function (_b) {
453
- switch (_b.label) {
411
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
412
+ return __generator(this, function (_a) {
413
+ switch (_a.label) {
454
414
  case 0:
455
415
  // verify required parameter 's3Key' is not null or undefined
456
416
  (0, common_1.assertParamExists)('getSignedS3keyUrl', 's3Key', s3Key);
@@ -469,18 +429,15 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
469
429
  case 1:
470
430
  // authentication bearer required
471
431
  // http bearer authentication required
472
- _b.sent();
432
+ _a.sent();
473
433
  if (s3Key !== undefined) {
474
434
  localVarQueryParameter['s3Key'] = s3Key;
475
435
  }
476
436
  if (contentDisposition !== undefined) {
477
437
  localVarQueryParameter['contentDisposition'] = contentDisposition;
478
438
  }
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) {
483
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
439
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
440
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
484
441
  }
485
442
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
486
443
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -510,10 +467,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
510
467
  listDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
511
468
  if (options === void 0) { options = {}; }
512
469
  return __awaiter(_this, void 0, void 0, function () {
513
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
514
- var _a;
515
- return __generator(this, function (_b) {
516
- switch (_b.label) {
470
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
471
+ return __generator(this, function (_a) {
472
+ switch (_a.label) {
517
473
  case 0:
518
474
  localVarPath = "/documentservice/v1/documents";
519
475
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -530,7 +486,7 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
530
486
  case 1:
531
487
  // authentication bearer required
532
488
  // http bearer authentication required
533
- _b.sent();
489
+ _a.sent();
534
490
  if (pageSize !== undefined) {
535
491
  localVarQueryParameter['pageSize'] = pageSize;
536
492
  }
@@ -552,11 +508,8 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
552
508
  if (filters !== undefined) {
553
509
  localVarQueryParameter['filters'] = filters;
554
510
  }
555
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
556
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
557
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
558
- if (authorizationValue || authorizationKeepEmpty) {
559
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
511
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
512
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
560
513
  }
561
514
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
562
515
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -580,10 +533,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
580
533
  mergeDocuments: function (mergeDocumentsRequestDto, authorization, options) {
581
534
  if (options === void 0) { options = {}; }
582
535
  return __awaiter(_this, void 0, void 0, function () {
583
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
584
- var _a;
585
- return __generator(this, function (_b) {
586
- switch (_b.label) {
536
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
537
+ return __generator(this, function (_a) {
538
+ switch (_a.label) {
587
539
  case 0:
588
540
  // verify required parameter 'mergeDocumentsRequestDto' is not null or undefined
589
541
  (0, common_1.assertParamExists)('mergeDocuments', 'mergeDocumentsRequestDto', mergeDocumentsRequestDto);
@@ -598,19 +550,13 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
598
550
  localVarQueryParameter = {};
599
551
  // authentication bearer required
600
552
  // http bearer authentication required
601
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
602
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
603
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
604
- ];
553
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
605
554
  case 1:
606
555
  // authentication bearer required
607
556
  // http bearer authentication required
608
- _b.sent();
609
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
610
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
611
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
612
- if (authorizationValue || authorizationKeepEmpty) {
613
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
557
+ _a.sent();
558
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
559
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
614
560
  }
615
561
  localVarHeaderParameter['Content-Type'] = 'application/json';
616
562
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -636,10 +582,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
636
582
  saveExternalDocument: function (saveExternalDocumentRequestDto, authorization, options) {
637
583
  if (options === void 0) { options = {}; }
638
584
  return __awaiter(_this, void 0, void 0, function () {
639
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
640
- var _a;
641
- return __generator(this, function (_b) {
642
- switch (_b.label) {
585
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
586
+ return __generator(this, function (_a) {
587
+ switch (_a.label) {
643
588
  case 0:
644
589
  // verify required parameter 'saveExternalDocumentRequestDto' is not null or undefined
645
590
  (0, common_1.assertParamExists)('saveExternalDocument', 'saveExternalDocumentRequestDto', saveExternalDocumentRequestDto);
@@ -654,19 +599,13 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
654
599
  localVarQueryParameter = {};
655
600
  // authentication bearer required
656
601
  // http bearer authentication required
657
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
658
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
659
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
660
- ];
602
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
661
603
  case 1:
662
604
  // authentication bearer required
663
605
  // http bearer authentication required
664
- _b.sent();
665
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
666
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
667
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
668
- if (authorizationValue || authorizationKeepEmpty) {
669
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
606
+ _a.sent();
607
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
608
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
670
609
  }
671
610
  localVarHeaderParameter['Content-Type'] = 'application/json';
672
611
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -693,10 +632,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
693
632
  updateDocument: function (code, updateDocumentRequestDto, authorization, options) {
694
633
  if (options === void 0) { options = {}; }
695
634
  return __awaiter(_this, void 0, void 0, function () {
696
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
697
- var _a;
698
- return __generator(this, function (_b) {
699
- switch (_b.label) {
635
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
636
+ return __generator(this, function (_a) {
637
+ switch (_a.label) {
700
638
  case 0:
701
639
  // verify required parameter 'code' is not null or undefined
702
640
  (0, common_1.assertParamExists)('updateDocument', 'code', code);
@@ -714,19 +652,13 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
714
652
  localVarQueryParameter = {};
715
653
  // authentication bearer required
716
654
  // http bearer authentication required
717
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
718
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
719
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
720
- ];
655
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
721
656
  case 1:
722
657
  // authentication bearer required
723
658
  // http bearer authentication required
724
- _b.sent();
725
- authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
726
- authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
727
- authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
728
- if (authorizationValue || authorizationKeepEmpty) {
729
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
659
+ _a.sent();
660
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
661
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
730
662
  }
731
663
  localVarHeaderParameter['Content-Type'] = 'application/json';
732
664
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -1157,7 +1089,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1157
1089
  */
1158
1090
  DocumentsApi.prototype.createDocument = function (requestParameters, options) {
1159
1091
  var _this = this;
1160
- return (0, exports.DocumentsApiFp)(this.configuration).createDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1092
+ return (0, exports.DocumentsApiFp)(this.configuration).createDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1161
1093
  };
1162
1094
  /**
1163
1095
  * This will create a URL that allows user upload its documents in Database.The URL will be expires between 5 minutes to 7 days. **Required Permissions** \"document-management.documents.create\"
@@ -1169,7 +1101,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1169
1101
  */
1170
1102
  DocumentsApi.prototype.createPresignedPost = function (requestParameters, options) {
1171
1103
  var _this = this;
1172
- return (0, exports.DocumentsApiFp)(this.configuration).createPresignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1104
+ return (0, exports.DocumentsApiFp)(this.configuration).createPresignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1173
1105
  };
1174
1106
  /**
1175
1107
  * Creates a Swiss QR bill PDF document **Required Permissions** \"document-management.documents.create\"
@@ -1181,7 +1113,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1181
1113
  */
1182
1114
  DocumentsApi.prototype.createQrBillDocument = function (requestParameters, options) {
1183
1115
  var _this = this;
1184
- return (0, exports.DocumentsApiFp)(this.configuration).createQrBillDocument(requestParameters.createQrBillDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1116
+ return (0, exports.DocumentsApiFp)(this.configuration).createQrBillDocument(requestParameters.createQrBillDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1185
1117
  };
1186
1118
  /**
1187
1119
  * Permanently deletes the document. Supply the unique code that was returned when you created the document and this will delete it. **Required Permissions** \"document-management.documents.delete\"
@@ -1193,7 +1125,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1193
1125
  */
1194
1126
  DocumentsApi.prototype.deleteDocument = function (requestParameters, options) {
1195
1127
  var _this = this;
1196
- return (0, exports.DocumentsApiFp)(this.configuration).deleteDocument(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1128
+ return (0, exports.DocumentsApiFp)(this.configuration).deleteDocument(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1197
1129
  };
1198
1130
  /**
1199
1131
  * This will fetch an internal document and export it to a third party API **Required Permissions** \"document-management.documents.create\"
@@ -1205,7 +1137,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1205
1137
  */
1206
1138
  DocumentsApi.prototype.exportDocument = function (requestParameters, options) {
1207
1139
  var _this = this;
1208
- return (0, exports.DocumentsApiFp)(this.configuration).exportDocument(requestParameters.code, requestParameters.exportDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1140
+ return (0, exports.DocumentsApiFp)(this.configuration).exportDocument(requestParameters.code, requestParameters.exportDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1209
1141
  };
1210
1142
  /**
1211
1143
  * This will return a presigned URL to download the document. **Required Permissions** \"document-management.documents.view\"
@@ -1217,7 +1149,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1217
1149
  */
1218
1150
  DocumentsApi.prototype.getDocumentDownloadUrl = function (requestParameters, options) {
1219
1151
  var _this = this;
1220
- return (0, exports.DocumentsApiFp)(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1152
+ return (0, exports.DocumentsApiFp)(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then(function (request) { return request(_this.axios, _this.basePath); });
1221
1153
  };
1222
1154
  /**
1223
1155
  * This will return a presigned URL for a random S3 key
@@ -1229,7 +1161,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1229
1161
  */
1230
1162
  DocumentsApi.prototype.getSignedS3keyUrl = function (requestParameters, options) {
1231
1163
  var _this = this;
1232
- return (0, exports.DocumentsApiFp)(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, requestParameters.contentDisposition, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1164
+ return (0, exports.DocumentsApiFp)(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, requestParameters.contentDisposition, options).then(function (request) { return request(_this.axios, _this.basePath); });
1233
1165
  };
1234
1166
  /**
1235
1167
  * Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"document-management.documents.view\"
@@ -1242,7 +1174,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1242
1174
  DocumentsApi.prototype.listDocuments = function (requestParameters, options) {
1243
1175
  var _this = this;
1244
1176
  if (requestParameters === void 0) { requestParameters = {}; }
1245
- return (0, exports.DocumentsApiFp)(this.configuration).listDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1177
+ return (0, exports.DocumentsApiFp)(this.configuration).listDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1246
1178
  };
1247
1179
  /**
1248
1180
  * Merges 2-5 PDF documents into a single PDF **Required Permissions** \"document-management.documents.delete\"
@@ -1254,7 +1186,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1254
1186
  */
1255
1187
  DocumentsApi.prototype.mergeDocuments = function (requestParameters, options) {
1256
1188
  var _this = this;
1257
- return (0, exports.DocumentsApiFp)(this.configuration).mergeDocuments(requestParameters.mergeDocumentsRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1189
+ return (0, exports.DocumentsApiFp)(this.configuration).mergeDocuments(requestParameters.mergeDocumentsRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1258
1190
  };
1259
1191
  /**
1260
1192
  * This will save an external document in the database and return it. This is useful if one needs to call a third party API and store the document in EIS and then, for instance, send it to a client. **Required Permissions** \"document-management.documents.create\"
@@ -1266,7 +1198,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1266
1198
  */
1267
1199
  DocumentsApi.prototype.saveExternalDocument = function (requestParameters, options) {
1268
1200
  var _this = this;
1269
- return (0, exports.DocumentsApiFp)(this.configuration).saveExternalDocument(requestParameters.saveExternalDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1201
+ return (0, exports.DocumentsApiFp)(this.configuration).saveExternalDocument(requestParameters.saveExternalDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1270
1202
  };
1271
1203
  /**
1272
1204
  * Updates the specified document by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"document-management.documents.update\"
@@ -1278,7 +1210,7 @@ var DocumentsApi = /** @class */ (function (_super) {
1278
1210
  */
1279
1211
  DocumentsApi.prototype.updateDocument = function (requestParameters, options) {
1280
1212
  var _this = this;
1281
- return (0, exports.DocumentsApiFp)(this.configuration).updateDocument(requestParameters.code, requestParameters.updateDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1213
+ return (0, exports.DocumentsApiFp)(this.configuration).updateDocument(requestParameters.code, requestParameters.updateDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1282
1214
  };
1283
1215
  return DocumentsApi;
1284
1216
  }(base_1.BaseAPI));
@@ -392,7 +392,7 @@ export declare class DocxTemplatesApi extends BaseAPI {
392
392
  * @throws {RequiredError}
393
393
  * @memberof DocxTemplatesApi
394
394
  */
395
- deleteDocxTemplate(requestParameters: DocxTemplatesApiDeleteDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteResponseClass, any, {}, any>>;
395
+ deleteDocxTemplate(requestParameters: DocxTemplatesApiDeleteDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteResponseClass, any, {}>>;
396
396
  /**
397
397
  * Get a pre-signed download url for the given docx template. **Required Permissions** \"document-management.docx-templates.view\"
398
398
  * @summary Get pre-signed url for downloading docx template
@@ -401,7 +401,7 @@ export declare class DocxTemplatesApi extends BaseAPI {
401
401
  * @throws {RequiredError}
402
402
  * @memberof DocxTemplatesApi
403
403
  */
404
- downloadDocxTemplate(requestParameters: DocxTemplatesApiDownloadDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDocxTemplateDownloadUrlResponseClass, any, {}, any>>;
404
+ downloadDocxTemplate(requestParameters: DocxTemplatesApiDownloadDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDocxTemplateDownloadUrlResponseClass, any, {}>>;
405
405
  /**
406
406
  * Get a docx template. **Required Permissions** \"document-management.docx-templates.view\"
407
407
  * @summary Retrieve the docx template
@@ -410,7 +410,7 @@ export declare class DocxTemplatesApi extends BaseAPI {
410
410
  * @throws {RequiredError}
411
411
  * @memberof DocxTemplatesApi
412
412
  */
413
- getDocxTemplate(requestParameters: DocxTemplatesApiGetDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDocxTemplateResponseClass, any, {}, any>>;
413
+ getDocxTemplate(requestParameters: DocxTemplatesApiGetDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDocxTemplateResponseClass, any, {}>>;
414
414
  /**
415
415
  * Returns a list of docx templates you have previously created. The docx templates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"document-management.docx-templates.view\"
416
416
  * @summary List docx templates
@@ -419,7 +419,7 @@ export declare class DocxTemplatesApi extends BaseAPI {
419
419
  * @throws {RequiredError}
420
420
  * @memberof DocxTemplatesApi
421
421
  */
422
- listDocxTemplates(requestParameters?: DocxTemplatesApiListDocxTemplatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListDocxTemplatesResponseClass, any, {}, any>>;
422
+ listDocxTemplates(requestParameters?: DocxTemplatesApiListDocxTemplatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListDocxTemplatesResponseClass, any, {}>>;
423
423
  /**
424
424
  * Updates a docx template metadata. **Required Permissions** \"document-management.docx-templates.update\"
425
425
  * @summary Update the docx template
@@ -428,7 +428,7 @@ export declare class DocxTemplatesApi extends BaseAPI {
428
428
  * @throws {RequiredError}
429
429
  * @memberof DocxTemplatesApi
430
430
  */
431
- updateDocxTemplate(requestParameters: DocxTemplatesApiUpdateDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateDocxTemplateResponseClass, any, {}, any>>;
431
+ updateDocxTemplate(requestParameters: DocxTemplatesApiUpdateDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateDocxTemplateResponseClass, any, {}>>;
432
432
  /**
433
433
  * Upload a docx template via a presigned Url. **Required Permissions** \"document-management.docx-templates.create\"
434
434
  * @summary Upload a docx template.
@@ -437,5 +437,5 @@ export declare class DocxTemplatesApi extends BaseAPI {
437
437
  * @throws {RequiredError}
438
438
  * @memberof DocxTemplatesApi
439
439
  */
440
- uploadDocxTemplate(requestParameters: DocxTemplatesApiUploadDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePresignedPostResponseClass, any, {}, any>>;
440
+ uploadDocxTemplate(requestParameters: DocxTemplatesApiUploadDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePresignedPostResponseClass, any, {}>>;
441
441
  }