@emilgroup/document-sdk-node 1.24.0 → 1.24.1-beta.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 +2 -2
- package/api/documents-api.ts +48 -16
- package/api/product-documents-api.ts +38 -22
- package/dist/api/documents-api.d.ts +28 -10
- package/dist/api/documents-api.js +31 -15
- package/dist/api/product-documents-api.d.ts +28 -19
- package/dist/api/product-documents-api.js +26 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/document-sdk-node@1.24.0 --save
|
|
20
|
+
npm install @emilgroup/document-sdk-node@1.24.1-beta.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/document-sdk-node@1.24.0
|
|
24
|
+
yarn add @emilgroup/document-sdk-node@1.24.1-beta.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `DocumentsApi`.
|
package/api/documents-api.ts
CHANGED
|
@@ -178,14 +178,17 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
178
178
|
/**
|
|
179
179
|
* This will return a presigned URL to download the document.
|
|
180
180
|
* @summary Fetches a document download URL
|
|
181
|
-
* @param {string} code
|
|
181
|
+
* @param {string} code Document code
|
|
182
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
182
183
|
* @param {string} [authorization] Bearer Token
|
|
183
184
|
* @param {*} [options] Override http request option.
|
|
184
185
|
* @throws {RequiredError}
|
|
185
186
|
*/
|
|
186
|
-
getDocumentDownloadUrl: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
187
|
+
getDocumentDownloadUrl: async (code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
187
188
|
// verify required parameter 'code' is not null or undefined
|
|
188
189
|
assertParamExists('getDocumentDownloadUrl', 'code', code)
|
|
190
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
191
|
+
assertParamExists('getDocumentDownloadUrl', 'contentDisposition', contentDisposition)
|
|
189
192
|
const localVarPath = `/documentservice/v1/documents/{code}/download-url`
|
|
190
193
|
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
191
194
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -205,6 +208,10 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
205
208
|
// http bearer authentication required
|
|
206
209
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
207
210
|
|
|
211
|
+
if (contentDisposition !== undefined) {
|
|
212
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
213
|
+
}
|
|
214
|
+
|
|
208
215
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
209
216
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
210
217
|
}
|
|
@@ -224,13 +231,16 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
224
231
|
* This will return a presigned URL for a random S3 key
|
|
225
232
|
* @summary Fetches a presigned URL for a S3 key
|
|
226
233
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
234
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
227
235
|
* @param {string} [authorization] Bearer Token
|
|
228
236
|
* @param {*} [options] Override http request option.
|
|
229
237
|
* @throws {RequiredError}
|
|
230
238
|
*/
|
|
231
|
-
getSignedS3keyUrl: async (s3Key: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
239
|
+
getSignedS3keyUrl: async (s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
232
240
|
// verify required parameter 's3Key' is not null or undefined
|
|
233
241
|
assertParamExists('getSignedS3keyUrl', 's3Key', s3Key)
|
|
242
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
243
|
+
assertParamExists('getSignedS3keyUrl', 'contentDisposition', contentDisposition)
|
|
234
244
|
const localVarPath = `/documentservice/v1/documents/signed-s3-url`;
|
|
235
245
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
236
246
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -253,6 +263,10 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
253
263
|
localVarQueryParameter['s3Key'] = s3Key;
|
|
254
264
|
}
|
|
255
265
|
|
|
266
|
+
if (contentDisposition !== undefined) {
|
|
267
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
268
|
+
}
|
|
269
|
+
|
|
256
270
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
257
271
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
258
272
|
}
|
|
@@ -444,25 +458,27 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
|
|
|
444
458
|
/**
|
|
445
459
|
* This will return a presigned URL to download the document.
|
|
446
460
|
* @summary Fetches a document download URL
|
|
447
|
-
* @param {string} code
|
|
461
|
+
* @param {string} code Document code
|
|
462
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
448
463
|
* @param {string} [authorization] Bearer Token
|
|
449
464
|
* @param {*} [options] Override http request option.
|
|
450
465
|
* @throws {RequiredError}
|
|
451
466
|
*/
|
|
452
|
-
async getDocumentDownloadUrl(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
453
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getDocumentDownloadUrl(code, authorization, options);
|
|
467
|
+
async getDocumentDownloadUrl(code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
468
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getDocumentDownloadUrl(code, contentDisposition, authorization, options);
|
|
454
469
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
455
470
|
},
|
|
456
471
|
/**
|
|
457
472
|
* This will return a presigned URL for a random S3 key
|
|
458
473
|
* @summary Fetches a presigned URL for a S3 key
|
|
459
474
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
475
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
460
476
|
* @param {string} [authorization] Bearer Token
|
|
461
477
|
* @param {*} [options] Override http request option.
|
|
462
478
|
* @throws {RequiredError}
|
|
463
479
|
*/
|
|
464
|
-
async getSignedS3keyUrl(s3Key: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
465
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, authorization, options);
|
|
480
|
+
async getSignedS3keyUrl(s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
481
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, contentDisposition, authorization, options);
|
|
466
482
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
467
483
|
},
|
|
468
484
|
/**
|
|
@@ -542,24 +558,26 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
|
|
|
542
558
|
/**
|
|
543
559
|
* This will return a presigned URL to download the document.
|
|
544
560
|
* @summary Fetches a document download URL
|
|
545
|
-
* @param {string} code
|
|
561
|
+
* @param {string} code Document code
|
|
562
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
546
563
|
* @param {string} [authorization] Bearer Token
|
|
547
564
|
* @param {*} [options] Override http request option.
|
|
548
565
|
* @throws {RequiredError}
|
|
549
566
|
*/
|
|
550
|
-
getDocumentDownloadUrl(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
551
|
-
return localVarFp.getDocumentDownloadUrl(code, authorization, options).then((request) => request(axios, basePath));
|
|
567
|
+
getDocumentDownloadUrl(code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void> {
|
|
568
|
+
return localVarFp.getDocumentDownloadUrl(code, contentDisposition, authorization, options).then((request) => request(axios, basePath));
|
|
552
569
|
},
|
|
553
570
|
/**
|
|
554
571
|
* This will return a presigned URL for a random S3 key
|
|
555
572
|
* @summary Fetches a presigned URL for a S3 key
|
|
556
573
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
574
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
557
575
|
* @param {string} [authorization] Bearer Token
|
|
558
576
|
* @param {*} [options] Override http request option.
|
|
559
577
|
* @throws {RequiredError}
|
|
560
578
|
*/
|
|
561
|
-
getSignedS3keyUrl(s3Key: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
562
|
-
return localVarFp.getSignedS3keyUrl(s3Key, authorization, options).then((request) => request(axios, basePath));
|
|
579
|
+
getSignedS3keyUrl(s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void> {
|
|
580
|
+
return localVarFp.getSignedS3keyUrl(s3Key, contentDisposition, authorization, options).then((request) => request(axios, basePath));
|
|
563
581
|
},
|
|
564
582
|
/**
|
|
565
583
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
@@ -663,12 +681,19 @@ export interface DocumentsApiDeleteDocumentRequest {
|
|
|
663
681
|
*/
|
|
664
682
|
export interface DocumentsApiGetDocumentDownloadUrlRequest {
|
|
665
683
|
/**
|
|
666
|
-
*
|
|
684
|
+
* Document code
|
|
667
685
|
* @type {string}
|
|
668
686
|
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
669
687
|
*/
|
|
670
688
|
readonly code: string
|
|
671
689
|
|
|
690
|
+
/**
|
|
691
|
+
* Content disposition override. Default will be depending on the document type.
|
|
692
|
+
* @type {'attachment' | 'inline'}
|
|
693
|
+
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
694
|
+
*/
|
|
695
|
+
readonly contentDisposition: 'attachment' | 'inline'
|
|
696
|
+
|
|
672
697
|
/**
|
|
673
698
|
* Bearer Token
|
|
674
699
|
* @type {string}
|
|
@@ -690,6 +715,13 @@ export interface DocumentsApiGetSignedS3keyUrlRequest {
|
|
|
690
715
|
*/
|
|
691
716
|
readonly s3Key: string
|
|
692
717
|
|
|
718
|
+
/**
|
|
719
|
+
* Content disposition override. Default will be depending on the document type.
|
|
720
|
+
* @type {'attachment' | 'inline'}
|
|
721
|
+
* @memberof DocumentsApiGetSignedS3keyUrl
|
|
722
|
+
*/
|
|
723
|
+
readonly contentDisposition: 'attachment' | 'inline'
|
|
724
|
+
|
|
693
725
|
/**
|
|
694
726
|
* Bearer Token
|
|
695
727
|
* @type {string}
|
|
@@ -841,7 +873,7 @@ export class DocumentsApi extends BaseAPI {
|
|
|
841
873
|
* @memberof DocumentsApi
|
|
842
874
|
*/
|
|
843
875
|
public getDocumentDownloadUrl(requestParameters: DocumentsApiGetDocumentDownloadUrlRequest, options?: AxiosRequestConfig) {
|
|
844
|
-
return DocumentsApiFp(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
876
|
+
return DocumentsApiFp(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.contentDisposition, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
845
877
|
}
|
|
846
878
|
|
|
847
879
|
/**
|
|
@@ -853,7 +885,7 @@ export class DocumentsApi extends BaseAPI {
|
|
|
853
885
|
* @memberof DocumentsApi
|
|
854
886
|
*/
|
|
855
887
|
public getSignedS3keyUrl(requestParameters: DocumentsApiGetSignedS3keyUrlRequest, options?: AxiosRequestConfig) {
|
|
856
|
-
return DocumentsApiFp(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
888
|
+
return DocumentsApiFp(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.contentDisposition, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
857
889
|
}
|
|
858
890
|
|
|
859
891
|
/**
|
|
@@ -86,17 +86,20 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
|
|
|
86
86
|
/**
|
|
87
87
|
* Get a pre-signed download url for the given product document.
|
|
88
88
|
* @summary Get pre-signed url for downloading product document
|
|
89
|
-
* @param {string} productSlug
|
|
90
|
-
* @param {string} code
|
|
89
|
+
* @param {string} productSlug Product slug
|
|
90
|
+
* @param {string} code Product document code
|
|
91
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
91
92
|
* @param {string} [authorization] Bearer Token
|
|
92
93
|
* @param {*} [options] Override http request option.
|
|
93
94
|
* @throws {RequiredError}
|
|
94
95
|
*/
|
|
95
|
-
downloadProductDocument: async (productSlug: string, code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
96
|
+
downloadProductDocument: async (productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
96
97
|
// verify required parameter 'productSlug' is not null or undefined
|
|
97
98
|
assertParamExists('downloadProductDocument', 'productSlug', productSlug)
|
|
98
99
|
// verify required parameter 'code' is not null or undefined
|
|
99
100
|
assertParamExists('downloadProductDocument', 'code', code)
|
|
101
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
102
|
+
assertParamExists('downloadProductDocument', 'contentDisposition', contentDisposition)
|
|
100
103
|
const localVarPath = `/documentservice/v1/product-documents/{productSlug}/{code}/download-url`
|
|
101
104
|
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)))
|
|
102
105
|
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
@@ -117,6 +120,10 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
|
|
|
117
120
|
// http bearer authentication required
|
|
118
121
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
119
122
|
|
|
123
|
+
if (contentDisposition !== undefined) {
|
|
124
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
125
|
+
}
|
|
126
|
+
|
|
120
127
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
121
128
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
122
129
|
}
|
|
@@ -188,11 +195,11 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
|
|
|
188
195
|
* @param {string} [authorization] Bearer Token
|
|
189
196
|
* @param {number} [pageSize] Page size
|
|
190
197
|
* @param {string} [pageToken] Page token
|
|
191
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
198
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
192
199
|
* @param {string} [search] Search query
|
|
193
200
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, filename</i>
|
|
194
201
|
* @param {string} [expand] Extra fields to fetch
|
|
195
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
202
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
196
203
|
* @param {*} [options] Override http request option.
|
|
197
204
|
* @throws {RequiredError}
|
|
198
205
|
*/
|
|
@@ -338,14 +345,15 @@ export const ProductDocumentsApiFp = function(configuration?: Configuration) {
|
|
|
338
345
|
/**
|
|
339
346
|
* Get a pre-signed download url for the given product document.
|
|
340
347
|
* @summary Get pre-signed url for downloading product document
|
|
341
|
-
* @param {string} productSlug
|
|
342
|
-
* @param {string} code
|
|
348
|
+
* @param {string} productSlug Product slug
|
|
349
|
+
* @param {string} code Product document code
|
|
350
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
343
351
|
* @param {string} [authorization] Bearer Token
|
|
344
352
|
* @param {*} [options] Override http request option.
|
|
345
353
|
* @throws {RequiredError}
|
|
346
354
|
*/
|
|
347
|
-
async downloadProductDocument(productSlug: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
348
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadProductDocument(productSlug, code, authorization, options);
|
|
355
|
+
async downloadProductDocument(productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
356
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadProductDocument(productSlug, code, contentDisposition, authorization, options);
|
|
349
357
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
350
358
|
},
|
|
351
359
|
/**
|
|
@@ -368,11 +376,11 @@ export const ProductDocumentsApiFp = function(configuration?: Configuration) {
|
|
|
368
376
|
* @param {string} [authorization] Bearer Token
|
|
369
377
|
* @param {number} [pageSize] Page size
|
|
370
378
|
* @param {string} [pageToken] Page token
|
|
371
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
379
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
372
380
|
* @param {string} [search] Search query
|
|
373
381
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, filename</i>
|
|
374
382
|
* @param {string} [expand] Extra fields to fetch
|
|
375
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
383
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
376
384
|
* @param {*} [options] Override http request option.
|
|
377
385
|
* @throws {RequiredError}
|
|
378
386
|
*/
|
|
@@ -418,14 +426,15 @@ export const ProductDocumentsApiFactory = function (configuration?: Configuratio
|
|
|
418
426
|
/**
|
|
419
427
|
* Get a pre-signed download url for the given product document.
|
|
420
428
|
* @summary Get pre-signed url for downloading product document
|
|
421
|
-
* @param {string} productSlug
|
|
422
|
-
* @param {string} code
|
|
429
|
+
* @param {string} productSlug Product slug
|
|
430
|
+
* @param {string} code Product document code
|
|
431
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
423
432
|
* @param {string} [authorization] Bearer Token
|
|
424
433
|
* @param {*} [options] Override http request option.
|
|
425
434
|
* @throws {RequiredError}
|
|
426
435
|
*/
|
|
427
|
-
downloadProductDocument(productSlug: string, code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
428
|
-
return localVarFp.downloadProductDocument(productSlug, code, authorization, options).then((request) => request(axios, basePath));
|
|
436
|
+
downloadProductDocument(productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void> {
|
|
437
|
+
return localVarFp.downloadProductDocument(productSlug, code, contentDisposition, authorization, options).then((request) => request(axios, basePath));
|
|
429
438
|
},
|
|
430
439
|
/**
|
|
431
440
|
* Get a product document.
|
|
@@ -446,11 +455,11 @@ export const ProductDocumentsApiFactory = function (configuration?: Configuratio
|
|
|
446
455
|
* @param {string} [authorization] Bearer Token
|
|
447
456
|
* @param {number} [pageSize] Page size
|
|
448
457
|
* @param {string} [pageToken] Page token
|
|
449
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
458
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
450
459
|
* @param {string} [search] Search query
|
|
451
460
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, filename</i>
|
|
452
461
|
* @param {string} [expand] Extra fields to fetch
|
|
453
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
462
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
454
463
|
* @param {*} [options] Override http request option.
|
|
455
464
|
* @throws {RequiredError}
|
|
456
465
|
*/
|
|
@@ -507,19 +516,26 @@ export interface ProductDocumentsApiDeleteProductDocumentRequest {
|
|
|
507
516
|
*/
|
|
508
517
|
export interface ProductDocumentsApiDownloadProductDocumentRequest {
|
|
509
518
|
/**
|
|
510
|
-
*
|
|
519
|
+
* Product slug
|
|
511
520
|
* @type {string}
|
|
512
521
|
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
513
522
|
*/
|
|
514
523
|
readonly productSlug: string
|
|
515
524
|
|
|
516
525
|
/**
|
|
517
|
-
*
|
|
526
|
+
* Product document code
|
|
518
527
|
* @type {string}
|
|
519
528
|
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
520
529
|
*/
|
|
521
530
|
readonly code: string
|
|
522
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Content disposition override. Default will be depending on the document type.
|
|
534
|
+
* @type {'attachment' | 'inline'}
|
|
535
|
+
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
536
|
+
*/
|
|
537
|
+
readonly contentDisposition: 'attachment' | 'inline'
|
|
538
|
+
|
|
523
539
|
/**
|
|
524
540
|
* Bearer Token
|
|
525
541
|
* @type {string}
|
|
@@ -591,7 +607,7 @@ export interface ProductDocumentsApiListProductDocumentsRequest {
|
|
|
591
607
|
readonly pageToken?: string
|
|
592
608
|
|
|
593
609
|
/**
|
|
594
|
-
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
610
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
595
611
|
* @type {string}
|
|
596
612
|
* @memberof ProductDocumentsApiListProductDocuments
|
|
597
613
|
*/
|
|
@@ -619,7 +635,7 @@ export interface ProductDocumentsApiListProductDocumentsRequest {
|
|
|
619
635
|
readonly expand?: string
|
|
620
636
|
|
|
621
637
|
/**
|
|
622
|
-
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
638
|
+
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
623
639
|
* @type {string}
|
|
624
640
|
* @memberof ProductDocumentsApiListProductDocuments
|
|
625
641
|
*/
|
|
@@ -682,7 +698,7 @@ export class ProductDocumentsApi extends BaseAPI {
|
|
|
682
698
|
* @memberof ProductDocumentsApi
|
|
683
699
|
*/
|
|
684
700
|
public downloadProductDocument(requestParameters: ProductDocumentsApiDownloadProductDocumentRequest, options?: AxiosRequestConfig) {
|
|
685
|
-
return ProductDocumentsApiFp(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
701
|
+
return ProductDocumentsApiFp(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.contentDisposition, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
686
702
|
}
|
|
687
703
|
|
|
688
704
|
/**
|
|
@@ -50,21 +50,23 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
|
|
|
50
50
|
/**
|
|
51
51
|
* This will return a presigned URL to download the document.
|
|
52
52
|
* @summary Fetches a document download URL
|
|
53
|
-
* @param {string} code
|
|
53
|
+
* @param {string} code Document code
|
|
54
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
54
55
|
* @param {string} [authorization] Bearer Token
|
|
55
56
|
* @param {*} [options] Override http request option.
|
|
56
57
|
* @throws {RequiredError}
|
|
57
58
|
*/
|
|
58
|
-
getDocumentDownloadUrl: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
59
|
+
getDocumentDownloadUrl: (code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
59
60
|
/**
|
|
60
61
|
* This will return a presigned URL for a random S3 key
|
|
61
62
|
* @summary Fetches a presigned URL for a S3 key
|
|
62
63
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
64
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
63
65
|
* @param {string} [authorization] Bearer Token
|
|
64
66
|
* @param {*} [options] Override http request option.
|
|
65
67
|
* @throws {RequiredError}
|
|
66
68
|
*/
|
|
67
|
-
getSignedS3keyUrl: (s3Key: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
69
|
+
getSignedS3keyUrl: (s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
68
70
|
/**
|
|
69
71
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
70
72
|
* @summary List documents
|
|
@@ -126,21 +128,23 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
|
|
|
126
128
|
/**
|
|
127
129
|
* This will return a presigned URL to download the document.
|
|
128
130
|
* @summary Fetches a document download URL
|
|
129
|
-
* @param {string} code
|
|
131
|
+
* @param {string} code Document code
|
|
132
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
130
133
|
* @param {string} [authorization] Bearer Token
|
|
131
134
|
* @param {*} [options] Override http request option.
|
|
132
135
|
* @throws {RequiredError}
|
|
133
136
|
*/
|
|
134
|
-
getDocumentDownloadUrl(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
137
|
+
getDocumentDownloadUrl(code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
135
138
|
/**
|
|
136
139
|
* This will return a presigned URL for a random S3 key
|
|
137
140
|
* @summary Fetches a presigned URL for a S3 key
|
|
138
141
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
142
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
139
143
|
* @param {string} [authorization] Bearer Token
|
|
140
144
|
* @param {*} [options] Override http request option.
|
|
141
145
|
* @throws {RequiredError}
|
|
142
146
|
*/
|
|
143
|
-
getSignedS3keyUrl(s3Key: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
147
|
+
getSignedS3keyUrl(s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
144
148
|
/**
|
|
145
149
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
146
150
|
* @summary List documents
|
|
@@ -202,21 +206,23 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
|
|
|
202
206
|
/**
|
|
203
207
|
* This will return a presigned URL to download the document.
|
|
204
208
|
* @summary Fetches a document download URL
|
|
205
|
-
* @param {string} code
|
|
209
|
+
* @param {string} code Document code
|
|
210
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
206
211
|
* @param {string} [authorization] Bearer Token
|
|
207
212
|
* @param {*} [options] Override http request option.
|
|
208
213
|
* @throws {RequiredError}
|
|
209
214
|
*/
|
|
210
|
-
getDocumentDownloadUrl(code: string, authorization?: string, options?: any): AxiosPromise<void>;
|
|
215
|
+
getDocumentDownloadUrl(code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void>;
|
|
211
216
|
/**
|
|
212
217
|
* This will return a presigned URL for a random S3 key
|
|
213
218
|
* @summary Fetches a presigned URL for a S3 key
|
|
214
219
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
220
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
215
221
|
* @param {string} [authorization] Bearer Token
|
|
216
222
|
* @param {*} [options] Override http request option.
|
|
217
223
|
* @throws {RequiredError}
|
|
218
224
|
*/
|
|
219
|
-
getSignedS3keyUrl(s3Key: string, authorization?: string, options?: any): AxiosPromise<void>;
|
|
225
|
+
getSignedS3keyUrl(s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void>;
|
|
220
226
|
/**
|
|
221
227
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
222
228
|
* @summary List documents
|
|
@@ -307,11 +313,17 @@ export interface DocumentsApiDeleteDocumentRequest {
|
|
|
307
313
|
*/
|
|
308
314
|
export interface DocumentsApiGetDocumentDownloadUrlRequest {
|
|
309
315
|
/**
|
|
310
|
-
*
|
|
316
|
+
* Document code
|
|
311
317
|
* @type {string}
|
|
312
318
|
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
313
319
|
*/
|
|
314
320
|
readonly code: string;
|
|
321
|
+
/**
|
|
322
|
+
* Content disposition override. Default will be depending on the document type.
|
|
323
|
+
* @type {'attachment' | 'inline'}
|
|
324
|
+
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
325
|
+
*/
|
|
326
|
+
readonly contentDisposition: 'attachment' | 'inline';
|
|
315
327
|
/**
|
|
316
328
|
* Bearer Token
|
|
317
329
|
* @type {string}
|
|
@@ -331,6 +343,12 @@ export interface DocumentsApiGetSignedS3keyUrlRequest {
|
|
|
331
343
|
* @memberof DocumentsApiGetSignedS3keyUrl
|
|
332
344
|
*/
|
|
333
345
|
readonly s3Key: string;
|
|
346
|
+
/**
|
|
347
|
+
* Content disposition override. Default will be depending on the document type.
|
|
348
|
+
* @type {'attachment' | 'inline'}
|
|
349
|
+
* @memberof DocumentsApiGetSignedS3keyUrl
|
|
350
|
+
*/
|
|
351
|
+
readonly contentDisposition: 'attachment' | 'inline';
|
|
334
352
|
/**
|
|
335
353
|
* Bearer Token
|
|
336
354
|
* @type {string}
|
|
@@ -245,12 +245,13 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
245
245
|
/**
|
|
246
246
|
* This will return a presigned URL to download the document.
|
|
247
247
|
* @summary Fetches a document download URL
|
|
248
|
-
* @param {string} code
|
|
248
|
+
* @param {string} code Document code
|
|
249
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
249
250
|
* @param {string} [authorization] Bearer Token
|
|
250
251
|
* @param {*} [options] Override http request option.
|
|
251
252
|
* @throws {RequiredError}
|
|
252
253
|
*/
|
|
253
|
-
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
254
|
+
getDocumentDownloadUrl: function (code, contentDisposition, authorization, options) {
|
|
254
255
|
if (options === void 0) { options = {}; }
|
|
255
256
|
return __awaiter(_this, void 0, void 0, function () {
|
|
256
257
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -259,6 +260,8 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
259
260
|
case 0:
|
|
260
261
|
// verify required parameter 'code' is not null or undefined
|
|
261
262
|
(0, common_1.assertParamExists)('getDocumentDownloadUrl', 'code', code);
|
|
263
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
264
|
+
(0, common_1.assertParamExists)('getDocumentDownloadUrl', 'contentDisposition', contentDisposition);
|
|
262
265
|
localVarPath = "/documentservice/v1/documents/{code}/download-url"
|
|
263
266
|
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
264
267
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -276,6 +279,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
276
279
|
// authentication bearer required
|
|
277
280
|
// http bearer authentication required
|
|
278
281
|
_a.sent();
|
|
282
|
+
if (contentDisposition !== undefined) {
|
|
283
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
284
|
+
}
|
|
279
285
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
280
286
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
281
287
|
}
|
|
@@ -294,11 +300,12 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
294
300
|
* This will return a presigned URL for a random S3 key
|
|
295
301
|
* @summary Fetches a presigned URL for a S3 key
|
|
296
302
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
303
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
297
304
|
* @param {string} [authorization] Bearer Token
|
|
298
305
|
* @param {*} [options] Override http request option.
|
|
299
306
|
* @throws {RequiredError}
|
|
300
307
|
*/
|
|
301
|
-
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
308
|
+
getSignedS3keyUrl: function (s3Key, contentDisposition, authorization, options) {
|
|
302
309
|
if (options === void 0) { options = {}; }
|
|
303
310
|
return __awaiter(_this, void 0, void 0, function () {
|
|
304
311
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -307,6 +314,8 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
307
314
|
case 0:
|
|
308
315
|
// verify required parameter 's3Key' is not null or undefined
|
|
309
316
|
(0, common_1.assertParamExists)('getSignedS3keyUrl', 's3Key', s3Key);
|
|
317
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
318
|
+
(0, common_1.assertParamExists)('getSignedS3keyUrl', 'contentDisposition', contentDisposition);
|
|
310
319
|
localVarPath = "/documentservice/v1/documents/signed-s3-url";
|
|
311
320
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
312
321
|
if (configuration) {
|
|
@@ -326,6 +335,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
326
335
|
if (s3Key !== undefined) {
|
|
327
336
|
localVarQueryParameter['s3Key'] = s3Key;
|
|
328
337
|
}
|
|
338
|
+
if (contentDisposition !== undefined) {
|
|
339
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
340
|
+
}
|
|
329
341
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
330
342
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
331
343
|
}
|
|
@@ -541,17 +553,18 @@ var DocumentsApiFp = function (configuration) {
|
|
|
541
553
|
/**
|
|
542
554
|
* This will return a presigned URL to download the document.
|
|
543
555
|
* @summary Fetches a document download URL
|
|
544
|
-
* @param {string} code
|
|
556
|
+
* @param {string} code Document code
|
|
557
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
545
558
|
* @param {string} [authorization] Bearer Token
|
|
546
559
|
* @param {*} [options] Override http request option.
|
|
547
560
|
* @throws {RequiredError}
|
|
548
561
|
*/
|
|
549
|
-
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
562
|
+
getDocumentDownloadUrl: function (code, contentDisposition, authorization, options) {
|
|
550
563
|
return __awaiter(this, void 0, void 0, function () {
|
|
551
564
|
var localVarAxiosArgs;
|
|
552
565
|
return __generator(this, function (_a) {
|
|
553
566
|
switch (_a.label) {
|
|
554
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getDocumentDownloadUrl(code, authorization, options)];
|
|
567
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getDocumentDownloadUrl(code, contentDisposition, authorization, options)];
|
|
555
568
|
case 1:
|
|
556
569
|
localVarAxiosArgs = _a.sent();
|
|
557
570
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -563,16 +576,17 @@ var DocumentsApiFp = function (configuration) {
|
|
|
563
576
|
* This will return a presigned URL for a random S3 key
|
|
564
577
|
* @summary Fetches a presigned URL for a S3 key
|
|
565
578
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
579
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
566
580
|
* @param {string} [authorization] Bearer Token
|
|
567
581
|
* @param {*} [options] Override http request option.
|
|
568
582
|
* @throws {RequiredError}
|
|
569
583
|
*/
|
|
570
|
-
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
584
|
+
getSignedS3keyUrl: function (s3Key, contentDisposition, authorization, options) {
|
|
571
585
|
return __awaiter(this, void 0, void 0, function () {
|
|
572
586
|
var localVarAxiosArgs;
|
|
573
587
|
return __generator(this, function (_a) {
|
|
574
588
|
switch (_a.label) {
|
|
575
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, authorization, options)];
|
|
589
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, contentDisposition, authorization, options)];
|
|
576
590
|
case 1:
|
|
577
591
|
localVarAxiosArgs = _a.sent();
|
|
578
592
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -675,24 +689,26 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
675
689
|
/**
|
|
676
690
|
* This will return a presigned URL to download the document.
|
|
677
691
|
* @summary Fetches a document download URL
|
|
678
|
-
* @param {string} code
|
|
692
|
+
* @param {string} code Document code
|
|
693
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
679
694
|
* @param {string} [authorization] Bearer Token
|
|
680
695
|
* @param {*} [options] Override http request option.
|
|
681
696
|
* @throws {RequiredError}
|
|
682
697
|
*/
|
|
683
|
-
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
684
|
-
return localVarFp.getDocumentDownloadUrl(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
698
|
+
getDocumentDownloadUrl: function (code, contentDisposition, authorization, options) {
|
|
699
|
+
return localVarFp.getDocumentDownloadUrl(code, contentDisposition, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
685
700
|
},
|
|
686
701
|
/**
|
|
687
702
|
* This will return a presigned URL for a random S3 key
|
|
688
703
|
* @summary Fetches a presigned URL for a S3 key
|
|
689
704
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
705
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
690
706
|
* @param {string} [authorization] Bearer Token
|
|
691
707
|
* @param {*} [options] Override http request option.
|
|
692
708
|
* @throws {RequiredError}
|
|
693
709
|
*/
|
|
694
|
-
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
695
|
-
return localVarFp.getSignedS3keyUrl(s3Key, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
710
|
+
getSignedS3keyUrl: function (s3Key, contentDisposition, authorization, options) {
|
|
711
|
+
return localVarFp.getSignedS3keyUrl(s3Key, contentDisposition, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
696
712
|
},
|
|
697
713
|
/**
|
|
698
714
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
@@ -783,7 +799,7 @@ var DocumentsApi = /** @class */ (function (_super) {
|
|
|
783
799
|
*/
|
|
784
800
|
DocumentsApi.prototype.getDocumentDownloadUrl = function (requestParameters, options) {
|
|
785
801
|
var _this = this;
|
|
786
|
-
return (0, exports.DocumentsApiFp)(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
802
|
+
return (0, exports.DocumentsApiFp)(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.contentDisposition, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
787
803
|
};
|
|
788
804
|
/**
|
|
789
805
|
* This will return a presigned URL for a random S3 key
|
|
@@ -795,7 +811,7 @@ var DocumentsApi = /** @class */ (function (_super) {
|
|
|
795
811
|
*/
|
|
796
812
|
DocumentsApi.prototype.getSignedS3keyUrl = function (requestParameters, options) {
|
|
797
813
|
var _this = this;
|
|
798
|
-
return (0, exports.DocumentsApiFp)(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
814
|
+
return (0, exports.DocumentsApiFp)(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.contentDisposition, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
799
815
|
};
|
|
800
816
|
/**
|
|
801
817
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
@@ -32,13 +32,14 @@ export declare const ProductDocumentsApiAxiosParamCreator: (configuration?: Conf
|
|
|
32
32
|
/**
|
|
33
33
|
* Get a pre-signed download url for the given product document.
|
|
34
34
|
* @summary Get pre-signed url for downloading product document
|
|
35
|
-
* @param {string} productSlug
|
|
36
|
-
* @param {string} code
|
|
35
|
+
* @param {string} productSlug Product slug
|
|
36
|
+
* @param {string} code Product document code
|
|
37
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
37
38
|
* @param {string} [authorization] Bearer Token
|
|
38
39
|
* @param {*} [options] Override http request option.
|
|
39
40
|
* @throws {RequiredError}
|
|
40
41
|
*/
|
|
41
|
-
downloadProductDocument: (productSlug: string, code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
42
|
+
downloadProductDocument: (productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
42
43
|
/**
|
|
43
44
|
* Get a product document.
|
|
44
45
|
* @summary Retrieve the product document
|
|
@@ -56,11 +57,11 @@ export declare const ProductDocumentsApiAxiosParamCreator: (configuration?: Conf
|
|
|
56
57
|
* @param {string} [authorization] Bearer Token
|
|
57
58
|
* @param {number} [pageSize] Page size
|
|
58
59
|
* @param {string} [pageToken] Page token
|
|
59
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
60
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
60
61
|
* @param {string} [search] Search query
|
|
61
62
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, filename</i>
|
|
62
63
|
* @param {string} [expand] Extra fields to fetch
|
|
63
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
64
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
64
65
|
* @param {*} [options] Override http request option.
|
|
65
66
|
* @throws {RequiredError}
|
|
66
67
|
*/
|
|
@@ -94,13 +95,14 @@ export declare const ProductDocumentsApiFp: (configuration?: Configuration) => {
|
|
|
94
95
|
/**
|
|
95
96
|
* Get a pre-signed download url for the given product document.
|
|
96
97
|
* @summary Get pre-signed url for downloading product document
|
|
97
|
-
* @param {string} productSlug
|
|
98
|
-
* @param {string} code
|
|
98
|
+
* @param {string} productSlug Product slug
|
|
99
|
+
* @param {string} code Product document code
|
|
100
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
99
101
|
* @param {string} [authorization] Bearer Token
|
|
100
102
|
* @param {*} [options] Override http request option.
|
|
101
103
|
* @throws {RequiredError}
|
|
102
104
|
*/
|
|
103
|
-
downloadProductDocument(productSlug: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
105
|
+
downloadProductDocument(productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
104
106
|
/**
|
|
105
107
|
* Get a product document.
|
|
106
108
|
* @summary Retrieve the product document
|
|
@@ -118,11 +120,11 @@ export declare const ProductDocumentsApiFp: (configuration?: Configuration) => {
|
|
|
118
120
|
* @param {string} [authorization] Bearer Token
|
|
119
121
|
* @param {number} [pageSize] Page size
|
|
120
122
|
* @param {string} [pageToken] Page token
|
|
121
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
123
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
122
124
|
* @param {string} [search] Search query
|
|
123
125
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, filename</i>
|
|
124
126
|
* @param {string} [expand] Extra fields to fetch
|
|
125
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
127
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
126
128
|
* @param {*} [options] Override http request option.
|
|
127
129
|
* @throws {RequiredError}
|
|
128
130
|
*/
|
|
@@ -156,13 +158,14 @@ export declare const ProductDocumentsApiFactory: (configuration?: Configuration,
|
|
|
156
158
|
/**
|
|
157
159
|
* Get a pre-signed download url for the given product document.
|
|
158
160
|
* @summary Get pre-signed url for downloading product document
|
|
159
|
-
* @param {string} productSlug
|
|
160
|
-
* @param {string} code
|
|
161
|
+
* @param {string} productSlug Product slug
|
|
162
|
+
* @param {string} code Product document code
|
|
163
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
161
164
|
* @param {string} [authorization] Bearer Token
|
|
162
165
|
* @param {*} [options] Override http request option.
|
|
163
166
|
* @throws {RequiredError}
|
|
164
167
|
*/
|
|
165
|
-
downloadProductDocument(productSlug: string, code: string, authorization?: string, options?: any): AxiosPromise<void>;
|
|
168
|
+
downloadProductDocument(productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void>;
|
|
166
169
|
/**
|
|
167
170
|
* Get a product document.
|
|
168
171
|
* @summary Retrieve the product document
|
|
@@ -180,11 +183,11 @@ export declare const ProductDocumentsApiFactory: (configuration?: Configuration,
|
|
|
180
183
|
* @param {string} [authorization] Bearer Token
|
|
181
184
|
* @param {number} [pageSize] Page size
|
|
182
185
|
* @param {string} [pageToken] Page token
|
|
183
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
186
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
184
187
|
* @param {string} [search] Search query
|
|
185
188
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, filename</i>
|
|
186
189
|
* @param {string} [expand] Extra fields to fetch
|
|
187
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
190
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
188
191
|
* @param {*} [options] Override http request option.
|
|
189
192
|
* @throws {RequiredError}
|
|
190
193
|
*/
|
|
@@ -232,17 +235,23 @@ export interface ProductDocumentsApiDeleteProductDocumentRequest {
|
|
|
232
235
|
*/
|
|
233
236
|
export interface ProductDocumentsApiDownloadProductDocumentRequest {
|
|
234
237
|
/**
|
|
235
|
-
*
|
|
238
|
+
* Product slug
|
|
236
239
|
* @type {string}
|
|
237
240
|
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
238
241
|
*/
|
|
239
242
|
readonly productSlug: string;
|
|
240
243
|
/**
|
|
241
|
-
*
|
|
244
|
+
* Product document code
|
|
242
245
|
* @type {string}
|
|
243
246
|
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
244
247
|
*/
|
|
245
248
|
readonly code: string;
|
|
249
|
+
/**
|
|
250
|
+
* Content disposition override. Default will be depending on the document type.
|
|
251
|
+
* @type {'attachment' | 'inline'}
|
|
252
|
+
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
253
|
+
*/
|
|
254
|
+
readonly contentDisposition: 'attachment' | 'inline';
|
|
246
255
|
/**
|
|
247
256
|
* Bearer Token
|
|
248
257
|
* @type {string}
|
|
@@ -306,7 +315,7 @@ export interface ProductDocumentsApiListProductDocumentsRequest {
|
|
|
306
315
|
*/
|
|
307
316
|
readonly pageToken?: string;
|
|
308
317
|
/**
|
|
309
|
-
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
318
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
310
319
|
* @type {string}
|
|
311
320
|
* @memberof ProductDocumentsApiListProductDocuments
|
|
312
321
|
*/
|
|
@@ -330,7 +339,7 @@ export interface ProductDocumentsApiListProductDocumentsRequest {
|
|
|
330
339
|
*/
|
|
331
340
|
readonly expand?: string;
|
|
332
341
|
/**
|
|
333
|
-
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
342
|
+
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
334
343
|
* @type {string}
|
|
335
344
|
* @memberof ProductDocumentsApiListProductDocuments
|
|
336
345
|
*/
|
|
@@ -151,13 +151,14 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
151
151
|
/**
|
|
152
152
|
* Get a pre-signed download url for the given product document.
|
|
153
153
|
* @summary Get pre-signed url for downloading product document
|
|
154
|
-
* @param {string} productSlug
|
|
155
|
-
* @param {string} code
|
|
154
|
+
* @param {string} productSlug Product slug
|
|
155
|
+
* @param {string} code Product document code
|
|
156
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
156
157
|
* @param {string} [authorization] Bearer Token
|
|
157
158
|
* @param {*} [options] Override http request option.
|
|
158
159
|
* @throws {RequiredError}
|
|
159
160
|
*/
|
|
160
|
-
downloadProductDocument: function (productSlug, code, authorization, options) {
|
|
161
|
+
downloadProductDocument: function (productSlug, code, contentDisposition, authorization, options) {
|
|
161
162
|
if (options === void 0) { options = {}; }
|
|
162
163
|
return __awaiter(_this, void 0, void 0, function () {
|
|
163
164
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -168,6 +169,8 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
168
169
|
(0, common_1.assertParamExists)('downloadProductDocument', 'productSlug', productSlug);
|
|
169
170
|
// verify required parameter 'code' is not null or undefined
|
|
170
171
|
(0, common_1.assertParamExists)('downloadProductDocument', 'code', code);
|
|
172
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
173
|
+
(0, common_1.assertParamExists)('downloadProductDocument', 'contentDisposition', contentDisposition);
|
|
171
174
|
localVarPath = "/documentservice/v1/product-documents/{productSlug}/{code}/download-url"
|
|
172
175
|
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)))
|
|
173
176
|
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
@@ -186,6 +189,9 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
186
189
|
// authentication bearer required
|
|
187
190
|
// http bearer authentication required
|
|
188
191
|
_a.sent();
|
|
192
|
+
if (contentDisposition !== undefined) {
|
|
193
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
194
|
+
}
|
|
189
195
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
190
196
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
191
197
|
}
|
|
@@ -259,11 +265,11 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
259
265
|
* @param {string} [authorization] Bearer Token
|
|
260
266
|
* @param {number} [pageSize] Page size
|
|
261
267
|
* @param {string} [pageToken] Page token
|
|
262
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
268
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
263
269
|
* @param {string} [search] Search query
|
|
264
270
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, filename</i>
|
|
265
271
|
* @param {string} [expand] Extra fields to fetch
|
|
266
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
272
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
267
273
|
* @param {*} [options] Override http request option.
|
|
268
274
|
* @throws {RequiredError}
|
|
269
275
|
*/
|
|
@@ -416,18 +422,19 @@ var ProductDocumentsApiFp = function (configuration) {
|
|
|
416
422
|
/**
|
|
417
423
|
* Get a pre-signed download url for the given product document.
|
|
418
424
|
* @summary Get pre-signed url for downloading product document
|
|
419
|
-
* @param {string} productSlug
|
|
420
|
-
* @param {string} code
|
|
425
|
+
* @param {string} productSlug Product slug
|
|
426
|
+
* @param {string} code Product document code
|
|
427
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
421
428
|
* @param {string} [authorization] Bearer Token
|
|
422
429
|
* @param {*} [options] Override http request option.
|
|
423
430
|
* @throws {RequiredError}
|
|
424
431
|
*/
|
|
425
|
-
downloadProductDocument: function (productSlug, code, authorization, options) {
|
|
432
|
+
downloadProductDocument: function (productSlug, code, contentDisposition, authorization, options) {
|
|
426
433
|
return __awaiter(this, void 0, void 0, function () {
|
|
427
434
|
var localVarAxiosArgs;
|
|
428
435
|
return __generator(this, function (_a) {
|
|
429
436
|
switch (_a.label) {
|
|
430
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductDocument(productSlug, code, authorization, options)];
|
|
437
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductDocument(productSlug, code, contentDisposition, authorization, options)];
|
|
431
438
|
case 1:
|
|
432
439
|
localVarAxiosArgs = _a.sent();
|
|
433
440
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -464,11 +471,11 @@ var ProductDocumentsApiFp = function (configuration) {
|
|
|
464
471
|
* @param {string} [authorization] Bearer Token
|
|
465
472
|
* @param {number} [pageSize] Page size
|
|
466
473
|
* @param {string} [pageToken] Page token
|
|
467
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
474
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
468
475
|
* @param {string} [search] Search query
|
|
469
476
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, filename</i>
|
|
470
477
|
* @param {string} [expand] Extra fields to fetch
|
|
471
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
478
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
472
479
|
* @param {*} [options] Override http request option.
|
|
473
480
|
* @throws {RequiredError}
|
|
474
481
|
*/
|
|
@@ -532,14 +539,15 @@ var ProductDocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
532
539
|
/**
|
|
533
540
|
* Get a pre-signed download url for the given product document.
|
|
534
541
|
* @summary Get pre-signed url for downloading product document
|
|
535
|
-
* @param {string} productSlug
|
|
536
|
-
* @param {string} code
|
|
542
|
+
* @param {string} productSlug Product slug
|
|
543
|
+
* @param {string} code Product document code
|
|
544
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
537
545
|
* @param {string} [authorization] Bearer Token
|
|
538
546
|
* @param {*} [options] Override http request option.
|
|
539
547
|
* @throws {RequiredError}
|
|
540
548
|
*/
|
|
541
|
-
downloadProductDocument: function (productSlug, code, authorization, options) {
|
|
542
|
-
return localVarFp.downloadProductDocument(productSlug, code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
549
|
+
downloadProductDocument: function (productSlug, code, contentDisposition, authorization, options) {
|
|
550
|
+
return localVarFp.downloadProductDocument(productSlug, code, contentDisposition, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
543
551
|
},
|
|
544
552
|
/**
|
|
545
553
|
* Get a product document.
|
|
@@ -560,11 +568,11 @@ var ProductDocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
560
568
|
* @param {string} [authorization] Bearer Token
|
|
561
569
|
* @param {number} [pageSize] Page size
|
|
562
570
|
* @param {string} [pageToken] Page token
|
|
563
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
571
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
564
572
|
* @param {string} [search] Search query
|
|
565
573
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, filename</i>
|
|
566
574
|
* @param {string} [expand] Extra fields to fetch
|
|
567
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt</i>
|
|
575
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, productSlug, productCode, type, createdAt, slug</i>
|
|
568
576
|
* @param {*} [options] Override http request option.
|
|
569
577
|
* @throws {RequiredError}
|
|
570
578
|
*/
|
|
@@ -619,7 +627,7 @@ var ProductDocumentsApi = /** @class */ (function (_super) {
|
|
|
619
627
|
*/
|
|
620
628
|
ProductDocumentsApi.prototype.downloadProductDocument = function (requestParameters, options) {
|
|
621
629
|
var _this = this;
|
|
622
|
-
return (0, exports.ProductDocumentsApiFp)(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
630
|
+
return (0, exports.ProductDocumentsApiFp)(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.contentDisposition, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
623
631
|
};
|
|
624
632
|
/**
|
|
625
633
|
* Get a product document.
|