@emilgroup/accounting-sdk-node 1.16.1-beta.0 → 1.16.1-beta.2
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 +6 -0
- package/README.md +2 -2
- package/api/personal-accounts-api.ts +577 -0
- package/api.ts +2 -0
- package/dist/api/personal-accounts-api.d.ts +327 -0
- package/dist/api/personal-accounts-api.js +549 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/models/create-financial-account-request-dto.d.ts +2 -2
- package/dist/models/create-personal-account-request-dto.d.ts +60 -0
- package/dist/models/create-personal-account-request-dto.js +21 -0
- package/dist/models/create-personal-account-response-class.d.ts +25 -0
- package/dist/models/create-personal-account-response-class.js +15 -0
- package/dist/models/financial-account-class.d.ts +2 -2
- package/dist/models/get-personal-account-response-class.d.ts +25 -0
- package/dist/models/get-personal-account-response-class.js +15 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/models/list-personal-accounts-response-class.d.ts +31 -0
- package/dist/models/list-personal-accounts-response-class.js +15 -0
- package/dist/models/personal-account-class.d.ts +104 -0
- package/dist/models/personal-account-class.js +23 -0
- package/models/create-financial-account-request-dto.ts +2 -2
- package/models/create-personal-account-request-dto.ts +69 -0
- package/models/create-personal-account-response-class.ts +31 -0
- package/models/financial-account-class.ts +2 -2
- package/models/get-personal-account-response-class.ts +31 -0
- package/models/index.ts +5 -0
- package/models/list-personal-accounts-response-class.ts +37 -0
- package/models/personal-account-class.ts +113 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -6,6 +6,7 @@ api.ts
|
|
|
6
6
|
api/booking-entries-api.ts
|
|
7
7
|
api/financial-accounts-api.ts
|
|
8
8
|
api/health-api.ts
|
|
9
|
+
api/personal-accounts-api.ts
|
|
9
10
|
base.ts
|
|
10
11
|
common.ts
|
|
11
12
|
configuration.ts
|
|
@@ -16,15 +17,20 @@ models/create-booking-entry-request-dto.ts
|
|
|
16
17
|
models/create-booking-entry-response-class.ts
|
|
17
18
|
models/create-financial-account-request-dto.ts
|
|
18
19
|
models/create-financial-account-response-class.ts
|
|
20
|
+
models/create-personal-account-request-dto.ts
|
|
21
|
+
models/create-personal-account-response-class.ts
|
|
19
22
|
models/financial-account-class.ts
|
|
20
23
|
models/financial-transaction-class.ts
|
|
21
24
|
models/financial-transaction-data-dto.ts
|
|
22
25
|
models/get-booking-entry-response-class.ts
|
|
23
26
|
models/get-financial-account-response-class.ts
|
|
27
|
+
models/get-personal-account-response-class.ts
|
|
24
28
|
models/index.ts
|
|
25
29
|
models/inline-response200.ts
|
|
26
30
|
models/inline-response503.ts
|
|
27
31
|
models/list-booking-entries-response-class.ts
|
|
28
32
|
models/list-financial-accounts-response-class.ts
|
|
33
|
+
models/list-personal-accounts-response-class.ts
|
|
34
|
+
models/personal-account-class.ts
|
|
29
35
|
package.json
|
|
30
36
|
tsconfig.json
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/accounting-sdk-node@1.16.1-beta.
|
|
20
|
+
npm install @emilgroup/accounting-sdk-node@1.16.1-beta.2 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/accounting-sdk-node@1.16.1-beta.
|
|
24
|
+
yarn add @emilgroup/accounting-sdk-node@1.16.1-beta.2
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `FinancialAccountsApi`.
|
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL AccountingService
|
|
5
|
+
* The EMIL AccountingService 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 { CreatePersonalAccountRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CreatePersonalAccountResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { GetPersonalAccountResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { ListPersonalAccountsResponseClass } from '../models';
|
|
31
|
+
// URLSearchParams not necessarily used
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
import { URL, URLSearchParams } from 'url';
|
|
34
|
+
const FormData = require('form-data');
|
|
35
|
+
/**
|
|
36
|
+
* PersonalAccountsApi - axios parameter creator
|
|
37
|
+
* @export
|
|
38
|
+
*/
|
|
39
|
+
export const PersonalAccountsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
40
|
+
return {
|
|
41
|
+
/**
|
|
42
|
+
* This will create an personal account in the database. The personal account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account.
|
|
43
|
+
* @summary Create the Personal Account
|
|
44
|
+
* @param {CreatePersonalAccountRequestDto} createPersonalAccountRequestDto
|
|
45
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
46
|
+
* @param {*} [options] Override http request option.
|
|
47
|
+
* @throws {RequiredError}
|
|
48
|
+
*/
|
|
49
|
+
createPersonalAccount: async (createPersonalAccountRequestDto: CreatePersonalAccountRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
50
|
+
// verify required parameter 'createPersonalAccountRequestDto' is not null or undefined
|
|
51
|
+
assertParamExists('createPersonalAccount', 'createPersonalAccountRequestDto', createPersonalAccountRequestDto)
|
|
52
|
+
const localVarPath = `/accountingservice/v1/personal-accounts`;
|
|
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(createPersonalAccountRequestDto, localVarRequestOptions, configuration)
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
url: toPathString(localVarUrlObj),
|
|
85
|
+
options: localVarRequestOptions,
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* Permanently deletes the Personal Account. Supply the unique code that was returned when you created the Personal Account and this will delete it.
|
|
90
|
+
* @summary Delete the Personal Account
|
|
91
|
+
* @param {string} code Unique identifier for the object.
|
|
92
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
93
|
+
* @param {*} [options] Override http request option.
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
*/
|
|
96
|
+
deletePersonalAccount: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
97
|
+
// verify required parameter 'code' is not null or undefined
|
|
98
|
+
assertParamExists('deletePersonalAccount', 'code', code)
|
|
99
|
+
const localVarPath = `/accountingservice/v1/personal-accounts/{code}`
|
|
100
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
101
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
102
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
103
|
+
let baseOptions;
|
|
104
|
+
let baseAccessToken;
|
|
105
|
+
if (configuration) {
|
|
106
|
+
baseOptions = configuration.baseOptions;
|
|
107
|
+
baseAccessToken = configuration.accessToken;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
111
|
+
const localVarHeaderParameter = {} as any;
|
|
112
|
+
const localVarQueryParameter = {} as any;
|
|
113
|
+
|
|
114
|
+
// authentication bearer required
|
|
115
|
+
// http bearer authentication required
|
|
116
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
117
|
+
|
|
118
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
119
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
125
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
126
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
url: toPathString(localVarUrlObj),
|
|
130
|
+
options: localVarRequestOptions,
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
/**
|
|
134
|
+
* Retrieves the details of the Financial Account that was previously created. Supply the unique Financial Account code that was returned when you created it and Emil Api will return the corresponding Financial Account information.
|
|
135
|
+
* @summary Retrieve the Financial Account
|
|
136
|
+
* @param {string} code Unique identifier for the object.
|
|
137
|
+
* @param {string} expand
|
|
138
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
139
|
+
* @param {*} [options] Override http request option.
|
|
140
|
+
* @throws {RequiredError}
|
|
141
|
+
*/
|
|
142
|
+
getPersonalAccount: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
143
|
+
// verify required parameter 'code' is not null or undefined
|
|
144
|
+
assertParamExists('getPersonalAccount', 'code', code)
|
|
145
|
+
// verify required parameter 'expand' is not null or undefined
|
|
146
|
+
assertParamExists('getPersonalAccount', 'expand', expand)
|
|
147
|
+
const localVarPath = `/accountingservice/v1/personal-accounts/{code}`
|
|
148
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
149
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
150
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
151
|
+
let baseOptions;
|
|
152
|
+
let baseAccessToken;
|
|
153
|
+
if (configuration) {
|
|
154
|
+
baseOptions = configuration.baseOptions;
|
|
155
|
+
baseAccessToken = configuration.accessToken;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
159
|
+
const localVarHeaderParameter = {} as any;
|
|
160
|
+
const localVarQueryParameter = {} as any;
|
|
161
|
+
|
|
162
|
+
// authentication bearer required
|
|
163
|
+
// http bearer authentication required
|
|
164
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
165
|
+
|
|
166
|
+
if (expand !== undefined) {
|
|
167
|
+
localVarQueryParameter['expand'] = expand;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
171
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
177
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
178
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
179
|
+
|
|
180
|
+
return {
|
|
181
|
+
url: toPathString(localVarUrlObj),
|
|
182
|
+
options: localVarRequestOptions,
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
/**
|
|
186
|
+
* Returns a list of Financial Accounts you have previously created. The Financial Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
187
|
+
* @summary List Financial Accounts
|
|
188
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
189
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
190
|
+
* @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
191
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type</i>
|
|
192
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
193
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, name, personalAccountNumber</i>
|
|
194
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
195
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type</i>
|
|
196
|
+
* @param {*} [options] Override http request option.
|
|
197
|
+
* @throws {RequiredError}
|
|
198
|
+
*/
|
|
199
|
+
listPersonalAccounts: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
200
|
+
const localVarPath = `/accountingservice/v1/personal-accounts`;
|
|
201
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
202
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
203
|
+
let baseOptions;
|
|
204
|
+
let baseAccessToken;
|
|
205
|
+
if (configuration) {
|
|
206
|
+
baseOptions = configuration.baseOptions;
|
|
207
|
+
baseAccessToken = configuration.accessToken;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
211
|
+
const localVarHeaderParameter = {} as any;
|
|
212
|
+
const localVarQueryParameter = {} as any;
|
|
213
|
+
|
|
214
|
+
// authentication bearer required
|
|
215
|
+
// http bearer authentication required
|
|
216
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
217
|
+
|
|
218
|
+
if (pageSize !== undefined) {
|
|
219
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (pageToken !== undefined) {
|
|
223
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (filter !== undefined) {
|
|
227
|
+
localVarQueryParameter['filter'] = filter;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (search !== undefined) {
|
|
231
|
+
localVarQueryParameter['search'] = search;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (order !== undefined) {
|
|
235
|
+
localVarQueryParameter['order'] = order;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (expand !== undefined) {
|
|
239
|
+
localVarQueryParameter['expand'] = expand;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (filters !== undefined) {
|
|
243
|
+
localVarQueryParameter['filters'] = filters;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
247
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
253
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
254
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
255
|
+
|
|
256
|
+
return {
|
|
257
|
+
url: toPathString(localVarUrlObj),
|
|
258
|
+
options: localVarRequestOptions,
|
|
259
|
+
};
|
|
260
|
+
},
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* PersonalAccountsApi - functional programming interface
|
|
266
|
+
* @export
|
|
267
|
+
*/
|
|
268
|
+
export const PersonalAccountsApiFp = function(configuration?: Configuration) {
|
|
269
|
+
const localVarAxiosParamCreator = PersonalAccountsApiAxiosParamCreator(configuration)
|
|
270
|
+
return {
|
|
271
|
+
/**
|
|
272
|
+
* This will create an personal account in the database. The personal account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account.
|
|
273
|
+
* @summary Create the Personal Account
|
|
274
|
+
* @param {CreatePersonalAccountRequestDto} createPersonalAccountRequestDto
|
|
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
|
+
async createPersonalAccount(createPersonalAccountRequestDto: CreatePersonalAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePersonalAccountResponseClass>> {
|
|
280
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createPersonalAccount(createPersonalAccountRequestDto, authorization, options);
|
|
281
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
* Permanently deletes the Personal Account. Supply the unique code that was returned when you created the Personal Account and this will delete it.
|
|
285
|
+
* @summary Delete the Personal Account
|
|
286
|
+
* @param {string} code Unique identifier for the object.
|
|
287
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
288
|
+
* @param {*} [options] Override http request option.
|
|
289
|
+
* @throws {RequiredError}
|
|
290
|
+
*/
|
|
291
|
+
async deletePersonalAccount(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
292
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePersonalAccount(code, authorization, options);
|
|
293
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
294
|
+
},
|
|
295
|
+
/**
|
|
296
|
+
* Retrieves the details of the Financial Account that was previously created. Supply the unique Financial Account code that was returned when you created it and Emil Api will return the corresponding Financial Account information.
|
|
297
|
+
* @summary Retrieve the Financial Account
|
|
298
|
+
* @param {string} code Unique identifier for the object.
|
|
299
|
+
* @param {string} expand
|
|
300
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
301
|
+
* @param {*} [options] Override http request option.
|
|
302
|
+
* @throws {RequiredError}
|
|
303
|
+
*/
|
|
304
|
+
async getPersonalAccount(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPersonalAccountResponseClass>> {
|
|
305
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPersonalAccount(code, expand, authorization, options);
|
|
306
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
307
|
+
},
|
|
308
|
+
/**
|
|
309
|
+
* Returns a list of Financial Accounts you have previously created. The Financial Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
310
|
+
* @summary List Financial Accounts
|
|
311
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
312
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
313
|
+
* @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
314
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type</i>
|
|
315
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
316
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, name, personalAccountNumber</i>
|
|
317
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
318
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type</i>
|
|
319
|
+
* @param {*} [options] Override http request option.
|
|
320
|
+
* @throws {RequiredError}
|
|
321
|
+
*/
|
|
322
|
+
async listPersonalAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPersonalAccountsResponseClass>> {
|
|
323
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listPersonalAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
324
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
325
|
+
},
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* PersonalAccountsApi - factory interface
|
|
331
|
+
* @export
|
|
332
|
+
*/
|
|
333
|
+
export const PersonalAccountsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
334
|
+
const localVarFp = PersonalAccountsApiFp(configuration)
|
|
335
|
+
return {
|
|
336
|
+
/**
|
|
337
|
+
* This will create an personal account in the database. The personal account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account.
|
|
338
|
+
* @summary Create the Personal Account
|
|
339
|
+
* @param {CreatePersonalAccountRequestDto} createPersonalAccountRequestDto
|
|
340
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
341
|
+
* @param {*} [options] Override http request option.
|
|
342
|
+
* @throws {RequiredError}
|
|
343
|
+
*/
|
|
344
|
+
createPersonalAccount(createPersonalAccountRequestDto: CreatePersonalAccountRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePersonalAccountResponseClass> {
|
|
345
|
+
return localVarFp.createPersonalAccount(createPersonalAccountRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
346
|
+
},
|
|
347
|
+
/**
|
|
348
|
+
* Permanently deletes the Personal Account. Supply the unique code that was returned when you created the Personal Account and this will delete it.
|
|
349
|
+
* @summary Delete the Personal Account
|
|
350
|
+
* @param {string} code Unique identifier for the object.
|
|
351
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
352
|
+
* @param {*} [options] Override http request option.
|
|
353
|
+
* @throws {RequiredError}
|
|
354
|
+
*/
|
|
355
|
+
deletePersonalAccount(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
356
|
+
return localVarFp.deletePersonalAccount(code, authorization, options).then((request) => request(axios, basePath));
|
|
357
|
+
},
|
|
358
|
+
/**
|
|
359
|
+
* Retrieves the details of the Financial Account that was previously created. Supply the unique Financial Account code that was returned when you created it and Emil Api will return the corresponding Financial Account information.
|
|
360
|
+
* @summary Retrieve the Financial Account
|
|
361
|
+
* @param {string} code Unique identifier for the object.
|
|
362
|
+
* @param {string} expand
|
|
363
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
364
|
+
* @param {*} [options] Override http request option.
|
|
365
|
+
* @throws {RequiredError}
|
|
366
|
+
*/
|
|
367
|
+
getPersonalAccount(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetPersonalAccountResponseClass> {
|
|
368
|
+
return localVarFp.getPersonalAccount(code, expand, authorization, options).then((request) => request(axios, basePath));
|
|
369
|
+
},
|
|
370
|
+
/**
|
|
371
|
+
* Returns a list of Financial Accounts you have previously created. The Financial Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
372
|
+
* @summary List Financial Accounts
|
|
373
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
374
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
375
|
+
* @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
376
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type</i>
|
|
377
|
+
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
378
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, name, personalAccountNumber</i>
|
|
379
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
380
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type</i>
|
|
381
|
+
* @param {*} [options] Override http request option.
|
|
382
|
+
* @throws {RequiredError}
|
|
383
|
+
*/
|
|
384
|
+
listPersonalAccounts(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPersonalAccountsResponseClass> {
|
|
385
|
+
return localVarFp.listPersonalAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
386
|
+
},
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Request parameters for createPersonalAccount operation in PersonalAccountsApi.
|
|
392
|
+
* @export
|
|
393
|
+
* @interface PersonalAccountsApiCreatePersonalAccountRequest
|
|
394
|
+
*/
|
|
395
|
+
export interface PersonalAccountsApiCreatePersonalAccountRequest {
|
|
396
|
+
/**
|
|
397
|
+
*
|
|
398
|
+
* @type {CreatePersonalAccountRequestDto}
|
|
399
|
+
* @memberof PersonalAccountsApiCreatePersonalAccount
|
|
400
|
+
*/
|
|
401
|
+
readonly createPersonalAccountRequestDto: CreatePersonalAccountRequestDto
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
405
|
+
* @type {string}
|
|
406
|
+
* @memberof PersonalAccountsApiCreatePersonalAccount
|
|
407
|
+
*/
|
|
408
|
+
readonly authorization?: string
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Request parameters for deletePersonalAccount operation in PersonalAccountsApi.
|
|
413
|
+
* @export
|
|
414
|
+
* @interface PersonalAccountsApiDeletePersonalAccountRequest
|
|
415
|
+
*/
|
|
416
|
+
export interface PersonalAccountsApiDeletePersonalAccountRequest {
|
|
417
|
+
/**
|
|
418
|
+
* Unique identifier for the object.
|
|
419
|
+
* @type {string}
|
|
420
|
+
* @memberof PersonalAccountsApiDeletePersonalAccount
|
|
421
|
+
*/
|
|
422
|
+
readonly code: string
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
426
|
+
* @type {string}
|
|
427
|
+
* @memberof PersonalAccountsApiDeletePersonalAccount
|
|
428
|
+
*/
|
|
429
|
+
readonly authorization?: string
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Request parameters for getPersonalAccount operation in PersonalAccountsApi.
|
|
434
|
+
* @export
|
|
435
|
+
* @interface PersonalAccountsApiGetPersonalAccountRequest
|
|
436
|
+
*/
|
|
437
|
+
export interface PersonalAccountsApiGetPersonalAccountRequest {
|
|
438
|
+
/**
|
|
439
|
+
* Unique identifier for the object.
|
|
440
|
+
* @type {string}
|
|
441
|
+
* @memberof PersonalAccountsApiGetPersonalAccount
|
|
442
|
+
*/
|
|
443
|
+
readonly code: string
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
*
|
|
447
|
+
* @type {string}
|
|
448
|
+
* @memberof PersonalAccountsApiGetPersonalAccount
|
|
449
|
+
*/
|
|
450
|
+
readonly expand: string
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
454
|
+
* @type {string}
|
|
455
|
+
* @memberof PersonalAccountsApiGetPersonalAccount
|
|
456
|
+
*/
|
|
457
|
+
readonly authorization?: string
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Request parameters for listPersonalAccounts operation in PersonalAccountsApi.
|
|
462
|
+
* @export
|
|
463
|
+
* @interface PersonalAccountsApiListPersonalAccountsRequest
|
|
464
|
+
*/
|
|
465
|
+
export interface PersonalAccountsApiListPersonalAccountsRequest {
|
|
466
|
+
/**
|
|
467
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
468
|
+
* @type {string}
|
|
469
|
+
* @memberof PersonalAccountsApiListPersonalAccounts
|
|
470
|
+
*/
|
|
471
|
+
readonly authorization?: string
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
475
|
+
* @type {any}
|
|
476
|
+
* @memberof PersonalAccountsApiListPersonalAccounts
|
|
477
|
+
*/
|
|
478
|
+
readonly pageSize?: any
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* 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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
482
|
+
* @type {any}
|
|
483
|
+
* @memberof PersonalAccountsApiListPersonalAccounts
|
|
484
|
+
*/
|
|
485
|
+
readonly pageToken?: any
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type</i>
|
|
489
|
+
* @type {string}
|
|
490
|
+
* @memberof PersonalAccountsApiListPersonalAccounts
|
|
491
|
+
*/
|
|
492
|
+
readonly filter?: string
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* To search the list by any field, pass search=xxx to fetch the result.
|
|
496
|
+
* @type {any}
|
|
497
|
+
* @memberof PersonalAccountsApiListPersonalAccounts
|
|
498
|
+
*/
|
|
499
|
+
readonly search?: any
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, createdAt, name, personalAccountNumber</i>
|
|
503
|
+
* @type {string}
|
|
504
|
+
* @memberof PersonalAccountsApiListPersonalAccounts
|
|
505
|
+
*/
|
|
506
|
+
readonly order?: string
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
510
|
+
* @type {string}
|
|
511
|
+
* @memberof PersonalAccountsApiListPersonalAccounts
|
|
512
|
+
*/
|
|
513
|
+
readonly expand?: string
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type</i>
|
|
517
|
+
* @type {string}
|
|
518
|
+
* @memberof PersonalAccountsApiListPersonalAccounts
|
|
519
|
+
*/
|
|
520
|
+
readonly filters?: string
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* PersonalAccountsApi - object-oriented interface
|
|
525
|
+
* @export
|
|
526
|
+
* @class PersonalAccountsApi
|
|
527
|
+
* @extends {BaseAPI}
|
|
528
|
+
*/
|
|
529
|
+
export class PersonalAccountsApi extends BaseAPI {
|
|
530
|
+
/**
|
|
531
|
+
* This will create an personal account in the database. The personal account will be created with the provided name, type, and account number. Optionally, you can provide a parent financial account ID to create a sub-account.
|
|
532
|
+
* @summary Create the Personal Account
|
|
533
|
+
* @param {PersonalAccountsApiCreatePersonalAccountRequest} requestParameters Request parameters.
|
|
534
|
+
* @param {*} [options] Override http request option.
|
|
535
|
+
* @throws {RequiredError}
|
|
536
|
+
* @memberof PersonalAccountsApi
|
|
537
|
+
*/
|
|
538
|
+
public createPersonalAccount(requestParameters: PersonalAccountsApiCreatePersonalAccountRequest, options?: AxiosRequestConfig) {
|
|
539
|
+
return PersonalAccountsApiFp(this.configuration).createPersonalAccount(requestParameters.createPersonalAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Permanently deletes the Personal Account. Supply the unique code that was returned when you created the Personal Account and this will delete it.
|
|
544
|
+
* @summary Delete the Personal Account
|
|
545
|
+
* @param {PersonalAccountsApiDeletePersonalAccountRequest} requestParameters Request parameters.
|
|
546
|
+
* @param {*} [options] Override http request option.
|
|
547
|
+
* @throws {RequiredError}
|
|
548
|
+
* @memberof PersonalAccountsApi
|
|
549
|
+
*/
|
|
550
|
+
public deletePersonalAccount(requestParameters: PersonalAccountsApiDeletePersonalAccountRequest, options?: AxiosRequestConfig) {
|
|
551
|
+
return PersonalAccountsApiFp(this.configuration).deletePersonalAccount(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Retrieves the details of the Financial Account that was previously created. Supply the unique Financial Account code that was returned when you created it and Emil Api will return the corresponding Financial Account information.
|
|
556
|
+
* @summary Retrieve the Financial Account
|
|
557
|
+
* @param {PersonalAccountsApiGetPersonalAccountRequest} requestParameters Request parameters.
|
|
558
|
+
* @param {*} [options] Override http request option.
|
|
559
|
+
* @throws {RequiredError}
|
|
560
|
+
* @memberof PersonalAccountsApi
|
|
561
|
+
*/
|
|
562
|
+
public getPersonalAccount(requestParameters: PersonalAccountsApiGetPersonalAccountRequest, options?: AxiosRequestConfig) {
|
|
563
|
+
return PersonalAccountsApiFp(this.configuration).getPersonalAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Returns a list of Financial Accounts you have previously created. The Financial Accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
568
|
+
* @summary List Financial Accounts
|
|
569
|
+
* @param {PersonalAccountsApiListPersonalAccountsRequest} requestParameters Request parameters.
|
|
570
|
+
* @param {*} [options] Override http request option.
|
|
571
|
+
* @throws {RequiredError}
|
|
572
|
+
* @memberof PersonalAccountsApi
|
|
573
|
+
*/
|
|
574
|
+
public listPersonalAccounts(requestParameters: PersonalAccountsApiListPersonalAccountsRequest = {}, options?: AxiosRequestConfig) {
|
|
575
|
+
return PersonalAccountsApiFp(this.configuration).listPersonalAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
576
|
+
}
|
|
577
|
+
}
|
package/api.ts
CHANGED
|
@@ -27,9 +27,11 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
|
|
27
27
|
import { BookingEntriesApi } from './api';
|
|
28
28
|
import { FinancialAccountsApi } from './api';
|
|
29
29
|
import { HealthApi } from './api';
|
|
30
|
+
import { PersonalAccountsApi } from './api';
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
export * from './api/booking-entries-api';
|
|
33
34
|
export * from './api/financial-accounts-api';
|
|
34
35
|
export * from './api/health-api';
|
|
36
|
+
export * from './api/personal-accounts-api';
|
|
35
37
|
|