@emilgroup/document-sdk 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@1.24.0 --save
|
|
20
|
+
npm install @emilgroup/document-sdk@1.24.1-beta.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/document-sdk@1.24.0
|
|
24
|
+
yarn add @emilgroup/document-sdk@1.24.1-beta.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `DocumentsApi`.
|
package/api/documents-api.ts
CHANGED
|
@@ -174,14 +174,17 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
174
174
|
/**
|
|
175
175
|
* This will return a presigned URL to download the document.
|
|
176
176
|
* @summary Fetches a document download URL
|
|
177
|
-
* @param {string} code
|
|
177
|
+
* @param {string} code Document code
|
|
178
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
178
179
|
* @param {string} [authorization] Bearer Token
|
|
179
180
|
* @param {*} [options] Override http request option.
|
|
180
181
|
* @throws {RequiredError}
|
|
181
182
|
*/
|
|
182
|
-
getDocumentDownloadUrl: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
183
|
+
getDocumentDownloadUrl: async (code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
183
184
|
// verify required parameter 'code' is not null or undefined
|
|
184
185
|
assertParamExists('getDocumentDownloadUrl', 'code', code)
|
|
186
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
187
|
+
assertParamExists('getDocumentDownloadUrl', 'contentDisposition', contentDisposition)
|
|
185
188
|
const localVarPath = `/documentservice/v1/documents/{code}/download-url`
|
|
186
189
|
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
187
190
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -201,6 +204,10 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
201
204
|
// http bearer authentication required
|
|
202
205
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
203
206
|
|
|
207
|
+
if (contentDisposition !== undefined) {
|
|
208
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
209
|
+
}
|
|
210
|
+
|
|
204
211
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
205
212
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
206
213
|
}
|
|
@@ -220,13 +227,16 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
220
227
|
* This will return a presigned URL for a random S3 key
|
|
221
228
|
* @summary Fetches a presigned URL for a S3 key
|
|
222
229
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
230
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
223
231
|
* @param {string} [authorization] Bearer Token
|
|
224
232
|
* @param {*} [options] Override http request option.
|
|
225
233
|
* @throws {RequiredError}
|
|
226
234
|
*/
|
|
227
|
-
getSignedS3keyUrl: async (s3Key: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
235
|
+
getSignedS3keyUrl: async (s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
228
236
|
// verify required parameter 's3Key' is not null or undefined
|
|
229
237
|
assertParamExists('getSignedS3keyUrl', 's3Key', s3Key)
|
|
238
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
239
|
+
assertParamExists('getSignedS3keyUrl', 'contentDisposition', contentDisposition)
|
|
230
240
|
const localVarPath = `/documentservice/v1/documents/signed-s3-url`;
|
|
231
241
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
232
242
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -249,6 +259,10 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
249
259
|
localVarQueryParameter['s3Key'] = s3Key;
|
|
250
260
|
}
|
|
251
261
|
|
|
262
|
+
if (contentDisposition !== undefined) {
|
|
263
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
264
|
+
}
|
|
265
|
+
|
|
252
266
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
253
267
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
254
268
|
}
|
|
@@ -440,25 +454,27 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
|
|
|
440
454
|
/**
|
|
441
455
|
* This will return a presigned URL to download the document.
|
|
442
456
|
* @summary Fetches a document download URL
|
|
443
|
-
* @param {string} code
|
|
457
|
+
* @param {string} code Document code
|
|
458
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
444
459
|
* @param {string} [authorization] Bearer Token
|
|
445
460
|
* @param {*} [options] Override http request option.
|
|
446
461
|
* @throws {RequiredError}
|
|
447
462
|
*/
|
|
448
|
-
async getDocumentDownloadUrl(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
449
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getDocumentDownloadUrl(code, authorization, options);
|
|
463
|
+
async getDocumentDownloadUrl(code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
464
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getDocumentDownloadUrl(code, contentDisposition, authorization, options);
|
|
450
465
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
451
466
|
},
|
|
452
467
|
/**
|
|
453
468
|
* This will return a presigned URL for a random S3 key
|
|
454
469
|
* @summary Fetches a presigned URL for a S3 key
|
|
455
470
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
471
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
456
472
|
* @param {string} [authorization] Bearer Token
|
|
457
473
|
* @param {*} [options] Override http request option.
|
|
458
474
|
* @throws {RequiredError}
|
|
459
475
|
*/
|
|
460
|
-
async getSignedS3keyUrl(s3Key: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
461
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, authorization, options);
|
|
476
|
+
async getSignedS3keyUrl(s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
477
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, contentDisposition, authorization, options);
|
|
462
478
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
463
479
|
},
|
|
464
480
|
/**
|
|
@@ -538,24 +554,26 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
|
|
|
538
554
|
/**
|
|
539
555
|
* This will return a presigned URL to download the document.
|
|
540
556
|
* @summary Fetches a document download URL
|
|
541
|
-
* @param {string} code
|
|
557
|
+
* @param {string} code Document code
|
|
558
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
542
559
|
* @param {string} [authorization] Bearer Token
|
|
543
560
|
* @param {*} [options] Override http request option.
|
|
544
561
|
* @throws {RequiredError}
|
|
545
562
|
*/
|
|
546
|
-
getDocumentDownloadUrl(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
547
|
-
return localVarFp.getDocumentDownloadUrl(code, authorization, options).then((request) => request(axios, basePath));
|
|
563
|
+
getDocumentDownloadUrl(code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void> {
|
|
564
|
+
return localVarFp.getDocumentDownloadUrl(code, contentDisposition, authorization, options).then((request) => request(axios, basePath));
|
|
548
565
|
},
|
|
549
566
|
/**
|
|
550
567
|
* This will return a presigned URL for a random S3 key
|
|
551
568
|
* @summary Fetches a presigned URL for a S3 key
|
|
552
569
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
570
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
553
571
|
* @param {string} [authorization] Bearer Token
|
|
554
572
|
* @param {*} [options] Override http request option.
|
|
555
573
|
* @throws {RequiredError}
|
|
556
574
|
*/
|
|
557
|
-
getSignedS3keyUrl(s3Key: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
558
|
-
return localVarFp.getSignedS3keyUrl(s3Key, authorization, options).then((request) => request(axios, basePath));
|
|
575
|
+
getSignedS3keyUrl(s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void> {
|
|
576
|
+
return localVarFp.getSignedS3keyUrl(s3Key, contentDisposition, authorization, options).then((request) => request(axios, basePath));
|
|
559
577
|
},
|
|
560
578
|
/**
|
|
561
579
|
* 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.
|
|
@@ -659,12 +677,19 @@ export interface DocumentsApiDeleteDocumentRequest {
|
|
|
659
677
|
*/
|
|
660
678
|
export interface DocumentsApiGetDocumentDownloadUrlRequest {
|
|
661
679
|
/**
|
|
662
|
-
*
|
|
680
|
+
* Document code
|
|
663
681
|
* @type {string}
|
|
664
682
|
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
665
683
|
*/
|
|
666
684
|
readonly code: string
|
|
667
685
|
|
|
686
|
+
/**
|
|
687
|
+
* Content disposition override. Default will be depending on the document type.
|
|
688
|
+
* @type {'attachment' | 'inline'}
|
|
689
|
+
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
690
|
+
*/
|
|
691
|
+
readonly contentDisposition: 'attachment' | 'inline'
|
|
692
|
+
|
|
668
693
|
/**
|
|
669
694
|
* Bearer Token
|
|
670
695
|
* @type {string}
|
|
@@ -686,6 +711,13 @@ export interface DocumentsApiGetSignedS3keyUrlRequest {
|
|
|
686
711
|
*/
|
|
687
712
|
readonly s3Key: string
|
|
688
713
|
|
|
714
|
+
/**
|
|
715
|
+
* Content disposition override. Default will be depending on the document type.
|
|
716
|
+
* @type {'attachment' | 'inline'}
|
|
717
|
+
* @memberof DocumentsApiGetSignedS3keyUrl
|
|
718
|
+
*/
|
|
719
|
+
readonly contentDisposition: 'attachment' | 'inline'
|
|
720
|
+
|
|
689
721
|
/**
|
|
690
722
|
* Bearer Token
|
|
691
723
|
* @type {string}
|
|
@@ -837,7 +869,7 @@ export class DocumentsApi extends BaseAPI {
|
|
|
837
869
|
* @memberof DocumentsApi
|
|
838
870
|
*/
|
|
839
871
|
public getDocumentDownloadUrl(requestParameters: DocumentsApiGetDocumentDownloadUrlRequest, options?: AxiosRequestConfig) {
|
|
840
|
-
return DocumentsApiFp(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
872
|
+
return DocumentsApiFp(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.contentDisposition, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
841
873
|
}
|
|
842
874
|
|
|
843
875
|
/**
|
|
@@ -849,7 +881,7 @@ export class DocumentsApi extends BaseAPI {
|
|
|
849
881
|
* @memberof DocumentsApi
|
|
850
882
|
*/
|
|
851
883
|
public getSignedS3keyUrl(requestParameters: DocumentsApiGetSignedS3keyUrlRequest, options?: AxiosRequestConfig) {
|
|
852
|
-
return DocumentsApiFp(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
884
|
+
return DocumentsApiFp(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.contentDisposition, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
853
885
|
}
|
|
854
886
|
|
|
855
887
|
/**
|
|
@@ -82,17 +82,20 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
|
|
|
82
82
|
/**
|
|
83
83
|
* Get a pre-signed download url for the given product document.
|
|
84
84
|
* @summary Get pre-signed url for downloading product document
|
|
85
|
-
* @param {string} productSlug
|
|
86
|
-
* @param {string} code
|
|
85
|
+
* @param {string} productSlug Product slug
|
|
86
|
+
* @param {string} code Product document code
|
|
87
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
87
88
|
* @param {string} [authorization] Bearer Token
|
|
88
89
|
* @param {*} [options] Override http request option.
|
|
89
90
|
* @throws {RequiredError}
|
|
90
91
|
*/
|
|
91
|
-
downloadProductDocument: async (productSlug: string, code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
92
|
+
downloadProductDocument: async (productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
92
93
|
// verify required parameter 'productSlug' is not null or undefined
|
|
93
94
|
assertParamExists('downloadProductDocument', 'productSlug', productSlug)
|
|
94
95
|
// verify required parameter 'code' is not null or undefined
|
|
95
96
|
assertParamExists('downloadProductDocument', 'code', code)
|
|
97
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
98
|
+
assertParamExists('downloadProductDocument', 'contentDisposition', contentDisposition)
|
|
96
99
|
const localVarPath = `/documentservice/v1/product-documents/{productSlug}/{code}/download-url`
|
|
97
100
|
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)))
|
|
98
101
|
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
@@ -113,6 +116,10 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
|
|
|
113
116
|
// http bearer authentication required
|
|
114
117
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
115
118
|
|
|
119
|
+
if (contentDisposition !== undefined) {
|
|
120
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
121
|
+
}
|
|
122
|
+
|
|
116
123
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
117
124
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
118
125
|
}
|
|
@@ -184,11 +191,11 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
|
|
|
184
191
|
* @param {string} [authorization] Bearer Token
|
|
185
192
|
* @param {number} [pageSize] Page size
|
|
186
193
|
* @param {string} [pageToken] Page token
|
|
187
|
-
* @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>
|
|
194
|
+
* @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>
|
|
188
195
|
* @param {string} [search] Search query
|
|
189
196
|
* @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>
|
|
190
197
|
* @param {string} [expand] Extra fields to fetch
|
|
191
|
-
* @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>
|
|
198
|
+
* @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>
|
|
192
199
|
* @param {*} [options] Override http request option.
|
|
193
200
|
* @throws {RequiredError}
|
|
194
201
|
*/
|
|
@@ -334,14 +341,15 @@ export const ProductDocumentsApiFp = function(configuration?: Configuration) {
|
|
|
334
341
|
/**
|
|
335
342
|
* Get a pre-signed download url for the given product document.
|
|
336
343
|
* @summary Get pre-signed url for downloading product document
|
|
337
|
-
* @param {string} productSlug
|
|
338
|
-
* @param {string} code
|
|
344
|
+
* @param {string} productSlug Product slug
|
|
345
|
+
* @param {string} code Product document code
|
|
346
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
339
347
|
* @param {string} [authorization] Bearer Token
|
|
340
348
|
* @param {*} [options] Override http request option.
|
|
341
349
|
* @throws {RequiredError}
|
|
342
350
|
*/
|
|
343
|
-
async downloadProductDocument(productSlug: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
344
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadProductDocument(productSlug, code, authorization, options);
|
|
351
|
+
async downloadProductDocument(productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
352
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadProductDocument(productSlug, code, contentDisposition, authorization, options);
|
|
345
353
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
346
354
|
},
|
|
347
355
|
/**
|
|
@@ -364,11 +372,11 @@ export const ProductDocumentsApiFp = function(configuration?: Configuration) {
|
|
|
364
372
|
* @param {string} [authorization] Bearer Token
|
|
365
373
|
* @param {number} [pageSize] Page size
|
|
366
374
|
* @param {string} [pageToken] Page token
|
|
367
|
-
* @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>
|
|
375
|
+
* @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>
|
|
368
376
|
* @param {string} [search] Search query
|
|
369
377
|
* @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>
|
|
370
378
|
* @param {string} [expand] Extra fields to fetch
|
|
371
|
-
* @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>
|
|
379
|
+
* @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>
|
|
372
380
|
* @param {*} [options] Override http request option.
|
|
373
381
|
* @throws {RequiredError}
|
|
374
382
|
*/
|
|
@@ -414,14 +422,15 @@ export const ProductDocumentsApiFactory = function (configuration?: Configuratio
|
|
|
414
422
|
/**
|
|
415
423
|
* Get a pre-signed download url for the given product document.
|
|
416
424
|
* @summary Get pre-signed url for downloading product document
|
|
417
|
-
* @param {string} productSlug
|
|
418
|
-
* @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.
|
|
419
428
|
* @param {string} [authorization] Bearer Token
|
|
420
429
|
* @param {*} [options] Override http request option.
|
|
421
430
|
* @throws {RequiredError}
|
|
422
431
|
*/
|
|
423
|
-
downloadProductDocument(productSlug: string, code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
424
|
-
return localVarFp.downloadProductDocument(productSlug, code, authorization, options).then((request) => request(axios, basePath));
|
|
432
|
+
downloadProductDocument(productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void> {
|
|
433
|
+
return localVarFp.downloadProductDocument(productSlug, code, contentDisposition, authorization, options).then((request) => request(axios, basePath));
|
|
425
434
|
},
|
|
426
435
|
/**
|
|
427
436
|
* Get a product document.
|
|
@@ -442,11 +451,11 @@ export const ProductDocumentsApiFactory = function (configuration?: Configuratio
|
|
|
442
451
|
* @param {string} [authorization] Bearer Token
|
|
443
452
|
* @param {number} [pageSize] Page size
|
|
444
453
|
* @param {string} [pageToken] Page token
|
|
445
|
-
* @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>
|
|
454
|
+
* @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>
|
|
446
455
|
* @param {string} [search] Search query
|
|
447
456
|
* @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>
|
|
448
457
|
* @param {string} [expand] Extra fields to fetch
|
|
449
|
-
* @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>
|
|
458
|
+
* @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>
|
|
450
459
|
* @param {*} [options] Override http request option.
|
|
451
460
|
* @throws {RequiredError}
|
|
452
461
|
*/
|
|
@@ -503,19 +512,26 @@ export interface ProductDocumentsApiDeleteProductDocumentRequest {
|
|
|
503
512
|
*/
|
|
504
513
|
export interface ProductDocumentsApiDownloadProductDocumentRequest {
|
|
505
514
|
/**
|
|
506
|
-
*
|
|
515
|
+
* Product slug
|
|
507
516
|
* @type {string}
|
|
508
517
|
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
509
518
|
*/
|
|
510
519
|
readonly productSlug: string
|
|
511
520
|
|
|
512
521
|
/**
|
|
513
|
-
*
|
|
522
|
+
* Product document code
|
|
514
523
|
* @type {string}
|
|
515
524
|
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
516
525
|
*/
|
|
517
526
|
readonly code: string
|
|
518
527
|
|
|
528
|
+
/**
|
|
529
|
+
* Content disposition override. Default will be depending on the document type.
|
|
530
|
+
* @type {'attachment' | 'inline'}
|
|
531
|
+
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
532
|
+
*/
|
|
533
|
+
readonly contentDisposition: 'attachment' | 'inline'
|
|
534
|
+
|
|
519
535
|
/**
|
|
520
536
|
* Bearer Token
|
|
521
537
|
* @type {string}
|
|
@@ -587,7 +603,7 @@ export interface ProductDocumentsApiListProductDocumentsRequest {
|
|
|
587
603
|
readonly pageToken?: string
|
|
588
604
|
|
|
589
605
|
/**
|
|
590
|
-
* 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>
|
|
606
|
+
* 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>
|
|
591
607
|
* @type {string}
|
|
592
608
|
* @memberof ProductDocumentsApiListProductDocuments
|
|
593
609
|
*/
|
|
@@ -615,7 +631,7 @@ export interface ProductDocumentsApiListProductDocumentsRequest {
|
|
|
615
631
|
readonly expand?: string
|
|
616
632
|
|
|
617
633
|
/**
|
|
618
|
-
* 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>
|
|
634
|
+
* 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>
|
|
619
635
|
* @type {string}
|
|
620
636
|
* @memberof ProductDocumentsApiListProductDocuments
|
|
621
637
|
*/
|
|
@@ -678,7 +694,7 @@ export class ProductDocumentsApi extends BaseAPI {
|
|
|
678
694
|
* @memberof ProductDocumentsApi
|
|
679
695
|
*/
|
|
680
696
|
public downloadProductDocument(requestParameters: ProductDocumentsApiDownloadProductDocumentRequest, options?: AxiosRequestConfig) {
|
|
681
|
-
return ProductDocumentsApiFp(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
697
|
+
return ProductDocumentsApiFp(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.contentDisposition, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
682
698
|
}
|
|
683
699
|
|
|
684
700
|
/**
|
|
@@ -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}
|
|
@@ -241,12 +241,13 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
241
241
|
/**
|
|
242
242
|
* This will return a presigned URL to download the document.
|
|
243
243
|
* @summary Fetches a document download URL
|
|
244
|
-
* @param {string} code
|
|
244
|
+
* @param {string} code Document code
|
|
245
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
245
246
|
* @param {string} [authorization] Bearer Token
|
|
246
247
|
* @param {*} [options] Override http request option.
|
|
247
248
|
* @throws {RequiredError}
|
|
248
249
|
*/
|
|
249
|
-
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
250
|
+
getDocumentDownloadUrl: function (code, contentDisposition, authorization, options) {
|
|
250
251
|
if (options === void 0) { options = {}; }
|
|
251
252
|
return __awaiter(_this, void 0, void 0, function () {
|
|
252
253
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -255,6 +256,8 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
255
256
|
case 0:
|
|
256
257
|
// verify required parameter 'code' is not null or undefined
|
|
257
258
|
(0, common_1.assertParamExists)('getDocumentDownloadUrl', 'code', code);
|
|
259
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
260
|
+
(0, common_1.assertParamExists)('getDocumentDownloadUrl', 'contentDisposition', contentDisposition);
|
|
258
261
|
localVarPath = "/documentservice/v1/documents/{code}/download-url"
|
|
259
262
|
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
260
263
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -272,6 +275,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
272
275
|
// authentication bearer required
|
|
273
276
|
// http bearer authentication required
|
|
274
277
|
_a.sent();
|
|
278
|
+
if (contentDisposition !== undefined) {
|
|
279
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
280
|
+
}
|
|
275
281
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
276
282
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
277
283
|
}
|
|
@@ -290,11 +296,12 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
290
296
|
* This will return a presigned URL for a random S3 key
|
|
291
297
|
* @summary Fetches a presigned URL for a S3 key
|
|
292
298
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
299
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
293
300
|
* @param {string} [authorization] Bearer Token
|
|
294
301
|
* @param {*} [options] Override http request option.
|
|
295
302
|
* @throws {RequiredError}
|
|
296
303
|
*/
|
|
297
|
-
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
304
|
+
getSignedS3keyUrl: function (s3Key, contentDisposition, authorization, options) {
|
|
298
305
|
if (options === void 0) { options = {}; }
|
|
299
306
|
return __awaiter(_this, void 0, void 0, function () {
|
|
300
307
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -303,6 +310,8 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
303
310
|
case 0:
|
|
304
311
|
// verify required parameter 's3Key' is not null or undefined
|
|
305
312
|
(0, common_1.assertParamExists)('getSignedS3keyUrl', 's3Key', s3Key);
|
|
313
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
314
|
+
(0, common_1.assertParamExists)('getSignedS3keyUrl', 'contentDisposition', contentDisposition);
|
|
306
315
|
localVarPath = "/documentservice/v1/documents/signed-s3-url";
|
|
307
316
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
308
317
|
if (configuration) {
|
|
@@ -322,6 +331,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
322
331
|
if (s3Key !== undefined) {
|
|
323
332
|
localVarQueryParameter['s3Key'] = s3Key;
|
|
324
333
|
}
|
|
334
|
+
if (contentDisposition !== undefined) {
|
|
335
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
336
|
+
}
|
|
325
337
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
326
338
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
327
339
|
}
|
|
@@ -537,17 +549,18 @@ var DocumentsApiFp = function (configuration) {
|
|
|
537
549
|
/**
|
|
538
550
|
* This will return a presigned URL to download the document.
|
|
539
551
|
* @summary Fetches a document download URL
|
|
540
|
-
* @param {string} code
|
|
552
|
+
* @param {string} code Document code
|
|
553
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
541
554
|
* @param {string} [authorization] Bearer Token
|
|
542
555
|
* @param {*} [options] Override http request option.
|
|
543
556
|
* @throws {RequiredError}
|
|
544
557
|
*/
|
|
545
|
-
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
558
|
+
getDocumentDownloadUrl: function (code, contentDisposition, authorization, options) {
|
|
546
559
|
return __awaiter(this, void 0, void 0, function () {
|
|
547
560
|
var localVarAxiosArgs;
|
|
548
561
|
return __generator(this, function (_a) {
|
|
549
562
|
switch (_a.label) {
|
|
550
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getDocumentDownloadUrl(code, authorization, options)];
|
|
563
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getDocumentDownloadUrl(code, contentDisposition, authorization, options)];
|
|
551
564
|
case 1:
|
|
552
565
|
localVarAxiosArgs = _a.sent();
|
|
553
566
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -559,16 +572,17 @@ var DocumentsApiFp = function (configuration) {
|
|
|
559
572
|
* This will return a presigned URL for a random S3 key
|
|
560
573
|
* @summary Fetches a presigned URL for a S3 key
|
|
561
574
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
575
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
562
576
|
* @param {string} [authorization] Bearer Token
|
|
563
577
|
* @param {*} [options] Override http request option.
|
|
564
578
|
* @throws {RequiredError}
|
|
565
579
|
*/
|
|
566
|
-
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
580
|
+
getSignedS3keyUrl: function (s3Key, contentDisposition, authorization, options) {
|
|
567
581
|
return __awaiter(this, void 0, void 0, function () {
|
|
568
582
|
var localVarAxiosArgs;
|
|
569
583
|
return __generator(this, function (_a) {
|
|
570
584
|
switch (_a.label) {
|
|
571
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, authorization, options)];
|
|
585
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, contentDisposition, authorization, options)];
|
|
572
586
|
case 1:
|
|
573
587
|
localVarAxiosArgs = _a.sent();
|
|
574
588
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -671,24 +685,26 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
671
685
|
/**
|
|
672
686
|
* This will return a presigned URL to download the document.
|
|
673
687
|
* @summary Fetches a document download URL
|
|
674
|
-
* @param {string} code
|
|
688
|
+
* @param {string} code Document code
|
|
689
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
675
690
|
* @param {string} [authorization] Bearer Token
|
|
676
691
|
* @param {*} [options] Override http request option.
|
|
677
692
|
* @throws {RequiredError}
|
|
678
693
|
*/
|
|
679
|
-
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
680
|
-
return localVarFp.getDocumentDownloadUrl(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
694
|
+
getDocumentDownloadUrl: function (code, contentDisposition, authorization, options) {
|
|
695
|
+
return localVarFp.getDocumentDownloadUrl(code, contentDisposition, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
681
696
|
},
|
|
682
697
|
/**
|
|
683
698
|
* This will return a presigned URL for a random S3 key
|
|
684
699
|
* @summary Fetches a presigned URL for a S3 key
|
|
685
700
|
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
701
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
686
702
|
* @param {string} [authorization] Bearer Token
|
|
687
703
|
* @param {*} [options] Override http request option.
|
|
688
704
|
* @throws {RequiredError}
|
|
689
705
|
*/
|
|
690
|
-
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
691
|
-
return localVarFp.getSignedS3keyUrl(s3Key, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
706
|
+
getSignedS3keyUrl: function (s3Key, contentDisposition, authorization, options) {
|
|
707
|
+
return localVarFp.getSignedS3keyUrl(s3Key, contentDisposition, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
692
708
|
},
|
|
693
709
|
/**
|
|
694
710
|
* 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.
|
|
@@ -779,7 +795,7 @@ var DocumentsApi = /** @class */ (function (_super) {
|
|
|
779
795
|
*/
|
|
780
796
|
DocumentsApi.prototype.getDocumentDownloadUrl = function (requestParameters, options) {
|
|
781
797
|
var _this = this;
|
|
782
|
-
return (0, exports.DocumentsApiFp)(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
798
|
+
return (0, exports.DocumentsApiFp)(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.contentDisposition, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
783
799
|
};
|
|
784
800
|
/**
|
|
785
801
|
* This will return a presigned URL for a random S3 key
|
|
@@ -791,7 +807,7 @@ var DocumentsApi = /** @class */ (function (_super) {
|
|
|
791
807
|
*/
|
|
792
808
|
DocumentsApi.prototype.getSignedS3keyUrl = function (requestParameters, options) {
|
|
793
809
|
var _this = this;
|
|
794
|
-
return (0, exports.DocumentsApiFp)(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
810
|
+
return (0, exports.DocumentsApiFp)(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.contentDisposition, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
795
811
|
};
|
|
796
812
|
/**
|
|
797
813
|
* 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
|
*/
|
|
@@ -147,13 +147,14 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
147
147
|
/**
|
|
148
148
|
* Get a pre-signed download url for the given product document.
|
|
149
149
|
* @summary Get pre-signed url for downloading product document
|
|
150
|
-
* @param {string} productSlug
|
|
151
|
-
* @param {string} code
|
|
150
|
+
* @param {string} productSlug Product slug
|
|
151
|
+
* @param {string} code Product document code
|
|
152
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
152
153
|
* @param {string} [authorization] Bearer Token
|
|
153
154
|
* @param {*} [options] Override http request option.
|
|
154
155
|
* @throws {RequiredError}
|
|
155
156
|
*/
|
|
156
|
-
downloadProductDocument: function (productSlug, code, authorization, options) {
|
|
157
|
+
downloadProductDocument: function (productSlug, code, contentDisposition, authorization, options) {
|
|
157
158
|
if (options === void 0) { options = {}; }
|
|
158
159
|
return __awaiter(_this, void 0, void 0, function () {
|
|
159
160
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -164,6 +165,8 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
164
165
|
(0, common_1.assertParamExists)('downloadProductDocument', 'productSlug', productSlug);
|
|
165
166
|
// verify required parameter 'code' is not null or undefined
|
|
166
167
|
(0, common_1.assertParamExists)('downloadProductDocument', 'code', code);
|
|
168
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
169
|
+
(0, common_1.assertParamExists)('downloadProductDocument', 'contentDisposition', contentDisposition);
|
|
167
170
|
localVarPath = "/documentservice/v1/product-documents/{productSlug}/{code}/download-url"
|
|
168
171
|
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)))
|
|
169
172
|
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
@@ -182,6 +185,9 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
182
185
|
// authentication bearer required
|
|
183
186
|
// http bearer authentication required
|
|
184
187
|
_a.sent();
|
|
188
|
+
if (contentDisposition !== undefined) {
|
|
189
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
190
|
+
}
|
|
185
191
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
186
192
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
187
193
|
}
|
|
@@ -255,11 +261,11 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
255
261
|
* @param {string} [authorization] Bearer Token
|
|
256
262
|
* @param {number} [pageSize] Page size
|
|
257
263
|
* @param {string} [pageToken] Page token
|
|
258
|
-
* @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>
|
|
264
|
+
* @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>
|
|
259
265
|
* @param {string} [search] Search query
|
|
260
266
|
* @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>
|
|
261
267
|
* @param {string} [expand] Extra fields to fetch
|
|
262
|
-
* @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>
|
|
268
|
+
* @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>
|
|
263
269
|
* @param {*} [options] Override http request option.
|
|
264
270
|
* @throws {RequiredError}
|
|
265
271
|
*/
|
|
@@ -412,18 +418,19 @@ var ProductDocumentsApiFp = function (configuration) {
|
|
|
412
418
|
/**
|
|
413
419
|
* Get a pre-signed download url for the given product document.
|
|
414
420
|
* @summary Get pre-signed url for downloading product document
|
|
415
|
-
* @param {string} productSlug
|
|
416
|
-
* @param {string} code
|
|
421
|
+
* @param {string} productSlug Product slug
|
|
422
|
+
* @param {string} code Product document code
|
|
423
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
417
424
|
* @param {string} [authorization] Bearer Token
|
|
418
425
|
* @param {*} [options] Override http request option.
|
|
419
426
|
* @throws {RequiredError}
|
|
420
427
|
*/
|
|
421
|
-
downloadProductDocument: function (productSlug, code, authorization, options) {
|
|
428
|
+
downloadProductDocument: function (productSlug, code, contentDisposition, authorization, options) {
|
|
422
429
|
return __awaiter(this, void 0, void 0, function () {
|
|
423
430
|
var localVarAxiosArgs;
|
|
424
431
|
return __generator(this, function (_a) {
|
|
425
432
|
switch (_a.label) {
|
|
426
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductDocument(productSlug, code, authorization, options)];
|
|
433
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductDocument(productSlug, code, contentDisposition, authorization, options)];
|
|
427
434
|
case 1:
|
|
428
435
|
localVarAxiosArgs = _a.sent();
|
|
429
436
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -460,11 +467,11 @@ var ProductDocumentsApiFp = function (configuration) {
|
|
|
460
467
|
* @param {string} [authorization] Bearer Token
|
|
461
468
|
* @param {number} [pageSize] Page size
|
|
462
469
|
* @param {string} [pageToken] Page token
|
|
463
|
-
* @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>
|
|
470
|
+
* @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>
|
|
464
471
|
* @param {string} [search] Search query
|
|
465
472
|
* @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>
|
|
466
473
|
* @param {string} [expand] Extra fields to fetch
|
|
467
|
-
* @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>
|
|
474
|
+
* @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>
|
|
468
475
|
* @param {*} [options] Override http request option.
|
|
469
476
|
* @throws {RequiredError}
|
|
470
477
|
*/
|
|
@@ -528,14 +535,15 @@ var ProductDocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
528
535
|
/**
|
|
529
536
|
* Get a pre-signed download url for the given product document.
|
|
530
537
|
* @summary Get pre-signed url for downloading product document
|
|
531
|
-
* @param {string} productSlug
|
|
532
|
-
* @param {string} code
|
|
538
|
+
* @param {string} productSlug Product slug
|
|
539
|
+
* @param {string} code Product document code
|
|
540
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
533
541
|
* @param {string} [authorization] Bearer Token
|
|
534
542
|
* @param {*} [options] Override http request option.
|
|
535
543
|
* @throws {RequiredError}
|
|
536
544
|
*/
|
|
537
|
-
downloadProductDocument: function (productSlug, code, authorization, options) {
|
|
538
|
-
return localVarFp.downloadProductDocument(productSlug, code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
545
|
+
downloadProductDocument: function (productSlug, code, contentDisposition, authorization, options) {
|
|
546
|
+
return localVarFp.downloadProductDocument(productSlug, code, contentDisposition, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
539
547
|
},
|
|
540
548
|
/**
|
|
541
549
|
* Get a product document.
|
|
@@ -556,11 +564,11 @@ var ProductDocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
556
564
|
* @param {string} [authorization] Bearer Token
|
|
557
565
|
* @param {number} [pageSize] Page size
|
|
558
566
|
* @param {string} [pageToken] Page token
|
|
559
|
-
* @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>
|
|
567
|
+
* @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>
|
|
560
568
|
* @param {string} [search] Search query
|
|
561
569
|
* @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>
|
|
562
570
|
* @param {string} [expand] Extra fields to fetch
|
|
563
|
-
* @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>
|
|
571
|
+
* @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>
|
|
564
572
|
* @param {*} [options] Override http request option.
|
|
565
573
|
* @throws {RequiredError}
|
|
566
574
|
*/
|
|
@@ -615,7 +623,7 @@ var ProductDocumentsApi = /** @class */ (function (_super) {
|
|
|
615
623
|
*/
|
|
616
624
|
ProductDocumentsApi.prototype.downloadProductDocument = function (requestParameters, options) {
|
|
617
625
|
var _this = this;
|
|
618
|
-
return (0, exports.ProductDocumentsApiFp)(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
626
|
+
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); });
|
|
619
627
|
};
|
|
620
628
|
/**
|
|
621
629
|
* Get a product document.
|