@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
package/.openapi-generator/FILES
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
.gitignore
|
|
2
2
|
.npmignore
|
|
3
|
+
.openapi-generator-ignore
|
|
3
4
|
README.md
|
|
4
5
|
api.ts
|
|
5
6
|
api/document-templates-api.ts
|
|
6
7
|
api/documents-api.ts
|
|
7
8
|
api/layouts-api.ts
|
|
9
|
+
api/search-keywords-api.ts
|
|
8
10
|
api/searchable-document-owners-api.ts
|
|
9
11
|
api/searchable-documents-api.ts
|
|
10
12
|
base.ts
|
|
@@ -13,9 +15,12 @@ configuration.ts
|
|
|
13
15
|
git_push.sh
|
|
14
16
|
index.ts
|
|
15
17
|
models/create-doc-template-request-dto.ts
|
|
18
|
+
models/create-doc-template-response-class.ts
|
|
16
19
|
models/create-document-request-dto.ts
|
|
17
20
|
models/create-html-template-dto.ts
|
|
18
21
|
models/create-layout-request-dto.ts
|
|
22
|
+
models/create-presigned-post-request-dto.ts
|
|
23
|
+
models/create-presigned-post-response-class.ts
|
|
19
24
|
models/delete-layout-request-dto.ts
|
|
20
25
|
models/delete-request-dto.ts
|
|
21
26
|
models/doc-template-class.ts
|
|
@@ -26,6 +31,7 @@ models/get-doc-template-response-class.ts
|
|
|
26
31
|
models/get-document-download-url-response-class.ts
|
|
27
32
|
models/get-layout-request-dto.ts
|
|
28
33
|
models/get-layout-response-class.ts
|
|
34
|
+
models/get-signed-s3-key-url-response-class.ts
|
|
29
35
|
models/html-template-class.ts
|
|
30
36
|
models/index.ts
|
|
31
37
|
models/layout-class.ts
|
|
@@ -33,6 +39,8 @@ models/list-doc-templates-response-class.ts
|
|
|
33
39
|
models/list-documents-response-class.ts
|
|
34
40
|
models/list-layouts-response-class.ts
|
|
35
41
|
models/list-request-dto.ts
|
|
42
|
+
models/list-search-keywords-request-dto.ts
|
|
43
|
+
models/list-search-keywords-response-class.ts
|
|
36
44
|
models/list-searchable-document-owners-response-class.ts
|
|
37
45
|
models/list-searchable-documents-request-dto.ts
|
|
38
46
|
models/list-searchable-documents-response-class.ts
|
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.
|
|
20
|
+
npm install @emilgroup/document-sdk-node@1.1.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/document-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/document-sdk-node@1.1.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `DocumentsApi`.
|
|
@@ -23,6 +23,8 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { CreateDocTemplateRequestDto } from '../models';
|
|
25
25
|
// @ts-ignore
|
|
26
|
+
import { CreateDocTemplateResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
26
28
|
import { GetDocTemplateResponseClass } from '../models';
|
|
27
29
|
// @ts-ignore
|
|
28
30
|
import { ListDocTemplatesResponseClass } from '../models';
|
|
@@ -323,7 +325,7 @@ export const DocumentTemplatesApiFp = function(configuration?: Configuration) {
|
|
|
323
325
|
* @param {*} [options] Override http request option.
|
|
324
326
|
* @throws {RequiredError}
|
|
325
327
|
*/
|
|
326
|
-
async createDocTemplate(createDocTemplateRequestDto: CreateDocTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
328
|
+
async createDocTemplate(createDocTemplateRequestDto: CreateDocTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateDocTemplateResponseClass>> {
|
|
327
329
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createDocTemplate(createDocTemplateRequestDto, authorization, options);
|
|
328
330
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
329
331
|
},
|
|
@@ -396,7 +398,7 @@ export const DocumentTemplatesApiFactory = function (configuration?: Configurati
|
|
|
396
398
|
* @param {*} [options] Override http request option.
|
|
397
399
|
* @throws {RequiredError}
|
|
398
400
|
*/
|
|
399
|
-
createDocTemplate(createDocTemplateRequestDto: CreateDocTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<
|
|
401
|
+
createDocTemplate(createDocTemplateRequestDto: CreateDocTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<CreateDocTemplateResponseClass> {
|
|
400
402
|
return localVarFp.createDocTemplate(createDocTemplateRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
401
403
|
},
|
|
402
404
|
/**
|
package/api/documents-api.ts
CHANGED
|
@@ -23,8 +23,14 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { CreateDocumentRequestDto } from '../models';
|
|
25
25
|
// @ts-ignore
|
|
26
|
+
import { CreatePresignedPostRequestDto } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { CreatePresignedPostResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
26
30
|
import { GetDocumentDownloadUrlResponseClass } from '../models';
|
|
27
31
|
// @ts-ignore
|
|
32
|
+
import { GetSignedS3KeyUrlResponseClass } from '../models';
|
|
33
|
+
// @ts-ignore
|
|
28
34
|
import { ListDocumentsResponseClass } from '../models';
|
|
29
35
|
// @ts-ignore
|
|
30
36
|
import { UpdateDocumentRequestDto } from '../models';
|
|
@@ -39,7 +45,7 @@ const FormData = require('form-data');
|
|
|
39
45
|
export const DocumentsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
40
46
|
return {
|
|
41
47
|
/**
|
|
42
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
48
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
43
49
|
* @summary Create the document
|
|
44
50
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
45
51
|
* @param {string} [authorization] Bearer Token
|
|
@@ -85,6 +91,52 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
85
91
|
options: localVarRequestOptions,
|
|
86
92
|
};
|
|
87
93
|
},
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
97
|
+
* @param {string} [authorization] Bearer Token
|
|
98
|
+
* @param {*} [options] Override http request option.
|
|
99
|
+
* @throws {RequiredError}
|
|
100
|
+
*/
|
|
101
|
+
createPresignedPost: async (createPresignedPostRequestDto: CreatePresignedPostRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
102
|
+
// verify required parameter 'createPresignedPostRequestDto' is not null or undefined
|
|
103
|
+
assertParamExists('createPresignedPost', 'createPresignedPostRequestDto', createPresignedPostRequestDto)
|
|
104
|
+
const localVarPath = `/documentservice/v1/documents/pre-signed-post`;
|
|
105
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
106
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
107
|
+
let baseOptions;
|
|
108
|
+
let baseAccessToken;
|
|
109
|
+
if (configuration) {
|
|
110
|
+
baseOptions = configuration.baseOptions;
|
|
111
|
+
baseAccessToken = configuration.accessToken;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
115
|
+
const localVarHeaderParameter = {} as any;
|
|
116
|
+
const localVarQueryParameter = {} as any;
|
|
117
|
+
|
|
118
|
+
// authentication bearer required
|
|
119
|
+
// http bearer authentication required
|
|
120
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
121
|
+
|
|
122
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
123
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
129
|
+
|
|
130
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
131
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
132
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
133
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createPresignedPostRequestDto, localVarRequestOptions, configuration)
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
url: toPathString(localVarUrlObj),
|
|
137
|
+
options: localVarRequestOptions,
|
|
138
|
+
};
|
|
139
|
+
},
|
|
88
140
|
/**
|
|
89
141
|
*
|
|
90
142
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
@@ -212,6 +264,54 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
212
264
|
|
|
213
265
|
|
|
214
266
|
|
|
267
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
268
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
269
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
270
|
+
|
|
271
|
+
return {
|
|
272
|
+
url: toPathString(localVarUrlObj),
|
|
273
|
+
options: localVarRequestOptions,
|
|
274
|
+
};
|
|
275
|
+
},
|
|
276
|
+
/**
|
|
277
|
+
* This will return a presigned URL for a random S3 key
|
|
278
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
279
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
280
|
+
* @param {string} [authorization] Bearer Token
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
*/
|
|
284
|
+
getSignedS3keyUrl: async (s3Key: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
285
|
+
// verify required parameter 's3Key' is not null or undefined
|
|
286
|
+
assertParamExists('getSignedS3keyUrl', 's3Key', s3Key)
|
|
287
|
+
const localVarPath = `/documentservice/v1/documents/signed-s3-url`;
|
|
288
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
289
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
290
|
+
let baseOptions;
|
|
291
|
+
let baseAccessToken;
|
|
292
|
+
if (configuration) {
|
|
293
|
+
baseOptions = configuration.baseOptions;
|
|
294
|
+
baseAccessToken = configuration.accessToken;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
298
|
+
const localVarHeaderParameter = {} as any;
|
|
299
|
+
const localVarQueryParameter = {} as any;
|
|
300
|
+
|
|
301
|
+
// authentication bearer required
|
|
302
|
+
// http bearer authentication required
|
|
303
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
304
|
+
|
|
305
|
+
if (s3Key !== undefined) {
|
|
306
|
+
localVarQueryParameter['s3Key'] = s3Key;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
310
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
215
315
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
216
316
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
217
317
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -354,7 +454,7 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
|
|
|
354
454
|
const localVarAxiosParamCreator = DocumentsApiAxiosParamCreator(configuration)
|
|
355
455
|
return {
|
|
356
456
|
/**
|
|
357
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
457
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
358
458
|
* @summary Create the document
|
|
359
459
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
360
460
|
* @param {string} [authorization] Bearer Token
|
|
@@ -365,6 +465,17 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
|
|
|
365
465
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createDocument(createDocumentRequestDto, authorization, options);
|
|
366
466
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
367
467
|
},
|
|
468
|
+
/**
|
|
469
|
+
*
|
|
470
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
471
|
+
* @param {string} [authorization] Bearer Token
|
|
472
|
+
* @param {*} [options] Override http request option.
|
|
473
|
+
* @throws {RequiredError}
|
|
474
|
+
*/
|
|
475
|
+
async createPresignedPost(createPresignedPostRequestDto: CreatePresignedPostRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePresignedPostResponseClass>> {
|
|
476
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createPresignedPost(createPresignedPostRequestDto, authorization, options);
|
|
477
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
478
|
+
},
|
|
368
479
|
/**
|
|
369
480
|
*
|
|
370
481
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
@@ -400,6 +511,18 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
|
|
|
400
511
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getDocumentDownloadUrl(code, authorization, options);
|
|
401
512
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
402
513
|
},
|
|
514
|
+
/**
|
|
515
|
+
* This will return a presigned URL for a random S3 key
|
|
516
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
517
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
518
|
+
* @param {string} [authorization] Bearer Token
|
|
519
|
+
* @param {*} [options] Override http request option.
|
|
520
|
+
* @throws {RequiredError}
|
|
521
|
+
*/
|
|
522
|
+
async getSignedS3keyUrl(s3Key: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSignedS3KeyUrlResponseClass>> {
|
|
523
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, authorization, options);
|
|
524
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
525
|
+
},
|
|
403
526
|
/**
|
|
404
527
|
* 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.
|
|
405
528
|
* @summary List documents
|
|
@@ -441,7 +564,7 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
|
|
|
441
564
|
const localVarFp = DocumentsApiFp(configuration)
|
|
442
565
|
return {
|
|
443
566
|
/**
|
|
444
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
567
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
445
568
|
* @summary Create the document
|
|
446
569
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
447
570
|
* @param {string} [authorization] Bearer Token
|
|
@@ -451,6 +574,16 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
|
|
|
451
574
|
createDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: any): AxiosPromise<object> {
|
|
452
575
|
return localVarFp.createDocument(createDocumentRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
453
576
|
},
|
|
577
|
+
/**
|
|
578
|
+
*
|
|
579
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
580
|
+
* @param {string} [authorization] Bearer Token
|
|
581
|
+
* @param {*} [options] Override http request option.
|
|
582
|
+
* @throws {RequiredError}
|
|
583
|
+
*/
|
|
584
|
+
createPresignedPost(createPresignedPostRequestDto: CreatePresignedPostRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePresignedPostResponseClass> {
|
|
585
|
+
return localVarFp.createPresignedPost(createPresignedPostRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
586
|
+
},
|
|
454
587
|
/**
|
|
455
588
|
*
|
|
456
589
|
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
@@ -483,6 +616,17 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
|
|
|
483
616
|
getDocumentDownloadUrl(code: string, authorization?: string, options?: any): AxiosPromise<GetDocumentDownloadUrlResponseClass> {
|
|
484
617
|
return localVarFp.getDocumentDownloadUrl(code, authorization, options).then((request) => request(axios, basePath));
|
|
485
618
|
},
|
|
619
|
+
/**
|
|
620
|
+
* This will return a presigned URL for a random S3 key
|
|
621
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
622
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
623
|
+
* @param {string} [authorization] Bearer Token
|
|
624
|
+
* @param {*} [options] Override http request option.
|
|
625
|
+
* @throws {RequiredError}
|
|
626
|
+
*/
|
|
627
|
+
getSignedS3keyUrl(s3Key: string, authorization?: string, options?: any): AxiosPromise<GetSignedS3KeyUrlResponseClass> {
|
|
628
|
+
return localVarFp.getSignedS3keyUrl(s3Key, authorization, options).then((request) => request(axios, basePath));
|
|
629
|
+
},
|
|
486
630
|
/**
|
|
487
631
|
* 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.
|
|
488
632
|
* @summary List documents
|
|
@@ -535,6 +679,27 @@ export interface DocumentsApiCreateDocumentRequest {
|
|
|
535
679
|
readonly authorization?: string
|
|
536
680
|
}
|
|
537
681
|
|
|
682
|
+
/**
|
|
683
|
+
* Request parameters for createPresignedPost operation in DocumentsApi.
|
|
684
|
+
* @export
|
|
685
|
+
* @interface DocumentsApiCreatePresignedPostRequest
|
|
686
|
+
*/
|
|
687
|
+
export interface DocumentsApiCreatePresignedPostRequest {
|
|
688
|
+
/**
|
|
689
|
+
*
|
|
690
|
+
* @type {CreatePresignedPostRequestDto}
|
|
691
|
+
* @memberof DocumentsApiCreatePresignedPost
|
|
692
|
+
*/
|
|
693
|
+
readonly createPresignedPostRequestDto: CreatePresignedPostRequestDto
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Bearer Token
|
|
697
|
+
* @type {string}
|
|
698
|
+
* @memberof DocumentsApiCreatePresignedPost
|
|
699
|
+
*/
|
|
700
|
+
readonly authorization?: string
|
|
701
|
+
}
|
|
702
|
+
|
|
538
703
|
/**
|
|
539
704
|
* Request parameters for createTemporaryDocument operation in DocumentsApi.
|
|
540
705
|
* @export
|
|
@@ -598,6 +763,27 @@ export interface DocumentsApiGetDocumentDownloadUrlRequest {
|
|
|
598
763
|
readonly authorization?: string
|
|
599
764
|
}
|
|
600
765
|
|
|
766
|
+
/**
|
|
767
|
+
* Request parameters for getSignedS3keyUrl operation in DocumentsApi.
|
|
768
|
+
* @export
|
|
769
|
+
* @interface DocumentsApiGetSignedS3keyUrlRequest
|
|
770
|
+
*/
|
|
771
|
+
export interface DocumentsApiGetSignedS3keyUrlRequest {
|
|
772
|
+
/**
|
|
773
|
+
* Key for the file in S3 bucket to create the presigned download URL for
|
|
774
|
+
* @type {string}
|
|
775
|
+
* @memberof DocumentsApiGetSignedS3keyUrl
|
|
776
|
+
*/
|
|
777
|
+
readonly s3Key: string
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Bearer Token
|
|
781
|
+
* @type {string}
|
|
782
|
+
* @memberof DocumentsApiGetSignedS3keyUrl
|
|
783
|
+
*/
|
|
784
|
+
readonly authorization?: string
|
|
785
|
+
}
|
|
786
|
+
|
|
601
787
|
/**
|
|
602
788
|
* Request parameters for listDocuments operation in DocumentsApi.
|
|
603
789
|
* @export
|
|
@@ -690,7 +876,7 @@ export interface DocumentsApiUpdateDocumentRequest {
|
|
|
690
876
|
*/
|
|
691
877
|
export class DocumentsApi extends BaseAPI {
|
|
692
878
|
/**
|
|
693
|
-
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
879
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3). Document can then be downloaded with
|
|
694
880
|
* @summary Create the document
|
|
695
881
|
* @param {DocumentsApiCreateDocumentRequest} requestParameters Request parameters.
|
|
696
882
|
* @param {*} [options] Override http request option.
|
|
@@ -701,6 +887,17 @@ export class DocumentsApi extends BaseAPI {
|
|
|
701
887
|
return DocumentsApiFp(this.configuration).createDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
702
888
|
}
|
|
703
889
|
|
|
890
|
+
/**
|
|
891
|
+
*
|
|
892
|
+
* @param {DocumentsApiCreatePresignedPostRequest} requestParameters Request parameters.
|
|
893
|
+
* @param {*} [options] Override http request option.
|
|
894
|
+
* @throws {RequiredError}
|
|
895
|
+
* @memberof DocumentsApi
|
|
896
|
+
*/
|
|
897
|
+
public createPresignedPost(requestParameters: DocumentsApiCreatePresignedPostRequest, options?: AxiosRequestConfig) {
|
|
898
|
+
return DocumentsApiFp(this.configuration).createPresignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
899
|
+
}
|
|
900
|
+
|
|
704
901
|
/**
|
|
705
902
|
*
|
|
706
903
|
* @param {DocumentsApiCreateTemporaryDocumentRequest} requestParameters Request parameters.
|
|
@@ -736,6 +933,18 @@ export class DocumentsApi extends BaseAPI {
|
|
|
736
933
|
return DocumentsApiFp(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
737
934
|
}
|
|
738
935
|
|
|
936
|
+
/**
|
|
937
|
+
* This will return a presigned URL for a random S3 key
|
|
938
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
939
|
+
* @param {DocumentsApiGetSignedS3keyUrlRequest} requestParameters Request parameters.
|
|
940
|
+
* @param {*} [options] Override http request option.
|
|
941
|
+
* @throws {RequiredError}
|
|
942
|
+
* @memberof DocumentsApi
|
|
943
|
+
*/
|
|
944
|
+
public getSignedS3keyUrl(requestParameters: DocumentsApiGetSignedS3keyUrlRequest, options?: AxiosRequestConfig) {
|
|
945
|
+
return DocumentsApiFp(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
946
|
+
}
|
|
947
|
+
|
|
739
948
|
/**
|
|
740
949
|
* 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.
|
|
741
950
|
* @summary List documents
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL DocumentService
|
|
5
|
+
* The EMIL DocumentService API description
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
+
import { Configuration } from '../configuration';
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { ListSearchKeywordsResponseClass } from '../models';
|
|
25
|
+
// URLSearchParams not necessarily used
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import { URL, URLSearchParams } from 'url';
|
|
28
|
+
const FormData = require('form-data');
|
|
29
|
+
/**
|
|
30
|
+
* SearchKeywordsApi - axios parameter creator
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
export const SearchKeywordsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
34
|
+
return {
|
|
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: async (searchText: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
43
|
+
// verify required parameter 'searchText' is not null or undefined
|
|
44
|
+
assertParamExists('listSearchKeywords', 'searchText', searchText)
|
|
45
|
+
const localVarPath = `/documentservice/v1/search-keywords`;
|
|
46
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
48
|
+
let baseOptions;
|
|
49
|
+
let baseAccessToken;
|
|
50
|
+
if (configuration) {
|
|
51
|
+
baseOptions = configuration.baseOptions;
|
|
52
|
+
baseAccessToken = configuration.accessToken;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
56
|
+
const localVarHeaderParameter = {} as any;
|
|
57
|
+
const localVarQueryParameter = {} as any;
|
|
58
|
+
|
|
59
|
+
// authentication bearer required
|
|
60
|
+
// http bearer authentication required
|
|
61
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
62
|
+
|
|
63
|
+
if (searchText !== undefined) {
|
|
64
|
+
localVarQueryParameter['searchText'] = searchText;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
68
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
74
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
75
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
url: toPathString(localVarUrlObj),
|
|
79
|
+
options: localVarRequestOptions,
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* SearchKeywordsApi - functional programming interface
|
|
87
|
+
* @export
|
|
88
|
+
*/
|
|
89
|
+
export const SearchKeywordsApiFp = function(configuration?: Configuration) {
|
|
90
|
+
const localVarAxiosParamCreator = SearchKeywordsApiAxiosParamCreator(configuration)
|
|
91
|
+
return {
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @param {string} searchText Text to search in the documents
|
|
95
|
+
* @param {string} [authorization] Bearer Token
|
|
96
|
+
* @param {*} [options] Override http request option.
|
|
97
|
+
* @throws {RequiredError}
|
|
98
|
+
*/
|
|
99
|
+
async listSearchKeywords(searchText: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSearchKeywordsResponseClass>> {
|
|
100
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listSearchKeywords(searchText, authorization, options);
|
|
101
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
102
|
+
},
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* SearchKeywordsApi - factory interface
|
|
108
|
+
* @export
|
|
109
|
+
*/
|
|
110
|
+
export const SearchKeywordsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
111
|
+
const localVarFp = SearchKeywordsApiFp(configuration)
|
|
112
|
+
return {
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @param {string} searchText Text to search in the documents
|
|
116
|
+
* @param {string} [authorization] Bearer Token
|
|
117
|
+
* @param {*} [options] Override http request option.
|
|
118
|
+
* @throws {RequiredError}
|
|
119
|
+
*/
|
|
120
|
+
listSearchKeywords(searchText: string, authorization?: string, options?: any): AxiosPromise<ListSearchKeywordsResponseClass> {
|
|
121
|
+
return localVarFp.listSearchKeywords(searchText, authorization, options).then((request) => request(axios, basePath));
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Request parameters for listSearchKeywords operation in SearchKeywordsApi.
|
|
128
|
+
* @export
|
|
129
|
+
* @interface SearchKeywordsApiListSearchKeywordsRequest
|
|
130
|
+
*/
|
|
131
|
+
export interface SearchKeywordsApiListSearchKeywordsRequest {
|
|
132
|
+
/**
|
|
133
|
+
* Text to search in the documents
|
|
134
|
+
* @type {string}
|
|
135
|
+
* @memberof SearchKeywordsApiListSearchKeywords
|
|
136
|
+
*/
|
|
137
|
+
readonly searchText: string
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Bearer Token
|
|
141
|
+
* @type {string}
|
|
142
|
+
* @memberof SearchKeywordsApiListSearchKeywords
|
|
143
|
+
*/
|
|
144
|
+
readonly authorization?: string
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* SearchKeywordsApi - object-oriented interface
|
|
149
|
+
* @export
|
|
150
|
+
* @class SearchKeywordsApi
|
|
151
|
+
* @extends {BaseAPI}
|
|
152
|
+
*/
|
|
153
|
+
export class SearchKeywordsApi extends BaseAPI {
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* @param {SearchKeywordsApiListSearchKeywordsRequest} requestParameters Request parameters.
|
|
157
|
+
* @param {*} [options] Override http request option.
|
|
158
|
+
* @throws {RequiredError}
|
|
159
|
+
* @memberof SearchKeywordsApi
|
|
160
|
+
*/
|
|
161
|
+
public listSearchKeywords(requestParameters: SearchKeywordsApiListSearchKeywordsRequest, options?: AxiosRequestConfig) {
|
|
162
|
+
return SearchKeywordsApiFp(this.configuration).listSearchKeywords(requestParameters.searchText, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
163
|
+
}
|
|
164
|
+
}
|