@emilgroup/document-sdk 1.26.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.26.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.26.0
24
+ yarn add @emilgroup/document-sdk@1.27.0
25
25
  ```
26
26
 
27
27
  And then you can import `DocumentsApi`.
@@ -225,13 +225,16 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
225
225
  * This will return a presigned URL for a random S3 key
226
226
  * @summary Fetches a presigned URL for a S3 key
227
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.
228
229
  * @param {string} [authorization] Bearer Token
229
230
  * @param {*} [options] Override http request option.
230
231
  * @throws {RequiredError}
231
232
  */
232
- getSignedS3keyUrl: async (s3Key: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
233
+ getSignedS3keyUrl: async (s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
233
234
  // verify required parameter 's3Key' is not null or undefined
234
235
  assertParamExists('getSignedS3keyUrl', 's3Key', s3Key)
236
+ // verify required parameter 'contentDisposition' is not null or undefined
237
+ assertParamExists('getSignedS3keyUrl', 'contentDisposition', contentDisposition)
235
238
  const localVarPath = `/documentservice/v1/documents/signed-s3-url`;
236
239
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
237
240
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -254,6 +257,10 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
254
257
  localVarQueryParameter['s3Key'] = s3Key;
255
258
  }
256
259
 
260
+ if (contentDisposition !== undefined) {
261
+ localVarQueryParameter['contentDisposition'] = contentDisposition;
262
+ }
263
+
257
264
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
258
265
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
259
266
  }
@@ -459,12 +466,13 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
459
466
  * This will return a presigned URL for a random S3 key
460
467
  * @summary Fetches a presigned URL for a S3 key
461
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.
462
470
  * @param {string} [authorization] Bearer Token
463
471
  * @param {*} [options] Override http request option.
464
472
  * @throws {RequiredError}
465
473
  */
466
- async getSignedS3keyUrl(s3Key: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
467
- 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);
468
476
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
469
477
  },
470
478
  /**
@@ -557,12 +565,13 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
557
565
  * This will return a presigned URL for a random S3 key
558
566
  * @summary Fetches a presigned URL for a S3 key
559
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.
560
569
  * @param {string} [authorization] Bearer Token
561
570
  * @param {*} [options] Override http request option.
562
571
  * @throws {RequiredError}
563
572
  */
564
- getSignedS3keyUrl(s3Key: string, authorization?: string, options?: any): AxiosPromise<void> {
565
- 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));
566
575
  },
567
576
  /**
568
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.
@@ -700,6 +709,13 @@ export interface DocumentsApiGetSignedS3keyUrlRequest {
700
709
  */
701
710
  readonly s3Key: string
702
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
+
703
719
  /**
704
720
  * Bearer Token
705
721
  * @type {string}
@@ -863,7 +879,7 @@ export class DocumentsApi extends BaseAPI {
863
879
  * @memberof DocumentsApi
864
880
  */
865
881
  public getSignedS3keyUrl(requestParameters: DocumentsApiGetSignedS3keyUrlRequest, options?: AxiosRequestConfig) {
866
- 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));
867
883
  }
868
884
 
869
885
  /**
@@ -61,11 +61,12 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
61
61
  * This will return a presigned URL for a random S3 key
62
62
  * @summary Fetches a presigned URL for a S3 key
63
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.
64
65
  * @param {string} [authorization] Bearer Token
65
66
  * @param {*} [options] Override http request option.
66
67
  * @throws {RequiredError}
67
68
  */
68
- getSignedS3keyUrl: (s3Key: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
69
+ getSignedS3keyUrl: (s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
69
70
  /**
70
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.
71
72
  * @summary List documents
@@ -138,11 +139,12 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
138
139
  * This will return a presigned URL for a random S3 key
139
140
  * @summary Fetches a presigned URL for a S3 key
140
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.
141
143
  * @param {string} [authorization] Bearer Token
142
144
  * @param {*} [options] Override http request option.
143
145
  * @throws {RequiredError}
144
146
  */
145
- 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>>;
146
148
  /**
147
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.
148
150
  * @summary List documents
@@ -215,11 +217,12 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
215
217
  * This will return a presigned URL for a random S3 key
216
218
  * @summary Fetches a presigned URL for a S3 key
217
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.
218
221
  * @param {string} [authorization] Bearer Token
219
222
  * @param {*} [options] Override http request option.
220
223
  * @throws {RequiredError}
221
224
  */
222
- getSignedS3keyUrl(s3Key: string, authorization?: string, options?: any): AxiosPromise<void>;
225
+ getSignedS3keyUrl(s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options?: any): AxiosPromise<void>;
223
226
  /**
224
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.
225
228
  * @summary List documents
@@ -340,6 +343,12 @@ export interface DocumentsApiGetSignedS3keyUrlRequest {
340
343
  * @memberof DocumentsApiGetSignedS3keyUrl
341
344
  */
342
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';
343
352
  /**
344
353
  * Bearer Token
345
354
  * @type {string}
@@ -294,11 +294,12 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
294
294
  * This will return a presigned URL for a random S3 key
295
295
  * @summary Fetches a presigned URL for a S3 key
296
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.
297
298
  * @param {string} [authorization] Bearer Token
298
299
  * @param {*} [options] Override http request option.
299
300
  * @throws {RequiredError}
300
301
  */
301
- getSignedS3keyUrl: function (s3Key, authorization, options) {
302
+ getSignedS3keyUrl: function (s3Key, contentDisposition, authorization, options) {
302
303
  if (options === void 0) { options = {}; }
303
304
  return __awaiter(_this, void 0, void 0, function () {
304
305
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -307,6 +308,8 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
307
308
  case 0:
308
309
  // verify required parameter 's3Key' is not null or undefined
309
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);
310
313
  localVarPath = "/documentservice/v1/documents/signed-s3-url";
311
314
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
312
315
  if (configuration) {
@@ -326,6 +329,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
326
329
  if (s3Key !== undefined) {
327
330
  localVarQueryParameter['s3Key'] = s3Key;
328
331
  }
332
+ if (contentDisposition !== undefined) {
333
+ localVarQueryParameter['contentDisposition'] = contentDisposition;
334
+ }
329
335
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
330
336
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
331
337
  }
@@ -564,16 +570,17 @@ var DocumentsApiFp = function (configuration) {
564
570
  * This will return a presigned URL for a random S3 key
565
571
  * @summary Fetches a presigned URL for a S3 key
566
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.
567
574
  * @param {string} [authorization] Bearer Token
568
575
  * @param {*} [options] Override http request option.
569
576
  * @throws {RequiredError}
570
577
  */
571
- getSignedS3keyUrl: function (s3Key, authorization, options) {
578
+ getSignedS3keyUrl: function (s3Key, contentDisposition, authorization, options) {
572
579
  return __awaiter(this, void 0, void 0, function () {
573
580
  var localVarAxiosArgs;
574
581
  return __generator(this, function (_a) {
575
582
  switch (_a.label) {
576
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, authorization, options)];
583
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, contentDisposition, authorization, options)];
577
584
  case 1:
578
585
  localVarAxiosArgs = _a.sent();
579
586
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -689,12 +696,13 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
689
696
  * This will return a presigned URL for a random S3 key
690
697
  * @summary Fetches a presigned URL for a S3 key
691
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.
692
700
  * @param {string} [authorization] Bearer Token
693
701
  * @param {*} [options] Override http request option.
694
702
  * @throws {RequiredError}
695
703
  */
696
- getSignedS3keyUrl: function (s3Key, authorization, options) {
697
- 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); });
698
706
  },
699
707
  /**
700
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.
@@ -797,7 +805,7 @@ var DocumentsApi = /** @class */ (function (_super) {
797
805
  */
798
806
  DocumentsApi.prototype.getSignedS3keyUrl = function (requestParameters, options) {
799
807
  var _this = this;
800
- 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); });
801
809
  };
802
810
  /**
803
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/document-sdk",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "description": "OpenAPI client for @emilgroup/document-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [