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