@emilgroup/accounting-sdk 1.34.0 → 1.34.1-beta.0

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