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