@emilgroup/document-sdk-node 1.49.1-beta.28 → 1.49.1-beta.29

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.
@@ -108,9 +108,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
108
108
  deleteProductDocument: function (code, productSlug, authorization, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
112
- return __generator(this, function (_a) {
113
- switch (_a.label) {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
112
+ var _a;
113
+ return __generator(this, function (_b) {
114
+ switch (_b.label) {
114
115
  case 0:
115
116
  // verify required parameter 'code' is not null or undefined
116
117
  (0, common_1.assertParamExists)('deleteProductDocument', 'code', code);
@@ -130,14 +131,17 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
130
131
  // authentication bearer required
131
132
  // http bearer authentication required
132
133
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
133
- // Only Authorization falls back to the configured token; an empty value is never sent.
134
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
135
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
134
136
  ];
135
137
  case 1:
136
138
  // authentication bearer required
137
139
  // http bearer authentication required
138
- _a.sent();
139
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
140
- if (authorizationValue) {
140
+ _b.sent();
141
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
142
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
143
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
144
+ if (authorizationValue || authorizationKeepEmpty) {
141
145
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
142
146
  }
143
147
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -164,9 +168,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
164
168
  downloadProductDocument: function (productSlug, code, authorization, contentDisposition, options) {
165
169
  if (options === void 0) { options = {}; }
166
170
  return __awaiter(_this, void 0, void 0, function () {
167
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
168
- return __generator(this, function (_a) {
169
- switch (_a.label) {
171
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
172
+ var _a;
173
+ return __generator(this, function (_b) {
174
+ switch (_b.label) {
170
175
  case 0:
171
176
  // verify required parameter 'productSlug' is not null or undefined
172
177
  (0, common_1.assertParamExists)('downloadProductDocument', 'productSlug', productSlug);
@@ -189,12 +194,14 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
189
194
  case 1:
190
195
  // authentication bearer required
191
196
  // http bearer authentication required
192
- _a.sent();
197
+ _b.sent();
193
198
  if (contentDisposition !== undefined) {
194
199
  localVarQueryParameter['contentDisposition'] = contentDisposition;
195
200
  }
196
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
197
- if (authorizationValue) {
201
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
202
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
203
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
204
+ if (authorizationValue || authorizationKeepEmpty) {
198
205
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
199
206
  }
200
207
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -220,9 +227,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
220
227
  getProductDocument: function (productSlug, code, authorization, options) {
221
228
  if (options === void 0) { options = {}; }
222
229
  return __awaiter(_this, void 0, void 0, function () {
223
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
224
- return __generator(this, function (_a) {
225
- switch (_a.label) {
230
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
231
+ var _a;
232
+ return __generator(this, function (_b) {
233
+ switch (_b.label) {
226
234
  case 0:
227
235
  // verify required parameter 'productSlug' is not null or undefined
228
236
  (0, common_1.assertParamExists)('getProductDocument', 'productSlug', productSlug);
@@ -242,14 +250,17 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
242
250
  // authentication bearer required
243
251
  // http bearer authentication required
244
252
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
245
- // Only Authorization falls back to the configured token; an empty value is never sent.
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.
246
255
  ];
247
256
  case 1:
248
257
  // authentication bearer required
249
258
  // http bearer authentication required
250
- _a.sent();
251
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
252
- if (authorizationValue) {
259
+ _b.sent();
260
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
261
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
262
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
263
+ if (authorizationValue || authorizationKeepEmpty) {
253
264
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
254
265
  }
255
266
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -280,9 +291,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
280
291
  listProductDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
281
292
  if (options === void 0) { options = {}; }
282
293
  return __awaiter(_this, void 0, void 0, function () {
283
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
284
- return __generator(this, function (_a) {
285
- switch (_a.label) {
294
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
295
+ var _a;
296
+ return __generator(this, function (_b) {
297
+ switch (_b.label) {
286
298
  case 0:
287
299
  localVarPath = "/documentservice/v1/product-documents";
288
300
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -299,7 +311,7 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
299
311
  case 1:
300
312
  // authentication bearer required
301
313
  // http bearer authentication required
302
- _a.sent();
314
+ _b.sent();
303
315
  if (pageSize !== undefined) {
304
316
  localVarQueryParameter['pageSize'] = pageSize;
305
317
  }
@@ -321,8 +333,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
321
333
  if (filters !== undefined) {
322
334
  localVarQueryParameter['filters'] = filters;
323
335
  }
324
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
325
- if (authorizationValue) {
336
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
337
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
338
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
339
+ if (authorizationValue || authorizationKeepEmpty) {
326
340
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
327
341
  }
328
342
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -354,9 +368,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
354
368
  listProductDocumentsByProduct: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
355
369
  if (options === void 0) { options = {}; }
356
370
  return __awaiter(_this, void 0, void 0, function () {
357
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
358
- return __generator(this, function (_a) {
359
- switch (_a.label) {
371
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
372
+ var _a;
373
+ return __generator(this, function (_b) {
374
+ switch (_b.label) {
360
375
  case 0:
361
376
  // verify required parameter 'productSlug' is not null or undefined
362
377
  (0, common_1.assertParamExists)('listProductDocumentsByProduct', 'productSlug', productSlug);
@@ -376,7 +391,7 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
376
391
  case 1:
377
392
  // authentication bearer required
378
393
  // http bearer authentication required
379
- _a.sent();
394
+ _b.sent();
380
395
  if (pageSize !== undefined) {
381
396
  localVarQueryParameter['pageSize'] = pageSize;
382
397
  }
@@ -398,8 +413,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
398
413
  if (filters !== undefined) {
399
414
  localVarQueryParameter['filters'] = filters;
400
415
  }
401
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
402
- if (authorizationValue) {
416
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
417
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
418
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
419
+ if (authorizationValue || authorizationKeepEmpty) {
403
420
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
404
421
  }
405
422
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -425,9 +442,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
425
442
  uploadProductDocument: function (productSlug, uploadProductDocumentRequestDto, authorization, options) {
426
443
  if (options === void 0) { options = {}; }
427
444
  return __awaiter(_this, void 0, void 0, function () {
428
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
429
- return __generator(this, function (_a) {
430
- switch (_a.label) {
445
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
446
+ var _a;
447
+ return __generator(this, function (_b) {
448
+ switch (_b.label) {
431
449
  case 0:
432
450
  // verify required parameter 'productSlug' is not null or undefined
433
451
  (0, common_1.assertParamExists)('uploadProductDocument', 'productSlug', productSlug);
@@ -446,14 +464,17 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
446
464
  // authentication bearer required
447
465
  // http bearer authentication required
448
466
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
449
- // Only Authorization falls back to the configured token; an empty value is never sent.
467
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
468
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
450
469
  ];
451
470
  case 1:
452
471
  // authentication bearer required
453
472
  // http bearer authentication required
454
- _a.sent();
455
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
456
- if (authorizationValue) {
473
+ _b.sent();
474
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
475
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
476
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
477
+ if (authorizationValue || authorizationKeepEmpty) {
457
478
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
458
479
  }
459
480
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -741,7 +762,7 @@ var ProductDocumentsApi = /** @class */ (function (_super) {
741
762
  */
742
763
  ProductDocumentsApi.prototype.deleteProductDocument = function (requestParameters, options) {
743
764
  var _this = this;
744
- return (0, exports.ProductDocumentsApiFp)(this.configuration).deleteProductDocument(requestParameters.code, requestParameters.productSlug, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
765
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).deleteProductDocument(requestParameters.code, requestParameters.productSlug, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
745
766
  };
746
767
  /**
747
768
  * Get a pre-signed download url for the given product document. **Required Permissions** \"document-management.documents.view\"
@@ -753,7 +774,7 @@ var ProductDocumentsApi = /** @class */ (function (_super) {
753
774
  */
754
775
  ProductDocumentsApi.prototype.downloadProductDocument = function (requestParameters, options) {
755
776
  var _this = this;
756
- return (0, exports.ProductDocumentsApiFp)(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then(function (request) { return request(_this.axios, _this.basePath); });
777
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
757
778
  };
758
779
  /**
759
780
  * Get a product document. **Required Permissions** \"document-management.documents.view\"
@@ -765,7 +786,7 @@ var ProductDocumentsApi = /** @class */ (function (_super) {
765
786
  */
766
787
  ProductDocumentsApi.prototype.getProductDocument = function (requestParameters, options) {
767
788
  var _this = this;
768
- return (0, exports.ProductDocumentsApiFp)(this.configuration).getProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
789
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).getProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
769
790
  };
770
791
  /**
771
792
  * Returns a list of product documents you have previously created. The product 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\"
@@ -778,7 +799,7 @@ var ProductDocumentsApi = /** @class */ (function (_super) {
778
799
  ProductDocumentsApi.prototype.listProductDocuments = function (requestParameters, options) {
779
800
  var _this = this;
780
801
  if (requestParameters === void 0) { requestParameters = {}; }
781
- return (0, exports.ProductDocumentsApiFp)(this.configuration).listProductDocuments(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); });
802
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).listProductDocuments(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); });
782
803
  };
783
804
  /**
784
805
  * Returns a list of product documents you have previously created. The product 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\"
@@ -790,7 +811,7 @@ var ProductDocumentsApi = /** @class */ (function (_super) {
790
811
  */
791
812
  ProductDocumentsApi.prototype.listProductDocumentsByProduct = function (requestParameters, options) {
792
813
  var _this = this;
793
- return (0, exports.ProductDocumentsApiFp)(this.configuration).listProductDocumentsByProduct(requestParameters.productSlug, 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); });
814
+ return (0, exports.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(function (request) { return request(_this.axios, _this.basePath); });
794
815
  };
795
816
  /**
796
817
  * Upload a product document. **Required Permissions** \"document-management.documents.update\"
@@ -802,7 +823,7 @@ var ProductDocumentsApi = /** @class */ (function (_super) {
802
823
  */
803
824
  ProductDocumentsApi.prototype.uploadProductDocument = function (requestParameters, options) {
804
825
  var _this = this;
805
- return (0, exports.ProductDocumentsApiFp)(this.configuration).uploadProductDocument(requestParameters.productSlug, requestParameters.uploadProductDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
826
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).uploadProductDocument(requestParameters.productSlug, requestParameters.uploadProductDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
806
827
  };
807
828
  return ProductDocumentsApi;
808
829
  }(base_1.BaseAPI));
@@ -107,9 +107,10 @@ var SearchKeywordsApiAxiosParamCreator = function (configuration) {
107
107
  listSearchKeywords: function (searchText, authorization, options) {
108
108
  if (options === void 0) { options = {}; }
109
109
  return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
111
- return __generator(this, function (_a) {
112
- switch (_a.label) {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
111
+ var _a;
112
+ return __generator(this, function (_b) {
113
+ switch (_b.label) {
113
114
  case 0:
114
115
  // verify required parameter 'searchText' is not null or undefined
115
116
  (0, common_1.assertParamExists)('listSearchKeywords', 'searchText', searchText);
@@ -128,12 +129,14 @@ var SearchKeywordsApiAxiosParamCreator = function (configuration) {
128
129
  case 1:
129
130
  // authentication bearer required
130
131
  // http bearer authentication required
131
- _a.sent();
132
+ _b.sent();
132
133
  if (searchText !== undefined) {
133
134
  localVarQueryParameter['searchText'] = searchText;
134
135
  }
135
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
136
- if (authorizationValue) {
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) {
137
140
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
138
141
  }
139
142
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -223,7 +226,7 @@ var SearchKeywordsApi = /** @class */ (function (_super) {
223
226
  */
224
227
  SearchKeywordsApi.prototype.listSearchKeywords = function (requestParameters, options) {
225
228
  var _this = this;
226
- return (0, exports.SearchKeywordsApiFp)(this.configuration).listSearchKeywords(requestParameters.searchText, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
229
+ return (0, exports.SearchKeywordsApiFp)(this.configuration).listSearchKeywords(requestParameters.searchText, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
227
230
  };
228
231
  return SearchKeywordsApi;
229
232
  }(base_1.BaseAPI));
@@ -113,9 +113,10 @@ var SearchableDocumentOwnersApiAxiosParamCreator = function (configuration) {
113
113
  listSearchableDocumentOwners: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
114
114
  if (options === void 0) { options = {}; }
115
115
  return __awaiter(_this, void 0, void 0, function () {
116
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
117
- return __generator(this, function (_a) {
118
- switch (_a.label) {
116
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
117
+ var _a;
118
+ return __generator(this, function (_b) {
119
+ switch (_b.label) {
119
120
  case 0:
120
121
  localVarPath = "/documentservice/v1/searchable-document-owners";
121
122
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -132,7 +133,7 @@ var SearchableDocumentOwnersApiAxiosParamCreator = function (configuration) {
132
133
  case 1:
133
134
  // authentication bearer required
134
135
  // http bearer authentication required
135
- _a.sent();
136
+ _b.sent();
136
137
  if (pageSize !== undefined) {
137
138
  localVarQueryParameter['pageSize'] = pageSize;
138
139
  }
@@ -154,8 +155,10 @@ var SearchableDocumentOwnersApiAxiosParamCreator = function (configuration) {
154
155
  if (filters !== undefined) {
155
156
  localVarQueryParameter['filters'] = filters;
156
157
  }
157
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
158
- if (authorizationValue) {
158
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
159
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
160
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
161
+ if (authorizationValue || authorizationKeepEmpty) {
159
162
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
160
163
  }
161
164
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -258,7 +261,7 @@ var SearchableDocumentOwnersApi = /** @class */ (function (_super) {
258
261
  SearchableDocumentOwnersApi.prototype.listSearchableDocumentOwners = function (requestParameters, options) {
259
262
  var _this = this;
260
263
  if (requestParameters === void 0) { requestParameters = {}; }
261
- return (0, exports.SearchableDocumentOwnersApiFp)(this.configuration).listSearchableDocumentOwners(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); });
264
+ return (0, exports.SearchableDocumentOwnersApiFp)(this.configuration).listSearchableDocumentOwners(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); });
262
265
  };
263
266
  return SearchableDocumentOwnersApi;
264
267
  }(base_1.BaseAPI));
@@ -109,9 +109,10 @@ var SearchableDocumentsApiAxiosParamCreator = function (configuration) {
109
109
  listSearchableDocuments: function (searchText, ownerIds, authorization, product, options) {
110
110
  if (options === void 0) { options = {}; }
111
111
  return __awaiter(_this, void 0, void 0, function () {
112
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
113
- return __generator(this, function (_a) {
114
- switch (_a.label) {
112
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
113
+ var _a;
114
+ return __generator(this, function (_b) {
115
+ switch (_b.label) {
115
116
  case 0:
116
117
  // verify required parameter 'searchText' is not null or undefined
117
118
  (0, common_1.assertParamExists)('listSearchableDocuments', 'searchText', searchText);
@@ -132,7 +133,7 @@ var SearchableDocumentsApiAxiosParamCreator = function (configuration) {
132
133
  case 1:
133
134
  // authentication bearer required
134
135
  // http bearer authentication required
135
- _a.sent();
136
+ _b.sent();
136
137
  if (searchText !== undefined) {
137
138
  localVarQueryParameter['searchText'] = searchText;
138
139
  }
@@ -142,8 +143,10 @@ var SearchableDocumentsApiAxiosParamCreator = function (configuration) {
142
143
  if (product !== undefined) {
143
144
  localVarQueryParameter['product'] = product;
144
145
  }
145
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
146
- if (authorizationValue) {
146
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
147
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
148
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
149
+ if (authorizationValue || authorizationKeepEmpty) {
147
150
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
148
151
  }
149
152
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -237,7 +240,7 @@ var SearchableDocumentsApi = /** @class */ (function (_super) {
237
240
  */
238
241
  SearchableDocumentsApi.prototype.listSearchableDocuments = function (requestParameters, options) {
239
242
  var _this = this;
240
- return (0, exports.SearchableDocumentsApiFp)(this.configuration).listSearchableDocuments(requestParameters.searchText, requestParameters.ownerIds, requestParameters.authorization, requestParameters.product, options).then(function (request) { return request(_this.axios, _this.basePath); });
243
+ return (0, exports.SearchableDocumentsApiFp)(this.configuration).listSearchableDocuments(requestParameters.searchText, requestParameters.ownerIds, requestParameters.authorization, requestParameters.product, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
241
244
  };
242
245
  return SearchableDocumentsApi;
243
246
  }(base_1.BaseAPI));
package/dist/base.d.ts CHANGED
@@ -63,6 +63,7 @@ export declare class BaseAPI {
63
63
  protected configuration: Configuration;
64
64
  private username?;
65
65
  private password?;
66
+ protected withOwner(options?: AxiosRequestConfig): AxiosRequestConfig;
66
67
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
67
68
  initialize(env?: Environment, targetWorkspace?: string): Promise<void>;
68
69
  private loadCredentials;
package/dist/base.js CHANGED
@@ -163,6 +163,9 @@ var BaseAPI = /** @class */ (function () {
163
163
  }
164
164
  this.attachInterceptor(axios);
165
165
  }
166
+ BaseAPI.prototype.withOwner = function (options) {
167
+ return __assign({}, options);
168
+ };
166
169
  BaseAPI.prototype.initialize = function (env, targetWorkspace) {
167
170
  if (env === void 0) { env = Environment.Production; }
168
171
  return __awaiter(this, void 0, void 0, function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/document-sdk-node",
3
- "version": "1.49.1-beta.28",
3
+ "version": "1.49.1-beta.29",
4
4
  "description": "OpenAPI client for @emilgroup/document-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [