@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.
Files changed (31) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/personal-accounts-api.ts +577 -0
  4. package/api.ts +2 -0
  5. package/dist/api/personal-accounts-api.d.ts +327 -0
  6. package/dist/api/personal-accounts-api.js +549 -0
  7. package/dist/api.d.ts +1 -0
  8. package/dist/api.js +1 -0
  9. package/dist/models/create-financial-account-request-dto.d.ts +2 -2
  10. package/dist/models/create-personal-account-request-dto.d.ts +60 -0
  11. package/dist/models/create-personal-account-request-dto.js +21 -0
  12. package/dist/models/create-personal-account-response-class.d.ts +25 -0
  13. package/dist/models/create-personal-account-response-class.js +15 -0
  14. package/dist/models/financial-account-class.d.ts +2 -2
  15. package/dist/models/get-personal-account-response-class.d.ts +25 -0
  16. package/dist/models/get-personal-account-response-class.js +15 -0
  17. package/dist/models/index.d.ts +5 -0
  18. package/dist/models/index.js +5 -0
  19. package/dist/models/list-personal-accounts-response-class.d.ts +31 -0
  20. package/dist/models/list-personal-accounts-response-class.js +15 -0
  21. package/dist/models/personal-account-class.d.ts +104 -0
  22. package/dist/models/personal-account-class.js +23 -0
  23. package/models/create-financial-account-request-dto.ts +2 -2
  24. package/models/create-personal-account-request-dto.ts +69 -0
  25. package/models/create-personal-account-response-class.ts +31 -0
  26. package/models/financial-account-class.ts +2 -2
  27. package/models/get-personal-account-response-class.ts +31 -0
  28. package/models/index.ts +5 -0
  29. package/models/list-personal-accounts-response-class.ts +37 -0
  30. package/models/personal-account-class.ts +113 -0
  31. package/package.json +1 -1
@@ -0,0 +1,549 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL AccountingService
6
+ * The EMIL AccountingService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.PersonalAccountsApi = exports.PersonalAccountsApiFactory = exports.PersonalAccountsApiFp = exports.PersonalAccountsApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * PersonalAccountsApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var PersonalAccountsApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * 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.
101
+ * @summary Create the Personal Account
102
+ * @param {CreatePersonalAccountRequestDto} createPersonalAccountRequestDto
103
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ createPersonalAccount: function (createPersonalAccountRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'createPersonalAccountRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('createPersonalAccount', 'createPersonalAccountRequestDto', createPersonalAccountRequestDto);
116
+ localVarPath = "/accountingservice/v1/personal-accounts";
117
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPersonalAccountRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
148
+ /**
149
+ * Permanently deletes the Personal Account. Supply the unique code that was returned when you created the Personal Account and this will delete it.
150
+ * @summary Delete the Personal Account
151
+ * @param {string} code Unique identifier for the object.
152
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ deletePersonalAccount: function (code, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'code' is not null or undefined
164
+ (0, common_1.assertParamExists)('deletePersonalAccount', 'code', code);
165
+ localVarPath = "/accountingservice/v1/personal-accounts/{code}"
166
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
167
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ baseAccessToken = configuration.accessToken;
171
+ }
172
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
173
+ localVarHeaderParameter = {};
174
+ localVarQueryParameter = {};
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
178
+ case 1:
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ _a.sent();
182
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
+ }
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ return [2 /*return*/, {
189
+ url: (0, common_1.toPathString)(localVarUrlObj),
190
+ options: localVarRequestOptions,
191
+ }];
192
+ }
193
+ });
194
+ });
195
+ },
196
+ /**
197
+ * 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.
198
+ * @summary Retrieve the Financial Account
199
+ * @param {string} code Unique identifier for the object.
200
+ * @param {string} expand
201
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ getPersonalAccount: function (code, expand, authorization, options) {
206
+ if (options === void 0) { options = {}; }
207
+ return __awaiter(_this, void 0, void 0, function () {
208
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
+ return __generator(this, function (_a) {
210
+ switch (_a.label) {
211
+ case 0:
212
+ // verify required parameter 'code' is not null or undefined
213
+ (0, common_1.assertParamExists)('getPersonalAccount', 'code', code);
214
+ // verify required parameter 'expand' is not null or undefined
215
+ (0, common_1.assertParamExists)('getPersonalAccount', 'expand', expand);
216
+ localVarPath = "/accountingservice/v1/personal-accounts/{code}"
217
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
218
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
219
+ if (configuration) {
220
+ baseOptions = configuration.baseOptions;
221
+ baseAccessToken = configuration.accessToken;
222
+ }
223
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
224
+ localVarHeaderParameter = {};
225
+ localVarQueryParameter = {};
226
+ // authentication bearer required
227
+ // http bearer authentication required
228
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
229
+ case 1:
230
+ // authentication bearer required
231
+ // http bearer authentication required
232
+ _a.sent();
233
+ if (expand !== undefined) {
234
+ localVarQueryParameter['expand'] = expand;
235
+ }
236
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
237
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
238
+ }
239
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
240
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
241
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
242
+ return [2 /*return*/, {
243
+ url: (0, common_1.toPathString)(localVarUrlObj),
244
+ options: localVarRequestOptions,
245
+ }];
246
+ }
247
+ });
248
+ });
249
+ },
250
+ /**
251
+ * 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.
252
+ * @summary List Financial Accounts
253
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
254
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
255
+ * @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.
256
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type&lt;/i&gt;
257
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
258
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, name, personalAccountNumber&lt;/i&gt;
259
+ * @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.&lt;br/&gt; &lt;br/&gt;
260
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type&lt;/i&gt;
261
+ * @param {*} [options] Override http request option.
262
+ * @throws {RequiredError}
263
+ */
264
+ listPersonalAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
265
+ if (options === void 0) { options = {}; }
266
+ return __awaiter(_this, void 0, void 0, function () {
267
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
268
+ return __generator(this, function (_a) {
269
+ switch (_a.label) {
270
+ case 0:
271
+ localVarPath = "/accountingservice/v1/personal-accounts";
272
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
273
+ if (configuration) {
274
+ baseOptions = configuration.baseOptions;
275
+ baseAccessToken = configuration.accessToken;
276
+ }
277
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
278
+ localVarHeaderParameter = {};
279
+ localVarQueryParameter = {};
280
+ // authentication bearer required
281
+ // http bearer authentication required
282
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
283
+ case 1:
284
+ // authentication bearer required
285
+ // http bearer authentication required
286
+ _a.sent();
287
+ if (pageSize !== undefined) {
288
+ localVarQueryParameter['pageSize'] = pageSize;
289
+ }
290
+ if (pageToken !== undefined) {
291
+ localVarQueryParameter['pageToken'] = pageToken;
292
+ }
293
+ if (filter !== undefined) {
294
+ localVarQueryParameter['filter'] = filter;
295
+ }
296
+ if (search !== undefined) {
297
+ localVarQueryParameter['search'] = search;
298
+ }
299
+ if (order !== undefined) {
300
+ localVarQueryParameter['order'] = order;
301
+ }
302
+ if (expand !== undefined) {
303
+ localVarQueryParameter['expand'] = expand;
304
+ }
305
+ if (filters !== undefined) {
306
+ localVarQueryParameter['filters'] = filters;
307
+ }
308
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
309
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
310
+ }
311
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
312
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
313
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
314
+ return [2 /*return*/, {
315
+ url: (0, common_1.toPathString)(localVarUrlObj),
316
+ options: localVarRequestOptions,
317
+ }];
318
+ }
319
+ });
320
+ });
321
+ },
322
+ };
323
+ };
324
+ exports.PersonalAccountsApiAxiosParamCreator = PersonalAccountsApiAxiosParamCreator;
325
+ /**
326
+ * PersonalAccountsApi - functional programming interface
327
+ * @export
328
+ */
329
+ var PersonalAccountsApiFp = function (configuration) {
330
+ var localVarAxiosParamCreator = (0, exports.PersonalAccountsApiAxiosParamCreator)(configuration);
331
+ return {
332
+ /**
333
+ * 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.
334
+ * @summary Create the Personal Account
335
+ * @param {CreatePersonalAccountRequestDto} createPersonalAccountRequestDto
336
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
337
+ * @param {*} [options] Override http request option.
338
+ * @throws {RequiredError}
339
+ */
340
+ createPersonalAccount: function (createPersonalAccountRequestDto, authorization, options) {
341
+ return __awaiter(this, void 0, void 0, function () {
342
+ var localVarAxiosArgs;
343
+ return __generator(this, function (_a) {
344
+ switch (_a.label) {
345
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPersonalAccount(createPersonalAccountRequestDto, authorization, options)];
346
+ case 1:
347
+ localVarAxiosArgs = _a.sent();
348
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
349
+ }
350
+ });
351
+ });
352
+ },
353
+ /**
354
+ * Permanently deletes the Personal Account. Supply the unique code that was returned when you created the Personal Account and this will delete it.
355
+ * @summary Delete the Personal Account
356
+ * @param {string} code Unique identifier for the object.
357
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
358
+ * @param {*} [options] Override http request option.
359
+ * @throws {RequiredError}
360
+ */
361
+ deletePersonalAccount: function (code, authorization, options) {
362
+ return __awaiter(this, void 0, void 0, function () {
363
+ var localVarAxiosArgs;
364
+ return __generator(this, function (_a) {
365
+ switch (_a.label) {
366
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deletePersonalAccount(code, authorization, options)];
367
+ case 1:
368
+ localVarAxiosArgs = _a.sent();
369
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
370
+ }
371
+ });
372
+ });
373
+ },
374
+ /**
375
+ * 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.
376
+ * @summary Retrieve the Financial Account
377
+ * @param {string} code Unique identifier for the object.
378
+ * @param {string} expand
379
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ */
383
+ getPersonalAccount: function (code, expand, authorization, options) {
384
+ return __awaiter(this, void 0, void 0, function () {
385
+ var localVarAxiosArgs;
386
+ return __generator(this, function (_a) {
387
+ switch (_a.label) {
388
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPersonalAccount(code, expand, authorization, options)];
389
+ case 1:
390
+ localVarAxiosArgs = _a.sent();
391
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
392
+ }
393
+ });
394
+ });
395
+ },
396
+ /**
397
+ * 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.
398
+ * @summary List Financial Accounts
399
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
400
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
401
+ * @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.
402
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type&lt;/i&gt;
403
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
404
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, name, personalAccountNumber&lt;/i&gt;
405
+ * @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.&lt;br/&gt; &lt;br/&gt;
406
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type&lt;/i&gt;
407
+ * @param {*} [options] Override http request option.
408
+ * @throws {RequiredError}
409
+ */
410
+ listPersonalAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
411
+ return __awaiter(this, void 0, void 0, function () {
412
+ var localVarAxiosArgs;
413
+ return __generator(this, function (_a) {
414
+ switch (_a.label) {
415
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPersonalAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
416
+ case 1:
417
+ localVarAxiosArgs = _a.sent();
418
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
419
+ }
420
+ });
421
+ });
422
+ },
423
+ };
424
+ };
425
+ exports.PersonalAccountsApiFp = PersonalAccountsApiFp;
426
+ /**
427
+ * PersonalAccountsApi - factory interface
428
+ * @export
429
+ */
430
+ var PersonalAccountsApiFactory = function (configuration, basePath, axios) {
431
+ var localVarFp = (0, exports.PersonalAccountsApiFp)(configuration);
432
+ return {
433
+ /**
434
+ * 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.
435
+ * @summary Create the Personal Account
436
+ * @param {CreatePersonalAccountRequestDto} createPersonalAccountRequestDto
437
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
438
+ * @param {*} [options] Override http request option.
439
+ * @throws {RequiredError}
440
+ */
441
+ createPersonalAccount: function (createPersonalAccountRequestDto, authorization, options) {
442
+ return localVarFp.createPersonalAccount(createPersonalAccountRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
443
+ },
444
+ /**
445
+ * Permanently deletes the Personal Account. Supply the unique code that was returned when you created the Personal Account and this will delete it.
446
+ * @summary Delete the Personal Account
447
+ * @param {string} code Unique identifier for the object.
448
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ */
452
+ deletePersonalAccount: function (code, authorization, options) {
453
+ return localVarFp.deletePersonalAccount(code, authorization, options).then(function (request) { return request(axios, basePath); });
454
+ },
455
+ /**
456
+ * 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.
457
+ * @summary Retrieve the Financial Account
458
+ * @param {string} code Unique identifier for the object.
459
+ * @param {string} expand
460
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
461
+ * @param {*} [options] Override http request option.
462
+ * @throws {RequiredError}
463
+ */
464
+ getPersonalAccount: function (code, expand, authorization, options) {
465
+ return localVarFp.getPersonalAccount(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
466
+ },
467
+ /**
468
+ * 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.
469
+ * @summary List Financial Accounts
470
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
471
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
472
+ * @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.
473
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type&lt;/i&gt;
474
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
475
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, createdAt, name, personalAccountNumber&lt;/i&gt;
476
+ * @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.&lt;br/&gt; &lt;br/&gt;
477
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, name, financialAccountNumber, personalAccountNumber, createdAt, partnerNumber, type&lt;/i&gt;
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ */
481
+ listPersonalAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
482
+ return localVarFp.listPersonalAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
483
+ },
484
+ };
485
+ };
486
+ exports.PersonalAccountsApiFactory = PersonalAccountsApiFactory;
487
+ /**
488
+ * PersonalAccountsApi - object-oriented interface
489
+ * @export
490
+ * @class PersonalAccountsApi
491
+ * @extends {BaseAPI}
492
+ */
493
+ var PersonalAccountsApi = /** @class */ (function (_super) {
494
+ __extends(PersonalAccountsApi, _super);
495
+ function PersonalAccountsApi() {
496
+ return _super !== null && _super.apply(this, arguments) || this;
497
+ }
498
+ /**
499
+ * 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.
500
+ * @summary Create the Personal Account
501
+ * @param {PersonalAccountsApiCreatePersonalAccountRequest} requestParameters Request parameters.
502
+ * @param {*} [options] Override http request option.
503
+ * @throws {RequiredError}
504
+ * @memberof PersonalAccountsApi
505
+ */
506
+ PersonalAccountsApi.prototype.createPersonalAccount = function (requestParameters, options) {
507
+ var _this = this;
508
+ return (0, exports.PersonalAccountsApiFp)(this.configuration).createPersonalAccount(requestParameters.createPersonalAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
509
+ };
510
+ /**
511
+ * Permanently deletes the Personal Account. Supply the unique code that was returned when you created the Personal Account and this will delete it.
512
+ * @summary Delete the Personal Account
513
+ * @param {PersonalAccountsApiDeletePersonalAccountRequest} requestParameters Request parameters.
514
+ * @param {*} [options] Override http request option.
515
+ * @throws {RequiredError}
516
+ * @memberof PersonalAccountsApi
517
+ */
518
+ PersonalAccountsApi.prototype.deletePersonalAccount = function (requestParameters, options) {
519
+ var _this = this;
520
+ return (0, exports.PersonalAccountsApiFp)(this.configuration).deletePersonalAccount(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
521
+ };
522
+ /**
523
+ * 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.
524
+ * @summary Retrieve the Financial Account
525
+ * @param {PersonalAccountsApiGetPersonalAccountRequest} requestParameters Request parameters.
526
+ * @param {*} [options] Override http request option.
527
+ * @throws {RequiredError}
528
+ * @memberof PersonalAccountsApi
529
+ */
530
+ PersonalAccountsApi.prototype.getPersonalAccount = function (requestParameters, options) {
531
+ var _this = this;
532
+ return (0, exports.PersonalAccountsApiFp)(this.configuration).getPersonalAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
533
+ };
534
+ /**
535
+ * 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.
536
+ * @summary List Financial Accounts
537
+ * @param {PersonalAccountsApiListPersonalAccountsRequest} requestParameters Request parameters.
538
+ * @param {*} [options] Override http request option.
539
+ * @throws {RequiredError}
540
+ * @memberof PersonalAccountsApi
541
+ */
542
+ PersonalAccountsApi.prototype.listPersonalAccounts = function (requestParameters, options) {
543
+ var _this = this;
544
+ if (requestParameters === void 0) { requestParameters = {}; }
545
+ return (0, exports.PersonalAccountsApiFp)(this.configuration).listPersonalAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
546
+ };
547
+ return PersonalAccountsApi;
548
+ }(base_1.BaseAPI));
549
+ exports.PersonalAccountsApi = PersonalAccountsApi;
package/dist/api.d.ts CHANGED
@@ -12,3 +12,4 @@
12
12
  export * from './api/booking-entries-api';
13
13
  export * from './api/financial-accounts-api';
14
14
  export * from './api/health-api';
15
+ export * from './api/personal-accounts-api';
package/dist/api.js CHANGED
@@ -30,3 +30,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
30
30
  __exportStar(require("./api/booking-entries-api"), exports);
31
31
  __exportStar(require("./api/financial-accounts-api"), exports);
32
32
  __exportStar(require("./api/health-api"), exports);
33
+ __exportStar(require("./api/personal-accounts-api"), exports);
@@ -34,11 +34,11 @@ export interface CreateFinancialAccountRequestDto {
34
34
  */
35
35
  'type': CreateFinancialAccountRequestDtoTypeEnum;
36
36
  /**
37
- * An optional code representing the entity associated with this account. Useful for associating the account with specific organizational entities or departments.
37
+ * An optional code representing the partner associated with this account. Useful for associating the account with specific partner in Emil.
38
38
  * @type {string}
39
39
  * @memberof CreateFinancialAccountRequestDto
40
40
  */
41
- 'entityNumber'?: string;
41
+ 'partnerNumber'?: string;
42
42
  /**
43
43
  * An optional identifier for the parent account. If provided, this allows the creation of sub-accounts under a parent financial account, establishing a hierarchy.
44
44
  * @type {number}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * EMIL AccountingService
3
+ * The EMIL AccountingService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface CreatePersonalAccountRequestDto
16
+ */
17
+ export interface CreatePersonalAccountRequestDto {
18
+ /**
19
+ * The name of the financial account. This is a descriptive label used to identify the account within the system.
20
+ * @type {string}
21
+ * @memberof CreatePersonalAccountRequestDto
22
+ */
23
+ 'name': string;
24
+ /**
25
+ * The unique account number assigned to this financial account. This number is used to route transactions and manage the account within the financial system.
26
+ * @type {string}
27
+ * @memberof CreatePersonalAccountRequestDto
28
+ */
29
+ 'personalAccountNumber': string;
30
+ /**
31
+ * The unique account number assigned to this financial account. This number is used to route transactions and manage the account within the financial system.
32
+ * @type {string}
33
+ * @memberof CreatePersonalAccountRequestDto
34
+ */
35
+ 'financialAccountNumber': string;
36
+ /**
37
+ * The partner number of the account
38
+ * @type {string}
39
+ * @memberof CreatePersonalAccountRequestDto
40
+ */
41
+ 'partnerNumber': string;
42
+ /**
43
+ * The type of personal account, specifying its category or classification, such as customer, supplier, or employee. This categorization helps in accounting and reporting.
44
+ * @type {string}
45
+ * @memberof CreatePersonalAccountRequestDto
46
+ */
47
+ 'type': CreatePersonalAccountRequestDtoTypeEnum;
48
+ /**
49
+ * Optional key-value pairs to store additional custom metadata or specific attributes related to the financial account, such as account purpose or manager.
50
+ * @type {object}
51
+ * @memberof CreatePersonalAccountRequestDto
52
+ */
53
+ 'customFields': object;
54
+ }
55
+ export declare const CreatePersonalAccountRequestDtoTypeEnum: {
56
+ readonly Customer: "customer";
57
+ readonly Supplier: "supplier";
58
+ readonly Employee: "employee";
59
+ };
60
+ export type CreatePersonalAccountRequestDtoTypeEnum = typeof CreatePersonalAccountRequestDtoTypeEnum[keyof typeof CreatePersonalAccountRequestDtoTypeEnum];