@emilgroup/customer-sdk-node 1.9.0 → 1.10.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 (47) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/authentication-api.ts +601 -0
  4. package/api/claims-api.ts +16 -16
  5. package/api/customers-api.ts +72 -1770
  6. package/api/documents-api.ts +442 -0
  7. package/api/invites-api.ts +443 -0
  8. package/api/invoices-api.ts +245 -0
  9. package/api/payments-api.ts +277 -0
  10. package/api/policies-api.ts +16 -16
  11. package/api/products-api.ts +19 -19
  12. package/api.ts +10 -0
  13. package/dist/api/authentication-api.d.ts +332 -0
  14. package/dist/api/authentication-api.js +604 -0
  15. package/dist/api/claims-api.d.ts +16 -16
  16. package/dist/api/claims-api.js +12 -12
  17. package/dist/api/customers-api.d.ts +0 -954
  18. package/dist/api/customers-api.js +20 -1381
  19. package/dist/api/documents-api.d.ts +262 -0
  20. package/dist/api/documents-api.js +417 -0
  21. package/dist/api/invites-api.d.ts +248 -0
  22. package/dist/api/invites-api.js +456 -0
  23. package/dist/api/invoices-api.d.ts +150 -0
  24. package/dist/api/invoices-api.js +253 -0
  25. package/dist/api/payments-api.d.ts +162 -0
  26. package/dist/api/payments-api.js +306 -0
  27. package/dist/api/policies-api.d.ts +16 -16
  28. package/dist/api/policies-api.js +12 -12
  29. package/dist/api/products-api.d.ts +20 -20
  30. package/dist/api/products-api.js +12 -12
  31. package/dist/api.d.ts +5 -0
  32. package/dist/api.js +5 -0
  33. package/dist/models/account-class.d.ts +26 -1
  34. package/dist/models/account-class.js +7 -0
  35. package/dist/models/create-account-request-dto.d.ts +39 -9
  36. package/dist/models/create-account-request-dto.js +11 -1
  37. package/dist/models/index.d.ts +1 -0
  38. package/dist/models/index.js +1 -0
  39. package/dist/models/list-policies-response-class.d.ts +4 -4
  40. package/dist/models/list-products-response-class.d.ts +31 -0
  41. package/dist/models/list-products-response-class.js +15 -0
  42. package/models/account-class.ts +29 -1
  43. package/models/create-account-request-dto.ts +41 -9
  44. package/models/index.ts +1 -0
  45. package/models/list-policies-response-class.ts +4 -4
  46. package/models/list-products-response-class.ts +37 -0
  47. package/package.json +2 -2
@@ -0,0 +1,442 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CustomerService
5
+ * The EMIL CustomerService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
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 { CreatePresignedPostResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { GetCustomerDocumentDownloadUrlResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { ListDocumentsResponseClass } from '../models';
29
+ // URLSearchParams not necessarily used
30
+ // @ts-ignore
31
+ import { URL, URLSearchParams } from 'url';
32
+ const FormData = require('form-data');
33
+ /**
34
+ * DocumentsApi - axios parameter creator
35
+ * @export
36
+ */
37
+ export const DocumentsApiAxiosParamCreator = function (configuration?: Configuration) {
38
+ return {
39
+ /**
40
+ * Get a presigned download url for document.
41
+ * @summary Get a presigned download url for document
42
+ * @param {string} documentCode The document code.
43
+ * @param {string} customerCode
44
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
45
+ * @param {*} [options] Override http request option.
46
+ * @throws {RequiredError}
47
+ */
48
+ getCustomerDocumentDownloadUrl: async (documentCode: string, customerCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
49
+ // verify required parameter 'documentCode' is not null or undefined
50
+ assertParamExists('getCustomerDocumentDownloadUrl', 'documentCode', documentCode)
51
+ // verify required parameter 'customerCode' is not null or undefined
52
+ assertParamExists('getCustomerDocumentDownloadUrl', 'customerCode', customerCode)
53
+ const localVarPath = `/v1/customers/{customerCode}/documents/{documentCode}/download-url`
54
+ .replace(`{${"documentCode"}}`, encodeURIComponent(String(documentCode)))
55
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
56
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
57
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
58
+ let baseOptions;
59
+ let baseAccessToken;
60
+ if (configuration) {
61
+ baseOptions = configuration.baseOptions;
62
+ baseAccessToken = configuration.accessToken;
63
+ }
64
+
65
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
66
+ const localVarHeaderParameter = {} as any;
67
+ const localVarQueryParameter = {} as any;
68
+
69
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
70
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
71
+ }
72
+
73
+
74
+
75
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
76
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
77
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
78
+
79
+ return {
80
+ url: toPathString(localVarUrlObj),
81
+ options: localVarRequestOptions,
82
+ };
83
+ },
84
+ /**
85
+ * List all the documents of a customer.
86
+ * @summary List documents of a customer
87
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
88
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
89
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
90
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
91
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
92
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
93
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
94
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ listDocuments: async (customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
99
+ // verify required parameter 'customerCode' is not null or undefined
100
+ assertParamExists('listDocuments', 'customerCode', customerCode)
101
+ const localVarPath = `/v1/customers/{customerCode}/documents`
102
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
103
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
104
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
105
+ let baseOptions;
106
+ let baseAccessToken;
107
+ if (configuration) {
108
+ baseOptions = configuration.baseOptions;
109
+ baseAccessToken = configuration.accessToken;
110
+ }
111
+
112
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
113
+ const localVarHeaderParameter = {} as any;
114
+ const localVarQueryParameter = {} as any;
115
+
116
+ if (pageSize !== undefined) {
117
+ localVarQueryParameter['pageSize'] = pageSize;
118
+ }
119
+
120
+ if (pageToken !== undefined) {
121
+ localVarQueryParameter['pageToken'] = pageToken;
122
+ }
123
+
124
+ if (filter !== undefined) {
125
+ localVarQueryParameter['filter'] = filter;
126
+ }
127
+
128
+ if (search !== undefined) {
129
+ localVarQueryParameter['search'] = search;
130
+ }
131
+
132
+ if (order !== undefined) {
133
+ localVarQueryParameter['order'] = order;
134
+ }
135
+
136
+ if (expand !== undefined) {
137
+ localVarQueryParameter['expand'] = expand;
138
+ }
139
+
140
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
141
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
142
+ }
143
+
144
+
145
+
146
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
147
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
148
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
149
+
150
+ return {
151
+ url: toPathString(localVarUrlObj),
152
+ options: localVarRequestOptions,
153
+ };
154
+ },
155
+ /**
156
+ * API to upload and attach documents to an account.
157
+ * @summary Upload account documents
158
+ * @param {string} customerCode
159
+ * @param {*} [options] Override http request option.
160
+ * @throws {RequiredError}
161
+ */
162
+ uploadAccountDocuments: async (customerCode: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
163
+ // verify required parameter 'customerCode' is not null or undefined
164
+ assertParamExists('uploadAccountDocuments', 'customerCode', customerCode)
165
+ const localVarPath = `/v1/customers/{customerCode}/documents`
166
+ .replace(`{${"customerCode"}}`, encodeURIComponent(String(customerCode)));
167
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
168
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
169
+ let baseOptions;
170
+ let baseAccessToken;
171
+ if (configuration) {
172
+ baseOptions = configuration.baseOptions;
173
+ baseAccessToken = configuration.accessToken;
174
+ }
175
+
176
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
177
+ const localVarHeaderParameter = {} as any;
178
+ const localVarQueryParameter = {} as any;
179
+
180
+
181
+
182
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
183
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
184
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
185
+
186
+ return {
187
+ url: toPathString(localVarUrlObj),
188
+ options: localVarRequestOptions,
189
+ };
190
+ },
191
+ }
192
+ };
193
+
194
+ /**
195
+ * DocumentsApi - functional programming interface
196
+ * @export
197
+ */
198
+ export const DocumentsApiFp = function(configuration?: Configuration) {
199
+ const localVarAxiosParamCreator = DocumentsApiAxiosParamCreator(configuration)
200
+ return {
201
+ /**
202
+ * Get a presigned download url for document.
203
+ * @summary Get a presigned download url for document
204
+ * @param {string} documentCode The document code.
205
+ * @param {string} customerCode
206
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
207
+ * @param {*} [options] Override http request option.
208
+ * @throws {RequiredError}
209
+ */
210
+ async getCustomerDocumentDownloadUrl(documentCode: string, customerCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCustomerDocumentDownloadUrlResponseClass>> {
211
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerDocumentDownloadUrl(documentCode, customerCode, authorization, options);
212
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
213
+ },
214
+ /**
215
+ * List all the documents of a customer.
216
+ * @summary List documents of a customer
217
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
218
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
219
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
220
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
221
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
222
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
223
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
224
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
225
+ * @param {*} [options] Override http request option.
226
+ * @throws {RequiredError}
227
+ */
228
+ async listDocuments(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListDocumentsResponseClass>> {
229
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options);
230
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
231
+ },
232
+ /**
233
+ * API to upload and attach documents to an account.
234
+ * @summary Upload account documents
235
+ * @param {string} customerCode
236
+ * @param {*} [options] Override http request option.
237
+ * @throws {RequiredError}
238
+ */
239
+ async uploadAccountDocuments(customerCode: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePresignedPostResponseClass>> {
240
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uploadAccountDocuments(customerCode, options);
241
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
242
+ },
243
+ }
244
+ };
245
+
246
+ /**
247
+ * DocumentsApi - factory interface
248
+ * @export
249
+ */
250
+ export const DocumentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
251
+ const localVarFp = DocumentsApiFp(configuration)
252
+ return {
253
+ /**
254
+ * Get a presigned download url for document.
255
+ * @summary Get a presigned download url for document
256
+ * @param {string} documentCode The document code.
257
+ * @param {string} customerCode
258
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
259
+ * @param {*} [options] Override http request option.
260
+ * @throws {RequiredError}
261
+ */
262
+ getCustomerDocumentDownloadUrl(documentCode: string, customerCode: string, authorization?: string, options?: any): AxiosPromise<GetCustomerDocumentDownloadUrlResponseClass> {
263
+ return localVarFp.getCustomerDocumentDownloadUrl(documentCode, customerCode, authorization, options).then((request) => request(axios, basePath));
264
+ },
265
+ /**
266
+ * List all the documents of a customer.
267
+ * @summary List documents of a customer
268
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
269
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
270
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
271
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
272
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
273
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
274
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
275
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
276
+ * @param {*} [options] Override http request option.
277
+ * @throws {RequiredError}
278
+ */
279
+ listDocuments(customerCode: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, authorization?: string, options?: any): AxiosPromise<ListDocumentsResponseClass> {
280
+ return localVarFp.listDocuments(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then((request) => request(axios, basePath));
281
+ },
282
+ /**
283
+ * API to upload and attach documents to an account.
284
+ * @summary Upload account documents
285
+ * @param {string} customerCode
286
+ * @param {*} [options] Override http request option.
287
+ * @throws {RequiredError}
288
+ */
289
+ uploadAccountDocuments(customerCode: string, options?: any): AxiosPromise<CreatePresignedPostResponseClass> {
290
+ return localVarFp.uploadAccountDocuments(customerCode, options).then((request) => request(axios, basePath));
291
+ },
292
+ };
293
+ };
294
+
295
+ /**
296
+ * Request parameters for getCustomerDocumentDownloadUrl operation in DocumentsApi.
297
+ * @export
298
+ * @interface DocumentsApiGetCustomerDocumentDownloadUrlRequest
299
+ */
300
+ export interface DocumentsApiGetCustomerDocumentDownloadUrlRequest {
301
+ /**
302
+ * The document code.
303
+ * @type {string}
304
+ * @memberof DocumentsApiGetCustomerDocumentDownloadUrl
305
+ */
306
+ readonly documentCode: string
307
+
308
+ /**
309
+ *
310
+ * @type {string}
311
+ * @memberof DocumentsApiGetCustomerDocumentDownloadUrl
312
+ */
313
+ readonly customerCode: string
314
+
315
+ /**
316
+ * Bearer Token: provided by the login endpoint under the name accessToken.
317
+ * @type {string}
318
+ * @memberof DocumentsApiGetCustomerDocumentDownloadUrl
319
+ */
320
+ readonly authorization?: string
321
+ }
322
+
323
+ /**
324
+ * Request parameters for listDocuments operation in DocumentsApi.
325
+ * @export
326
+ * @interface DocumentsApiListDocumentsRequest
327
+ */
328
+ export interface DocumentsApiListDocumentsRequest {
329
+ /**
330
+ * The customer code or \&quot;me\&quot; for the currently logged in customer.
331
+ * @type {string}
332
+ * @memberof DocumentsApiListDocuments
333
+ */
334
+ readonly customerCode: string
335
+
336
+ /**
337
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
338
+ * @type {any}
339
+ * @memberof DocumentsApiListDocuments
340
+ */
341
+ readonly pageSize?: any
342
+
343
+ /**
344
+ * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
345
+ * @type {any}
346
+ * @memberof DocumentsApiListDocuments
347
+ */
348
+ readonly pageToken?: any
349
+
350
+ /**
351
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
352
+ * @type {any}
353
+ * @memberof DocumentsApiListDocuments
354
+ */
355
+ readonly filter?: any
356
+
357
+ /**
358
+ * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
359
+ * @type {any}
360
+ * @memberof DocumentsApiListDocuments
361
+ */
362
+ readonly search?: any
363
+
364
+ /**
365
+ * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
366
+ * @type {any}
367
+ * @memberof DocumentsApiListDocuments
368
+ */
369
+ readonly order?: any
370
+
371
+ /**
372
+ * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
373
+ * @type {any}
374
+ * @memberof DocumentsApiListDocuments
375
+ */
376
+ readonly expand?: any
377
+
378
+ /**
379
+ * Bearer Token: provided by the login endpoint under the name accessToken.
380
+ * @type {string}
381
+ * @memberof DocumentsApiListDocuments
382
+ */
383
+ readonly authorization?: string
384
+ }
385
+
386
+ /**
387
+ * Request parameters for uploadAccountDocuments operation in DocumentsApi.
388
+ * @export
389
+ * @interface DocumentsApiUploadAccountDocumentsRequest
390
+ */
391
+ export interface DocumentsApiUploadAccountDocumentsRequest {
392
+ /**
393
+ *
394
+ * @type {string}
395
+ * @memberof DocumentsApiUploadAccountDocuments
396
+ */
397
+ readonly customerCode: string
398
+ }
399
+
400
+ /**
401
+ * DocumentsApi - object-oriented interface
402
+ * @export
403
+ * @class DocumentsApi
404
+ * @extends {BaseAPI}
405
+ */
406
+ export class DocumentsApi extends BaseAPI {
407
+ /**
408
+ * Get a presigned download url for document.
409
+ * @summary Get a presigned download url for document
410
+ * @param {DocumentsApiGetCustomerDocumentDownloadUrlRequest} requestParameters Request parameters.
411
+ * @param {*} [options] Override http request option.
412
+ * @throws {RequiredError}
413
+ * @memberof DocumentsApi
414
+ */
415
+ public getCustomerDocumentDownloadUrl(requestParameters: DocumentsApiGetCustomerDocumentDownloadUrlRequest, options?: AxiosRequestConfig) {
416
+ return DocumentsApiFp(this.configuration).getCustomerDocumentDownloadUrl(requestParameters.documentCode, requestParameters.customerCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
417
+ }
418
+
419
+ /**
420
+ * List all the documents of a customer.
421
+ * @summary List documents of a customer
422
+ * @param {DocumentsApiListDocumentsRequest} requestParameters Request parameters.
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ * @memberof DocumentsApi
426
+ */
427
+ public listDocuments(requestParameters: DocumentsApiListDocumentsRequest, options?: AxiosRequestConfig) {
428
+ return DocumentsApiFp(this.configuration).listDocuments(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
429
+ }
430
+
431
+ /**
432
+ * API to upload and attach documents to an account.
433
+ * @summary Upload account documents
434
+ * @param {DocumentsApiUploadAccountDocumentsRequest} requestParameters Request parameters.
435
+ * @param {*} [options] Override http request option.
436
+ * @throws {RequiredError}
437
+ * @memberof DocumentsApi
438
+ */
439
+ public uploadAccountDocuments(requestParameters: DocumentsApiUploadAccountDocumentsRequest, options?: AxiosRequestConfig) {
440
+ return DocumentsApiFp(this.configuration).uploadAccountDocuments(requestParameters.customerCode, options).then((request) => request(this.axios, this.basePath));
441
+ }
442
+ }