@emilgroup/document-sdk 1.16.0 → 1.20.0

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@1.16.0 --save
20
+ npm install @emilgroup/document-sdk@1.20.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/document-sdk@1.16.0
24
+ yarn add @emilgroup/document-sdk@1.20.0
25
25
  ```
26
26
 
27
27
  And then you can import `DocumentsApi`.
@@ -186,6 +186,7 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
186
186
  /**
187
187
  * 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.
188
188
  * @summary List product documents
189
+ * @param {string} productSlug
189
190
  * @param {string} [authorization] Bearer Token
190
191
  * @param {number} [pageSize] Page size
191
192
  * @param {string} [pageToken] Page token
@@ -196,8 +197,86 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
196
197
  * @param {*} [options] Override http request option.
197
198
  * @throws {RequiredError}
198
199
  */
199
- listProductDocuments: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
200
- const localVarPath = `/documentservice/v1/documents/product`;
200
+ listProductDocuments: async (productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
201
+ // verify required parameter 'productSlug' is not null or undefined
202
+ assertParamExists('listProductDocuments', 'productSlug', productSlug)
203
+ const localVarPath = `/documentservice/v1/documents/product/{productSlug}`
204
+ .replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
205
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
206
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
207
+ let baseOptions;
208
+ let baseAccessToken;
209
+ if (configuration) {
210
+ baseOptions = configuration.baseOptions;
211
+ baseAccessToken = configuration.accessToken;
212
+ }
213
+
214
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
215
+ const localVarHeaderParameter = {} as any;
216
+ const localVarQueryParameter = {} as any;
217
+
218
+ // authentication bearer required
219
+ // http bearer authentication required
220
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
221
+
222
+ if (pageSize !== undefined) {
223
+ localVarQueryParameter['pageSize'] = pageSize;
224
+ }
225
+
226
+ if (pageToken !== undefined) {
227
+ localVarQueryParameter['pageToken'] = pageToken;
228
+ }
229
+
230
+ if (filter !== undefined) {
231
+ localVarQueryParameter['filter'] = filter;
232
+ }
233
+
234
+ if (search !== undefined) {
235
+ localVarQueryParameter['search'] = search;
236
+ }
237
+
238
+ if (order !== undefined) {
239
+ localVarQueryParameter['order'] = order;
240
+ }
241
+
242
+ if (expand !== undefined) {
243
+ localVarQueryParameter['expand'] = expand;
244
+ }
245
+
246
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
247
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
248
+ }
249
+
250
+
251
+
252
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
253
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
254
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
255
+
256
+ return {
257
+ url: toPathString(localVarUrlObj),
258
+ options: localVarRequestOptions,
259
+ };
260
+ },
261
+ /**
262
+ * 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.
263
+ * @summary List product documents
264
+ * @param {string} productSlug
265
+ * @param {string} [authorization] Bearer Token
266
+ * @param {number} [pageSize] Page size
267
+ * @param {string} [pageToken] Page token
268
+ * @param {string} [filter] List filter
269
+ * @param {string} [search] Search query
270
+ * @param {string} [order] Ordering criteria
271
+ * @param {string} [expand] Extra fields to fetch
272
+ * @param {*} [options] Override http request option.
273
+ * @throws {RequiredError}
274
+ */
275
+ listProductDocuments_1: async (productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
276
+ // verify required parameter 'productSlug' is not null or undefined
277
+ assertParamExists('listProductDocuments_1', 'productSlug', productSlug)
278
+ const localVarPath = `/documentservice/v1/documents/product`
279
+ .replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
201
280
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
202
281
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
203
282
  let baseOptions;
@@ -357,6 +436,7 @@ export const ProductDocumentsApiFp = function(configuration?: Configuration) {
357
436
  /**
358
437
  * 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.
359
438
  * @summary List product documents
439
+ * @param {string} productSlug
360
440
  * @param {string} [authorization] Bearer Token
361
441
  * @param {number} [pageSize] Page size
362
442
  * @param {string} [pageToken] Page token
@@ -367,8 +447,26 @@ export const ProductDocumentsApiFp = function(configuration?: Configuration) {
367
447
  * @param {*} [options] Override http request option.
368
448
  * @throws {RequiredError}
369
449
  */
370
- async listProductDocuments(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductDocumentsResponseClass>> {
371
- const localVarAxiosArgs = await localVarAxiosParamCreator.listProductDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options);
450
+ async listProductDocuments(productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductDocumentsResponseClass>> {
451
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listProductDocuments(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options);
452
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
453
+ },
454
+ /**
455
+ * 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.
456
+ * @summary List product documents
457
+ * @param {string} productSlug
458
+ * @param {string} [authorization] Bearer Token
459
+ * @param {number} [pageSize] Page size
460
+ * @param {string} [pageToken] Page token
461
+ * @param {string} [filter] List filter
462
+ * @param {string} [search] Search query
463
+ * @param {string} [order] Ordering criteria
464
+ * @param {string} [expand] Extra fields to fetch
465
+ * @param {*} [options] Override http request option.
466
+ * @throws {RequiredError}
467
+ */
468
+ async listProductDocuments_1(productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductDocumentsResponseClass>> {
469
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listProductDocuments_1(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options);
372
470
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
373
471
  },
374
472
  /**
@@ -433,6 +531,24 @@ export const ProductDocumentsApiFactory = function (configuration?: Configuratio
433
531
  /**
434
532
  * 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.
435
533
  * @summary List product documents
534
+ * @param {string} productSlug
535
+ * @param {string} [authorization] Bearer Token
536
+ * @param {number} [pageSize] Page size
537
+ * @param {string} [pageToken] Page token
538
+ * @param {string} [filter] List filter
539
+ * @param {string} [search] Search query
540
+ * @param {string} [order] Ordering criteria
541
+ * @param {string} [expand] Extra fields to fetch
542
+ * @param {*} [options] Override http request option.
543
+ * @throws {RequiredError}
544
+ */
545
+ listProductDocuments(productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListProductDocumentsResponseClass> {
546
+ return localVarFp.listProductDocuments(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
547
+ },
548
+ /**
549
+ * 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.
550
+ * @summary List product documents
551
+ * @param {string} productSlug
436
552
  * @param {string} [authorization] Bearer Token
437
553
  * @param {number} [pageSize] Page size
438
554
  * @param {string} [pageToken] Page token
@@ -443,8 +559,8 @@ export const ProductDocumentsApiFactory = function (configuration?: Configuratio
443
559
  * @param {*} [options] Override http request option.
444
560
  * @throws {RequiredError}
445
561
  */
446
- listProductDocuments(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListProductDocumentsResponseClass> {
447
- return localVarFp.listProductDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
562
+ listProductDocuments_1(productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListProductDocumentsResponseClass> {
563
+ return localVarFp.listProductDocuments_1(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
448
564
  },
449
565
  /**
450
566
  * Upload a product document.
@@ -551,6 +667,13 @@ export interface ProductDocumentsApiGetProductDocumentRequest {
551
667
  * @interface ProductDocumentsApiListProductDocumentsRequest
552
668
  */
553
669
  export interface ProductDocumentsApiListProductDocumentsRequest {
670
+ /**
671
+ *
672
+ * @type {string}
673
+ * @memberof ProductDocumentsApiListProductDocuments
674
+ */
675
+ readonly productSlug: string
676
+
554
677
  /**
555
678
  * Bearer Token
556
679
  * @type {string}
@@ -601,6 +724,69 @@ export interface ProductDocumentsApiListProductDocumentsRequest {
601
724
  readonly expand?: string
602
725
  }
603
726
 
727
+ /**
728
+ * Request parameters for listProductDocuments_1 operation in ProductDocumentsApi.
729
+ * @export
730
+ * @interface ProductDocumentsApiListProductDocuments0Request
731
+ */
732
+ export interface ProductDocumentsApiListProductDocuments0Request {
733
+ /**
734
+ *
735
+ * @type {string}
736
+ * @memberof ProductDocumentsApiListProductDocuments0
737
+ */
738
+ readonly productSlug: string
739
+
740
+ /**
741
+ * Bearer Token
742
+ * @type {string}
743
+ * @memberof ProductDocumentsApiListProductDocuments0
744
+ */
745
+ readonly authorization?: string
746
+
747
+ /**
748
+ * Page size
749
+ * @type {number}
750
+ * @memberof ProductDocumentsApiListProductDocuments0
751
+ */
752
+ readonly pageSize?: number
753
+
754
+ /**
755
+ * Page token
756
+ * @type {string}
757
+ * @memberof ProductDocumentsApiListProductDocuments0
758
+ */
759
+ readonly pageToken?: string
760
+
761
+ /**
762
+ * List filter
763
+ * @type {string}
764
+ * @memberof ProductDocumentsApiListProductDocuments0
765
+ */
766
+ readonly filter?: string
767
+
768
+ /**
769
+ * Search query
770
+ * @type {string}
771
+ * @memberof ProductDocumentsApiListProductDocuments0
772
+ */
773
+ readonly search?: string
774
+
775
+ /**
776
+ * Ordering criteria
777
+ * @type {string}
778
+ * @memberof ProductDocumentsApiListProductDocuments0
779
+ */
780
+ readonly order?: string
781
+
782
+ /**
783
+ * Extra fields to fetch
784
+ * @type {string}
785
+ * @memberof ProductDocumentsApiListProductDocuments0
786
+ */
787
+ readonly expand?: string
788
+ }
789
+
604
790
  /**
605
791
  * Request parameters for uploadProductDocument operation in ProductDocumentsApi.
606
792
  * @export
@@ -680,8 +866,20 @@ export class ProductDocumentsApi extends BaseAPI {
680
866
  * @throws {RequiredError}
681
867
  * @memberof ProductDocumentsApi
682
868
  */
683
- public listProductDocuments(requestParameters: ProductDocumentsApiListProductDocumentsRequest = {}, options?: AxiosRequestConfig) {
684
- return ProductDocumentsApiFp(this.configuration).listProductDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
869
+ public listProductDocuments(requestParameters: ProductDocumentsApiListProductDocumentsRequest, options?: AxiosRequestConfig) {
870
+ return ProductDocumentsApiFp(this.configuration).listProductDocuments(requestParameters.productSlug, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
871
+ }
872
+
873
+ /**
874
+ * 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.
875
+ * @summary List product documents
876
+ * @param {ProductDocumentsApiListProductDocuments0Request} requestParameters Request parameters.
877
+ * @param {*} [options] Override http request option.
878
+ * @throws {RequiredError}
879
+ * @memberof ProductDocumentsApi
880
+ */
881
+ public listProductDocuments_1(requestParameters: ProductDocumentsApiListProductDocuments0Request, options?: AxiosRequestConfig) {
882
+ return ProductDocumentsApiFp(this.configuration).listProductDocuments_1(requestParameters.productSlug, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
685
883
  }
686
884
 
687
885
  /**
package/base.ts CHANGED
@@ -87,6 +87,7 @@ export class BaseAPI {
87
87
  if (configuration) {
88
88
  this.configuration = configuration;
89
89
  this.basePath = configuration.basePath || this.basePath;
90
+ this.configuration.accessToken = this.tokenData.accessToken ? `Bearer ${this.tokenData.accessToken}` : '';
90
91
  } else {
91
92
  const { accessToken, username } = this.tokenData;
92
93
 
@@ -55,6 +55,22 @@ export declare const ProductDocumentsApiAxiosParamCreator: (configuration?: Conf
55
55
  /**
56
56
  * 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.
57
57
  * @summary List product documents
58
+ * @param {string} productSlug
59
+ * @param {string} [authorization] Bearer Token
60
+ * @param {number} [pageSize] Page size
61
+ * @param {string} [pageToken] Page token
62
+ * @param {string} [filter] List filter
63
+ * @param {string} [search] Search query
64
+ * @param {string} [order] Ordering criteria
65
+ * @param {string} [expand] Extra fields to fetch
66
+ * @param {*} [options] Override http request option.
67
+ * @throws {RequiredError}
68
+ */
69
+ listProductDocuments: (productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
70
+ /**
71
+ * 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.
72
+ * @summary List product documents
73
+ * @param {string} productSlug
58
74
  * @param {string} [authorization] Bearer Token
59
75
  * @param {number} [pageSize] Page size
60
76
  * @param {string} [pageToken] Page token
@@ -65,7 +81,7 @@ export declare const ProductDocumentsApiAxiosParamCreator: (configuration?: Conf
65
81
  * @param {*} [options] Override http request option.
66
82
  * @throws {RequiredError}
67
83
  */
68
- listProductDocuments: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
84
+ listProductDocuments_1: (productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
69
85
  /**
70
86
  * Upload a product document.
71
87
  * @summary Create the product document
@@ -115,6 +131,7 @@ export declare const ProductDocumentsApiFp: (configuration?: Configuration) => {
115
131
  /**
116
132
  * 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.
117
133
  * @summary List product documents
134
+ * @param {string} productSlug
118
135
  * @param {string} [authorization] Bearer Token
119
136
  * @param {number} [pageSize] Page size
120
137
  * @param {string} [pageToken] Page token
@@ -125,7 +142,22 @@ export declare const ProductDocumentsApiFp: (configuration?: Configuration) => {
125
142
  * @param {*} [options] Override http request option.
126
143
  * @throws {RequiredError}
127
144
  */
128
- listProductDocuments(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductDocumentsResponseClass>>;
145
+ listProductDocuments(productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductDocumentsResponseClass>>;
146
+ /**
147
+ * 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.
148
+ * @summary List product documents
149
+ * @param {string} productSlug
150
+ * @param {string} [authorization] Bearer Token
151
+ * @param {number} [pageSize] Page size
152
+ * @param {string} [pageToken] Page token
153
+ * @param {string} [filter] List filter
154
+ * @param {string} [search] Search query
155
+ * @param {string} [order] Ordering criteria
156
+ * @param {string} [expand] Extra fields to fetch
157
+ * @param {*} [options] Override http request option.
158
+ * @throws {RequiredError}
159
+ */
160
+ listProductDocuments_1(productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListProductDocumentsResponseClass>>;
129
161
  /**
130
162
  * Upload a product document.
131
163
  * @summary Create the product document
@@ -175,6 +207,7 @@ export declare const ProductDocumentsApiFactory: (configuration?: Configuration,
175
207
  /**
176
208
  * 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.
177
209
  * @summary List product documents
210
+ * @param {string} productSlug
178
211
  * @param {string} [authorization] Bearer Token
179
212
  * @param {number} [pageSize] Page size
180
213
  * @param {string} [pageToken] Page token
@@ -185,7 +218,22 @@ export declare const ProductDocumentsApiFactory: (configuration?: Configuration,
185
218
  * @param {*} [options] Override http request option.
186
219
  * @throws {RequiredError}
187
220
  */
188
- listProductDocuments(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListProductDocumentsResponseClass>;
221
+ listProductDocuments(productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListProductDocumentsResponseClass>;
222
+ /**
223
+ * 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.
224
+ * @summary List product documents
225
+ * @param {string} productSlug
226
+ * @param {string} [authorization] Bearer Token
227
+ * @param {number} [pageSize] Page size
228
+ * @param {string} [pageToken] Page token
229
+ * @param {string} [filter] List filter
230
+ * @param {string} [search] Search query
231
+ * @param {string} [order] Ordering criteria
232
+ * @param {string} [expand] Extra fields to fetch
233
+ * @param {*} [options] Override http request option.
234
+ * @throws {RequiredError}
235
+ */
236
+ listProductDocuments_1(productSlug: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListProductDocumentsResponseClass>;
189
237
  /**
190
238
  * Upload a product document.
191
239
  * @summary Create the product document
@@ -278,6 +326,12 @@ export interface ProductDocumentsApiGetProductDocumentRequest {
278
326
  * @interface ProductDocumentsApiListProductDocumentsRequest
279
327
  */
280
328
  export interface ProductDocumentsApiListProductDocumentsRequest {
329
+ /**
330
+ *
331
+ * @type {string}
332
+ * @memberof ProductDocumentsApiListProductDocuments
333
+ */
334
+ readonly productSlug: string;
281
335
  /**
282
336
  * Bearer Token
283
337
  * @type {string}
@@ -321,6 +375,61 @@ export interface ProductDocumentsApiListProductDocumentsRequest {
321
375
  */
322
376
  readonly expand?: string;
323
377
  }
378
+ /**
379
+ * Request parameters for listProductDocuments_1 operation in ProductDocumentsApi.
380
+ * @export
381
+ * @interface ProductDocumentsApiListProductDocuments0Request
382
+ */
383
+ export interface ProductDocumentsApiListProductDocuments0Request {
384
+ /**
385
+ *
386
+ * @type {string}
387
+ * @memberof ProductDocumentsApiListProductDocuments0
388
+ */
389
+ readonly productSlug: string;
390
+ /**
391
+ * Bearer Token
392
+ * @type {string}
393
+ * @memberof ProductDocumentsApiListProductDocuments0
394
+ */
395
+ readonly authorization?: string;
396
+ /**
397
+ * Page size
398
+ * @type {number}
399
+ * @memberof ProductDocumentsApiListProductDocuments0
400
+ */
401
+ readonly pageSize?: number;
402
+ /**
403
+ * Page token
404
+ * @type {string}
405
+ * @memberof ProductDocumentsApiListProductDocuments0
406
+ */
407
+ readonly pageToken?: string;
408
+ /**
409
+ * List filter
410
+ * @type {string}
411
+ * @memberof ProductDocumentsApiListProductDocuments0
412
+ */
413
+ readonly filter?: string;
414
+ /**
415
+ * Search query
416
+ * @type {string}
417
+ * @memberof ProductDocumentsApiListProductDocuments0
418
+ */
419
+ readonly search?: string;
420
+ /**
421
+ * Ordering criteria
422
+ * @type {string}
423
+ * @memberof ProductDocumentsApiListProductDocuments0
424
+ */
425
+ readonly order?: string;
426
+ /**
427
+ * Extra fields to fetch
428
+ * @type {string}
429
+ * @memberof ProductDocumentsApiListProductDocuments0
430
+ */
431
+ readonly expand?: string;
432
+ }
324
433
  /**
325
434
  * Request parameters for uploadProductDocument operation in ProductDocumentsApi.
326
435
  * @export
@@ -388,7 +497,16 @@ export declare class ProductDocumentsApi extends BaseAPI {
388
497
  * @throws {RequiredError}
389
498
  * @memberof ProductDocumentsApi
390
499
  */
391
- listProductDocuments(requestParameters?: ProductDocumentsApiListProductDocumentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListProductDocumentsResponseClass, any>>;
500
+ listProductDocuments(requestParameters: ProductDocumentsApiListProductDocumentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListProductDocumentsResponseClass, any>>;
501
+ /**
502
+ * 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.
503
+ * @summary List product documents
504
+ * @param {ProductDocumentsApiListProductDocuments0Request} requestParameters Request parameters.
505
+ * @param {*} [options] Override http request option.
506
+ * @throws {RequiredError}
507
+ * @memberof ProductDocumentsApi
508
+ */
509
+ listProductDocuments_1(requestParameters: ProductDocumentsApiListProductDocuments0Request, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListProductDocumentsResponseClass, any>>;
392
510
  /**
393
511
  * Upload a product document.
394
512
  * @summary Create the product document
@@ -251,6 +251,79 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
251
251
  /**
252
252
  * 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.
253
253
  * @summary List product documents
254
+ * @param {string} productSlug
255
+ * @param {string} [authorization] Bearer Token
256
+ * @param {number} [pageSize] Page size
257
+ * @param {string} [pageToken] Page token
258
+ * @param {string} [filter] List filter
259
+ * @param {string} [search] Search query
260
+ * @param {string} [order] Ordering criteria
261
+ * @param {string} [expand] Extra fields to fetch
262
+ * @param {*} [options] Override http request option.
263
+ * @throws {RequiredError}
264
+ */
265
+ listProductDocuments: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
266
+ if (options === void 0) { options = {}; }
267
+ return __awaiter(_this, void 0, void 0, function () {
268
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
269
+ return __generator(this, function (_a) {
270
+ switch (_a.label) {
271
+ case 0:
272
+ // verify required parameter 'productSlug' is not null or undefined
273
+ (0, common_1.assertParamExists)('listProductDocuments', 'productSlug', productSlug);
274
+ localVarPath = "/documentservice/v1/documents/product/{productSlug}"
275
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
276
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
277
+ if (configuration) {
278
+ baseOptions = configuration.baseOptions;
279
+ baseAccessToken = configuration.accessToken;
280
+ }
281
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
282
+ localVarHeaderParameter = {};
283
+ localVarQueryParameter = {};
284
+ // authentication bearer required
285
+ // http bearer authentication required
286
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
287
+ case 1:
288
+ // authentication bearer required
289
+ // http bearer authentication required
290
+ _a.sent();
291
+ if (pageSize !== undefined) {
292
+ localVarQueryParameter['pageSize'] = pageSize;
293
+ }
294
+ if (pageToken !== undefined) {
295
+ localVarQueryParameter['pageToken'] = pageToken;
296
+ }
297
+ if (filter !== undefined) {
298
+ localVarQueryParameter['filter'] = filter;
299
+ }
300
+ if (search !== undefined) {
301
+ localVarQueryParameter['search'] = search;
302
+ }
303
+ if (order !== undefined) {
304
+ localVarQueryParameter['order'] = order;
305
+ }
306
+ if (expand !== undefined) {
307
+ localVarQueryParameter['expand'] = expand;
308
+ }
309
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
310
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
311
+ }
312
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
313
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
314
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
315
+ return [2 /*return*/, {
316
+ url: (0, common_1.toPathString)(localVarUrlObj),
317
+ options: localVarRequestOptions,
318
+ }];
319
+ }
320
+ });
321
+ });
322
+ },
323
+ /**
324
+ * 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.
325
+ * @summary List product documents
326
+ * @param {string} productSlug
254
327
  * @param {string} [authorization] Bearer Token
255
328
  * @param {number} [pageSize] Page size
256
329
  * @param {string} [pageToken] Page token
@@ -261,14 +334,17 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
261
334
  * @param {*} [options] Override http request option.
262
335
  * @throws {RequiredError}
263
336
  */
264
- listProductDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
337
+ listProductDocuments_1: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
265
338
  if (options === void 0) { options = {}; }
266
339
  return __awaiter(_this, void 0, void 0, function () {
267
340
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
268
341
  return __generator(this, function (_a) {
269
342
  switch (_a.label) {
270
343
  case 0:
271
- localVarPath = "/documentservice/v1/documents/product";
344
+ // verify required parameter 'productSlug' is not null or undefined
345
+ (0, common_1.assertParamExists)('listProductDocuments_1', 'productSlug', productSlug);
346
+ localVarPath = "/documentservice/v1/documents/product"
347
+ .replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
272
348
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
273
349
  if (configuration) {
274
350
  baseOptions = configuration.baseOptions;
@@ -448,6 +524,34 @@ var ProductDocumentsApiFp = function (configuration) {
448
524
  /**
449
525
  * 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.
450
526
  * @summary List product documents
527
+ * @param {string} productSlug
528
+ * @param {string} [authorization] Bearer Token
529
+ * @param {number} [pageSize] Page size
530
+ * @param {string} [pageToken] Page token
531
+ * @param {string} [filter] List filter
532
+ * @param {string} [search] Search query
533
+ * @param {string} [order] Ordering criteria
534
+ * @param {string} [expand] Extra fields to fetch
535
+ * @param {*} [options] Override http request option.
536
+ * @throws {RequiredError}
537
+ */
538
+ listProductDocuments: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
539
+ return __awaiter(this, void 0, void 0, function () {
540
+ var localVarAxiosArgs;
541
+ return __generator(this, function (_a) {
542
+ switch (_a.label) {
543
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductDocuments(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options)];
544
+ case 1:
545
+ localVarAxiosArgs = _a.sent();
546
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
547
+ }
548
+ });
549
+ });
550
+ },
551
+ /**
552
+ * 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.
553
+ * @summary List product documents
554
+ * @param {string} productSlug
451
555
  * @param {string} [authorization] Bearer Token
452
556
  * @param {number} [pageSize] Page size
453
557
  * @param {string} [pageToken] Page token
@@ -458,12 +562,12 @@ var ProductDocumentsApiFp = function (configuration) {
458
562
  * @param {*} [options] Override http request option.
459
563
  * @throws {RequiredError}
460
564
  */
461
- listProductDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
565
+ listProductDocuments_1: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
462
566
  return __awaiter(this, void 0, void 0, function () {
463
567
  var localVarAxiosArgs;
464
568
  return __generator(this, function (_a) {
465
569
  switch (_a.label) {
466
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options)];
570
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductDocuments_1(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options)];
467
571
  case 1:
468
572
  localVarAxiosArgs = _a.sent();
469
573
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -542,6 +646,7 @@ var ProductDocumentsApiFactory = function (configuration, basePath, axios) {
542
646
  /**
543
647
  * 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.
544
648
  * @summary List product documents
649
+ * @param {string} productSlug
545
650
  * @param {string} [authorization] Bearer Token
546
651
  * @param {number} [pageSize] Page size
547
652
  * @param {string} [pageToken] Page token
@@ -552,8 +657,25 @@ var ProductDocumentsApiFactory = function (configuration, basePath, axios) {
552
657
  * @param {*} [options] Override http request option.
553
658
  * @throws {RequiredError}
554
659
  */
555
- listProductDocuments: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
556
- return localVarFp.listProductDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
660
+ listProductDocuments: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
661
+ return localVarFp.listProductDocuments(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
662
+ },
663
+ /**
664
+ * 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.
665
+ * @summary List product documents
666
+ * @param {string} productSlug
667
+ * @param {string} [authorization] Bearer Token
668
+ * @param {number} [pageSize] Page size
669
+ * @param {string} [pageToken] Page token
670
+ * @param {string} [filter] List filter
671
+ * @param {string} [search] Search query
672
+ * @param {string} [order] Ordering criteria
673
+ * @param {string} [expand] Extra fields to fetch
674
+ * @param {*} [options] Override http request option.
675
+ * @throws {RequiredError}
676
+ */
677
+ listProductDocuments_1: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options) {
678
+ return localVarFp.listProductDocuments_1(productSlug, authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
557
679
  },
558
680
  /**
559
681
  * Upload a product document.
@@ -627,8 +749,19 @@ var ProductDocumentsApi = /** @class */ (function (_super) {
627
749
  */
628
750
  ProductDocumentsApi.prototype.listProductDocuments = function (requestParameters, options) {
629
751
  var _this = this;
630
- if (requestParameters === void 0) { requestParameters = {}; }
631
- return (0, exports.ProductDocumentsApiFp)(this.configuration).listProductDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
752
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).listProductDocuments(requestParameters.productSlug, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
753
+ };
754
+ /**
755
+ * 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.
756
+ * @summary List product documents
757
+ * @param {ProductDocumentsApiListProductDocuments0Request} requestParameters Request parameters.
758
+ * @param {*} [options] Override http request option.
759
+ * @throws {RequiredError}
760
+ * @memberof ProductDocumentsApi
761
+ */
762
+ ProductDocumentsApi.prototype.listProductDocuments_1 = function (requestParameters, options) {
763
+ var _this = this;
764
+ return (0, exports.ProductDocumentsApiFp)(this.configuration).listProductDocuments_1(requestParameters.productSlug, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
632
765
  };
633
766
  /**
634
767
  * Upload a product document.
package/dist/base.js CHANGED
@@ -125,6 +125,7 @@ var BaseAPI = /** @class */ (function () {
125
125
  if (configuration) {
126
126
  this.configuration = configuration;
127
127
  this.basePath = configuration.basePath || this.basePath;
128
+ this.configuration.accessToken = this.tokenData.accessToken ? "Bearer ".concat(this.tokenData.accessToken) : '';
128
129
  }
129
130
  else {
130
131
  var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
@@ -64,7 +64,7 @@ export interface DocxTemplateClass {
64
64
  */
65
65
  'entityType': string;
66
66
  /**
67
- * Name of the file the end user will see when they downloads it.
67
+ * Name of the file the end user will see when he downloads it.
68
68
  * @type {string}
69
69
  * @memberof DocxTemplateClass
70
70
  */
@@ -23,32 +23,32 @@ export interface InlineResponse200 {
23
23
  'status'?: string;
24
24
  /**
25
25
  *
26
- * @type {{ [key: string]: { [key: string]: string; }; }}
26
+ * @type {{ [key: string]: { [key: string]: object; }; }}
27
27
  * @memberof InlineResponse200
28
28
  */
29
29
  'info'?: {
30
30
  [key: string]: {
31
- [key: string]: string;
31
+ [key: string]: object;
32
32
  };
33
33
  } | null;
34
34
  /**
35
35
  *
36
- * @type {{ [key: string]: { [key: string]: string; }; }}
36
+ * @type {{ [key: string]: { [key: string]: object; }; }}
37
37
  * @memberof InlineResponse200
38
38
  */
39
39
  'error'?: {
40
40
  [key: string]: {
41
- [key: string]: string;
41
+ [key: string]: object;
42
42
  };
43
43
  } | null;
44
44
  /**
45
45
  *
46
- * @type {{ [key: string]: { [key: string]: string; }; }}
46
+ * @type {{ [key: string]: { [key: string]: object; }; }}
47
47
  * @memberof InlineResponse200
48
48
  */
49
49
  'details'?: {
50
50
  [key: string]: {
51
- [key: string]: string;
51
+ [key: string]: object;
52
52
  };
53
53
  };
54
54
  }
@@ -23,32 +23,32 @@ export interface InlineResponse503 {
23
23
  'status'?: string;
24
24
  /**
25
25
  *
26
- * @type {{ [key: string]: { [key: string]: string; }; }}
26
+ * @type {{ [key: string]: { [key: string]: object; }; }}
27
27
  * @memberof InlineResponse503
28
28
  */
29
29
  'info'?: {
30
30
  [key: string]: {
31
- [key: string]: string;
31
+ [key: string]: object;
32
32
  };
33
33
  } | null;
34
34
  /**
35
35
  *
36
- * @type {{ [key: string]: { [key: string]: string; }; }}
36
+ * @type {{ [key: string]: { [key: string]: object; }; }}
37
37
  * @memberof InlineResponse503
38
38
  */
39
39
  'error'?: {
40
40
  [key: string]: {
41
- [key: string]: string;
41
+ [key: string]: object;
42
42
  };
43
43
  } | null;
44
44
  /**
45
45
  *
46
- * @type {{ [key: string]: { [key: string]: string; }; }}
46
+ * @type {{ [key: string]: { [key: string]: object; }; }}
47
47
  * @memberof InlineResponse503
48
48
  */
49
49
  'details'?: {
50
50
  [key: string]: {
51
- [key: string]: string;
51
+ [key: string]: object;
52
52
  };
53
53
  };
54
54
  }
@@ -76,7 +76,7 @@ export interface ProductDocumentClass {
76
76
  */
77
77
  'entityType': string;
78
78
  /**
79
- * Name of the file the end user will see when they downloads it.
79
+ * The file name the end user will see when downloading it.
80
80
  * @type {string}
81
81
  * @memberof ProductDocumentClass
82
82
  */
@@ -69,7 +69,7 @@ export interface DocxTemplateClass {
69
69
  */
70
70
  'entityType': string;
71
71
  /**
72
- * Name of the file the end user will see when they downloads it.
72
+ * Name of the file the end user will see when he downloads it.
73
73
  * @type {string}
74
74
  * @memberof DocxTemplateClass
75
75
  */
@@ -28,21 +28,21 @@ export interface InlineResponse200 {
28
28
  'status'?: string;
29
29
  /**
30
30
  *
31
- * @type {{ [key: string]: { [key: string]: string; }; }}
31
+ * @type {{ [key: string]: { [key: string]: object; }; }}
32
32
  * @memberof InlineResponse200
33
33
  */
34
- 'info'?: { [key: string]: { [key: string]: string; }; } | null;
34
+ 'info'?: { [key: string]: { [key: string]: object; }; } | null;
35
35
  /**
36
36
  *
37
- * @type {{ [key: string]: { [key: string]: string; }; }}
37
+ * @type {{ [key: string]: { [key: string]: object; }; }}
38
38
  * @memberof InlineResponse200
39
39
  */
40
- 'error'?: { [key: string]: { [key: string]: string; }; } | null;
40
+ 'error'?: { [key: string]: { [key: string]: object; }; } | null;
41
41
  /**
42
42
  *
43
- * @type {{ [key: string]: { [key: string]: string; }; }}
43
+ * @type {{ [key: string]: { [key: string]: object; }; }}
44
44
  * @memberof InlineResponse200
45
45
  */
46
- 'details'?: { [key: string]: { [key: string]: string; }; };
46
+ 'details'?: { [key: string]: { [key: string]: object; }; };
47
47
  }
48
48
 
@@ -28,21 +28,21 @@ export interface InlineResponse503 {
28
28
  'status'?: string;
29
29
  /**
30
30
  *
31
- * @type {{ [key: string]: { [key: string]: string; }; }}
31
+ * @type {{ [key: string]: { [key: string]: object; }; }}
32
32
  * @memberof InlineResponse503
33
33
  */
34
- 'info'?: { [key: string]: { [key: string]: string; }; } | null;
34
+ 'info'?: { [key: string]: { [key: string]: object; }; } | null;
35
35
  /**
36
36
  *
37
- * @type {{ [key: string]: { [key: string]: string; }; }}
37
+ * @type {{ [key: string]: { [key: string]: object; }; }}
38
38
  * @memberof InlineResponse503
39
39
  */
40
- 'error'?: { [key: string]: { [key: string]: string; }; } | null;
40
+ 'error'?: { [key: string]: { [key: string]: object; }; } | null;
41
41
  /**
42
42
  *
43
- * @type {{ [key: string]: { [key: string]: string; }; }}
43
+ * @type {{ [key: string]: { [key: string]: object; }; }}
44
44
  * @memberof InlineResponse503
45
45
  */
46
- 'details'?: { [key: string]: { [key: string]: string; }; };
46
+ 'details'?: { [key: string]: { [key: string]: object; }; };
47
47
  }
48
48
 
@@ -81,7 +81,7 @@ export interface ProductDocumentClass {
81
81
  */
82
82
  'entityType': string;
83
83
  /**
84
- * Name of the file the end user will see when they downloads it.
84
+ * The file name the end user will see when downloading it.
85
85
  * @type {string}
86
86
  * @memberof ProductDocumentClass
87
87
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/document-sdk",
3
- "version": "1.16.0",
3
+ "version": "1.20.0",
4
4
  "description": "OpenAPI client for @emilgroup/document-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [