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

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.
@@ -73,13 +73,8 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
73
73
  // http bearer authentication required
74
74
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
75
75
 
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);
76
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
77
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
83
78
  }
84
79
 
85
80
 
@@ -126,13 +121,8 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
126
121
  // http bearer authentication required
127
122
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
128
123
 
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);
124
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
136
126
  }
137
127
 
138
128
 
@@ -183,13 +173,8 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
183
173
  localVarQueryParameter['id'] = id2;
184
174
  }
185
175
 
186
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
187
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
188
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
189
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
190
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
191
- if (authorizationValue || authorizationKeepEmpty) {
192
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
176
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
177
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
193
178
  }
194
179
 
195
180
 
@@ -264,13 +249,8 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
264
249
  localVarQueryParameter['filters'] = filters;
265
250
  }
266
251
 
267
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
268
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
269
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
270
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
271
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
272
- if (authorizationValue || authorizationKeepEmpty) {
273
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
252
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
253
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
274
254
  }
275
255
 
276
256
 
@@ -317,13 +297,8 @@ export const LayoutsApiAxiosParamCreator = function (configuration?: Configurati
317
297
  // http bearer authentication required
318
298
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
319
299
 
320
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
321
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
322
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
323
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
324
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
325
- if (authorizationValue || authorizationKeepEmpty) {
326
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
300
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
301
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
327
302
  }
328
303
 
329
304
 
@@ -671,7 +646,7 @@ export class LayoutsApi extends BaseAPI {
671
646
  * @memberof LayoutsApi
672
647
  */
673
648
  public createLayout(requestParameters: LayoutsApiCreateLayoutRequest, options?: AxiosRequestConfig) {
674
- return LayoutsApiFp(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
649
+ return LayoutsApiFp(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
675
650
  }
676
651
 
677
652
  /**
@@ -683,7 +658,7 @@ export class LayoutsApi extends BaseAPI {
683
658
  * @memberof LayoutsApi
684
659
  */
685
660
  public deleteLayout(requestParameters: LayoutsApiDeleteLayoutRequest, options?: AxiosRequestConfig) {
686
- return LayoutsApiFp(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
661
+ return LayoutsApiFp(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
687
662
  }
688
663
 
689
664
  /**
@@ -695,7 +670,7 @@ export class LayoutsApi extends BaseAPI {
695
670
  * @memberof LayoutsApi
696
671
  */
697
672
  public getLayout(requestParameters: LayoutsApiGetLayoutRequest, options?: AxiosRequestConfig) {
698
- return LayoutsApiFp(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
673
+ return LayoutsApiFp(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
699
674
  }
700
675
 
701
676
  /**
@@ -707,7 +682,7 @@ export class LayoutsApi extends BaseAPI {
707
682
  * @memberof LayoutsApi
708
683
  */
709
684
  public listLayouts(requestParameters: LayoutsApiListLayoutsRequest = {}, options?: AxiosRequestConfig) {
710
- return LayoutsApiFp(this.configuration).listLayouts(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));
685
+ return LayoutsApiFp(this.configuration).listLayouts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
711
686
  }
712
687
 
713
688
  /**
@@ -719,6 +694,6 @@ export class LayoutsApi extends BaseAPI {
719
694
  * @memberof LayoutsApi
720
695
  */
721
696
  public updateLayout(requestParameters: LayoutsApiUpdateLayoutRequest, options?: AxiosRequestConfig) {
722
- return LayoutsApiFp(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
697
+ return LayoutsApiFp(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
723
698
  }
724
699
  }
@@ -76,13 +76,8 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
76
76
  // http bearer authentication required
77
77
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
78
78
 
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);
79
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
80
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
86
81
  }
87
82
 
88
83
 
@@ -135,13 +130,8 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
135
130
  localVarQueryParameter['contentDisposition'] = contentDisposition;
136
131
  }
137
132
 
138
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
139
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
140
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
141
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
142
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
143
- if (authorizationValue || authorizationKeepEmpty) {
144
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
133
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
145
135
  }
146
136
 
147
137
 
@@ -189,13 +179,8 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
189
179
  // http bearer authentication required
190
180
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
191
181
 
192
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
193
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
194
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
195
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
196
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
197
- if (authorizationValue || authorizationKeepEmpty) {
198
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
182
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
199
184
  }
200
185
 
201
186
 
@@ -270,13 +255,8 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
270
255
  localVarQueryParameter['filters'] = filters;
271
256
  }
272
257
 
273
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
274
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
275
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
276
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
277
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
278
- if (authorizationValue || authorizationKeepEmpty) {
279
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
258
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
259
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
280
260
  }
281
261
 
282
262
 
@@ -355,13 +335,8 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
355
335
  localVarQueryParameter['filters'] = filters;
356
336
  }
357
337
 
358
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
359
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
360
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
361
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
362
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
363
- if (authorizationValue || authorizationKeepEmpty) {
364
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
338
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
339
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
365
340
  }
366
341
 
367
342
 
@@ -408,13 +383,8 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
408
383
  // http bearer authentication required
409
384
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
410
385
 
411
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
412
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
413
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
414
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
415
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
416
- if (authorizationValue || authorizationKeepEmpty) {
417
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
386
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
387
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
418
388
  }
419
389
 
420
390
 
@@ -896,7 +866,7 @@ export class ProductDocumentsApi extends BaseAPI {
896
866
  * @memberof ProductDocumentsApi
897
867
  */
898
868
  public deleteProductDocument(requestParameters: ProductDocumentsApiDeleteProductDocumentRequest, options?: AxiosRequestConfig) {
899
- return ProductDocumentsApiFp(this.configuration).deleteProductDocument(requestParameters.code, requestParameters.productSlug, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
869
+ return ProductDocumentsApiFp(this.configuration).deleteProductDocument(requestParameters.code, requestParameters.productSlug, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
900
870
  }
901
871
 
902
872
  /**
@@ -908,7 +878,7 @@ export class ProductDocumentsApi extends BaseAPI {
908
878
  * @memberof ProductDocumentsApi
909
879
  */
910
880
  public downloadProductDocument(requestParameters: ProductDocumentsApiDownloadProductDocumentRequest, options?: AxiosRequestConfig) {
911
- return ProductDocumentsApiFp(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
881
+ return ProductDocumentsApiFp(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then((request) => request(this.axios, this.basePath));
912
882
  }
913
883
 
914
884
  /**
@@ -920,7 +890,7 @@ export class ProductDocumentsApi extends BaseAPI {
920
890
  * @memberof ProductDocumentsApi
921
891
  */
922
892
  public getProductDocument(requestParameters: ProductDocumentsApiGetProductDocumentRequest, options?: AxiosRequestConfig) {
923
- return ProductDocumentsApiFp(this.configuration).getProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
893
+ return ProductDocumentsApiFp(this.configuration).getProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
924
894
  }
925
895
 
926
896
  /**
@@ -932,7 +902,7 @@ export class ProductDocumentsApi extends BaseAPI {
932
902
  * @memberof ProductDocumentsApi
933
903
  */
934
904
  public listProductDocuments(requestParameters: ProductDocumentsApiListProductDocumentsRequest = {}, options?: AxiosRequestConfig) {
935
- return ProductDocumentsApiFp(this.configuration).listProductDocuments(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));
905
+ return ProductDocumentsApiFp(this.configuration).listProductDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
936
906
  }
937
907
 
938
908
  /**
@@ -944,7 +914,7 @@ export class ProductDocumentsApi extends BaseAPI {
944
914
  * @memberof ProductDocumentsApi
945
915
  */
946
916
  public listProductDocumentsByProduct(requestParameters: ProductDocumentsApiListProductDocumentsByProductRequest, options?: AxiosRequestConfig) {
947
- return ProductDocumentsApiFp(this.configuration).listProductDocumentsByProduct(requestParameters.productSlug, 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));
917
+ return ProductDocumentsApiFp(this.configuration).listProductDocumentsByProduct(requestParameters.productSlug, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
948
918
  }
949
919
 
950
920
  /**
@@ -956,6 +926,6 @@ export class ProductDocumentsApi extends BaseAPI {
956
926
  * @memberof ProductDocumentsApi
957
927
  */
958
928
  public uploadProductDocument(requestParameters: ProductDocumentsApiUploadProductDocumentRequest, options?: AxiosRequestConfig) {
959
- return ProductDocumentsApiFp(this.configuration).uploadProductDocument(requestParameters.productSlug, requestParameters.uploadProductDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
929
+ return ProductDocumentsApiFp(this.configuration).uploadProductDocument(requestParameters.productSlug, requestParameters.uploadProductDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
960
930
  }
961
931
  }
@@ -65,13 +65,8 @@ export const SearchKeywordsApiAxiosParamCreator = function (configuration?: Conf
65
65
  localVarQueryParameter['searchText'] = searchText;
66
66
  }
67
67
 
68
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
69
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
70
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
71
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
72
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
73
- if (authorizationValue || authorizationKeepEmpty) {
74
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
68
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
69
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
75
70
  }
76
71
 
77
72
 
@@ -168,6 +163,6 @@ export class SearchKeywordsApi extends BaseAPI {
168
163
  * @memberof SearchKeywordsApi
169
164
  */
170
165
  public listSearchKeywords(requestParameters: SearchKeywordsApiListSearchKeywordsRequest, options?: AxiosRequestConfig) {
171
- return SearchKeywordsApiFp(this.configuration).listSearchKeywords(requestParameters.searchText, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
166
+ return SearchKeywordsApiFp(this.configuration).listSearchKeywords(requestParameters.searchText, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
172
167
  }
173
168
  }
@@ -93,13 +93,8 @@ export const SearchableDocumentOwnersApiAxiosParamCreator = function (configurat
93
93
  localVarQueryParameter['filters'] = filters;
94
94
  }
95
95
 
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);
96
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
97
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
103
98
  }
104
99
 
105
100
 
@@ -250,6 +245,6 @@ export class SearchableDocumentOwnersApi extends BaseAPI {
250
245
  * @memberof SearchableDocumentOwnersApi
251
246
  */
252
247
  public listSearchableDocumentOwners(requestParameters: SearchableDocumentOwnersApiListSearchableDocumentOwnersRequest = {}, options?: AxiosRequestConfig) {
253
- return SearchableDocumentOwnersApiFp(this.configuration).listSearchableDocumentOwners(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));
248
+ return SearchableDocumentOwnersApiFp(this.configuration).listSearchableDocumentOwners(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
254
249
  }
255
250
  }
@@ -77,13 +77,8 @@ export const SearchableDocumentsApiAxiosParamCreator = function (configuration?:
77
77
  localVarQueryParameter['product'] = product;
78
78
  }
79
79
 
80
- // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
81
- // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
82
- const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
83
- const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
84
- const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
85
- if (authorizationValue || authorizationKeepEmpty) {
86
- localVarHeaderParameter['Authorization'] = String(authorizationValue);
80
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
81
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
87
82
  }
88
83
 
89
84
 
@@ -198,6 +193,6 @@ export class SearchableDocumentsApi extends BaseAPI {
198
193
  * @memberof SearchableDocumentsApi
199
194
  */
200
195
  public listSearchableDocuments(requestParameters: SearchableDocumentsApiListSearchableDocumentsRequest, options?: AxiosRequestConfig) {
201
- return SearchableDocumentsApiFp(this.configuration).listSearchableDocuments(requestParameters.searchText, requestParameters.ownerIds, requestParameters.authorization, requestParameters.product, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
196
+ return SearchableDocumentsApiFp(this.configuration).listSearchableDocuments(requestParameters.searchText, requestParameters.ownerIds, requestParameters.authorization, requestParameters.product, options).then((request) => request(this.axios, this.basePath));
202
197
  }
203
198
  }
package/base.ts CHANGED
@@ -92,10 +92,6 @@ export class BaseAPI {
92
92
  private username?: string;
93
93
  private password?: string;
94
94
 
95
- protected withOwner(options?: AxiosRequestConfig): AxiosRequestConfig {
96
- return { ...options };
97
- }
98
-
99
95
  constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
100
96
  if (configuration) {
101
97
  this.configuration = configuration;
package/common.ts CHANGED
@@ -131,10 +131,9 @@ export const toPathString = function (url: URL) {
131
131
  * @export
132
132
  */
133
133
  export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
134
- // Typed by hand: since axios 1.20, request() returns an internal axios type that SDK declarations cannot name.
135
- return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH): Promise<R> => {
134
+ return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
136
135
  const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
137
- return axios.request<T, R>(axiosRequestArgs) as Promise<R>;
136
+ return axios.request<T, R>(axiosRequestArgs);
138
137
  };
139
138
  }
140
139
 
@@ -345,7 +345,7 @@ export declare class DocumentTemplatesApi extends BaseAPI {
345
345
  * @throws {RequiredError}
346
346
  * @memberof DocumentTemplatesApi
347
347
  */
348
- createDocTemplate(requestParameters: DocumentTemplatesApiCreateDocTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateDocTemplateResponseClass, any, {}, any>>;
348
+ createDocTemplate(requestParameters: DocumentTemplatesApiCreateDocTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateDocTemplateResponseClass, any, {}>>;
349
349
  /**
350
350
  * Permanently deletes the document template. Supply the unique code that was returned when you created the document template and this will delete it. **Required Permissions** \"document-management.templates.delete\"
351
351
  * @summary Delete the document template
@@ -354,7 +354,7 @@ export declare class DocumentTemplatesApi extends BaseAPI {
354
354
  * @throws {RequiredError}
355
355
  * @memberof DocumentTemplatesApi
356
356
  */
357
- deleteDocTemplate(requestParameters: DocumentTemplatesApiDeleteDocTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteResponseClass, any, {}, any>>;
357
+ deleteDocTemplate(requestParameters: DocumentTemplatesApiDeleteDocTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteResponseClass, any, {}>>;
358
358
  /**
359
359
  * Retrieves the details of the document template that was previously created. Supply the unique document template id that was returned when you created it and Emil Api will return the corresponding document template information. **Required Permissions** \"document-management.templates.view\"
360
360
  * @summary Retrieve the document template
@@ -363,7 +363,7 @@ export declare class DocumentTemplatesApi extends BaseAPI {
363
363
  * @throws {RequiredError}
364
364
  * @memberof DocumentTemplatesApi
365
365
  */
366
- getDocTemplate(requestParameters: DocumentTemplatesApiGetDocTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDocTemplateResponseClass, any, {}, any>>;
366
+ getDocTemplate(requestParameters: DocumentTemplatesApiGetDocTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDocTemplateResponseClass, any, {}>>;
367
367
  /**
368
368
  * Returns a list of document templates you have previously created. The document 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.templates.view\"
369
369
  * @summary List document templates
@@ -372,7 +372,7 @@ export declare class DocumentTemplatesApi extends BaseAPI {
372
372
  * @throws {RequiredError}
373
373
  * @memberof DocumentTemplatesApi
374
374
  */
375
- listDocTemplates(requestParameters?: DocumentTemplatesApiListDocTemplatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListDocTemplatesResponseClass, any, {}, any>>;
375
+ listDocTemplates(requestParameters?: DocumentTemplatesApiListDocTemplatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListDocTemplatesResponseClass, any, {}>>;
376
376
  /**
377
377
  * Updates the specified document template by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"document-management.templates.update\"
378
378
  * @summary Update the document template
@@ -381,5 +381,5 @@ export declare class DocumentTemplatesApi extends BaseAPI {
381
381
  * @throws {RequiredError}
382
382
  * @memberof DocumentTemplatesApi
383
383
  */
384
- updateDocTemplate(requestParameters: DocumentTemplatesApiUpdateDocTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateDocTemplateResponseClass, any, {}, any>>;
384
+ updateDocTemplate(requestParameters: DocumentTemplatesApiUpdateDocTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateDocTemplateResponseClass, any, {}>>;
385
385
  }