@emilgroup/document-sdk-node 1.22.1-beta.1 → 1.22.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api/documents-api.ts +26 -10
- package/api/product-documents-api.ts +30 -14
- package/dist/api/documents-api.d.ts +16 -7
- package/dist/api/documents-api.js +17 -9
- package/dist/api/product-documents-api.d.ts +20 -11
- package/dist/api/product-documents-api.js +20 -12
- 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.22.1-beta.
|
|
20
|
+
npm install @emilgroup/document-sdk-node@1.22.1-beta.2 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/document-sdk-node@1.22.1-beta.
|
|
24
|
+
yarn add @emilgroup/document-sdk-node@1.22.1-beta.2
|
|
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
|
}
|
|
@@ -444,13 +451,14 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
|
|
|
444
451
|
/**
|
|
445
452
|
* This will return a presigned URL to download the document.
|
|
446
453
|
* @summary Fetches a document download URL
|
|
447
|
-
* @param {string} code
|
|
454
|
+
* @param {string} code Document code
|
|
455
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
448
456
|
* @param {string} [authorization] Bearer Token
|
|
449
457
|
* @param {*} [options] Override http request option.
|
|
450
458
|
* @throws {RequiredError}
|
|
451
459
|
*/
|
|
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);
|
|
460
|
+
async getDocumentDownloadUrl(code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
461
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getDocumentDownloadUrl(code, contentDisposition, authorization, options);
|
|
454
462
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
455
463
|
},
|
|
456
464
|
/**
|
|
@@ -542,13 +550,14 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
|
|
|
542
550
|
/**
|
|
543
551
|
* This will return a presigned URL to download the document.
|
|
544
552
|
* @summary Fetches a document download URL
|
|
545
|
-
* @param {string} code
|
|
553
|
+
* @param {string} code Document code
|
|
554
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
546
555
|
* @param {string} [authorization] Bearer Token
|
|
547
556
|
* @param {*} [options] Override http request option.
|
|
548
557
|
* @throws {RequiredError}
|
|
549
558
|
*/
|
|
550
|
-
getDocumentDownloadUrl(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
551
|
-
return localVarFp.getDocumentDownloadUrl(code, authorization, options).then((request) => request(axios, basePath));
|
|
559
|
+
getDocumentDownloadUrl(code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void> {
|
|
560
|
+
return localVarFp.getDocumentDownloadUrl(code, contentDisposition, authorization, options).then((request) => request(axios, basePath));
|
|
552
561
|
},
|
|
553
562
|
/**
|
|
554
563
|
* This will return a presigned URL for a random S3 key
|
|
@@ -663,12 +672,19 @@ export interface DocumentsApiDeleteDocumentRequest {
|
|
|
663
672
|
*/
|
|
664
673
|
export interface DocumentsApiGetDocumentDownloadUrlRequest {
|
|
665
674
|
/**
|
|
666
|
-
*
|
|
675
|
+
* Document code
|
|
667
676
|
* @type {string}
|
|
668
677
|
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
669
678
|
*/
|
|
670
679
|
readonly code: string
|
|
671
680
|
|
|
681
|
+
/**
|
|
682
|
+
* Content disposition override. Default will be depending on the document type.
|
|
683
|
+
* @type {'attachment' | 'inline'}
|
|
684
|
+
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
685
|
+
*/
|
|
686
|
+
readonly contentDisposition: 'attachment' | 'inline'
|
|
687
|
+
|
|
672
688
|
/**
|
|
673
689
|
* Bearer Token
|
|
674
690
|
* @type {string}
|
|
@@ -841,7 +857,7 @@ export class DocumentsApi extends BaseAPI {
|
|
|
841
857
|
* @memberof DocumentsApi
|
|
842
858
|
*/
|
|
843
859
|
public getDocumentDownloadUrl(requestParameters: DocumentsApiGetDocumentDownloadUrlRequest, options?: AxiosRequestConfig) {
|
|
844
|
-
return DocumentsApiFp(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
860
|
+
return DocumentsApiFp(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.contentDisposition, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
845
861
|
}
|
|
846
862
|
|
|
847
863
|
/**
|
|
@@ -84,17 +84,20 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
|
|
|
84
84
|
/**
|
|
85
85
|
* Get a pre-signed download url for the given product document.
|
|
86
86
|
* @summary Get pre-signed url for downloading product document
|
|
87
|
-
* @param {string} productSlug
|
|
88
|
-
* @param {string} code
|
|
87
|
+
* @param {string} productSlug Product slug
|
|
88
|
+
* @param {string} code Product document code
|
|
89
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
89
90
|
* @param {string} [authorization] Bearer Token
|
|
90
91
|
* @param {*} [options] Override http request option.
|
|
91
92
|
* @throws {RequiredError}
|
|
92
93
|
*/
|
|
93
|
-
downloadProductDocument: async (productSlug: string, code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
94
|
+
downloadProductDocument: async (productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
94
95
|
// verify required parameter 'productSlug' is not null or undefined
|
|
95
96
|
assertParamExists('downloadProductDocument', 'productSlug', productSlug)
|
|
96
97
|
// verify required parameter 'code' is not null or undefined
|
|
97
98
|
assertParamExists('downloadProductDocument', 'code', code)
|
|
99
|
+
// verify required parameter 'contentDisposition' is not null or undefined
|
|
100
|
+
assertParamExists('downloadProductDocument', 'contentDisposition', contentDisposition)
|
|
98
101
|
const localVarPath = `/documentservice/v1/product-documents/{productSlug}/{code}/download-url`
|
|
99
102
|
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)))
|
|
100
103
|
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
@@ -115,6 +118,10 @@ export const ProductDocumentsApiAxiosParamCreator = function (configuration?: Co
|
|
|
115
118
|
// http bearer authentication required
|
|
116
119
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
117
120
|
|
|
121
|
+
if (contentDisposition !== undefined) {
|
|
122
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
123
|
+
}
|
|
124
|
+
|
|
118
125
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
119
126
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
120
127
|
}
|
|
@@ -336,14 +343,15 @@ export const ProductDocumentsApiFp = function(configuration?: Configuration) {
|
|
|
336
343
|
/**
|
|
337
344
|
* Get a pre-signed download url for the given product document.
|
|
338
345
|
* @summary Get pre-signed url for downloading product document
|
|
339
|
-
* @param {string} productSlug
|
|
340
|
-
* @param {string} code
|
|
346
|
+
* @param {string} productSlug Product slug
|
|
347
|
+
* @param {string} code Product document code
|
|
348
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
341
349
|
* @param {string} [authorization] Bearer Token
|
|
342
350
|
* @param {*} [options] Override http request option.
|
|
343
351
|
* @throws {RequiredError}
|
|
344
352
|
*/
|
|
345
|
-
async downloadProductDocument(productSlug: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
346
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadProductDocument(productSlug, code, authorization, options);
|
|
353
|
+
async downloadProductDocument(productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
354
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadProductDocument(productSlug, code, contentDisposition, authorization, options);
|
|
347
355
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
348
356
|
},
|
|
349
357
|
/**
|
|
@@ -416,14 +424,15 @@ export const ProductDocumentsApiFactory = function (configuration?: Configuratio
|
|
|
416
424
|
/**
|
|
417
425
|
* Get a pre-signed download url for the given product document.
|
|
418
426
|
* @summary Get pre-signed url for downloading product document
|
|
419
|
-
* @param {string} productSlug
|
|
420
|
-
* @param {string} code
|
|
427
|
+
* @param {string} productSlug Product slug
|
|
428
|
+
* @param {string} code Product document code
|
|
429
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
421
430
|
* @param {string} [authorization] Bearer Token
|
|
422
431
|
* @param {*} [options] Override http request option.
|
|
423
432
|
* @throws {RequiredError}
|
|
424
433
|
*/
|
|
425
|
-
downloadProductDocument(productSlug: string, code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
426
|
-
return localVarFp.downloadProductDocument(productSlug, code, authorization, options).then((request) => request(axios, basePath));
|
|
434
|
+
downloadProductDocument(productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void> {
|
|
435
|
+
return localVarFp.downloadProductDocument(productSlug, code, contentDisposition, authorization, options).then((request) => request(axios, basePath));
|
|
427
436
|
},
|
|
428
437
|
/**
|
|
429
438
|
* Get a product document.
|
|
@@ -505,19 +514,26 @@ export interface ProductDocumentsApiDeleteProductDocumentRequest {
|
|
|
505
514
|
*/
|
|
506
515
|
export interface ProductDocumentsApiDownloadProductDocumentRequest {
|
|
507
516
|
/**
|
|
508
|
-
*
|
|
517
|
+
* Product slug
|
|
509
518
|
* @type {string}
|
|
510
519
|
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
511
520
|
*/
|
|
512
521
|
readonly productSlug: string
|
|
513
522
|
|
|
514
523
|
/**
|
|
515
|
-
*
|
|
524
|
+
* Product document code
|
|
516
525
|
* @type {string}
|
|
517
526
|
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
518
527
|
*/
|
|
519
528
|
readonly code: string
|
|
520
529
|
|
|
530
|
+
/**
|
|
531
|
+
* Content disposition override. Default will be depending on the document type.
|
|
532
|
+
* @type {'attachment' | 'inline'}
|
|
533
|
+
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
534
|
+
*/
|
|
535
|
+
readonly contentDisposition: 'attachment' | 'inline'
|
|
536
|
+
|
|
521
537
|
/**
|
|
522
538
|
* Bearer Token
|
|
523
539
|
* @type {string}
|
|
@@ -680,7 +696,7 @@ export class ProductDocumentsApi extends BaseAPI {
|
|
|
680
696
|
* @memberof ProductDocumentsApi
|
|
681
697
|
*/
|
|
682
698
|
public downloadProductDocument(requestParameters: ProductDocumentsApiDownloadProductDocumentRequest, options?: AxiosRequestConfig) {
|
|
683
|
-
return ProductDocumentsApiFp(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
699
|
+
return ProductDocumentsApiFp(this.configuration).downloadProductDocument(requestParameters.productSlug, requestParameters.code, requestParameters.contentDisposition, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
684
700
|
}
|
|
685
701
|
|
|
686
702
|
/**
|
|
@@ -50,12 +50,13 @@ 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
|
|
@@ -126,12 +127,13 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
|
|
|
126
127
|
/**
|
|
127
128
|
* This will return a presigned URL to download the document.
|
|
128
129
|
* @summary Fetches a document download URL
|
|
129
|
-
* @param {string} code
|
|
130
|
+
* @param {string} code Document code
|
|
131
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
130
132
|
* @param {string} [authorization] Bearer Token
|
|
131
133
|
* @param {*} [options] Override http request option.
|
|
132
134
|
* @throws {RequiredError}
|
|
133
135
|
*/
|
|
134
|
-
getDocumentDownloadUrl(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
136
|
+
getDocumentDownloadUrl(code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
135
137
|
/**
|
|
136
138
|
* This will return a presigned URL for a random S3 key
|
|
137
139
|
* @summary Fetches a presigned URL for a S3 key
|
|
@@ -202,12 +204,13 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
|
|
|
202
204
|
/**
|
|
203
205
|
* This will return a presigned URL to download the document.
|
|
204
206
|
* @summary Fetches a document download URL
|
|
205
|
-
* @param {string} code
|
|
207
|
+
* @param {string} code Document code
|
|
208
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
206
209
|
* @param {string} [authorization] Bearer Token
|
|
207
210
|
* @param {*} [options] Override http request option.
|
|
208
211
|
* @throws {RequiredError}
|
|
209
212
|
*/
|
|
210
|
-
getDocumentDownloadUrl(code: string, authorization?: string, options?: any): AxiosPromise<void>;
|
|
213
|
+
getDocumentDownloadUrl(code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void>;
|
|
211
214
|
/**
|
|
212
215
|
* This will return a presigned URL for a random S3 key
|
|
213
216
|
* @summary Fetches a presigned URL for a S3 key
|
|
@@ -307,11 +310,17 @@ export interface DocumentsApiDeleteDocumentRequest {
|
|
|
307
310
|
*/
|
|
308
311
|
export interface DocumentsApiGetDocumentDownloadUrlRequest {
|
|
309
312
|
/**
|
|
310
|
-
*
|
|
313
|
+
* Document code
|
|
311
314
|
* @type {string}
|
|
312
315
|
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
313
316
|
*/
|
|
314
317
|
readonly code: string;
|
|
318
|
+
/**
|
|
319
|
+
* Content disposition override. Default will be depending on the document type.
|
|
320
|
+
* @type {'attachment' | 'inline'}
|
|
321
|
+
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
322
|
+
*/
|
|
323
|
+
readonly contentDisposition: 'attachment' | 'inline';
|
|
315
324
|
/**
|
|
316
325
|
* Bearer Token
|
|
317
326
|
* @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
|
}
|
|
@@ -541,17 +547,18 @@ var DocumentsApiFp = function (configuration) {
|
|
|
541
547
|
/**
|
|
542
548
|
* This will return a presigned URL to download the document.
|
|
543
549
|
* @summary Fetches a document download URL
|
|
544
|
-
* @param {string} code
|
|
550
|
+
* @param {string} code Document code
|
|
551
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
545
552
|
* @param {string} [authorization] Bearer Token
|
|
546
553
|
* @param {*} [options] Override http request option.
|
|
547
554
|
* @throws {RequiredError}
|
|
548
555
|
*/
|
|
549
|
-
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
556
|
+
getDocumentDownloadUrl: function (code, contentDisposition, authorization, options) {
|
|
550
557
|
return __awaiter(this, void 0, void 0, function () {
|
|
551
558
|
var localVarAxiosArgs;
|
|
552
559
|
return __generator(this, function (_a) {
|
|
553
560
|
switch (_a.label) {
|
|
554
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getDocumentDownloadUrl(code, authorization, options)];
|
|
561
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getDocumentDownloadUrl(code, contentDisposition, authorization, options)];
|
|
555
562
|
case 1:
|
|
556
563
|
localVarAxiosArgs = _a.sent();
|
|
557
564
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -675,13 +682,14 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
675
682
|
/**
|
|
676
683
|
* This will return a presigned URL to download the document.
|
|
677
684
|
* @summary Fetches a document download URL
|
|
678
|
-
* @param {string} code
|
|
685
|
+
* @param {string} code Document code
|
|
686
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
679
687
|
* @param {string} [authorization] Bearer Token
|
|
680
688
|
* @param {*} [options] Override http request option.
|
|
681
689
|
* @throws {RequiredError}
|
|
682
690
|
*/
|
|
683
|
-
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
684
|
-
return localVarFp.getDocumentDownloadUrl(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
691
|
+
getDocumentDownloadUrl: function (code, contentDisposition, authorization, options) {
|
|
692
|
+
return localVarFp.getDocumentDownloadUrl(code, contentDisposition, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
685
693
|
},
|
|
686
694
|
/**
|
|
687
695
|
* This will return a presigned URL for a random S3 key
|
|
@@ -783,7 +791,7 @@ var DocumentsApi = /** @class */ (function (_super) {
|
|
|
783
791
|
*/
|
|
784
792
|
DocumentsApi.prototype.getDocumentDownloadUrl = function (requestParameters, options) {
|
|
785
793
|
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); });
|
|
794
|
+
return (0, exports.DocumentsApiFp)(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.contentDisposition, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
787
795
|
};
|
|
788
796
|
/**
|
|
789
797
|
* This will return a presigned URL for a random S3 key
|
|
@@ -31,13 +31,14 @@ export declare const ProductDocumentsApiAxiosParamCreator: (configuration?: Conf
|
|
|
31
31
|
/**
|
|
32
32
|
* Get a pre-signed download url for the given product document.
|
|
33
33
|
* @summary Get pre-signed url for downloading product document
|
|
34
|
-
* @param {string} productSlug
|
|
35
|
-
* @param {string} code
|
|
34
|
+
* @param {string} productSlug Product slug
|
|
35
|
+
* @param {string} code Product document code
|
|
36
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
36
37
|
* @param {string} [authorization] Bearer Token
|
|
37
38
|
* @param {*} [options] Override http request option.
|
|
38
39
|
* @throws {RequiredError}
|
|
39
40
|
*/
|
|
40
|
-
downloadProductDocument: (productSlug: string, code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
41
|
+
downloadProductDocument: (productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
41
42
|
/**
|
|
42
43
|
* Get a product document.
|
|
43
44
|
* @summary Retrieve the product document
|
|
@@ -93,13 +94,14 @@ export declare const ProductDocumentsApiFp: (configuration?: Configuration) => {
|
|
|
93
94
|
/**
|
|
94
95
|
* Get a pre-signed download url for the given product document.
|
|
95
96
|
* @summary Get pre-signed url for downloading product document
|
|
96
|
-
* @param {string} productSlug
|
|
97
|
-
* @param {string} code
|
|
97
|
+
* @param {string} productSlug Product slug
|
|
98
|
+
* @param {string} code Product document code
|
|
99
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
98
100
|
* @param {string} [authorization] Bearer Token
|
|
99
101
|
* @param {*} [options] Override http request option.
|
|
100
102
|
* @throws {RequiredError}
|
|
101
103
|
*/
|
|
102
|
-
downloadProductDocument(productSlug: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
104
|
+
downloadProductDocument(productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
103
105
|
/**
|
|
104
106
|
* Get a product document.
|
|
105
107
|
* @summary Retrieve the product document
|
|
@@ -155,13 +157,14 @@ export declare const ProductDocumentsApiFactory: (configuration?: Configuration,
|
|
|
155
157
|
/**
|
|
156
158
|
* Get a pre-signed download url for the given product document.
|
|
157
159
|
* @summary Get pre-signed url for downloading product document
|
|
158
|
-
* @param {string} productSlug
|
|
159
|
-
* @param {string} code
|
|
160
|
+
* @param {string} productSlug Product slug
|
|
161
|
+
* @param {string} code Product document code
|
|
162
|
+
* @param {'attachment' | 'inline'} contentDisposition Content disposition override. Default will be depending on the document type.
|
|
160
163
|
* @param {string} [authorization] Bearer Token
|
|
161
164
|
* @param {*} [options] Override http request option.
|
|
162
165
|
* @throws {RequiredError}
|
|
163
166
|
*/
|
|
164
|
-
downloadProductDocument(productSlug: string, code: string, authorization?: string, options?: any): AxiosPromise<void>;
|
|
167
|
+
downloadProductDocument(productSlug: string, code: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void>;
|
|
165
168
|
/**
|
|
166
169
|
* Get a product document.
|
|
167
170
|
* @summary Retrieve the product document
|
|
@@ -231,17 +234,23 @@ export interface ProductDocumentsApiDeleteProductDocumentRequest {
|
|
|
231
234
|
*/
|
|
232
235
|
export interface ProductDocumentsApiDownloadProductDocumentRequest {
|
|
233
236
|
/**
|
|
234
|
-
*
|
|
237
|
+
* Product slug
|
|
235
238
|
* @type {string}
|
|
236
239
|
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
237
240
|
*/
|
|
238
241
|
readonly productSlug: string;
|
|
239
242
|
/**
|
|
240
|
-
*
|
|
243
|
+
* Product document code
|
|
241
244
|
* @type {string}
|
|
242
245
|
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
243
246
|
*/
|
|
244
247
|
readonly code: string;
|
|
248
|
+
/**
|
|
249
|
+
* Content disposition override. Default will be depending on the document type.
|
|
250
|
+
* @type {'attachment' | 'inline'}
|
|
251
|
+
* @memberof ProductDocumentsApiDownloadProductDocument
|
|
252
|
+
*/
|
|
253
|
+
readonly contentDisposition: 'attachment' | 'inline';
|
|
245
254
|
/**
|
|
246
255
|
* Bearer Token
|
|
247
256
|
* @type {string}
|
|
@@ -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
|
}
|
|
@@ -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)];
|
|
@@ -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.
|
|
@@ -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.
|