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