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