@emilgroup/document-sdk-node 1.49.1-beta.39 → 1.49.1-beta.40

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.
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/document-sdk-node@1.49.1-beta.39 --save
20
+ npm install @emilgroup/document-sdk-node@1.49.1-beta.40 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/document-sdk-node@1.49.1-beta.39
24
+ yarn add @emilgroup/document-sdk-node@1.49.1-beta.40
25
25
  ```
26
26
 
27
27
  And then you can import `DocumentsApi`.
@@ -73,8 +73,13 @@ export const DocumentTemplatesApiAxiosParamCreator = function (configuration?: C
73
73
  // http bearer authentication required
74
74
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
75
75
 
76
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
77
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
76
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
77
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
78
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
79
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
80
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
81
+ if (authorizationValue || authorizationKeepEmpty) {
82
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
78
83
  }
79
84
 
80
85
 
@@ -121,8 +126,13 @@ export const DocumentTemplatesApiAxiosParamCreator = function (configuration?: C
121
126
  // http bearer authentication required
122
127
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
123
128
 
124
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
132
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
133
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
134
+ if (authorizationValue || authorizationKeepEmpty) {
135
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
126
136
  }
127
137
 
128
138
 
@@ -171,8 +181,13 @@ export const DocumentTemplatesApiAxiosParamCreator = function (configuration?: C
171
181
  localVarQueryParameter['expand'] = expand;
172
182
  }
173
183
 
174
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
175
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
185
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
186
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
187
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
188
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
189
+ if (authorizationValue || authorizationKeepEmpty) {
190
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
176
191
  }
177
192
 
178
193
 
@@ -242,8 +257,13 @@ export const DocumentTemplatesApiAxiosParamCreator = function (configuration?: C
242
257
  localVarQueryParameter['expand'] = expand;
243
258
  }
244
259
 
245
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
246
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
260
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
261
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
262
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
263
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
264
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
265
+ if (authorizationValue || authorizationKeepEmpty) {
266
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
247
267
  }
248
268
 
249
269
 
@@ -290,8 +310,13 @@ export const DocumentTemplatesApiAxiosParamCreator = function (configuration?: C
290
310
  // http bearer authentication required
291
311
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
292
312
 
293
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
294
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
313
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
314
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
315
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
316
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
317
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
318
+ if (authorizationValue || authorizationKeepEmpty) {
319
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
295
320
  }
296
321
 
297
322
 
@@ -630,7 +655,7 @@ export class DocumentTemplatesApi extends BaseAPI {
630
655
  * @memberof DocumentTemplatesApi
631
656
  */
632
657
  public createDocTemplate(requestParameters: DocumentTemplatesApiCreateDocTemplateRequest, options?: AxiosRequestConfig) {
633
- return DocumentTemplatesApiFp(this.configuration).createDocTemplate(requestParameters.createDocTemplateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
658
+ return DocumentTemplatesApiFp(this.configuration).createDocTemplate(requestParameters.createDocTemplateRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
634
659
  }
635
660
 
636
661
  /**
@@ -642,7 +667,7 @@ export class DocumentTemplatesApi extends BaseAPI {
642
667
  * @memberof DocumentTemplatesApi
643
668
  */
644
669
  public deleteDocTemplate(requestParameters: DocumentTemplatesApiDeleteDocTemplateRequest, options?: AxiosRequestConfig) {
645
- return DocumentTemplatesApiFp(this.configuration).deleteDocTemplate(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
670
+ return DocumentTemplatesApiFp(this.configuration).deleteDocTemplate(requestParameters.id, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
646
671
  }
647
672
 
648
673
  /**
@@ -654,7 +679,7 @@ export class DocumentTemplatesApi extends BaseAPI {
654
679
  * @memberof DocumentTemplatesApi
655
680
  */
656
681
  public getDocTemplate(requestParameters: DocumentTemplatesApiGetDocTemplateRequest, options?: AxiosRequestConfig) {
657
- return DocumentTemplatesApiFp(this.configuration).getDocTemplate(requestParameters.id, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
682
+ return DocumentTemplatesApiFp(this.configuration).getDocTemplate(requestParameters.id, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
658
683
  }
659
684
 
660
685
  /**
@@ -666,7 +691,7 @@ export class DocumentTemplatesApi extends BaseAPI {
666
691
  * @memberof DocumentTemplatesApi
667
692
  */
668
693
  public listDocTemplates(requestParameters: DocumentTemplatesApiListDocTemplatesRequest = {}, options?: AxiosRequestConfig) {
669
- return DocumentTemplatesApiFp(this.configuration).listDocTemplates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
694
+ return DocumentTemplatesApiFp(this.configuration).listDocTemplates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
670
695
  }
671
696
 
672
697
  /**
@@ -678,6 +703,6 @@ export class DocumentTemplatesApi extends BaseAPI {
678
703
  * @memberof DocumentTemplatesApi
679
704
  */
680
705
  public updateDocTemplate(requestParameters: DocumentTemplatesApiUpdateDocTemplateRequest, options?: AxiosRequestConfig) {
681
- return DocumentTemplatesApiFp(this.configuration).updateDocTemplate(requestParameters.id, requestParameters.updateDocTemplateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
706
+ return DocumentTemplatesApiFp(this.configuration).updateDocTemplate(requestParameters.id, requestParameters.updateDocTemplateRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
682
707
  }
683
708
  }
@@ -93,8 +93,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
93
93
  // http bearer authentication required
94
94
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
95
95
 
96
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
97
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
96
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
97
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
98
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
99
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
100
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
101
+ if (authorizationValue || authorizationKeepEmpty) {
102
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
98
103
  }
99
104
 
100
105
 
@@ -140,8 +145,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
140
145
  // http bearer authentication required
141
146
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
142
147
 
143
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
144
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
148
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
149
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
150
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
151
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
152
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
153
+ if (authorizationValue || authorizationKeepEmpty) {
154
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
145
155
  }
146
156
 
147
157
 
@@ -187,8 +197,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
187
197
  // http bearer authentication required
188
198
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
189
199
 
190
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
191
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
200
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
201
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
202
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
203
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
204
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
205
+ if (authorizationValue || authorizationKeepEmpty) {
206
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
192
207
  }
193
208
 
194
209
 
@@ -235,8 +250,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
235
250
  // http bearer authentication required
236
251
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
237
252
 
238
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
239
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
253
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
254
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
255
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
256
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
257
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
258
+ if (authorizationValue || authorizationKeepEmpty) {
259
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
240
260
  }
241
261
 
242
262
 
@@ -283,8 +303,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
283
303
  // http bearer authentication required
284
304
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
285
305
 
286
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
287
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
306
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
307
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
308
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
309
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
310
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
311
+ if (authorizationValue || authorizationKeepEmpty) {
312
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
288
313
  }
289
314
 
290
315
 
@@ -336,8 +361,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
336
361
  localVarQueryParameter['contentDisposition'] = contentDisposition;
337
362
  }
338
363
 
339
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
340
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
364
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
365
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
366
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
367
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
368
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
369
+ if (authorizationValue || authorizationKeepEmpty) {
370
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
341
371
  }
342
372
 
343
373
 
@@ -389,8 +419,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
389
419
  localVarQueryParameter['contentDisposition'] = contentDisposition;
390
420
  }
391
421
 
392
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
393
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
422
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
423
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
424
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
425
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
426
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
427
+ if (authorizationValue || authorizationKeepEmpty) {
428
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
394
429
  }
395
430
 
396
431
 
@@ -465,8 +500,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
465
500
  localVarQueryParameter['filters'] = filters;
466
501
  }
467
502
 
468
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
469
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
503
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
504
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
505
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
506
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
507
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
508
+ if (authorizationValue || authorizationKeepEmpty) {
509
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
470
510
  }
471
511
 
472
512
 
@@ -509,8 +549,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
509
549
  // http bearer authentication required
510
550
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
511
551
 
512
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
513
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
552
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
553
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
554
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
555
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
556
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
557
+ if (authorizationValue || authorizationKeepEmpty) {
558
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
514
559
  }
515
560
 
516
561
 
@@ -556,8 +601,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
556
601
  // http bearer authentication required
557
602
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
558
603
 
559
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
560
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
604
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
605
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
606
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
607
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
608
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
609
+ if (authorizationValue || authorizationKeepEmpty) {
610
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
561
611
  }
562
612
 
563
613
 
@@ -607,8 +657,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
607
657
  // http bearer authentication required
608
658
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
609
659
 
610
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
611
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
660
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
661
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
662
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
663
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
664
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
665
+ if (authorizationValue || authorizationKeepEmpty) {
666
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
612
667
  }
613
668
 
614
669
 
@@ -1238,7 +1293,7 @@ export class DocumentsApi extends BaseAPI {
1238
1293
  * @memberof DocumentsApi
1239
1294
  */
1240
1295
  public createDocument(requestParameters: DocumentsApiCreateDocumentRequest, options?: AxiosRequestConfig) {
1241
- return DocumentsApiFp(this.configuration).createDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1296
+ return DocumentsApiFp(this.configuration).createDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1242
1297
  }
1243
1298
 
1244
1299
  /**
@@ -1250,7 +1305,7 @@ export class DocumentsApi extends BaseAPI {
1250
1305
  * @memberof DocumentsApi
1251
1306
  */
1252
1307
  public createPresignedPost(requestParameters: DocumentsApiCreatePresignedPostRequest, options?: AxiosRequestConfig) {
1253
- return DocumentsApiFp(this.configuration).createPresignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1308
+ return DocumentsApiFp(this.configuration).createPresignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1254
1309
  }
1255
1310
 
1256
1311
  /**
@@ -1262,7 +1317,7 @@ export class DocumentsApi extends BaseAPI {
1262
1317
  * @memberof DocumentsApi
1263
1318
  */
1264
1319
  public createQrBillDocument(requestParameters: DocumentsApiCreateQrBillDocumentRequest, options?: AxiosRequestConfig) {
1265
- return DocumentsApiFp(this.configuration).createQrBillDocument(requestParameters.createQrBillDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1320
+ return DocumentsApiFp(this.configuration).createQrBillDocument(requestParameters.createQrBillDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1266
1321
  }
1267
1322
 
1268
1323
  /**
@@ -1274,7 +1329,7 @@ export class DocumentsApi extends BaseAPI {
1274
1329
  * @memberof DocumentsApi
1275
1330
  */
1276
1331
  public deleteDocument(requestParameters: DocumentsApiDeleteDocumentRequest, options?: AxiosRequestConfig) {
1277
- return DocumentsApiFp(this.configuration).deleteDocument(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1332
+ return DocumentsApiFp(this.configuration).deleteDocument(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1278
1333
  }
1279
1334
 
1280
1335
  /**
@@ -1286,7 +1341,7 @@ export class DocumentsApi extends BaseAPI {
1286
1341
  * @memberof DocumentsApi
1287
1342
  */
1288
1343
  public exportDocument(requestParameters: DocumentsApiExportDocumentRequest, options?: AxiosRequestConfig) {
1289
- return DocumentsApiFp(this.configuration).exportDocument(requestParameters.code, requestParameters.exportDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1344
+ return DocumentsApiFp(this.configuration).exportDocument(requestParameters.code, requestParameters.exportDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1290
1345
  }
1291
1346
 
1292
1347
  /**
@@ -1298,7 +1353,7 @@ export class DocumentsApi extends BaseAPI {
1298
1353
  * @memberof DocumentsApi
1299
1354
  */
1300
1355
  public getDocumentDownloadUrl(requestParameters: DocumentsApiGetDocumentDownloadUrlRequest, options?: AxiosRequestConfig) {
1301
- return DocumentsApiFp(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then((request) => request(this.axios, this.basePath));
1356
+ return DocumentsApiFp(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1302
1357
  }
1303
1358
 
1304
1359
  /**
@@ -1310,7 +1365,7 @@ export class DocumentsApi extends BaseAPI {
1310
1365
  * @memberof DocumentsApi
1311
1366
  */
1312
1367
  public getSignedS3keyUrl(requestParameters: DocumentsApiGetSignedS3keyUrlRequest, options?: AxiosRequestConfig) {
1313
- return DocumentsApiFp(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, requestParameters.contentDisposition, options).then((request) => request(this.axios, this.basePath));
1368
+ return DocumentsApiFp(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, requestParameters.contentDisposition, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1314
1369
  }
1315
1370
 
1316
1371
  /**
@@ -1322,7 +1377,7 @@ export class DocumentsApi extends BaseAPI {
1322
1377
  * @memberof DocumentsApi
1323
1378
  */
1324
1379
  public listDocuments(requestParameters: DocumentsApiListDocumentsRequest = {}, options?: AxiosRequestConfig) {
1325
- return DocumentsApiFp(this.configuration).listDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
1380
+ return DocumentsApiFp(this.configuration).listDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1326
1381
  }
1327
1382
 
1328
1383
  /**
@@ -1334,7 +1389,7 @@ export class DocumentsApi extends BaseAPI {
1334
1389
  * @memberof DocumentsApi
1335
1390
  */
1336
1391
  public mergeDocuments(requestParameters: DocumentsApiMergeDocumentsRequest, options?: AxiosRequestConfig) {
1337
- return DocumentsApiFp(this.configuration).mergeDocuments(requestParameters.mergeDocumentsRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1392
+ return DocumentsApiFp(this.configuration).mergeDocuments(requestParameters.mergeDocumentsRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1338
1393
  }
1339
1394
 
1340
1395
  /**
@@ -1346,7 +1401,7 @@ export class DocumentsApi extends BaseAPI {
1346
1401
  * @memberof DocumentsApi
1347
1402
  */
1348
1403
  public saveExternalDocument(requestParameters: DocumentsApiSaveExternalDocumentRequest, options?: AxiosRequestConfig) {
1349
- return DocumentsApiFp(this.configuration).saveExternalDocument(requestParameters.saveExternalDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1404
+ return DocumentsApiFp(this.configuration).saveExternalDocument(requestParameters.saveExternalDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1350
1405
  }
1351
1406
 
1352
1407
  /**
@@ -1358,6 +1413,6 @@ export class DocumentsApi extends BaseAPI {
1358
1413
  * @memberof DocumentsApi
1359
1414
  */
1360
1415
  public updateDocument(requestParameters: DocumentsApiUpdateDocumentRequest, options?: AxiosRequestConfig) {
1361
- return DocumentsApiFp(this.configuration).updateDocument(requestParameters.code, requestParameters.updateDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1416
+ return DocumentsApiFp(this.configuration).updateDocument(requestParameters.code, requestParameters.updateDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
1362
1417
  }
1363
1418
  }
@@ -76,8 +76,13 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
76
76
  // http bearer authentication required
77
77
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
78
78
 
79
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
80
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
79
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
80
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
81
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
82
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
83
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
84
+ if (authorizationValue || authorizationKeepEmpty) {
85
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
81
86
  }
82
87
 
83
88
 
@@ -121,8 +126,13 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
121
126
  // http bearer authentication required
122
127
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
123
128
 
124
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
132
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
133
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
134
+ if (authorizationValue || authorizationKeepEmpty) {
135
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
126
136
  }
127
137
 
128
138
 
@@ -166,8 +176,13 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
166
176
  // http bearer authentication required
167
177
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
168
178
 
169
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
170
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
179
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
180
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
181
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
182
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
183
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
184
+ if (authorizationValue || authorizationKeepEmpty) {
185
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
171
186
  }
172
187
 
173
188
 
@@ -242,8 +257,13 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
242
257
  localVarQueryParameter['filters'] = filters;
243
258
  }
244
259
 
245
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
246
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
260
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
261
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
262
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
263
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
264
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
265
+ if (authorizationValue || authorizationKeepEmpty) {
266
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
247
267
  }
248
268
 
249
269
 
@@ -290,8 +310,13 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
290
310
  // http bearer authentication required
291
311
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
292
312
 
293
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
294
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
313
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
314
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
315
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
316
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
317
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
318
+ if (authorizationValue || authorizationKeepEmpty) {
319
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
295
320
  }
296
321
 
297
322
 
@@ -337,8 +362,13 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
337
362
  // http bearer authentication required
338
363
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
339
364
 
340
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
341
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
365
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
366
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
367
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
368
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
369
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
370
+ if (authorizationValue || authorizationKeepEmpty) {
371
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
342
372
  }
343
373
 
344
374
 
@@ -721,7 +751,7 @@ export class DocxTemplatesApi extends BaseAPI {
721
751
  * @memberof DocxTemplatesApi
722
752
  */
723
753
  public deleteDocxTemplate(requestParameters: DocxTemplatesApiDeleteDocxTemplateRequest, options?: AxiosRequestConfig) {
724
- return DocxTemplatesApiFp(this.configuration).deleteDocxTemplate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
754
+ return DocxTemplatesApiFp(this.configuration).deleteDocxTemplate(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
725
755
  }
726
756
 
727
757
  /**
@@ -733,7 +763,7 @@ export class DocxTemplatesApi extends BaseAPI {
733
763
  * @memberof DocxTemplatesApi
734
764
  */
735
765
  public downloadDocxTemplate(requestParameters: DocxTemplatesApiDownloadDocxTemplateRequest, options?: AxiosRequestConfig) {
736
- return DocxTemplatesApiFp(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
766
+ return DocxTemplatesApiFp(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
737
767
  }
738
768
 
739
769
  /**
@@ -745,7 +775,7 @@ export class DocxTemplatesApi extends BaseAPI {
745
775
  * @memberof DocxTemplatesApi
746
776
  */
747
777
  public getDocxTemplate(requestParameters: DocxTemplatesApiGetDocxTemplateRequest, options?: AxiosRequestConfig) {
748
- return DocxTemplatesApiFp(this.configuration).getDocxTemplate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
778
+ return DocxTemplatesApiFp(this.configuration).getDocxTemplate(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
749
779
  }
750
780
 
751
781
  /**
@@ -757,7 +787,7 @@ export class DocxTemplatesApi extends BaseAPI {
757
787
  * @memberof DocxTemplatesApi
758
788
  */
759
789
  public listDocxTemplates(requestParameters: DocxTemplatesApiListDocxTemplatesRequest = {}, options?: AxiosRequestConfig) {
760
- return DocxTemplatesApiFp(this.configuration).listDocxTemplates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
790
+ return DocxTemplatesApiFp(this.configuration).listDocxTemplates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
761
791
  }
762
792
 
763
793
  /**
@@ -769,7 +799,7 @@ export class DocxTemplatesApi extends BaseAPI {
769
799
  * @memberof DocxTemplatesApi
770
800
  */
771
801
  public updateDocxTemplate(requestParameters: DocxTemplatesApiUpdateDocxTemplateRequest, options?: AxiosRequestConfig) {
772
- return DocxTemplatesApiFp(this.configuration).updateDocxTemplate(requestParameters.code, requestParameters.sharedUpdateDocxTemplateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
802
+ return DocxTemplatesApiFp(this.configuration).updateDocxTemplate(requestParameters.code, requestParameters.sharedUpdateDocxTemplateRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
773
803
  }
774
804
 
775
805
  /**
@@ -781,6 +811,6 @@ export class DocxTemplatesApi extends BaseAPI {
781
811
  * @memberof DocxTemplatesApi
782
812
  */
783
813
  public uploadDocxTemplate(requestParameters: DocxTemplatesApiUploadDocxTemplateRequest, options?: AxiosRequestConfig) {
784
- return DocxTemplatesApiFp(this.configuration).uploadDocxTemplate(requestParameters.uploadDocxTemplateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
814
+ return DocxTemplatesApiFp(this.configuration).uploadDocxTemplate(requestParameters.uploadDocxTemplateRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
785
815
  }
786
816
  }
package/api/health-api.ts CHANGED
@@ -123,6 +123,6 @@ export class HealthApi extends BaseAPI {
123
123
  * @memberof HealthApi
124
124
  */
125
125
  public check(options?: AxiosRequestConfig) {
126
- return HealthApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
126
+ return HealthApiFp(this.configuration).check(this.withOwner(options)).then((request) => request(this.axios, this.basePath));
127
127
  }
128
128
  }