@emilgroup/document-sdk-node 1.0.0 → 1.1.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/.openapi-generator/FILES +8 -0
- package/README.md +2 -2
- package/api/document-templates-api.ts +4 -2
- package/api/documents-api.ts +213 -4
- package/api/search-keywords-api.ts +164 -0
- package/api/searchable-document-owners-api.ts +18 -18
- package/api.ts +2 -5
- package/base.ts +271 -242
- package/common.ts +61 -0
- package/dist/api/document-templates-api.d.ts +4 -3
- package/dist/api/document-templates-api.js +1 -1
- package/dist/api/documents-api.d.ts +113 -4
- package/dist/api/documents-api.js +188 -5
- package/dist/api/layouts-api.js +1 -1
- package/dist/api/search-keywords-api.d.ts +92 -0
- package/dist/api/search-keywords-api.js +225 -0
- package/dist/api/searchable-document-owners-api.d.ts +15 -15
- package/dist/api/searchable-document-owners-api.js +9 -9
- package/dist/api/searchable-documents-api.js +1 -1
- package/dist/api.d.ts +1 -4
- package/dist/api.js +1 -6
- package/dist/base.d.ts +5 -4
- package/dist/base.js +42 -13
- package/dist/common.d.ts +26 -0
- package/dist/common.js +35 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/models/create-doc-template-request-dto.d.ts +9 -3
- package/dist/models/create-doc-template-response-class.d.ts +25 -0
- package/dist/models/create-doc-template-response-class.js +15 -0
- package/dist/models/create-document-request-dto.d.ts +16 -4
- package/dist/models/create-html-template-dto.d.ts +1 -1
- package/dist/models/create-presigned-post-request-dto.d.ts +33 -9
- package/dist/models/doc-template-class.d.ts +24 -18
- package/dist/models/document-class.d.ts +17 -5
- package/dist/models/get-signed-s3-key-url-response-class.d.ts +24 -0
- package/dist/models/get-signed-s3-key-url-response-class.js +15 -0
- package/dist/models/html-template-class.d.ts +8 -8
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/models/layout-class.d.ts +10 -10
- package/dist/models/list-search-keywords-request-dto.d.ts +24 -0
- package/dist/models/list-search-keywords-request-dto.js +15 -0
- package/dist/models/list-search-keywords-response-class.d.ts +24 -0
- package/dist/models/list-search-keywords-response-class.js +15 -0
- package/dist/models/list-searchable-documents-response-class.d.ts +1 -1
- package/dist/models/update-doc-template-request-dto.d.ts +12 -6
- package/dist/models/update-document-request-dto.d.ts +6 -0
- package/index.ts +1 -1
- package/models/create-doc-template-request-dto.ts +9 -3
- package/models/create-doc-template-response-class.ts +31 -0
- package/models/create-document-request-dto.ts +12 -0
- package/models/create-html-template-dto.ts +1 -1
- package/models/create-presigned-post-request-dto.ts +31 -7
- package/models/doc-template-class.ts +24 -18
- package/models/document-class.ts +14 -2
- package/models/get-signed-s3-key-url-response-class.ts +30 -0
- package/models/html-template-class.ts +7 -7
- package/models/index.ts +6 -0
- package/models/layout-class.ts +10 -10
- package/models/list-search-keywords-request-dto.ts +30 -0
- package/models/list-search-keywords-response-class.ts +30 -0
- package/models/list-searchable-documents-response-class.ts +1 -1
- package/models/update-doc-template-request-dto.ts +12 -6
- package/models/update-document-request-dto.ts +6 -0
- package/package.json +2 -2
|
@@ -13,7 +13,10 @@ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import { CreateDocumentRequestDto } from '../models';
|
|
16
|
+
import { CreatePresignedPostRequestDto } from '../models';
|
|
17
|
+
import { CreatePresignedPostResponseClass } from '../models';
|
|
16
18
|
import { GetDocumentDownloadUrlResponseClass } from '../models';
|
|
19
|
+
import { GetSignedS3KeyUrlResponseClass } from '../models';
|
|
17
20
|
import { ListDocumentsResponseClass } from '../models';
|
|
18
21
|
import { UpdateDocumentRequestDto } from '../models';
|
|
19
22
|
/**
|
|
@@ -22,7 +25,7 @@ import { UpdateDocumentRequestDto } from '../models';
|
|
|
22
25
|
*/
|
|
23
26
|
export declare const DocumentsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
24
27
|
/**
|
|
25
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
28
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
26
29
|
* @summary Create the document
|
|
27
30
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
28
31
|
* @param {string} [authorization] Bearer Token
|
|
@@ -30,6 +33,14 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
|
|
|
30
33
|
* @throws {RequiredError}
|
|
31
34
|
*/
|
|
32
35
|
createDocument: (createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
39
|
+
* @param {string} [authorization] Bearer Token
|
|
40
|
+
* @param {*} [options] Override http request option.
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
*/
|
|
43
|
+
createPresignedPost: (createPresignedPostRequestDto: CreatePresignedPostRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
33
44
|
/**
|
|
34
45
|
*
|
|
35
46
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
@@ -56,6 +67,15 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
|
|
|
56
67
|
* @throws {RequiredError}
|
|
57
68
|
*/
|
|
58
69
|
getDocumentDownloadUrl: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
70
|
+
/**
|
|
71
|
+
* This will return a presigned URL for a random S3 key
|
|
72
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
73
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
74
|
+
* @param {string} [authorization] Bearer Token
|
|
75
|
+
* @param {*} [options] Override http request option.
|
|
76
|
+
* @throws {RequiredError}
|
|
77
|
+
*/
|
|
78
|
+
getSignedS3keyUrl: (s3Key: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
59
79
|
/**
|
|
60
80
|
* 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.
|
|
61
81
|
* @summary List documents
|
|
@@ -87,7 +107,7 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
|
|
|
87
107
|
*/
|
|
88
108
|
export declare const DocumentsApiFp: (configuration?: Configuration) => {
|
|
89
109
|
/**
|
|
90
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
110
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
91
111
|
* @summary Create the document
|
|
92
112
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
93
113
|
* @param {string} [authorization] Bearer Token
|
|
@@ -95,6 +115,14 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
|
|
|
95
115
|
* @throws {RequiredError}
|
|
96
116
|
*/
|
|
97
117
|
createDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
121
|
+
* @param {string} [authorization] Bearer Token
|
|
122
|
+
* @param {*} [options] Override http request option.
|
|
123
|
+
* @throws {RequiredError}
|
|
124
|
+
*/
|
|
125
|
+
createPresignedPost(createPresignedPostRequestDto: CreatePresignedPostRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePresignedPostResponseClass>>;
|
|
98
126
|
/**
|
|
99
127
|
*
|
|
100
128
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
@@ -121,6 +149,15 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
|
|
|
121
149
|
* @throws {RequiredError}
|
|
122
150
|
*/
|
|
123
151
|
getDocumentDownloadUrl(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocumentDownloadUrlResponseClass>>;
|
|
152
|
+
/**
|
|
153
|
+
* This will return a presigned URL for a random S3 key
|
|
154
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
155
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
156
|
+
* @param {string} [authorization] Bearer Token
|
|
157
|
+
* @param {*} [options] Override http request option.
|
|
158
|
+
* @throws {RequiredError}
|
|
159
|
+
*/
|
|
160
|
+
getSignedS3keyUrl(s3Key: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSignedS3KeyUrlResponseClass>>;
|
|
124
161
|
/**
|
|
125
162
|
* 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.
|
|
126
163
|
* @summary List documents
|
|
@@ -152,7 +189,7 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
|
|
|
152
189
|
*/
|
|
153
190
|
export declare const DocumentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
154
191
|
/**
|
|
155
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
192
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
156
193
|
* @summary Create the document
|
|
157
194
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
158
195
|
* @param {string} [authorization] Bearer Token
|
|
@@ -160,6 +197,14 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
|
|
|
160
197
|
* @throws {RequiredError}
|
|
161
198
|
*/
|
|
162
199
|
createDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: any): AxiosPromise<object>;
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
203
|
+
* @param {string} [authorization] Bearer Token
|
|
204
|
+
* @param {*} [options] Override http request option.
|
|
205
|
+
* @throws {RequiredError}
|
|
206
|
+
*/
|
|
207
|
+
createPresignedPost(createPresignedPostRequestDto: CreatePresignedPostRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePresignedPostResponseClass>;
|
|
163
208
|
/**
|
|
164
209
|
*
|
|
165
210
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
@@ -186,6 +231,15 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
|
|
|
186
231
|
* @throws {RequiredError}
|
|
187
232
|
*/
|
|
188
233
|
getDocumentDownloadUrl(code: string, authorization?: string, options?: any): AxiosPromise<GetDocumentDownloadUrlResponseClass>;
|
|
234
|
+
/**
|
|
235
|
+
* This will return a presigned URL for a random S3 key
|
|
236
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
237
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
238
|
+
* @param {string} [authorization] Bearer Token
|
|
239
|
+
* @param {*} [options] Override http request option.
|
|
240
|
+
* @throws {RequiredError}
|
|
241
|
+
*/
|
|
242
|
+
getSignedS3keyUrl(s3Key: string, authorization?: string, options?: any): AxiosPromise<GetSignedS3KeyUrlResponseClass>;
|
|
189
243
|
/**
|
|
190
244
|
* 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.
|
|
191
245
|
* @summary List documents
|
|
@@ -230,6 +284,25 @@ export interface DocumentsApiCreateDocumentRequest {
|
|
|
230
284
|
*/
|
|
231
285
|
readonly authorization?: string;
|
|
232
286
|
}
|
|
287
|
+
/**
|
|
288
|
+
* Request parameters for createPresignedPost operation in DocumentsApi.
|
|
289
|
+
* @export
|
|
290
|
+
* @interface DocumentsApiCreatePresignedPostRequest
|
|
291
|
+
*/
|
|
292
|
+
export interface DocumentsApiCreatePresignedPostRequest {
|
|
293
|
+
/**
|
|
294
|
+
*
|
|
295
|
+
* @type {CreatePresignedPostRequestDto}
|
|
296
|
+
* @memberof DocumentsApiCreatePresignedPost
|
|
297
|
+
*/
|
|
298
|
+
readonly createPresignedPostRequestDto: CreatePresignedPostRequestDto;
|
|
299
|
+
/**
|
|
300
|
+
* Bearer Token
|
|
301
|
+
* @type {string}
|
|
302
|
+
* @memberof DocumentsApiCreatePresignedPost
|
|
303
|
+
*/
|
|
304
|
+
readonly authorization?: string;
|
|
305
|
+
}
|
|
233
306
|
/**
|
|
234
307
|
* Request parameters for createTemporaryDocument operation in DocumentsApi.
|
|
235
308
|
* @export
|
|
@@ -287,6 +360,25 @@ export interface DocumentsApiGetDocumentDownloadUrlRequest {
|
|
|
287
360
|
*/
|
|
288
361
|
readonly authorization?: string;
|
|
289
362
|
}
|
|
363
|
+
/**
|
|
364
|
+
* Request parameters for getSignedS3keyUrl operation in DocumentsApi.
|
|
365
|
+
* @export
|
|
366
|
+
* @interface DocumentsApiGetSignedS3keyUrlRequest
|
|
367
|
+
*/
|
|
368
|
+
export interface DocumentsApiGetSignedS3keyUrlRequest {
|
|
369
|
+
/**
|
|
370
|
+
* Key for the file in S3 bucket to create the presigned download URL for
|
|
371
|
+
* @type {string}
|
|
372
|
+
* @memberof DocumentsApiGetSignedS3keyUrl
|
|
373
|
+
*/
|
|
374
|
+
readonly s3Key: string;
|
|
375
|
+
/**
|
|
376
|
+
* Bearer Token
|
|
377
|
+
* @type {string}
|
|
378
|
+
* @memberof DocumentsApiGetSignedS3keyUrl
|
|
379
|
+
*/
|
|
380
|
+
readonly authorization?: string;
|
|
381
|
+
}
|
|
290
382
|
/**
|
|
291
383
|
* Request parameters for listDocuments operation in DocumentsApi.
|
|
292
384
|
* @export
|
|
@@ -369,7 +461,7 @@ export interface DocumentsApiUpdateDocumentRequest {
|
|
|
369
461
|
*/
|
|
370
462
|
export declare class DocumentsApi extends BaseAPI {
|
|
371
463
|
/**
|
|
372
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
464
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
373
465
|
* @summary Create the document
|
|
374
466
|
* @param {DocumentsApiCreateDocumentRequest} requestParameters Request parameters.
|
|
375
467
|
* @param {*} [options] Override http request option.
|
|
@@ -377,6 +469,14 @@ export declare class DocumentsApi extends BaseAPI {
|
|
|
377
469
|
* @memberof DocumentsApi
|
|
378
470
|
*/
|
|
379
471
|
createDocument(requestParameters: DocumentsApiCreateDocumentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
|
|
472
|
+
/**
|
|
473
|
+
*
|
|
474
|
+
* @param {DocumentsApiCreatePresignedPostRequest} requestParameters Request parameters.
|
|
475
|
+
* @param {*} [options] Override http request option.
|
|
476
|
+
* @throws {RequiredError}
|
|
477
|
+
* @memberof DocumentsApi
|
|
478
|
+
*/
|
|
479
|
+
createPresignedPost(requestParameters: DocumentsApiCreatePresignedPostRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePresignedPostResponseClass, any>>;
|
|
380
480
|
/**
|
|
381
481
|
*
|
|
382
482
|
* @param {DocumentsApiCreateTemporaryDocumentRequest} requestParameters Request parameters.
|
|
@@ -403,6 +503,15 @@ export declare class DocumentsApi extends BaseAPI {
|
|
|
403
503
|
* @memberof DocumentsApi
|
|
404
504
|
*/
|
|
405
505
|
getDocumentDownloadUrl(requestParameters: DocumentsApiGetDocumentDownloadUrlRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDocumentDownloadUrlResponseClass, any>>;
|
|
506
|
+
/**
|
|
507
|
+
* This will return a presigned URL for a random S3 key
|
|
508
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
509
|
+
* @param {DocumentsApiGetSignedS3keyUrlRequest} requestParameters Request parameters.
|
|
510
|
+
* @param {*} [options] Override http request option.
|
|
511
|
+
* @throws {RequiredError}
|
|
512
|
+
* @memberof DocumentsApi
|
|
513
|
+
*/
|
|
514
|
+
getSignedS3keyUrl(requestParameters: DocumentsApiGetSignedS3keyUrlRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetSignedS3KeyUrlResponseClass, any>>;
|
|
406
515
|
/**
|
|
407
516
|
* 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.
|
|
408
517
|
* @summary List documents
|
|
@@ -53,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
53
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
54
|
function step(op) {
|
|
55
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
-
while (_) try {
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
57
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
58
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
59
|
switch (op[0]) {
|
|
@@ -97,7 +97,7 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
97
97
|
var _this = this;
|
|
98
98
|
return {
|
|
99
99
|
/**
|
|
100
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
100
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
101
101
|
* @summary Create the document
|
|
102
102
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
103
103
|
* @param {string} [authorization] Bearer Token
|
|
@@ -145,6 +145,54 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
147
|
},
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
151
|
+
* @param {string} [authorization] Bearer Token
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
*/
|
|
155
|
+
createPresignedPost: function (createPresignedPostRequestDto, authorization, options) {
|
|
156
|
+
if (options === void 0) { options = {}; }
|
|
157
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
158
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
159
|
+
return __generator(this, function (_a) {
|
|
160
|
+
switch (_a.label) {
|
|
161
|
+
case 0:
|
|
162
|
+
// verify required parameter 'createPresignedPostRequestDto' is not null or undefined
|
|
163
|
+
(0, common_1.assertParamExists)('createPresignedPost', 'createPresignedPostRequestDto', createPresignedPostRequestDto);
|
|
164
|
+
localVarPath = "/documentservice/v1/documents/pre-signed-post";
|
|
165
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
166
|
+
if (configuration) {
|
|
167
|
+
baseOptions = configuration.baseOptions;
|
|
168
|
+
baseAccessToken = configuration.accessToken;
|
|
169
|
+
}
|
|
170
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
171
|
+
localVarHeaderParameter = {};
|
|
172
|
+
localVarQueryParameter = {};
|
|
173
|
+
// authentication bearer required
|
|
174
|
+
// http bearer authentication required
|
|
175
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
176
|
+
case 1:
|
|
177
|
+
// authentication bearer required
|
|
178
|
+
// http bearer authentication required
|
|
179
|
+
_a.sent();
|
|
180
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
181
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
182
|
+
}
|
|
183
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
184
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
185
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
186
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
187
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPresignedPostRequestDto, localVarRequestOptions, configuration);
|
|
188
|
+
return [2 /*return*/, {
|
|
189
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
190
|
+
options: localVarRequestOptions,
|
|
191
|
+
}];
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
},
|
|
148
196
|
/**
|
|
149
197
|
*
|
|
150
198
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
@@ -289,6 +337,56 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
289
337
|
});
|
|
290
338
|
});
|
|
291
339
|
},
|
|
340
|
+
/**
|
|
341
|
+
* This will return a presigned URL for a random S3 key
|
|
342
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
343
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
344
|
+
* @param {string} [authorization] Bearer Token
|
|
345
|
+
* @param {*} [options] Override http request option.
|
|
346
|
+
* @throws {RequiredError}
|
|
347
|
+
*/
|
|
348
|
+
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
349
|
+
if (options === void 0) { options = {}; }
|
|
350
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
351
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
352
|
+
return __generator(this, function (_a) {
|
|
353
|
+
switch (_a.label) {
|
|
354
|
+
case 0:
|
|
355
|
+
// verify required parameter 's3Key' is not null or undefined
|
|
356
|
+
(0, common_1.assertParamExists)('getSignedS3keyUrl', 's3Key', s3Key);
|
|
357
|
+
localVarPath = "/documentservice/v1/documents/signed-s3-url";
|
|
358
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
359
|
+
if (configuration) {
|
|
360
|
+
baseOptions = configuration.baseOptions;
|
|
361
|
+
baseAccessToken = configuration.accessToken;
|
|
362
|
+
}
|
|
363
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
364
|
+
localVarHeaderParameter = {};
|
|
365
|
+
localVarQueryParameter = {};
|
|
366
|
+
// authentication bearer required
|
|
367
|
+
// http bearer authentication required
|
|
368
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
369
|
+
case 1:
|
|
370
|
+
// authentication bearer required
|
|
371
|
+
// http bearer authentication required
|
|
372
|
+
_a.sent();
|
|
373
|
+
if (s3Key !== undefined) {
|
|
374
|
+
localVarQueryParameter['s3Key'] = s3Key;
|
|
375
|
+
}
|
|
376
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
377
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
378
|
+
}
|
|
379
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
380
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
381
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
382
|
+
return [2 /*return*/, {
|
|
383
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
384
|
+
options: localVarRequestOptions,
|
|
385
|
+
}];
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
},
|
|
292
390
|
/**
|
|
293
391
|
* 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.
|
|
294
392
|
* @summary List documents
|
|
@@ -421,7 +519,7 @@ var DocumentsApiFp = function (configuration) {
|
|
|
421
519
|
var localVarAxiosParamCreator = (0, exports.DocumentsApiAxiosParamCreator)(configuration);
|
|
422
520
|
return {
|
|
423
521
|
/**
|
|
424
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
522
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
425
523
|
* @summary Create the document
|
|
426
524
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
427
525
|
* @param {string} [authorization] Bearer Token
|
|
@@ -441,6 +539,26 @@ var DocumentsApiFp = function (configuration) {
|
|
|
441
539
|
});
|
|
442
540
|
});
|
|
443
541
|
},
|
|
542
|
+
/**
|
|
543
|
+
*
|
|
544
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
545
|
+
* @param {string} [authorization] Bearer Token
|
|
546
|
+
* @param {*} [options] Override http request option.
|
|
547
|
+
* @throws {RequiredError}
|
|
548
|
+
*/
|
|
549
|
+
createPresignedPost: function (createPresignedPostRequestDto, authorization, options) {
|
|
550
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
551
|
+
var localVarAxiosArgs;
|
|
552
|
+
return __generator(this, function (_a) {
|
|
553
|
+
switch (_a.label) {
|
|
554
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPresignedPost(createPresignedPostRequestDto, authorization, options)];
|
|
555
|
+
case 1:
|
|
556
|
+
localVarAxiosArgs = _a.sent();
|
|
557
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
});
|
|
561
|
+
},
|
|
444
562
|
/**
|
|
445
563
|
*
|
|
446
564
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
@@ -503,6 +621,27 @@ var DocumentsApiFp = function (configuration) {
|
|
|
503
621
|
});
|
|
504
622
|
});
|
|
505
623
|
},
|
|
624
|
+
/**
|
|
625
|
+
* This will return a presigned URL for a random S3 key
|
|
626
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
627
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
628
|
+
* @param {string} [authorization] Bearer Token
|
|
629
|
+
* @param {*} [options] Override http request option.
|
|
630
|
+
* @throws {RequiredError}
|
|
631
|
+
*/
|
|
632
|
+
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
633
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
634
|
+
var localVarAxiosArgs;
|
|
635
|
+
return __generator(this, function (_a) {
|
|
636
|
+
switch (_a.label) {
|
|
637
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, authorization, options)];
|
|
638
|
+
case 1:
|
|
639
|
+
localVarAxiosArgs = _a.sent();
|
|
640
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
641
|
+
}
|
|
642
|
+
});
|
|
643
|
+
});
|
|
644
|
+
},
|
|
506
645
|
/**
|
|
507
646
|
* 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.
|
|
508
647
|
* @summary List documents
|
|
@@ -562,7 +701,7 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
562
701
|
var localVarFp = (0, exports.DocumentsApiFp)(configuration);
|
|
563
702
|
return {
|
|
564
703
|
/**
|
|
565
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
704
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
566
705
|
* @summary Create the document
|
|
567
706
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
568
707
|
* @param {string} [authorization] Bearer Token
|
|
@@ -572,6 +711,16 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
572
711
|
createDocument: function (createDocumentRequestDto, authorization, options) {
|
|
573
712
|
return localVarFp.createDocument(createDocumentRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
574
713
|
},
|
|
714
|
+
/**
|
|
715
|
+
*
|
|
716
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
717
|
+
* @param {string} [authorization] Bearer Token
|
|
718
|
+
* @param {*} [options] Override http request option.
|
|
719
|
+
* @throws {RequiredError}
|
|
720
|
+
*/
|
|
721
|
+
createPresignedPost: function (createPresignedPostRequestDto, authorization, options) {
|
|
722
|
+
return localVarFp.createPresignedPost(createPresignedPostRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
723
|
+
},
|
|
575
724
|
/**
|
|
576
725
|
*
|
|
577
726
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
@@ -604,6 +753,17 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
604
753
|
getDocumentDownloadUrl: function (code, authorization, options) {
|
|
605
754
|
return localVarFp.getDocumentDownloadUrl(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
606
755
|
},
|
|
756
|
+
/**
|
|
757
|
+
* This will return a presigned URL for a random S3 key
|
|
758
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
759
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
760
|
+
* @param {string} [authorization] Bearer Token
|
|
761
|
+
* @param {*} [options] Override http request option.
|
|
762
|
+
* @throws {RequiredError}
|
|
763
|
+
*/
|
|
764
|
+
getSignedS3keyUrl: function (s3Key, authorization, options) {
|
|
765
|
+
return localVarFp.getSignedS3keyUrl(s3Key, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
766
|
+
},
|
|
607
767
|
/**
|
|
608
768
|
* 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.
|
|
609
769
|
* @summary List documents
|
|
@@ -647,7 +807,7 @@ var DocumentsApi = /** @class */ (function (_super) {
|
|
|
647
807
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
648
808
|
}
|
|
649
809
|
/**
|
|
650
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
810
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
651
811
|
* @summary Create the document
|
|
652
812
|
* @param {DocumentsApiCreateDocumentRequest} requestParameters Request parameters.
|
|
653
813
|
* @param {*} [options] Override http request option.
|
|
@@ -658,6 +818,17 @@ var DocumentsApi = /** @class */ (function (_super) {
|
|
|
658
818
|
var _this = this;
|
|
659
819
|
return (0, exports.DocumentsApiFp)(this.configuration).createDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
660
820
|
};
|
|
821
|
+
/**
|
|
822
|
+
*
|
|
823
|
+
* @param {DocumentsApiCreatePresignedPostRequest} requestParameters Request parameters.
|
|
824
|
+
* @param {*} [options] Override http request option.
|
|
825
|
+
* @throws {RequiredError}
|
|
826
|
+
* @memberof DocumentsApi
|
|
827
|
+
*/
|
|
828
|
+
DocumentsApi.prototype.createPresignedPost = function (requestParameters, options) {
|
|
829
|
+
var _this = this;
|
|
830
|
+
return (0, exports.DocumentsApiFp)(this.configuration).createPresignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
831
|
+
};
|
|
661
832
|
/**
|
|
662
833
|
*
|
|
663
834
|
* @param {DocumentsApiCreateTemporaryDocumentRequest} requestParameters Request parameters.
|
|
@@ -693,6 +864,18 @@ var DocumentsApi = /** @class */ (function (_super) {
|
|
|
693
864
|
var _this = this;
|
|
694
865
|
return (0, exports.DocumentsApiFp)(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
695
866
|
};
|
|
867
|
+
/**
|
|
868
|
+
* This will return a presigned URL for a random S3 key
|
|
869
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
870
|
+
* @param {DocumentsApiGetSignedS3keyUrlRequest} requestParameters Request parameters.
|
|
871
|
+
* @param {*} [options] Override http request option.
|
|
872
|
+
* @throws {RequiredError}
|
|
873
|
+
* @memberof DocumentsApi
|
|
874
|
+
*/
|
|
875
|
+
DocumentsApi.prototype.getSignedS3keyUrl = function (requestParameters, options) {
|
|
876
|
+
var _this = this;
|
|
877
|
+
return (0, exports.DocumentsApiFp)(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
878
|
+
};
|
|
696
879
|
/**
|
|
697
880
|
* 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.
|
|
698
881
|
* @summary List documents
|
package/dist/api/layouts-api.js
CHANGED
|
@@ -53,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
53
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
54
|
function step(op) {
|
|
55
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
-
while (_) try {
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
57
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
58
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
59
|
switch (op[0]) {
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL DocumentService
|
|
3
|
+
* The EMIL DocumentService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
|
+
import { Configuration } from '../configuration';
|
|
14
|
+
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { ListSearchKeywordsResponseClass } from '../models';
|
|
16
|
+
/**
|
|
17
|
+
* SearchKeywordsApi - axios parameter creator
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export declare const SearchKeywordsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param {string} searchText Text to search in the documents
|
|
24
|
+
* @param {string} [authorization] Bearer Token
|
|
25
|
+
* @param {*} [options] Override http request option.
|
|
26
|
+
* @throws {RequiredError}
|
|
27
|
+
*/
|
|
28
|
+
listSearchKeywords: (searchText: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* SearchKeywordsApi - functional programming interface
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export declare const SearchKeywordsApiFp: (configuration?: Configuration) => {
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param {string} searchText Text to search in the documents
|
|
38
|
+
* @param {string} [authorization] Bearer Token
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
*/
|
|
42
|
+
listSearchKeywords(searchText: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSearchKeywordsResponseClass>>;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* SearchKeywordsApi - factory interface
|
|
46
|
+
* @export
|
|
47
|
+
*/
|
|
48
|
+
export declare const SearchKeywordsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param {string} searchText Text to search in the documents
|
|
52
|
+
* @param {string} [authorization] Bearer Token
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
*/
|
|
56
|
+
listSearchKeywords(searchText: string, authorization?: string, options?: any): AxiosPromise<ListSearchKeywordsResponseClass>;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Request parameters for listSearchKeywords operation in SearchKeywordsApi.
|
|
60
|
+
* @export
|
|
61
|
+
* @interface SearchKeywordsApiListSearchKeywordsRequest
|
|
62
|
+
*/
|
|
63
|
+
export interface SearchKeywordsApiListSearchKeywordsRequest {
|
|
64
|
+
/**
|
|
65
|
+
* Text to search in the documents
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof SearchKeywordsApiListSearchKeywords
|
|
68
|
+
*/
|
|
69
|
+
readonly searchText: string;
|
|
70
|
+
/**
|
|
71
|
+
* Bearer Token
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof SearchKeywordsApiListSearchKeywords
|
|
74
|
+
*/
|
|
75
|
+
readonly authorization?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* SearchKeywordsApi - object-oriented interface
|
|
79
|
+
* @export
|
|
80
|
+
* @class SearchKeywordsApi
|
|
81
|
+
* @extends {BaseAPI}
|
|
82
|
+
*/
|
|
83
|
+
export declare class SearchKeywordsApi extends BaseAPI {
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @param {SearchKeywordsApiListSearchKeywordsRequest} requestParameters Request parameters.
|
|
87
|
+
* @param {*} [options] Override http request option.
|
|
88
|
+
* @throws {RequiredError}
|
|
89
|
+
* @memberof SearchKeywordsApi
|
|
90
|
+
*/
|
|
91
|
+
listSearchKeywords(requestParameters: SearchKeywordsApiListSearchKeywordsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListSearchKeywordsResponseClass, any>>;
|
|
92
|
+
}
|