@emilgroup/document-sdk 1.0.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 +61 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +68 -0
- package/api/document-templates-api.ts +669 -0
- package/api/documents-api.ts +880 -0
- package/api/layouts-api.ts +685 -0
- package/api/search-keywords-api.ts +168 -0
- package/api/searchable-document-owners-api.ts +236 -0
- package/api/searchable-documents-api.ts +184 -0
- package/api.ts +41 -0
- package/base.ts +284 -0
- package/common.ts +199 -0
- package/configuration.ts +109 -0
- package/dist/api/document-templates-api.d.ts +376 -0
- package/dist/api/document-templates-api.js +634 -0
- package/dist/api/documents-api.d.ts +488 -0
- package/dist/api/documents-api.js +821 -0
- package/dist/api/layouts-api.d.ts +385 -0
- package/dist/api/layouts-api.js +642 -0
- package/dist/api/search-keywords-api.d.ts +96 -0
- package/dist/api/search-keywords-api.js +229 -0
- package/dist/api/searchable-document-owners-api.d.ts +141 -0
- package/dist/api/searchable-document-owners-api.js +258 -0
- package/dist/api/searchable-documents-api.d.ts +105 -0
- package/dist/api/searchable-documents-api.js +237 -0
- package/dist/api.d.ts +17 -0
- package/dist/api.js +35 -0
- package/dist/base.d.ts +77 -0
- package/dist/base.js +393 -0
- package/dist/common.d.ts +92 -0
- package/dist/common.js +277 -0
- package/dist/configuration.d.ts +90 -0
- package/dist/configuration.js +44 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +36 -0
- package/dist/models/create-doc-template-request-dto.d.ts +49 -0
- package/dist/models/create-doc-template-request-dto.js +15 -0
- 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 +155 -0
- package/dist/models/create-document-request-dto.js +65 -0
- package/dist/models/create-document-sync-response-class.d.ts +25 -0
- package/dist/models/create-document-sync-response-class.js +15 -0
- package/dist/models/create-html-template-dto.d.ts +24 -0
- package/dist/models/create-html-template-dto.js +15 -0
- package/dist/models/create-layout-request-dto.d.ts +49 -0
- package/dist/models/create-layout-request-dto.js +15 -0
- package/dist/models/create-layout-response-class.d.ts +25 -0
- package/dist/models/create-layout-response-class.js +15 -0
- package/dist/models/create-presigned-post-request-dto.d.ts +127 -0
- package/dist/models/create-presigned-post-request-dto.js +51 -0
- package/dist/models/create-presigned-post-response-class.d.ts +30 -0
- package/dist/models/create-presigned-post-response-class.js +15 -0
- package/dist/models/delete-layout-request-dto.d.ts +24 -0
- package/dist/models/delete-layout-request-dto.js +15 -0
- package/dist/models/delete-request-dto.d.ts +24 -0
- package/dist/models/delete-request-dto.js +15 -0
- package/dist/models/delete-response-class.d.ts +24 -0
- package/dist/models/delete-response-class.js +15 -0
- package/dist/models/doc-template-class.d.ts +86 -0
- package/dist/models/doc-template-class.js +15 -0
- package/dist/models/document-class.d.ts +162 -0
- package/dist/models/document-class.js +61 -0
- package/dist/models/download-document-request-dto.d.ts +30 -0
- package/dist/models/download-document-request-dto.js +15 -0
- package/dist/models/get-doc-template-request-dto.d.ts +30 -0
- package/dist/models/get-doc-template-request-dto.js +15 -0
- package/dist/models/get-doc-template-response-class.d.ts +25 -0
- package/dist/models/get-doc-template-response-class.js +15 -0
- package/dist/models/get-document-download-url-response-class.d.ts +24 -0
- package/dist/models/get-document-download-url-response-class.js +15 -0
- package/dist/models/get-layout-request-dto.d.ts +24 -0
- package/dist/models/get-layout-request-dto.js +15 -0
- package/dist/models/get-layout-response-class.d.ts +25 -0
- package/dist/models/get-layout-response-class.js +15 -0
- 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 +66 -0
- package/dist/models/html-template-class.js +21 -0
- package/dist/models/index.d.ts +42 -0
- package/dist/models/index.js +58 -0
- package/dist/models/layout-class.d.ts +79 -0
- package/dist/models/layout-class.js +15 -0
- package/dist/models/list-doc-template-request-dto.d.ts +48 -0
- package/dist/models/list-doc-template-request-dto.js +15 -0
- package/dist/models/list-doc-templates-response-class.d.ts +31 -0
- package/dist/models/list-doc-templates-response-class.js +15 -0
- package/dist/models/list-documents-response-class.d.ts +31 -0
- package/dist/models/list-documents-response-class.js +15 -0
- package/dist/models/list-layouts-response-class.d.ts +31 -0
- package/dist/models/list-layouts-response-class.js +15 -0
- package/dist/models/list-request-dto.d.ts +54 -0
- package/dist/models/list-request-dto.js +15 -0
- 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-document-owners-response-class.d.ts +25 -0
- package/dist/models/list-searchable-document-owners-response-class.js +15 -0
- package/dist/models/list-searchable-documents-request-dto.d.ts +30 -0
- package/dist/models/list-searchable-documents-request-dto.js +15 -0
- package/dist/models/list-searchable-documents-response-class.d.ts +31 -0
- package/dist/models/list-searchable-documents-response-class.js +15 -0
- package/dist/models/searchable-document-class.d.ts +66 -0
- package/dist/models/searchable-document-class.js +15 -0
- package/dist/models/searchable-document-owner-class.d.ts +30 -0
- package/dist/models/searchable-document-owner-class.js +15 -0
- package/dist/models/update-doc-template-request-dto.d.ts +55 -0
- package/dist/models/update-doc-template-request-dto.js +15 -0
- package/dist/models/update-doc-template-response-class.d.ts +25 -0
- package/dist/models/update-doc-template-response-class.js +15 -0
- package/dist/models/update-document-request-dto.d.ts +54 -0
- package/dist/models/update-document-request-dto.js +15 -0
- package/dist/models/update-document-response-class.d.ts +25 -0
- package/dist/models/update-document-response-class.js +15 -0
- package/dist/models/update-html-template-dto.d.ts +42 -0
- package/dist/models/update-html-template-dto.js +21 -0
- package/dist/models/update-layout-request-dto.d.ts +55 -0
- package/dist/models/update-layout-request-dto.js +15 -0
- package/dist/models/update-layout-response-class.d.ts +25 -0
- package/dist/models/update-layout-response-class.js +15 -0
- package/git_push.sh +57 -0
- package/index.ts +19 -0
- package/models/create-doc-template-request-dto.ts +55 -0
- package/models/create-doc-template-response-class.ts +31 -0
- package/models/create-document-request-dto.ts +167 -0
- package/models/create-document-sync-response-class.ts +31 -0
- package/models/create-html-template-dto.ts +30 -0
- package/models/create-layout-request-dto.ts +55 -0
- package/models/create-layout-response-class.ts +31 -0
- package/models/create-presigned-post-request-dto.ts +137 -0
- package/models/create-presigned-post-response-class.ts +36 -0
- package/models/delete-layout-request-dto.ts +30 -0
- package/models/delete-request-dto.ts +30 -0
- package/models/delete-response-class.ts +30 -0
- package/models/doc-template-class.ts +92 -0
- package/models/document-class.ts +173 -0
- package/models/download-document-request-dto.ts +36 -0
- package/models/get-doc-template-request-dto.ts +36 -0
- package/models/get-doc-template-response-class.ts +31 -0
- package/models/get-document-download-url-response-class.ts +30 -0
- package/models/get-layout-request-dto.ts +30 -0
- package/models/get-layout-response-class.ts +31 -0
- package/models/get-signed-s3-key-url-response-class.ts +30 -0
- package/models/html-template-class.ts +75 -0
- package/models/index.ts +42 -0
- package/models/layout-class.ts +85 -0
- package/models/list-doc-template-request-dto.ts +54 -0
- package/models/list-doc-templates-response-class.ts +37 -0
- package/models/list-documents-response-class.ts +37 -0
- package/models/list-layouts-response-class.ts +37 -0
- package/models/list-request-dto.ts +60 -0
- package/models/list-search-keywords-request-dto.ts +30 -0
- package/models/list-search-keywords-response-class.ts +30 -0
- package/models/list-searchable-document-owners-response-class.ts +31 -0
- package/models/list-searchable-documents-request-dto.ts +36 -0
- package/models/list-searchable-documents-response-class.ts +37 -0
- package/models/searchable-document-class.ts +72 -0
- package/models/searchable-document-owner-class.ts +36 -0
- package/models/update-doc-template-request-dto.ts +61 -0
- package/models/update-doc-template-response-class.ts +31 -0
- package/models/update-document-request-dto.ts +60 -0
- package/models/update-document-response-class.ts +31 -0
- package/models/update-html-template-dto.ts +51 -0
- package/models/update-layout-request-dto.ts +61 -0
- package/models/update-layout-response-class.ts +31 -0
- package/package.json +29 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,880 @@
|
|
|
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 { CreateDocumentRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CreateDocumentSyncResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { CreatePresignedPostRequestDto } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { CreatePresignedPostResponseClass } from '../models';
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
import { GetDocumentDownloadUrlResponseClass } from '../models';
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
import { GetSignedS3KeyUrlResponseClass } from '../models';
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
import { ListDocumentsResponseClass } from '../models';
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
import { UpdateDocumentRequestDto } from '../models';
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
import { UpdateDocumentResponseClass } from '../models';
|
|
41
|
+
// URLSearchParams not necessarily used
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
import { URL, URLSearchParams } from 'url';
|
|
44
|
+
const FormData = require('form-data');
|
|
45
|
+
/**
|
|
46
|
+
* DocumentsApi - axios parameter creator
|
|
47
|
+
* @export
|
|
48
|
+
*/
|
|
49
|
+
export const DocumentsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
50
|
+
return {
|
|
51
|
+
/**
|
|
52
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
53
|
+
* @summary Create the document
|
|
54
|
+
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
55
|
+
* @param {string} [authorization] Bearer Token
|
|
56
|
+
* @param {*} [options] Override http request option.
|
|
57
|
+
* @throws {RequiredError}
|
|
58
|
+
*/
|
|
59
|
+
createDocument: async (createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
60
|
+
// verify required parameter 'createDocumentRequestDto' is not null or undefined
|
|
61
|
+
assertParamExists('createDocument', 'createDocumentRequestDto', createDocumentRequestDto)
|
|
62
|
+
const localVarPath = `/documentservice/v1/documents`;
|
|
63
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
64
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
65
|
+
let baseOptions;
|
|
66
|
+
let baseAccessToken;
|
|
67
|
+
if (configuration) {
|
|
68
|
+
baseOptions = configuration.baseOptions;
|
|
69
|
+
baseAccessToken = configuration.accessToken;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
73
|
+
const localVarHeaderParameter = {} as any;
|
|
74
|
+
const localVarQueryParameter = {} as any;
|
|
75
|
+
|
|
76
|
+
// authentication bearer required
|
|
77
|
+
// http bearer authentication required
|
|
78
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
79
|
+
|
|
80
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
81
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
87
|
+
|
|
88
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
89
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
90
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
91
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createDocumentRequestDto, localVarRequestOptions, configuration)
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
url: toPathString(localVarUrlObj),
|
|
95
|
+
options: localVarRequestOptions,
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* This will create a URL that allows user upload its documents in Database.The URL will be expires between 5 minutes to 7 days.
|
|
100
|
+
* @summary Upload documents using pre-signed URL
|
|
101
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
102
|
+
* @param {string} [authorization] Bearer Token
|
|
103
|
+
* @param {*} [options] Override http request option.
|
|
104
|
+
* @throws {RequiredError}
|
|
105
|
+
*/
|
|
106
|
+
createPresignedPost: async (createPresignedPostRequestDto: CreatePresignedPostRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
107
|
+
// verify required parameter 'createPresignedPostRequestDto' is not null or undefined
|
|
108
|
+
assertParamExists('createPresignedPost', 'createPresignedPostRequestDto', createPresignedPostRequestDto)
|
|
109
|
+
const localVarPath = `/documentservice/v1/documents/pre-signed-post`;
|
|
110
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
111
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
112
|
+
let baseOptions;
|
|
113
|
+
let baseAccessToken;
|
|
114
|
+
if (configuration) {
|
|
115
|
+
baseOptions = configuration.baseOptions;
|
|
116
|
+
baseAccessToken = configuration.accessToken;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
120
|
+
const localVarHeaderParameter = {} as any;
|
|
121
|
+
const localVarQueryParameter = {} as any;
|
|
122
|
+
|
|
123
|
+
// authentication bearer required
|
|
124
|
+
// http bearer authentication required
|
|
125
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
126
|
+
|
|
127
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
128
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
134
|
+
|
|
135
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
136
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
137
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
138
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createPresignedPostRequestDto, localVarRequestOptions, configuration)
|
|
139
|
+
|
|
140
|
+
return {
|
|
141
|
+
url: toPathString(localVarUrlObj),
|
|
142
|
+
options: localVarRequestOptions,
|
|
143
|
+
};
|
|
144
|
+
},
|
|
145
|
+
/**
|
|
146
|
+
* Permanently deletes the document. Supply the unique code that was returned when you created the document and this will delete it.
|
|
147
|
+
* @summary Delete the document
|
|
148
|
+
* @param {string} code
|
|
149
|
+
* @param {string} [authorization] Bearer Token
|
|
150
|
+
* @param {*} [options] Override http request option.
|
|
151
|
+
* @throws {RequiredError}
|
|
152
|
+
*/
|
|
153
|
+
deleteDocument: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
154
|
+
// verify required parameter 'code' is not null or undefined
|
|
155
|
+
assertParamExists('deleteDocument', 'code', code)
|
|
156
|
+
const localVarPath = `/documentservice/v1/documents/{code}`
|
|
157
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
158
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
159
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
160
|
+
let baseOptions;
|
|
161
|
+
let baseAccessToken;
|
|
162
|
+
if (configuration) {
|
|
163
|
+
baseOptions = configuration.baseOptions;
|
|
164
|
+
baseAccessToken = configuration.accessToken;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
168
|
+
const localVarHeaderParameter = {} as any;
|
|
169
|
+
const localVarQueryParameter = {} as any;
|
|
170
|
+
|
|
171
|
+
// authentication bearer required
|
|
172
|
+
// http bearer authentication required
|
|
173
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
174
|
+
|
|
175
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
176
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
182
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
183
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
184
|
+
|
|
185
|
+
return {
|
|
186
|
+
url: toPathString(localVarUrlObj),
|
|
187
|
+
options: localVarRequestOptions,
|
|
188
|
+
};
|
|
189
|
+
},
|
|
190
|
+
/**
|
|
191
|
+
* This will return a presigned URL to download the document.
|
|
192
|
+
* @summary Fetches a document download URL
|
|
193
|
+
* @param {string} code
|
|
194
|
+
* @param {string} [authorization] Bearer Token
|
|
195
|
+
* @param {*} [options] Override http request option.
|
|
196
|
+
* @throws {RequiredError}
|
|
197
|
+
*/
|
|
198
|
+
getDocumentDownloadUrl: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
199
|
+
// verify required parameter 'code' is not null or undefined
|
|
200
|
+
assertParamExists('getDocumentDownloadUrl', 'code', code)
|
|
201
|
+
const localVarPath = `/documentservice/v1/documents/{code}/download-url`
|
|
202
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
203
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
204
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
205
|
+
let baseOptions;
|
|
206
|
+
let baseAccessToken;
|
|
207
|
+
if (configuration) {
|
|
208
|
+
baseOptions = configuration.baseOptions;
|
|
209
|
+
baseAccessToken = configuration.accessToken;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
213
|
+
const localVarHeaderParameter = {} as any;
|
|
214
|
+
const localVarQueryParameter = {} as any;
|
|
215
|
+
|
|
216
|
+
// authentication bearer required
|
|
217
|
+
// http bearer authentication required
|
|
218
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
219
|
+
|
|
220
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
221
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
227
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
228
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
229
|
+
|
|
230
|
+
return {
|
|
231
|
+
url: toPathString(localVarUrlObj),
|
|
232
|
+
options: localVarRequestOptions,
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
/**
|
|
236
|
+
* This will return a presigned URL for a random S3 key
|
|
237
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
238
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
239
|
+
* @param {string} [authorization] Bearer Token
|
|
240
|
+
* @param {*} [options] Override http request option.
|
|
241
|
+
* @throws {RequiredError}
|
|
242
|
+
*/
|
|
243
|
+
getSignedS3keyUrl: async (s3Key: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
244
|
+
// verify required parameter 's3Key' is not null or undefined
|
|
245
|
+
assertParamExists('getSignedS3keyUrl', 's3Key', s3Key)
|
|
246
|
+
const localVarPath = `/documentservice/v1/documents/signed-s3-url`;
|
|
247
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
248
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
249
|
+
let baseOptions;
|
|
250
|
+
let baseAccessToken;
|
|
251
|
+
if (configuration) {
|
|
252
|
+
baseOptions = configuration.baseOptions;
|
|
253
|
+
baseAccessToken = configuration.accessToken;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
257
|
+
const localVarHeaderParameter = {} as any;
|
|
258
|
+
const localVarQueryParameter = {} as any;
|
|
259
|
+
|
|
260
|
+
// authentication bearer required
|
|
261
|
+
// http bearer authentication required
|
|
262
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
263
|
+
|
|
264
|
+
if (s3Key !== undefined) {
|
|
265
|
+
localVarQueryParameter['s3Key'] = s3Key;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
269
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
275
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
276
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
277
|
+
|
|
278
|
+
return {
|
|
279
|
+
url: toPathString(localVarUrlObj),
|
|
280
|
+
options: localVarRequestOptions,
|
|
281
|
+
};
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
* 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.
|
|
285
|
+
* @summary List documents
|
|
286
|
+
* @param {string} [authorization] Bearer Token
|
|
287
|
+
* @param {number} [pageSize] Page size
|
|
288
|
+
* @param {string} [pageToken] Page token
|
|
289
|
+
* @param {string} [filter] List filter
|
|
290
|
+
* @param {string} [search] Search query
|
|
291
|
+
* @param {string} [order] Ordering criteria
|
|
292
|
+
* @param {string} [expand] Extra fields to fetch
|
|
293
|
+
* @param {*} [options] Override http request option.
|
|
294
|
+
* @throws {RequiredError}
|
|
295
|
+
*/
|
|
296
|
+
listDocuments: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
297
|
+
const localVarPath = `/documentservice/v1/documents`;
|
|
298
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
299
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
300
|
+
let baseOptions;
|
|
301
|
+
let baseAccessToken;
|
|
302
|
+
if (configuration) {
|
|
303
|
+
baseOptions = configuration.baseOptions;
|
|
304
|
+
baseAccessToken = configuration.accessToken;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
308
|
+
const localVarHeaderParameter = {} as any;
|
|
309
|
+
const localVarQueryParameter = {} as any;
|
|
310
|
+
|
|
311
|
+
// authentication bearer required
|
|
312
|
+
// http bearer authentication required
|
|
313
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
314
|
+
|
|
315
|
+
if (pageSize !== undefined) {
|
|
316
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if (pageToken !== undefined) {
|
|
320
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (filter !== undefined) {
|
|
324
|
+
localVarQueryParameter['filter'] = filter;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if (search !== undefined) {
|
|
328
|
+
localVarQueryParameter['search'] = search;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (order !== undefined) {
|
|
332
|
+
localVarQueryParameter['order'] = order;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
if (expand !== undefined) {
|
|
336
|
+
localVarQueryParameter['expand'] = expand;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
340
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
346
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
347
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
348
|
+
|
|
349
|
+
return {
|
|
350
|
+
url: toPathString(localVarUrlObj),
|
|
351
|
+
options: localVarRequestOptions,
|
|
352
|
+
};
|
|
353
|
+
},
|
|
354
|
+
/**
|
|
355
|
+
* Updates the specified document by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
356
|
+
* @summary Update the document
|
|
357
|
+
* @param {string} code
|
|
358
|
+
* @param {UpdateDocumentRequestDto} updateDocumentRequestDto
|
|
359
|
+
* @param {string} [authorization] Bearer Token
|
|
360
|
+
* @param {*} [options] Override http request option.
|
|
361
|
+
* @throws {RequiredError}
|
|
362
|
+
*/
|
|
363
|
+
updateDocument: async (code: string, updateDocumentRequestDto: UpdateDocumentRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
364
|
+
// verify required parameter 'code' is not null or undefined
|
|
365
|
+
assertParamExists('updateDocument', 'code', code)
|
|
366
|
+
// verify required parameter 'updateDocumentRequestDto' is not null or undefined
|
|
367
|
+
assertParamExists('updateDocument', 'updateDocumentRequestDto', updateDocumentRequestDto)
|
|
368
|
+
const localVarPath = `/documentservice/v1/documents/{code}`
|
|
369
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
370
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
371
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
372
|
+
let baseOptions;
|
|
373
|
+
let baseAccessToken;
|
|
374
|
+
if (configuration) {
|
|
375
|
+
baseOptions = configuration.baseOptions;
|
|
376
|
+
baseAccessToken = configuration.accessToken;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
380
|
+
const localVarHeaderParameter = {} as any;
|
|
381
|
+
const localVarQueryParameter = {} as any;
|
|
382
|
+
|
|
383
|
+
// authentication bearer required
|
|
384
|
+
// http bearer authentication required
|
|
385
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
386
|
+
|
|
387
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
388
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
394
|
+
|
|
395
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
396
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
397
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
398
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateDocumentRequestDto, localVarRequestOptions, configuration)
|
|
399
|
+
|
|
400
|
+
return {
|
|
401
|
+
url: toPathString(localVarUrlObj),
|
|
402
|
+
options: localVarRequestOptions,
|
|
403
|
+
};
|
|
404
|
+
},
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* DocumentsApi - functional programming interface
|
|
410
|
+
* @export
|
|
411
|
+
*/
|
|
412
|
+
export const DocumentsApiFp = function(configuration?: Configuration) {
|
|
413
|
+
const localVarAxiosParamCreator = DocumentsApiAxiosParamCreator(configuration)
|
|
414
|
+
return {
|
|
415
|
+
/**
|
|
416
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
417
|
+
* @summary Create the document
|
|
418
|
+
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
419
|
+
* @param {string} [authorization] Bearer Token
|
|
420
|
+
* @param {*} [options] Override http request option.
|
|
421
|
+
* @throws {RequiredError}
|
|
422
|
+
*/
|
|
423
|
+
async createDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateDocumentSyncResponseClass>> {
|
|
424
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createDocument(createDocumentRequestDto, authorization, options);
|
|
425
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
426
|
+
},
|
|
427
|
+
/**
|
|
428
|
+
* This will create a URL that allows user upload its documents in Database.The URL will be expires between 5 minutes to 7 days.
|
|
429
|
+
* @summary Upload documents using pre-signed URL
|
|
430
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
431
|
+
* @param {string} [authorization] Bearer Token
|
|
432
|
+
* @param {*} [options] Override http request option.
|
|
433
|
+
* @throws {RequiredError}
|
|
434
|
+
*/
|
|
435
|
+
async createPresignedPost(createPresignedPostRequestDto: CreatePresignedPostRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePresignedPostResponseClass>> {
|
|
436
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createPresignedPost(createPresignedPostRequestDto, authorization, options);
|
|
437
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
438
|
+
},
|
|
439
|
+
/**
|
|
440
|
+
* Permanently deletes the document. Supply the unique code that was returned when you created the document and this will delete it.
|
|
441
|
+
* @summary Delete the document
|
|
442
|
+
* @param {string} code
|
|
443
|
+
* @param {string} [authorization] Bearer Token
|
|
444
|
+
* @param {*} [options] Override http request option.
|
|
445
|
+
* @throws {RequiredError}
|
|
446
|
+
*/
|
|
447
|
+
async deleteDocument(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
|
448
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDocument(code, authorization, options);
|
|
449
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
450
|
+
},
|
|
451
|
+
/**
|
|
452
|
+
* This will return a presigned URL to download the document.
|
|
453
|
+
* @summary Fetches a document download URL
|
|
454
|
+
* @param {string} code
|
|
455
|
+
* @param {string} [authorization] Bearer Token
|
|
456
|
+
* @param {*} [options] Override http request option.
|
|
457
|
+
* @throws {RequiredError}
|
|
458
|
+
*/
|
|
459
|
+
async getDocumentDownloadUrl(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocumentDownloadUrlResponseClass>> {
|
|
460
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getDocumentDownloadUrl(code, authorization, options);
|
|
461
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
462
|
+
},
|
|
463
|
+
/**
|
|
464
|
+
* This will return a presigned URL for a random S3 key
|
|
465
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
466
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
467
|
+
* @param {string} [authorization] Bearer Token
|
|
468
|
+
* @param {*} [options] Override http request option.
|
|
469
|
+
* @throws {RequiredError}
|
|
470
|
+
*/
|
|
471
|
+
async getSignedS3keyUrl(s3Key: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSignedS3KeyUrlResponseClass>> {
|
|
472
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSignedS3keyUrl(s3Key, authorization, options);
|
|
473
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
474
|
+
},
|
|
475
|
+
/**
|
|
476
|
+
* 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.
|
|
477
|
+
* @summary List documents
|
|
478
|
+
* @param {string} [authorization] Bearer Token
|
|
479
|
+
* @param {number} [pageSize] Page size
|
|
480
|
+
* @param {string} [pageToken] Page token
|
|
481
|
+
* @param {string} [filter] List filter
|
|
482
|
+
* @param {string} [search] Search query
|
|
483
|
+
* @param {string} [order] Ordering criteria
|
|
484
|
+
* @param {string} [expand] Extra fields to fetch
|
|
485
|
+
* @param {*} [options] Override http request option.
|
|
486
|
+
* @throws {RequiredError}
|
|
487
|
+
*/
|
|
488
|
+
async listDocuments(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListDocumentsResponseClass>> {
|
|
489
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options);
|
|
490
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
491
|
+
},
|
|
492
|
+
/**
|
|
493
|
+
* Updates the specified document by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
494
|
+
* @summary Update the document
|
|
495
|
+
* @param {string} code
|
|
496
|
+
* @param {UpdateDocumentRequestDto} updateDocumentRequestDto
|
|
497
|
+
* @param {string} [authorization] Bearer Token
|
|
498
|
+
* @param {*} [options] Override http request option.
|
|
499
|
+
* @throws {RequiredError}
|
|
500
|
+
*/
|
|
501
|
+
async updateDocument(code: string, updateDocumentRequestDto: UpdateDocumentRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateDocumentResponseClass>> {
|
|
502
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateDocument(code, updateDocumentRequestDto, authorization, options);
|
|
503
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
504
|
+
},
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* DocumentsApi - factory interface
|
|
510
|
+
* @export
|
|
511
|
+
*/
|
|
512
|
+
export const DocumentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
513
|
+
const localVarFp = DocumentsApiFp(configuration)
|
|
514
|
+
return {
|
|
515
|
+
/**
|
|
516
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
517
|
+
* @summary Create the document
|
|
518
|
+
* @param {CreateDocumentRequestDto} createDocumentRequestDto
|
|
519
|
+
* @param {string} [authorization] Bearer Token
|
|
520
|
+
* @param {*} [options] Override http request option.
|
|
521
|
+
* @throws {RequiredError}
|
|
522
|
+
*/
|
|
523
|
+
createDocument(createDocumentRequestDto: CreateDocumentRequestDto, authorization?: string, options?: any): AxiosPromise<CreateDocumentSyncResponseClass> {
|
|
524
|
+
return localVarFp.createDocument(createDocumentRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
525
|
+
},
|
|
526
|
+
/**
|
|
527
|
+
* This will create a URL that allows user upload its documents in Database.The URL will be expires between 5 minutes to 7 days.
|
|
528
|
+
* @summary Upload documents using pre-signed URL
|
|
529
|
+
* @param {CreatePresignedPostRequestDto} createPresignedPostRequestDto
|
|
530
|
+
* @param {string} [authorization] Bearer Token
|
|
531
|
+
* @param {*} [options] Override http request option.
|
|
532
|
+
* @throws {RequiredError}
|
|
533
|
+
*/
|
|
534
|
+
createPresignedPost(createPresignedPostRequestDto: CreatePresignedPostRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePresignedPostResponseClass> {
|
|
535
|
+
return localVarFp.createPresignedPost(createPresignedPostRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
536
|
+
},
|
|
537
|
+
/**
|
|
538
|
+
* Permanently deletes the document. Supply the unique code that was returned when you created the document and this will delete it.
|
|
539
|
+
* @summary Delete the document
|
|
540
|
+
* @param {string} code
|
|
541
|
+
* @param {string} [authorization] Bearer Token
|
|
542
|
+
* @param {*} [options] Override http request option.
|
|
543
|
+
* @throws {RequiredError}
|
|
544
|
+
*/
|
|
545
|
+
deleteDocument(code: string, authorization?: string, options?: any): AxiosPromise<object> {
|
|
546
|
+
return localVarFp.deleteDocument(code, authorization, options).then((request) => request(axios, basePath));
|
|
547
|
+
},
|
|
548
|
+
/**
|
|
549
|
+
* This will return a presigned URL to download the document.
|
|
550
|
+
* @summary Fetches a document download URL
|
|
551
|
+
* @param {string} code
|
|
552
|
+
* @param {string} [authorization] Bearer Token
|
|
553
|
+
* @param {*} [options] Override http request option.
|
|
554
|
+
* @throws {RequiredError}
|
|
555
|
+
*/
|
|
556
|
+
getDocumentDownloadUrl(code: string, authorization?: string, options?: any): AxiosPromise<GetDocumentDownloadUrlResponseClass> {
|
|
557
|
+
return localVarFp.getDocumentDownloadUrl(code, authorization, options).then((request) => request(axios, basePath));
|
|
558
|
+
},
|
|
559
|
+
/**
|
|
560
|
+
* This will return a presigned URL for a random S3 key
|
|
561
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
562
|
+
* @param {string} s3Key Key for the file in S3 bucket to create the presigned download URL for
|
|
563
|
+
* @param {string} [authorization] Bearer Token
|
|
564
|
+
* @param {*} [options] Override http request option.
|
|
565
|
+
* @throws {RequiredError}
|
|
566
|
+
*/
|
|
567
|
+
getSignedS3keyUrl(s3Key: string, authorization?: string, options?: any): AxiosPromise<GetSignedS3KeyUrlResponseClass> {
|
|
568
|
+
return localVarFp.getSignedS3keyUrl(s3Key, authorization, options).then((request) => request(axios, basePath));
|
|
569
|
+
},
|
|
570
|
+
/**
|
|
571
|
+
* 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.
|
|
572
|
+
* @summary List documents
|
|
573
|
+
* @param {string} [authorization] Bearer Token
|
|
574
|
+
* @param {number} [pageSize] Page size
|
|
575
|
+
* @param {string} [pageToken] Page token
|
|
576
|
+
* @param {string} [filter] List filter
|
|
577
|
+
* @param {string} [search] Search query
|
|
578
|
+
* @param {string} [order] Ordering criteria
|
|
579
|
+
* @param {string} [expand] Extra fields to fetch
|
|
580
|
+
* @param {*} [options] Override http request option.
|
|
581
|
+
* @throws {RequiredError}
|
|
582
|
+
*/
|
|
583
|
+
listDocuments(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListDocumentsResponseClass> {
|
|
584
|
+
return localVarFp.listDocuments(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
585
|
+
},
|
|
586
|
+
/**
|
|
587
|
+
* Updates the specified document by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
588
|
+
* @summary Update the document
|
|
589
|
+
* @param {string} code
|
|
590
|
+
* @param {UpdateDocumentRequestDto} updateDocumentRequestDto
|
|
591
|
+
* @param {string} [authorization] Bearer Token
|
|
592
|
+
* @param {*} [options] Override http request option.
|
|
593
|
+
* @throws {RequiredError}
|
|
594
|
+
*/
|
|
595
|
+
updateDocument(code: string, updateDocumentRequestDto: UpdateDocumentRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateDocumentResponseClass> {
|
|
596
|
+
return localVarFp.updateDocument(code, updateDocumentRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
597
|
+
},
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Request parameters for createDocument operation in DocumentsApi.
|
|
603
|
+
* @export
|
|
604
|
+
* @interface DocumentsApiCreateDocumentRequest
|
|
605
|
+
*/
|
|
606
|
+
export interface DocumentsApiCreateDocumentRequest {
|
|
607
|
+
/**
|
|
608
|
+
*
|
|
609
|
+
* @type {CreateDocumentRequestDto}
|
|
610
|
+
* @memberof DocumentsApiCreateDocument
|
|
611
|
+
*/
|
|
612
|
+
readonly createDocumentRequestDto: CreateDocumentRequestDto
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Bearer Token
|
|
616
|
+
* @type {string}
|
|
617
|
+
* @memberof DocumentsApiCreateDocument
|
|
618
|
+
*/
|
|
619
|
+
readonly authorization?: string
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Request parameters for createPresignedPost operation in DocumentsApi.
|
|
624
|
+
* @export
|
|
625
|
+
* @interface DocumentsApiCreatePresignedPostRequest
|
|
626
|
+
*/
|
|
627
|
+
export interface DocumentsApiCreatePresignedPostRequest {
|
|
628
|
+
/**
|
|
629
|
+
*
|
|
630
|
+
* @type {CreatePresignedPostRequestDto}
|
|
631
|
+
* @memberof DocumentsApiCreatePresignedPost
|
|
632
|
+
*/
|
|
633
|
+
readonly createPresignedPostRequestDto: CreatePresignedPostRequestDto
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Bearer Token
|
|
637
|
+
* @type {string}
|
|
638
|
+
* @memberof DocumentsApiCreatePresignedPost
|
|
639
|
+
*/
|
|
640
|
+
readonly authorization?: string
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Request parameters for deleteDocument operation in DocumentsApi.
|
|
645
|
+
* @export
|
|
646
|
+
* @interface DocumentsApiDeleteDocumentRequest
|
|
647
|
+
*/
|
|
648
|
+
export interface DocumentsApiDeleteDocumentRequest {
|
|
649
|
+
/**
|
|
650
|
+
*
|
|
651
|
+
* @type {string}
|
|
652
|
+
* @memberof DocumentsApiDeleteDocument
|
|
653
|
+
*/
|
|
654
|
+
readonly code: string
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Bearer Token
|
|
658
|
+
* @type {string}
|
|
659
|
+
* @memberof DocumentsApiDeleteDocument
|
|
660
|
+
*/
|
|
661
|
+
readonly authorization?: string
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Request parameters for getDocumentDownloadUrl operation in DocumentsApi.
|
|
666
|
+
* @export
|
|
667
|
+
* @interface DocumentsApiGetDocumentDownloadUrlRequest
|
|
668
|
+
*/
|
|
669
|
+
export interface DocumentsApiGetDocumentDownloadUrlRequest {
|
|
670
|
+
/**
|
|
671
|
+
*
|
|
672
|
+
* @type {string}
|
|
673
|
+
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
674
|
+
*/
|
|
675
|
+
readonly code: string
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Bearer Token
|
|
679
|
+
* @type {string}
|
|
680
|
+
* @memberof DocumentsApiGetDocumentDownloadUrl
|
|
681
|
+
*/
|
|
682
|
+
readonly authorization?: string
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Request parameters for getSignedS3keyUrl operation in DocumentsApi.
|
|
687
|
+
* @export
|
|
688
|
+
* @interface DocumentsApiGetSignedS3keyUrlRequest
|
|
689
|
+
*/
|
|
690
|
+
export interface DocumentsApiGetSignedS3keyUrlRequest {
|
|
691
|
+
/**
|
|
692
|
+
* Key for the file in S3 bucket to create the presigned download URL for
|
|
693
|
+
* @type {string}
|
|
694
|
+
* @memberof DocumentsApiGetSignedS3keyUrl
|
|
695
|
+
*/
|
|
696
|
+
readonly s3Key: string
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Bearer Token
|
|
700
|
+
* @type {string}
|
|
701
|
+
* @memberof DocumentsApiGetSignedS3keyUrl
|
|
702
|
+
*/
|
|
703
|
+
readonly authorization?: string
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* Request parameters for listDocuments operation in DocumentsApi.
|
|
708
|
+
* @export
|
|
709
|
+
* @interface DocumentsApiListDocumentsRequest
|
|
710
|
+
*/
|
|
711
|
+
export interface DocumentsApiListDocumentsRequest {
|
|
712
|
+
/**
|
|
713
|
+
* Bearer Token
|
|
714
|
+
* @type {string}
|
|
715
|
+
* @memberof DocumentsApiListDocuments
|
|
716
|
+
*/
|
|
717
|
+
readonly authorization?: string
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Page size
|
|
721
|
+
* @type {number}
|
|
722
|
+
* @memberof DocumentsApiListDocuments
|
|
723
|
+
*/
|
|
724
|
+
readonly pageSize?: number
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Page token
|
|
728
|
+
* @type {string}
|
|
729
|
+
* @memberof DocumentsApiListDocuments
|
|
730
|
+
*/
|
|
731
|
+
readonly pageToken?: string
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* List filter
|
|
735
|
+
* @type {string}
|
|
736
|
+
* @memberof DocumentsApiListDocuments
|
|
737
|
+
*/
|
|
738
|
+
readonly filter?: string
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Search query
|
|
742
|
+
* @type {string}
|
|
743
|
+
* @memberof DocumentsApiListDocuments
|
|
744
|
+
*/
|
|
745
|
+
readonly search?: string
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Ordering criteria
|
|
749
|
+
* @type {string}
|
|
750
|
+
* @memberof DocumentsApiListDocuments
|
|
751
|
+
*/
|
|
752
|
+
readonly order?: string
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Extra fields to fetch
|
|
756
|
+
* @type {string}
|
|
757
|
+
* @memberof DocumentsApiListDocuments
|
|
758
|
+
*/
|
|
759
|
+
readonly expand?: string
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* Request parameters for updateDocument operation in DocumentsApi.
|
|
764
|
+
* @export
|
|
765
|
+
* @interface DocumentsApiUpdateDocumentRequest
|
|
766
|
+
*/
|
|
767
|
+
export interface DocumentsApiUpdateDocumentRequest {
|
|
768
|
+
/**
|
|
769
|
+
*
|
|
770
|
+
* @type {string}
|
|
771
|
+
* @memberof DocumentsApiUpdateDocument
|
|
772
|
+
*/
|
|
773
|
+
readonly code: string
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
*
|
|
777
|
+
* @type {UpdateDocumentRequestDto}
|
|
778
|
+
* @memberof DocumentsApiUpdateDocument
|
|
779
|
+
*/
|
|
780
|
+
readonly updateDocumentRequestDto: UpdateDocumentRequestDto
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Bearer Token
|
|
784
|
+
* @type {string}
|
|
785
|
+
* @memberof DocumentsApiUpdateDocument
|
|
786
|
+
*/
|
|
787
|
+
readonly authorization?: string
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* DocumentsApi - object-oriented interface
|
|
792
|
+
* @export
|
|
793
|
+
* @class DocumentsApi
|
|
794
|
+
* @extends {BaseAPI}
|
|
795
|
+
*/
|
|
796
|
+
export class DocumentsApi extends BaseAPI {
|
|
797
|
+
/**
|
|
798
|
+
* This will create a document in database and upload the file to Amazon Simple Storage Service (S3).
|
|
799
|
+
* @summary Create the document
|
|
800
|
+
* @param {DocumentsApiCreateDocumentRequest} requestParameters Request parameters.
|
|
801
|
+
* @param {*} [options] Override http request option.
|
|
802
|
+
* @throws {RequiredError}
|
|
803
|
+
* @memberof DocumentsApi
|
|
804
|
+
*/
|
|
805
|
+
public createDocument(requestParameters: DocumentsApiCreateDocumentRequest, options?: AxiosRequestConfig) {
|
|
806
|
+
return DocumentsApiFp(this.configuration).createDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* This will create a URL that allows user upload its documents in Database.The URL will be expires between 5 minutes to 7 days.
|
|
811
|
+
* @summary Upload documents using pre-signed URL
|
|
812
|
+
* @param {DocumentsApiCreatePresignedPostRequest} requestParameters Request parameters.
|
|
813
|
+
* @param {*} [options] Override http request option.
|
|
814
|
+
* @throws {RequiredError}
|
|
815
|
+
* @memberof DocumentsApi
|
|
816
|
+
*/
|
|
817
|
+
public createPresignedPost(requestParameters: DocumentsApiCreatePresignedPostRequest, options?: AxiosRequestConfig) {
|
|
818
|
+
return DocumentsApiFp(this.configuration).createPresignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* Permanently deletes the document. Supply the unique code that was returned when you created the document and this will delete it.
|
|
823
|
+
* @summary Delete the document
|
|
824
|
+
* @param {DocumentsApiDeleteDocumentRequest} requestParameters Request parameters.
|
|
825
|
+
* @param {*} [options] Override http request option.
|
|
826
|
+
* @throws {RequiredError}
|
|
827
|
+
* @memberof DocumentsApi
|
|
828
|
+
*/
|
|
829
|
+
public deleteDocument(requestParameters: DocumentsApiDeleteDocumentRequest, options?: AxiosRequestConfig) {
|
|
830
|
+
return DocumentsApiFp(this.configuration).deleteDocument(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* This will return a presigned URL to download the document.
|
|
835
|
+
* @summary Fetches a document download URL
|
|
836
|
+
* @param {DocumentsApiGetDocumentDownloadUrlRequest} requestParameters Request parameters.
|
|
837
|
+
* @param {*} [options] Override http request option.
|
|
838
|
+
* @throws {RequiredError}
|
|
839
|
+
* @memberof DocumentsApi
|
|
840
|
+
*/
|
|
841
|
+
public getDocumentDownloadUrl(requestParameters: DocumentsApiGetDocumentDownloadUrlRequest, options?: AxiosRequestConfig) {
|
|
842
|
+
return DocumentsApiFp(this.configuration).getDocumentDownloadUrl(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* This will return a presigned URL for a random S3 key
|
|
847
|
+
* @summary Fetches a presigned URL for a S3 key
|
|
848
|
+
* @param {DocumentsApiGetSignedS3keyUrlRequest} requestParameters Request parameters.
|
|
849
|
+
* @param {*} [options] Override http request option.
|
|
850
|
+
* @throws {RequiredError}
|
|
851
|
+
* @memberof DocumentsApi
|
|
852
|
+
*/
|
|
853
|
+
public getSignedS3keyUrl(requestParameters: DocumentsApiGetSignedS3keyUrlRequest, options?: AxiosRequestConfig) {
|
|
854
|
+
return DocumentsApiFp(this.configuration).getSignedS3keyUrl(requestParameters.s3Key, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* 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.
|
|
859
|
+
* @summary List documents
|
|
860
|
+
* @param {DocumentsApiListDocumentsRequest} requestParameters Request parameters.
|
|
861
|
+
* @param {*} [options] Override http request option.
|
|
862
|
+
* @throws {RequiredError}
|
|
863
|
+
* @memberof DocumentsApi
|
|
864
|
+
*/
|
|
865
|
+
public listDocuments(requestParameters: DocumentsApiListDocumentsRequest = {}, options?: AxiosRequestConfig) {
|
|
866
|
+
return DocumentsApiFp(this.configuration).listDocuments(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Updates the specified document by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
871
|
+
* @summary Update the document
|
|
872
|
+
* @param {DocumentsApiUpdateDocumentRequest} requestParameters Request parameters.
|
|
873
|
+
* @param {*} [options] Override http request option.
|
|
874
|
+
* @throws {RequiredError}
|
|
875
|
+
* @memberof DocumentsApi
|
|
876
|
+
*/
|
|
877
|
+
public updateDocument(requestParameters: DocumentsApiUpdateDocumentRequest, options?: AxiosRequestConfig) {
|
|
878
|
+
return DocumentsApiFp(this.configuration).updateDocument(requestParameters.code, requestParameters.updateDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
879
|
+
}
|
|
880
|
+
}
|