@emilgroup/document-sdk 1.11.1 → 1.12.2

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.11.1 --save
20
+ npm install @emilgroup/document-sdk@1.12.2 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/document-sdk@1.11.1
24
+ yarn add @emilgroup/document-sdk@1.12.2
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
  /**
@@ -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
 
@@ -69,7 +69,7 @@ export interface ProductDocumentClass {
69
69
  */
70
70
  's3Key': string;
71
71
  /**
72
- * Type of the document expressed with its file extension.
72
+ * Extension of the file.
73
73
  * @type {string}
74
74
  * @memberof ProductDocumentClass
75
75
  */
@@ -80,6 +80,12 @@ export interface ProductDocumentClass {
80
80
  * @memberof ProductDocumentClass
81
81
  */
82
82
  'entityType': string;
83
+ /**
84
+ * The file name the end user will see when downloading it.
85
+ * @type {string}
86
+ * @memberof ProductDocumentClass
87
+ */
88
+ 'filename': string;
83
89
  /**
84
90
  * A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
85
91
  * @type {string}
@@ -110,21 +116,9 @@ export const ProductDocumentClassContentTypeEnum = {
110
116
  Pdf: 'pdf',
111
117
  Jpg: 'jpg',
112
118
  Png: 'png',
113
- Gz: 'gz',
114
119
  Csv: 'csv',
115
120
  Doc: 'doc',
116
- Docx: 'docx',
117
- Html: 'html',
118
- Json: 'json',
119
- Xml: 'xml',
120
- Txt: 'txt',
121
- Zip: 'zip',
122
- Tar: 'tar',
123
- Rar: 'rar',
124
- Mp4: 'MP4',
125
- Mov: 'MOV',
126
- Wmv: 'WMV',
127
- Avi: 'AVI'
121
+ Docx: 'docx'
128
122
  } as const;
129
123
 
130
124
  export type ProductDocumentClassContentTypeEnum = typeof ProductDocumentClassContentTypeEnum[keyof typeof ProductDocumentClassContentTypeEnum];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/document-sdk",
3
- "version": "1.11.1",
3
+ "version": "1.12.2",
4
4
  "description": "OpenAPI client for @emilgroup/document-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [