@emilgroup/document-sdk-node 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-node@1.26.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.26.0
24
+ yarn add @emilgroup/document-sdk-node@1.27.0
25
25
  ```
26
26
 
27
27
  And then you can import `DocumentsApi`.
@@ -229,13 +229,16 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
229
229
  * This will return a presigned URL for a random S3 key
230
230
  * @summary Fetches a presigned URL for a S3 key
231
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.
232
233
  * @param {string} [authorization] Bearer Token
233
234
  * @param {*} [options] Override http request option.
234
235
  * @throws {RequiredError}
235
236
  */
236
- getSignedS3keyUrl: async (s3Key: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
237
+ getSignedS3keyUrl: async (s3Key: string, contentDisposition: 'attachment' | 'inline', authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
237
238
  // verify required parameter 's3Key' is not null or undefined
238
239
  assertParamExists('getSignedS3keyUrl', 's3Key', s3Key)
240
+ // verify required parameter 'contentDisposition' is not null or undefined
241
+ assertParamExists('getSignedS3keyUrl', 'contentDisposition', contentDisposition)
239
242
  const localVarPath = `/documentservice/v1/documents/signed-s3-url`;
240
243
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
241
244
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -258,6 +261,10 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
258
261
  localVarQueryParameter['s3Key'] = s3Key;
259
262
  }
260
263
 
264
+ if (contentDisposition !== undefined) {
265
+ localVarQueryParameter['contentDisposition'] = contentDisposition;
266
+ }
267
+
261
268
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
262
269
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
263
270
  }
@@ -463,12 +470,13 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
463
470
  * This will return a presigned URL for a random S3 key
464
471
  * @summary Fetches a presigned URL for a S3 key
465
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.
466
474
  * @param {string} [authorization] Bearer Token
467
475
  * @param {*} [options] Override http request option.
468
476
  * @throws {RequiredError}
469
477
  */
470
- async getSignedS3keyUrl(s3Key: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
471
- 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);
472
480
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
473
481
  },
474
482
  /**
@@ -561,12 +569,13 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
561
569
  * This will return a presigned URL for a random S3 key
562
570
  * @summary Fetches a presigned URL for a S3 key
563
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.
564
573
  * @param {string} [authorization] Bearer Token
565
574
  * @param {*} [options] Override http request option.
566
575
  * @throws {RequiredError}
567
576
  */
568
- getSignedS3keyUrl(s3Key: string, authorization?: string, options?: any): AxiosPromise<void> {
569
- 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));
570
579
  },
571
580
  /**
572
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.
@@ -704,6 +713,13 @@ export interface DocumentsApiGetSignedS3keyUrlRequest {
704
713
  */
705
714
  readonly s3Key: string
706
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
+
707
723
  /**
708
724
  * Bearer Token
709
725
  * @type {string}
@@ -867,7 +883,7 @@ export class DocumentsApi extends BaseAPI {
867
883
  * @memberof DocumentsApi
868
884
  */
869
885
  public getSignedS3keyUrl(requestParameters: DocumentsApiGetSignedS3keyUrlRequest, options?: AxiosRequestConfig) {
870
- 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));
871
887
  }
872
888
 
873
889
  /**
@@ -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}
@@ -298,11 +298,12 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
298
298
  * This will return a presigned URL for a random S3 key
299
299
  * @summary Fetches a presigned URL for a S3 key
300
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.
301
302
  * @param {string} [authorization] Bearer Token
302
303
  * @param {*} [options] Override http request option.
303
304
  * @throws {RequiredError}
304
305
  */
305
- getSignedS3keyUrl: function (s3Key, authorization, options) {
306
+ getSignedS3keyUrl: function (s3Key, contentDisposition, authorization, options) {
306
307
  if (options === void 0) { options = {}; }
307
308
  return __awaiter(_this, void 0, void 0, function () {
308
309
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -311,6 +312,8 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
311
312
  case 0:
312
313
  // verify required parameter 's3Key' is not null or undefined
313
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);
314
317
  localVarPath = "/documentservice/v1/documents/signed-s3-url";
315
318
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
316
319
  if (configuration) {
@@ -330,6 +333,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
330
333
  if (s3Key !== undefined) {
331
334
  localVarQueryParameter['s3Key'] = s3Key;
332
335
  }
336
+ if (contentDisposition !== undefined) {
337
+ localVarQueryParameter['contentDisposition'] = contentDisposition;
338
+ }
333
339
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
334
340
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
335
341
  }
@@ -568,16 +574,17 @@ var DocumentsApiFp = function (configuration) {
568
574
  * This will return a presigned URL for a random S3 key
569
575
  * @summary Fetches a presigned URL for a S3 key
570
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.
571
578
  * @param {string} [authorization] Bearer Token
572
579
  * @param {*} [options] Override http request option.
573
580
  * @throws {RequiredError}
574
581
  */
575
- getSignedS3keyUrl: function (s3Key, authorization, options) {
582
+ getSignedS3keyUrl: function (s3Key, contentDisposition, authorization, options) {
576
583
  return __awaiter(this, void 0, void 0, function () {
577
584
  var localVarAxiosArgs;
578
585
  return __generator(this, function (_a) {
579
586
  switch (_a.label) {
580
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, authorization, options)];
587
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, contentDisposition, authorization, options)];
581
588
  case 1:
582
589
  localVarAxiosArgs = _a.sent();
583
590
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -693,12 +700,13 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
693
700
  * This will return a presigned URL for a random S3 key
694
701
  * @summary Fetches a presigned URL for a S3 key
695
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.
696
704
  * @param {string} [authorization] Bearer Token
697
705
  * @param {*} [options] Override http request option.
698
706
  * @throws {RequiredError}
699
707
  */
700
- getSignedS3keyUrl: function (s3Key, authorization, options) {
701
- 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); });
702
710
  },
703
711
  /**
704
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.
@@ -801,7 +809,7 @@ var DocumentsApi = /** @class */ (function (_super) {
801
809
  */
802
810
  DocumentsApi.prototype.getSignedS3keyUrl = function (requestParameters, options) {
803
811
  var _this = this;
804
- 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); });
805
813
  };
806
814
  /**
807
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/document-sdk-node",
3
- "version": "1.26.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": [