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