@emilgroup/accounting-sdk-node 1.32.0 → 1.32.1-beta.1

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