@emilgroup/accounting-sdk 1.28.1-beta.3 → 1.28.1-beta.30

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 (96) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/README.md +2 -2
  3. package/api/accounting-configs-api.ts +1137 -0
  4. package/api/financial-accounts-api.ts +12 -12
  5. package/api.ts +2 -0
  6. package/base.ts +1 -0
  7. package/dist/api/accounting-configs-api.d.ts +624 -0
  8. package/dist/api/accounting-configs-api.js +1031 -0
  9. package/dist/api/financial-accounts-api.d.ts +12 -12
  10. package/dist/api/financial-accounts-api.js +9 -9
  11. package/dist/api.d.ts +1 -0
  12. package/dist/api.js +1 -0
  13. package/dist/base.d.ts +2 -1
  14. package/dist/base.js +1 -0
  15. package/dist/models/accounting-config-class.d.ts +67 -0
  16. package/dist/models/accounting-config-class.js +15 -0
  17. package/dist/models/accounting-config-data-class.d.ts +45 -0
  18. package/dist/models/accounting-config-data-class.js +15 -0
  19. package/dist/models/accounting-configuration-class.d.ts +36 -0
  20. package/dist/models/accounting-configuration-class.js +15 -0
  21. package/dist/models/chart-of-accounts-config-class.d.ts +25 -0
  22. package/dist/models/chart-of-accounts-config-class.js +15 -0
  23. package/dist/models/chart-of-accounts-item-class.d.ts +71 -0
  24. package/dist/models/chart-of-accounts-item-class.js +38 -0
  25. package/dist/models/create-accounting-config-data-dto-accounting-configuration.d.ts +46 -0
  26. package/dist/models/create-accounting-config-data-dto-accounting-configuration.js +24 -0
  27. package/dist/models/create-accounting-config-data-dto-chart-of-accounts-config-items.d.ts +59 -0
  28. package/dist/models/create-accounting-config-data-dto-chart-of-accounts-config-items.js +38 -0
  29. package/dist/models/create-accounting-config-data-dto-chart-of-accounts-config.d.ts +25 -0
  30. package/dist/models/create-accounting-config-data-dto-chart-of-accounts-config.js +15 -0
  31. package/dist/models/create-accounting-config-data-dto-opening-balances-opening-balances.d.ts +65 -0
  32. package/dist/models/create-accounting-config-data-dto-opening-balances-opening-balances.js +38 -0
  33. package/dist/models/create-accounting-config-data-dto-opening-balances.d.ts +25 -0
  34. package/dist/models/create-accounting-config-data-dto-opening-balances.js +15 -0
  35. package/dist/models/create-accounting-config-data-dto.d.ts +45 -0
  36. package/dist/models/create-accounting-config-data-dto.js +15 -0
  37. package/dist/models/create-accounting-config-request-dto.d.ts +31 -0
  38. package/dist/models/create-accounting-config-request-dto.js +15 -0
  39. package/dist/models/create-accounting-config-response-class.d.ts +25 -0
  40. package/dist/models/create-accounting-config-response-class.js +15 -0
  41. package/dist/models/create-financial-account-request-dto.d.ts +36 -1
  42. package/dist/models/create-financial-account-request-dto.js +24 -2
  43. package/dist/models/create-number-range-request-dto.d.ts +4 -4
  44. package/dist/models/create-number-range-request-dto.js +4 -4
  45. package/dist/models/create-personal-account-request-dto.d.ts +10 -4
  46. package/dist/models/create-personal-account-request-dto.js +3 -3
  47. package/dist/models/financial-account-class.d.ts +20 -2
  48. package/dist/models/financial-account-class.js +1 -1
  49. package/dist/models/get-accounting-config-response-class.d.ts +25 -0
  50. package/dist/models/get-accounting-config-response-class.js +15 -0
  51. package/dist/models/index.d.ts +21 -0
  52. package/dist/models/index.js +21 -0
  53. package/dist/models/inline-object2.d.ts +24 -0
  54. package/dist/models/inline-object2.js +15 -0
  55. package/dist/models/list-accounting-configs-response-class.d.ts +43 -0
  56. package/dist/models/list-accounting-configs-response-class.js +15 -0
  57. package/dist/models/opening-balance-class.d.ts +65 -0
  58. package/dist/models/opening-balance-class.js +38 -0
  59. package/dist/models/opening-balances-class.d.ts +25 -0
  60. package/dist/models/opening-balances-class.js +15 -0
  61. package/dist/models/personal-account-class.d.ts +8 -2
  62. package/dist/models/personal-account-class.js +1 -1
  63. package/dist/models/update-chart-of-accounts-response-class.d.ts +25 -0
  64. package/dist/models/update-chart-of-accounts-response-class.js +15 -0
  65. package/dist/models/validate-accounting-config-request-dto.d.ts +25 -0
  66. package/dist/models/validate-accounting-config-request-dto.js +15 -0
  67. package/dist/models/validate-accounting-config-response-class.d.ts +30 -0
  68. package/dist/models/validate-accounting-config-response-class.js +15 -0
  69. package/models/accounting-config-class.ts +73 -0
  70. package/models/accounting-config-data-class.ts +51 -0
  71. package/models/accounting-configuration-class.ts +42 -0
  72. package/models/chart-of-accounts-config-class.ts +31 -0
  73. package/models/chart-of-accounts-item-class.ts +80 -0
  74. package/models/create-accounting-config-data-dto-accounting-configuration.ts +56 -0
  75. package/models/create-accounting-config-data-dto-chart-of-accounts-config-items.ts +68 -0
  76. package/models/create-accounting-config-data-dto-chart-of-accounts-config.ts +31 -0
  77. package/models/create-accounting-config-data-dto-opening-balances-opening-balances.ts +74 -0
  78. package/models/create-accounting-config-data-dto-opening-balances.ts +31 -0
  79. package/models/create-accounting-config-data-dto.ts +51 -0
  80. package/models/create-accounting-config-request-dto.ts +37 -0
  81. package/models/create-accounting-config-response-class.ts +31 -0
  82. package/models/create-financial-account-request-dto.ts +37 -1
  83. package/models/create-number-range-request-dto.ts +4 -4
  84. package/models/create-personal-account-request-dto.ts +10 -4
  85. package/models/financial-account-class.ts +20 -2
  86. package/models/get-accounting-config-response-class.ts +31 -0
  87. package/models/index.ts +21 -0
  88. package/models/inline-object2.ts +30 -0
  89. package/models/list-accounting-configs-response-class.ts +49 -0
  90. package/models/opening-balance-class.ts +74 -0
  91. package/models/opening-balances-class.ts +31 -0
  92. package/models/personal-account-class.ts +8 -2
  93. package/models/update-chart-of-accounts-response-class.ts +31 -0
  94. package/models/validate-accounting-config-request-dto.ts +31 -0
  95. package/models/validate-accounting-config-response-class.ts +36 -0
  96. package/package.json +2 -2
@@ -0,0 +1,1137 @@
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 { CreateAccountingConfigRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateAccountingConfigResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetAccountingConfigResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { InlineObject2 } from '../models';
31
+ // @ts-ignore
32
+ import { ListAccountingConfigsResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { UpdateChartOfAccountsResponseClass } from '../models';
35
+ // @ts-ignore
36
+ import { ValidateAccountingConfigRequestDto } from '../models';
37
+ // @ts-ignore
38
+ import { ValidateAccountingConfigResponseClass } from '../models';
39
+ /**
40
+ * AccountingConfigsApi - axios parameter creator
41
+ * @export
42
+ */
43
+ export const AccountingConfigsApiAxiosParamCreator = function (configuration?: Configuration) {
44
+ return {
45
+ /**
46
+ * This will create accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
47
+ * @summary Create the accounting config
48
+ * @param {CreateAccountingConfigRequestDto} createAccountingConfigRequestDto
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
+ createAccountingConfig: async (createAccountingConfigRequestDto: CreateAccountingConfigRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
54
+ // verify required parameter 'createAccountingConfigRequestDto' is not null or undefined
55
+ assertParamExists('createAccountingConfig', 'createAccountingConfigRequestDto', createAccountingConfigRequestDto)
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(createAccountingConfigRequestDto, localVarRequestOptions, configuration)
86
+
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ },
92
+ /**
93
+ * This will create accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
94
+ * @summary Create the accounting config 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
+ createAccountingConfigFromFile: async (file: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
101
+ // verify required parameter 'file' is not null or undefined
102
+ assertParamExists('createAccountingConfigFromFile', '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
+
133
+
134
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
135
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
136
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
137
+ localVarRequestOptions.data = localVarFormParams;
138
+
139
+ return {
140
+ url: toPathString(localVarUrlObj),
141
+ options: localVarRequestOptions,
142
+ };
143
+ },
144
+ /**
145
+ * This will delete accounting config. **Required Permissions** \"accounting-management.financial-accounts.delete\"
146
+ * @summary Delete the accounting config
147
+ * @param {string} code Unique identifier for the object.
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
+ deleteAccountingConfig: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
153
+ // verify required parameter 'code' is not null or undefined
154
+ assertParamExists('deleteAccountingConfig', 'code', code)
155
+ const localVarPath = `/accountingservice/v1/accountingconfigs/{code}`
156
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
157
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
158
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
159
+ let baseOptions;
160
+ let baseAccessToken;
161
+ if (configuration) {
162
+ baseOptions = configuration.baseOptions;
163
+ baseAccessToken = configuration.accessToken;
164
+ }
165
+
166
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
167
+ const localVarHeaderParameter = {} as any;
168
+ const localVarQueryParameter = {} as any;
169
+
170
+ // authentication bearer required
171
+ // http bearer authentication required
172
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
173
+
174
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
175
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
176
+ }
177
+
178
+
179
+
180
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
181
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
182
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
183
+
184
+ return {
185
+ url: toPathString(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ };
188
+ },
189
+ /**
190
+ * This will get accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
191
+ * @summary Retrieve the accounting config
192
+ * @param {string} code
193
+ * @param {string} expand
194
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ getAccountingConfig: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
199
+ // verify required parameter 'code' is not null or undefined
200
+ assertParamExists('getAccountingConfig', 'code', code)
201
+ // verify required parameter 'expand' is not null or undefined
202
+ assertParamExists('getAccountingConfig', 'expand', expand)
203
+ const localVarPath = `/accountingservice/v1/accountingconfigs/{code}`
204
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
205
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
206
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
207
+ let baseOptions;
208
+ let baseAccessToken;
209
+ if (configuration) {
210
+ baseOptions = configuration.baseOptions;
211
+ baseAccessToken = configuration.accessToken;
212
+ }
213
+
214
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
215
+ const localVarHeaderParameter = {} as any;
216
+ const localVarQueryParameter = {} as any;
217
+
218
+ // authentication bearer required
219
+ // http bearer authentication required
220
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
221
+
222
+ if (expand !== undefined) {
223
+ localVarQueryParameter['expand'] = expand;
224
+ }
225
+
226
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
228
+ }
229
+
230
+
231
+
232
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
233
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
234
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
235
+
236
+ return {
237
+ url: toPathString(localVarUrlObj),
238
+ options: localVarRequestOptions,
239
+ };
240
+ },
241
+ /**
242
+ * Retrieves a list of accountingconfigs. **Required Permissions** \"accounting-management.financial-accounts.view\"
243
+ * @summary List accounting configs
244
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
245
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
246
+ * @param {string} [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.
247
+ * @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: id, code, createdAt&lt;/i&gt;
248
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
249
+ * @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: createdAt&lt;/i&gt;
250
+ * @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;
251
+ * @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: id, code, createdAt&lt;/i&gt;
252
+ * @param {*} [options] Override http request option.
253
+ * @throws {RequiredError}
254
+ */
255
+ listAccountingConfigs: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
256
+ const localVarPath = `/accountingservice/v1/accountingconfigs`;
257
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
258
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
259
+ let baseOptions;
260
+ let baseAccessToken;
261
+ if (configuration) {
262
+ baseOptions = configuration.baseOptions;
263
+ baseAccessToken = configuration.accessToken;
264
+ }
265
+
266
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
267
+ const localVarHeaderParameter = {} as any;
268
+ const localVarQueryParameter = {} as any;
269
+
270
+ // authentication bearer required
271
+ // http bearer authentication required
272
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
273
+
274
+ if (pageSize !== undefined) {
275
+ localVarQueryParameter['pageSize'] = pageSize;
276
+ }
277
+
278
+ if (pageToken !== undefined) {
279
+ localVarQueryParameter['pageToken'] = pageToken;
280
+ }
281
+
282
+ if (filter !== undefined) {
283
+ localVarQueryParameter['filter'] = filter;
284
+ }
285
+
286
+ if (search !== undefined) {
287
+ localVarQueryParameter['search'] = search;
288
+ }
289
+
290
+ if (order !== undefined) {
291
+ localVarQueryParameter['order'] = order;
292
+ }
293
+
294
+ if (expand !== undefined) {
295
+ localVarQueryParameter['expand'] = expand;
296
+ }
297
+
298
+ if (filters !== undefined) {
299
+ localVarQueryParameter['filters'] = filters;
300
+ }
301
+
302
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
303
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
304
+ }
305
+
306
+
307
+
308
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
309
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
310
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
311
+
312
+ return {
313
+ url: toPathString(localVarUrlObj),
314
+ options: localVarRequestOptions,
315
+ };
316
+ },
317
+ /**
318
+ * This will update the chart of accounts. **Required Permissions** \"accounting-management.financial-accounts.update\"
319
+ * @summary Update the chart of accounts
320
+ * @param {string} code
321
+ * @param {InlineObject2} inlineObject2
322
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ updateChartOfAccounts: async (code: string, inlineObject2: InlineObject2, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
327
+ // verify required parameter 'code' is not null or undefined
328
+ assertParamExists('updateChartOfAccounts', 'code', code)
329
+ // verify required parameter 'inlineObject2' is not null or undefined
330
+ assertParamExists('updateChartOfAccounts', 'inlineObject2', inlineObject2)
331
+ const localVarPath = `/accountingservice/v1/accountingconfigs/{code}`
332
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
333
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
334
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
335
+ let baseOptions;
336
+ let baseAccessToken;
337
+ if (configuration) {
338
+ baseOptions = configuration.baseOptions;
339
+ baseAccessToken = configuration.accessToken;
340
+ }
341
+
342
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
343
+ const localVarHeaderParameter = {} as any;
344
+ const localVarQueryParameter = {} as any;
345
+
346
+ // authentication bearer required
347
+ // http bearer authentication required
348
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
349
+
350
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
351
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
352
+ }
353
+
354
+
355
+
356
+ localVarHeaderParameter['Content-Type'] = 'application/json';
357
+
358
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
359
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
360
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
361
+ localVarRequestOptions.data = serializeDataIfNeeded(inlineObject2, localVarRequestOptions, configuration)
362
+
363
+ return {
364
+ url: toPathString(localVarUrlObj),
365
+ options: localVarRequestOptions,
366
+ };
367
+ },
368
+ /**
369
+ * This will update the chart of accounts from a file. **Required Permissions** \"accounting-management.financial-accounts.update\"
370
+ * @summary Update the chart of accounts from file
371
+ * @param {string} code
372
+ * @param {any} file JSON or YAML file containing the chart of accounts config. Supported formats: .json, .yaml, .yml
373
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
374
+ * @param {*} [options] Override http request option.
375
+ * @throws {RequiredError}
376
+ */
377
+ updateChartOfAccountsFromFile: async (code: string, file: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
378
+ // verify required parameter 'code' is not null or undefined
379
+ assertParamExists('updateChartOfAccountsFromFile', 'code', code)
380
+ // verify required parameter 'file' is not null or undefined
381
+ assertParamExists('updateChartOfAccountsFromFile', 'file', file)
382
+ const localVarPath = `/accountingservice/v1/accountingconfigs/{code}/upload`
383
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
384
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
385
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
386
+ let baseOptions;
387
+ let baseAccessToken;
388
+ if (configuration) {
389
+ baseOptions = configuration.baseOptions;
390
+ baseAccessToken = configuration.accessToken;
391
+ }
392
+
393
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
394
+ const localVarHeaderParameter = {} as any;
395
+ const localVarQueryParameter = {} as any;
396
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
397
+
398
+ // authentication bearer required
399
+ // http bearer authentication required
400
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
401
+
402
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
403
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
404
+ }
405
+
406
+
407
+ if (file !== undefined) {
408
+ localVarFormParams.append('file', file as any);
409
+ }
410
+
411
+
412
+
413
+
414
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
415
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
416
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
417
+ localVarRequestOptions.data = localVarFormParams;
418
+
419
+ return {
420
+ url: toPathString(localVarUrlObj),
421
+ options: localVarRequestOptions,
422
+ };
423
+ },
424
+ /**
425
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
426
+ * @summary Create the validate accounting config
427
+ * @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
428
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
429
+ * @param {*} [options] Override http request option.
430
+ * @throws {RequiredError}
431
+ */
432
+ validateAccountingConfig: async (validateAccountingConfigRequestDto: ValidateAccountingConfigRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
433
+ // verify required parameter 'validateAccountingConfigRequestDto' is not null or undefined
434
+ assertParamExists('validateAccountingConfig', 'validateAccountingConfigRequestDto', validateAccountingConfigRequestDto)
435
+ const localVarPath = `/accountingservice/v1/accountingconfigs/validate`;
436
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
437
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
438
+ let baseOptions;
439
+ let baseAccessToken;
440
+ if (configuration) {
441
+ baseOptions = configuration.baseOptions;
442
+ baseAccessToken = configuration.accessToken;
443
+ }
444
+
445
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
446
+ const localVarHeaderParameter = {} as any;
447
+ const localVarQueryParameter = {} as any;
448
+
449
+ // authentication bearer required
450
+ // http bearer authentication required
451
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
452
+
453
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
454
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
455
+ }
456
+
457
+
458
+
459
+ localVarHeaderParameter['Content-Type'] = 'application/json';
460
+
461
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
462
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
463
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
464
+ localVarRequestOptions.data = serializeDataIfNeeded(validateAccountingConfigRequestDto, localVarRequestOptions, configuration)
465
+
466
+ return {
467
+ url: toPathString(localVarUrlObj),
468
+ options: localVarRequestOptions,
469
+ };
470
+ },
471
+ /**
472
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
473
+ * @summary Create the validate accounting config from file
474
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
475
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ */
479
+ validateAccountingConfigFromFile: async (file: any, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
480
+ // verify required parameter 'file' is not null or undefined
481
+ assertParamExists('validateAccountingConfigFromFile', 'file', file)
482
+ const localVarPath = `/accountingservice/v1/accountingconfigs/validate/upload`;
483
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
484
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
485
+ let baseOptions;
486
+ let baseAccessToken;
487
+ if (configuration) {
488
+ baseOptions = configuration.baseOptions;
489
+ baseAccessToken = configuration.accessToken;
490
+ }
491
+
492
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
493
+ const localVarHeaderParameter = {} as any;
494
+ const localVarQueryParameter = {} as any;
495
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
496
+
497
+ // authentication bearer required
498
+ // http bearer authentication required
499
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
500
+
501
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
502
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
503
+ }
504
+
505
+
506
+ if (file !== undefined) {
507
+ localVarFormParams.append('file', file as any);
508
+ }
509
+
510
+
511
+
512
+
513
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
514
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
515
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
516
+ localVarRequestOptions.data = localVarFormParams;
517
+
518
+ return {
519
+ url: toPathString(localVarUrlObj),
520
+ options: localVarRequestOptions,
521
+ };
522
+ },
523
+ }
524
+ };
525
+
526
+ /**
527
+ * AccountingConfigsApi - functional programming interface
528
+ * @export
529
+ */
530
+ export const AccountingConfigsApiFp = function(configuration?: Configuration) {
531
+ const localVarAxiosParamCreator = AccountingConfigsApiAxiosParamCreator(configuration)
532
+ return {
533
+ /**
534
+ * This will create accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
535
+ * @summary Create the accounting config
536
+ * @param {CreateAccountingConfigRequestDto} createAccountingConfigRequestDto
537
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
538
+ * @param {*} [options] Override http request option.
539
+ * @throws {RequiredError}
540
+ */
541
+ async createAccountingConfig(createAccountingConfigRequestDto: CreateAccountingConfigRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateAccountingConfigResponseClass>> {
542
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAccountingConfig(createAccountingConfigRequestDto, authorization, options);
543
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
544
+ },
545
+ /**
546
+ * This will create accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
547
+ * @summary Create the accounting config from file
548
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
549
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
550
+ * @param {*} [options] Override http request option.
551
+ * @throws {RequiredError}
552
+ */
553
+ async createAccountingConfigFromFile(file: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateAccountingConfigResponseClass>> {
554
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAccountingConfigFromFile(file, authorization, options);
555
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
556
+ },
557
+ /**
558
+ * This will delete accounting config. **Required Permissions** \"accounting-management.financial-accounts.delete\"
559
+ * @summary Delete the accounting config
560
+ * @param {string} code Unique identifier for the object.
561
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
562
+ * @param {*} [options] Override http request option.
563
+ * @throws {RequiredError}
564
+ */
565
+ async deleteAccountingConfig(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
566
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAccountingConfig(code, authorization, options);
567
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
568
+ },
569
+ /**
570
+ * This will get accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
571
+ * @summary Retrieve the accounting config
572
+ * @param {string} code
573
+ * @param {string} expand
574
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
575
+ * @param {*} [options] Override http request option.
576
+ * @throws {RequiredError}
577
+ */
578
+ async getAccountingConfig(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountingConfigResponseClass>> {
579
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountingConfig(code, expand, authorization, options);
580
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
581
+ },
582
+ /**
583
+ * Retrieves a list of accountingconfigs. **Required Permissions** \"accounting-management.financial-accounts.view\"
584
+ * @summary List accounting configs
585
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
586
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
587
+ * @param {string} [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.
588
+ * @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: id, code, createdAt&lt;/i&gt;
589
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
590
+ * @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: createdAt&lt;/i&gt;
591
+ * @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;
592
+ * @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: id, code, createdAt&lt;/i&gt;
593
+ * @param {*} [options] Override http request option.
594
+ * @throws {RequiredError}
595
+ */
596
+ async listAccountingConfigs(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAccountingConfigsResponseClass>> {
597
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountingConfigs(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
598
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
599
+ },
600
+ /**
601
+ * This will update the chart of accounts. **Required Permissions** \"accounting-management.financial-accounts.update\"
602
+ * @summary Update the chart of accounts
603
+ * @param {string} code
604
+ * @param {InlineObject2} inlineObject2
605
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ */
609
+ async updateChartOfAccounts(code: string, inlineObject2: InlineObject2, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateChartOfAccountsResponseClass>> {
610
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateChartOfAccounts(code, inlineObject2, authorization, options);
611
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
612
+ },
613
+ /**
614
+ * This will update the chart of accounts from a file. **Required Permissions** \"accounting-management.financial-accounts.update\"
615
+ * @summary Update the chart of accounts from file
616
+ * @param {string} code
617
+ * @param {any} file JSON or YAML file containing the chart of accounts config. Supported formats: .json, .yaml, .yml
618
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
619
+ * @param {*} [options] Override http request option.
620
+ * @throws {RequiredError}
621
+ */
622
+ async updateChartOfAccountsFromFile(code: string, file: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateChartOfAccountsResponseClass>> {
623
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateChartOfAccountsFromFile(code, file, authorization, options);
624
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
625
+ },
626
+ /**
627
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
628
+ * @summary Create the validate accounting config
629
+ * @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
630
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
631
+ * @param {*} [options] Override http request option.
632
+ * @throws {RequiredError}
633
+ */
634
+ async validateAccountingConfig(validateAccountingConfigRequestDto: ValidateAccountingConfigRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidateAccountingConfigResponseClass>> {
635
+ const localVarAxiosArgs = await localVarAxiosParamCreator.validateAccountingConfig(validateAccountingConfigRequestDto, authorization, options);
636
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
637
+ },
638
+ /**
639
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
640
+ * @summary Create the validate accounting config from file
641
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
642
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
643
+ * @param {*} [options] Override http request option.
644
+ * @throws {RequiredError}
645
+ */
646
+ async validateAccountingConfigFromFile(file: any, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidateAccountingConfigResponseClass>> {
647
+ const localVarAxiosArgs = await localVarAxiosParamCreator.validateAccountingConfigFromFile(file, authorization, options);
648
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
649
+ },
650
+ }
651
+ };
652
+
653
+ /**
654
+ * AccountingConfigsApi - factory interface
655
+ * @export
656
+ */
657
+ export const AccountingConfigsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
658
+ const localVarFp = AccountingConfigsApiFp(configuration)
659
+ return {
660
+ /**
661
+ * This will create accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
662
+ * @summary Create the accounting config
663
+ * @param {CreateAccountingConfigRequestDto} createAccountingConfigRequestDto
664
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
665
+ * @param {*} [options] Override http request option.
666
+ * @throws {RequiredError}
667
+ */
668
+ createAccountingConfig(createAccountingConfigRequestDto: CreateAccountingConfigRequestDto, authorization?: string, options?: any): AxiosPromise<CreateAccountingConfigResponseClass> {
669
+ return localVarFp.createAccountingConfig(createAccountingConfigRequestDto, authorization, options).then((request) => request(axios, basePath));
670
+ },
671
+ /**
672
+ * This will create accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
673
+ * @summary Create the accounting config from file
674
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
675
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ */
679
+ createAccountingConfigFromFile(file: any, authorization?: string, options?: any): AxiosPromise<CreateAccountingConfigResponseClass> {
680
+ return localVarFp.createAccountingConfigFromFile(file, authorization, options).then((request) => request(axios, basePath));
681
+ },
682
+ /**
683
+ * This will delete accounting config. **Required Permissions** \"accounting-management.financial-accounts.delete\"
684
+ * @summary Delete the accounting config
685
+ * @param {string} code Unique identifier for the object.
686
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
687
+ * @param {*} [options] Override http request option.
688
+ * @throws {RequiredError}
689
+ */
690
+ deleteAccountingConfig(code: string, authorization?: string, options?: any): AxiosPromise<void> {
691
+ return localVarFp.deleteAccountingConfig(code, authorization, options).then((request) => request(axios, basePath));
692
+ },
693
+ /**
694
+ * This will get accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
695
+ * @summary Retrieve the accounting config
696
+ * @param {string} code
697
+ * @param {string} expand
698
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
699
+ * @param {*} [options] Override http request option.
700
+ * @throws {RequiredError}
701
+ */
702
+ getAccountingConfig(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetAccountingConfigResponseClass> {
703
+ return localVarFp.getAccountingConfig(code, expand, authorization, options).then((request) => request(axios, basePath));
704
+ },
705
+ /**
706
+ * Retrieves a list of accountingconfigs. **Required Permissions** \"accounting-management.financial-accounts.view\"
707
+ * @summary List accounting configs
708
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
709
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
710
+ * @param {string} [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.
711
+ * @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: id, code, createdAt&lt;/i&gt;
712
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
713
+ * @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: createdAt&lt;/i&gt;
714
+ * @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;
715
+ * @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: id, code, createdAt&lt;/i&gt;
716
+ * @param {*} [options] Override http request option.
717
+ * @throws {RequiredError}
718
+ */
719
+ listAccountingConfigs(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListAccountingConfigsResponseClass> {
720
+ return localVarFp.listAccountingConfigs(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
721
+ },
722
+ /**
723
+ * This will update the chart of accounts. **Required Permissions** \"accounting-management.financial-accounts.update\"
724
+ * @summary Update the chart of accounts
725
+ * @param {string} code
726
+ * @param {InlineObject2} inlineObject2
727
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
728
+ * @param {*} [options] Override http request option.
729
+ * @throws {RequiredError}
730
+ */
731
+ updateChartOfAccounts(code: string, inlineObject2: InlineObject2, authorization?: string, options?: any): AxiosPromise<UpdateChartOfAccountsResponseClass> {
732
+ return localVarFp.updateChartOfAccounts(code, inlineObject2, authorization, options).then((request) => request(axios, basePath));
733
+ },
734
+ /**
735
+ * This will update the chart of accounts from a file. **Required Permissions** \"accounting-management.financial-accounts.update\"
736
+ * @summary Update the chart of accounts from file
737
+ * @param {string} code
738
+ * @param {any} file JSON or YAML file containing the chart of accounts config. Supported formats: .json, .yaml, .yml
739
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
740
+ * @param {*} [options] Override http request option.
741
+ * @throws {RequiredError}
742
+ */
743
+ updateChartOfAccountsFromFile(code: string, file: any, authorization?: string, options?: any): AxiosPromise<UpdateChartOfAccountsResponseClass> {
744
+ return localVarFp.updateChartOfAccountsFromFile(code, file, authorization, options).then((request) => request(axios, basePath));
745
+ },
746
+ /**
747
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
748
+ * @summary Create the validate accounting config
749
+ * @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
750
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
751
+ * @param {*} [options] Override http request option.
752
+ * @throws {RequiredError}
753
+ */
754
+ validateAccountingConfig(validateAccountingConfigRequestDto: ValidateAccountingConfigRequestDto, authorization?: string, options?: any): AxiosPromise<ValidateAccountingConfigResponseClass> {
755
+ return localVarFp.validateAccountingConfig(validateAccountingConfigRequestDto, authorization, options).then((request) => request(axios, basePath));
756
+ },
757
+ /**
758
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
759
+ * @summary Create the validate accounting config from file
760
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
761
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
762
+ * @param {*} [options] Override http request option.
763
+ * @throws {RequiredError}
764
+ */
765
+ validateAccountingConfigFromFile(file: any, authorization?: string, options?: any): AxiosPromise<ValidateAccountingConfigResponseClass> {
766
+ return localVarFp.validateAccountingConfigFromFile(file, authorization, options).then((request) => request(axios, basePath));
767
+ },
768
+ };
769
+ };
770
+
771
+ /**
772
+ * Request parameters for createAccountingConfig operation in AccountingConfigsApi.
773
+ * @export
774
+ * @interface AccountingConfigsApiCreateAccountingConfigRequest
775
+ */
776
+ export interface AccountingConfigsApiCreateAccountingConfigRequest {
777
+ /**
778
+ *
779
+ * @type {CreateAccountingConfigRequestDto}
780
+ * @memberof AccountingConfigsApiCreateAccountingConfig
781
+ */
782
+ readonly createAccountingConfigRequestDto: CreateAccountingConfigRequestDto
783
+
784
+ /**
785
+ * Bearer Token: provided by the login endpoint under the name accessToken.
786
+ * @type {string}
787
+ * @memberof AccountingConfigsApiCreateAccountingConfig
788
+ */
789
+ readonly authorization?: string
790
+ }
791
+
792
+ /**
793
+ * Request parameters for createAccountingConfigFromFile operation in AccountingConfigsApi.
794
+ * @export
795
+ * @interface AccountingConfigsApiCreateAccountingConfigFromFileRequest
796
+ */
797
+ export interface AccountingConfigsApiCreateAccountingConfigFromFileRequest {
798
+ /**
799
+ * JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
800
+ * @type {any}
801
+ * @memberof AccountingConfigsApiCreateAccountingConfigFromFile
802
+ */
803
+ readonly file: any
804
+
805
+ /**
806
+ * Bearer Token: provided by the login endpoint under the name accessToken.
807
+ * @type {string}
808
+ * @memberof AccountingConfigsApiCreateAccountingConfigFromFile
809
+ */
810
+ readonly authorization?: string
811
+ }
812
+
813
+ /**
814
+ * Request parameters for deleteAccountingConfig operation in AccountingConfigsApi.
815
+ * @export
816
+ * @interface AccountingConfigsApiDeleteAccountingConfigRequest
817
+ */
818
+ export interface AccountingConfigsApiDeleteAccountingConfigRequest {
819
+ /**
820
+ * Unique identifier for the object.
821
+ * @type {string}
822
+ * @memberof AccountingConfigsApiDeleteAccountingConfig
823
+ */
824
+ readonly code: string
825
+
826
+ /**
827
+ * Bearer Token: provided by the login endpoint under the name accessToken.
828
+ * @type {string}
829
+ * @memberof AccountingConfigsApiDeleteAccountingConfig
830
+ */
831
+ readonly authorization?: string
832
+ }
833
+
834
+ /**
835
+ * Request parameters for getAccountingConfig operation in AccountingConfigsApi.
836
+ * @export
837
+ * @interface AccountingConfigsApiGetAccountingConfigRequest
838
+ */
839
+ export interface AccountingConfigsApiGetAccountingConfigRequest {
840
+ /**
841
+ *
842
+ * @type {string}
843
+ * @memberof AccountingConfigsApiGetAccountingConfig
844
+ */
845
+ readonly code: string
846
+
847
+ /**
848
+ *
849
+ * @type {string}
850
+ * @memberof AccountingConfigsApiGetAccountingConfig
851
+ */
852
+ readonly expand: string
853
+
854
+ /**
855
+ * Bearer Token: provided by the login endpoint under the name accessToken.
856
+ * @type {string}
857
+ * @memberof AccountingConfigsApiGetAccountingConfig
858
+ */
859
+ readonly authorization?: string
860
+ }
861
+
862
+ /**
863
+ * Request parameters for listAccountingConfigs operation in AccountingConfigsApi.
864
+ * @export
865
+ * @interface AccountingConfigsApiListAccountingConfigsRequest
866
+ */
867
+ export interface AccountingConfigsApiListAccountingConfigsRequest {
868
+ /**
869
+ * Bearer Token: provided by the login endpoint under the name accessToken.
870
+ * @type {string}
871
+ * @memberof AccountingConfigsApiListAccountingConfigs
872
+ */
873
+ readonly authorization?: string
874
+
875
+ /**
876
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
877
+ * @type {number}
878
+ * @memberof AccountingConfigsApiListAccountingConfigs
879
+ */
880
+ readonly pageSize?: number
881
+
882
+ /**
883
+ * 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.
884
+ * @type {string}
885
+ * @memberof AccountingConfigsApiListAccountingConfigs
886
+ */
887
+ readonly pageToken?: string
888
+
889
+ /**
890
+ * 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: id, code, createdAt&lt;/i&gt;
891
+ * @type {string}
892
+ * @memberof AccountingConfigsApiListAccountingConfigs
893
+ */
894
+ readonly filter?: string
895
+
896
+ /**
897
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
898
+ * @type {string}
899
+ * @memberof AccountingConfigsApiListAccountingConfigs
900
+ */
901
+ readonly search?: string
902
+
903
+ /**
904
+ * 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: createdAt&lt;/i&gt;
905
+ * @type {string}
906
+ * @memberof AccountingConfigsApiListAccountingConfigs
907
+ */
908
+ readonly order?: string
909
+
910
+ /**
911
+ * 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;
912
+ * @type {string}
913
+ * @memberof AccountingConfigsApiListAccountingConfigs
914
+ */
915
+ readonly expand?: string
916
+
917
+ /**
918
+ * 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: id, code, createdAt&lt;/i&gt;
919
+ * @type {string}
920
+ * @memberof AccountingConfigsApiListAccountingConfigs
921
+ */
922
+ readonly filters?: string
923
+ }
924
+
925
+ /**
926
+ * Request parameters for updateChartOfAccounts operation in AccountingConfigsApi.
927
+ * @export
928
+ * @interface AccountingConfigsApiUpdateChartOfAccountsRequest
929
+ */
930
+ export interface AccountingConfigsApiUpdateChartOfAccountsRequest {
931
+ /**
932
+ *
933
+ * @type {string}
934
+ * @memberof AccountingConfigsApiUpdateChartOfAccounts
935
+ */
936
+ readonly code: string
937
+
938
+ /**
939
+ *
940
+ * @type {InlineObject2}
941
+ * @memberof AccountingConfigsApiUpdateChartOfAccounts
942
+ */
943
+ readonly inlineObject2: InlineObject2
944
+
945
+ /**
946
+ * Bearer Token: provided by the login endpoint under the name accessToken.
947
+ * @type {string}
948
+ * @memberof AccountingConfigsApiUpdateChartOfAccounts
949
+ */
950
+ readonly authorization?: string
951
+ }
952
+
953
+ /**
954
+ * Request parameters for updateChartOfAccountsFromFile operation in AccountingConfigsApi.
955
+ * @export
956
+ * @interface AccountingConfigsApiUpdateChartOfAccountsFromFileRequest
957
+ */
958
+ export interface AccountingConfigsApiUpdateChartOfAccountsFromFileRequest {
959
+ /**
960
+ *
961
+ * @type {string}
962
+ * @memberof AccountingConfigsApiUpdateChartOfAccountsFromFile
963
+ */
964
+ readonly code: string
965
+
966
+ /**
967
+ * JSON or YAML file containing the chart of accounts config. Supported formats: .json, .yaml, .yml
968
+ * @type {any}
969
+ * @memberof AccountingConfigsApiUpdateChartOfAccountsFromFile
970
+ */
971
+ readonly file: any
972
+
973
+ /**
974
+ * Bearer Token: provided by the login endpoint under the name accessToken.
975
+ * @type {string}
976
+ * @memberof AccountingConfigsApiUpdateChartOfAccountsFromFile
977
+ */
978
+ readonly authorization?: string
979
+ }
980
+
981
+ /**
982
+ * Request parameters for validateAccountingConfig operation in AccountingConfigsApi.
983
+ * @export
984
+ * @interface AccountingConfigsApiValidateAccountingConfigRequest
985
+ */
986
+ export interface AccountingConfigsApiValidateAccountingConfigRequest {
987
+ /**
988
+ *
989
+ * @type {ValidateAccountingConfigRequestDto}
990
+ * @memberof AccountingConfigsApiValidateAccountingConfig
991
+ */
992
+ readonly validateAccountingConfigRequestDto: ValidateAccountingConfigRequestDto
993
+
994
+ /**
995
+ * Bearer Token: provided by the login endpoint under the name accessToken.
996
+ * @type {string}
997
+ * @memberof AccountingConfigsApiValidateAccountingConfig
998
+ */
999
+ readonly authorization?: string
1000
+ }
1001
+
1002
+ /**
1003
+ * Request parameters for validateAccountingConfigFromFile operation in AccountingConfigsApi.
1004
+ * @export
1005
+ * @interface AccountingConfigsApiValidateAccountingConfigFromFileRequest
1006
+ */
1007
+ export interface AccountingConfigsApiValidateAccountingConfigFromFileRequest {
1008
+ /**
1009
+ * JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
1010
+ * @type {any}
1011
+ * @memberof AccountingConfigsApiValidateAccountingConfigFromFile
1012
+ */
1013
+ readonly file: any
1014
+
1015
+ /**
1016
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1017
+ * @type {string}
1018
+ * @memberof AccountingConfigsApiValidateAccountingConfigFromFile
1019
+ */
1020
+ readonly authorization?: string
1021
+ }
1022
+
1023
+ /**
1024
+ * AccountingConfigsApi - object-oriented interface
1025
+ * @export
1026
+ * @class AccountingConfigsApi
1027
+ * @extends {BaseAPI}
1028
+ */
1029
+ export class AccountingConfigsApi extends BaseAPI {
1030
+ /**
1031
+ * This will create accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
1032
+ * @summary Create the accounting config
1033
+ * @param {AccountingConfigsApiCreateAccountingConfigRequest} requestParameters Request parameters.
1034
+ * @param {*} [options] Override http request option.
1035
+ * @throws {RequiredError}
1036
+ * @memberof AccountingConfigsApi
1037
+ */
1038
+ public createAccountingConfig(requestParameters: AccountingConfigsApiCreateAccountingConfigRequest, options?: AxiosRequestConfig) {
1039
+ return AccountingConfigsApiFp(this.configuration).createAccountingConfig(requestParameters.createAccountingConfigRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1040
+ }
1041
+
1042
+ /**
1043
+ * This will create accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
1044
+ * @summary Create the accounting config from file
1045
+ * @param {AccountingConfigsApiCreateAccountingConfigFromFileRequest} requestParameters Request parameters.
1046
+ * @param {*} [options] Override http request option.
1047
+ * @throws {RequiredError}
1048
+ * @memberof AccountingConfigsApi
1049
+ */
1050
+ public createAccountingConfigFromFile(requestParameters: AccountingConfigsApiCreateAccountingConfigFromFileRequest, options?: AxiosRequestConfig) {
1051
+ return AccountingConfigsApiFp(this.configuration).createAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1052
+ }
1053
+
1054
+ /**
1055
+ * This will delete accounting config. **Required Permissions** \"accounting-management.financial-accounts.delete\"
1056
+ * @summary Delete the accounting config
1057
+ * @param {AccountingConfigsApiDeleteAccountingConfigRequest} requestParameters Request parameters.
1058
+ * @param {*} [options] Override http request option.
1059
+ * @throws {RequiredError}
1060
+ * @memberof AccountingConfigsApi
1061
+ */
1062
+ public deleteAccountingConfig(requestParameters: AccountingConfigsApiDeleteAccountingConfigRequest, options?: AxiosRequestConfig) {
1063
+ return AccountingConfigsApiFp(this.configuration).deleteAccountingConfig(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1064
+ }
1065
+
1066
+ /**
1067
+ * This will get accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
1068
+ * @summary Retrieve the accounting config
1069
+ * @param {AccountingConfigsApiGetAccountingConfigRequest} requestParameters Request parameters.
1070
+ * @param {*} [options] Override http request option.
1071
+ * @throws {RequiredError}
1072
+ * @memberof AccountingConfigsApi
1073
+ */
1074
+ public getAccountingConfig(requestParameters: AccountingConfigsApiGetAccountingConfigRequest, options?: AxiosRequestConfig) {
1075
+ return AccountingConfigsApiFp(this.configuration).getAccountingConfig(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1076
+ }
1077
+
1078
+ /**
1079
+ * Retrieves a list of accountingconfigs. **Required Permissions** \"accounting-management.financial-accounts.view\"
1080
+ * @summary List accounting configs
1081
+ * @param {AccountingConfigsApiListAccountingConfigsRequest} requestParameters Request parameters.
1082
+ * @param {*} [options] Override http request option.
1083
+ * @throws {RequiredError}
1084
+ * @memberof AccountingConfigsApi
1085
+ */
1086
+ public listAccountingConfigs(requestParameters: AccountingConfigsApiListAccountingConfigsRequest = {}, options?: AxiosRequestConfig) {
1087
+ return AccountingConfigsApiFp(this.configuration).listAccountingConfigs(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
1088
+ }
1089
+
1090
+ /**
1091
+ * This will update the chart of accounts. **Required Permissions** \"accounting-management.financial-accounts.update\"
1092
+ * @summary Update the chart of accounts
1093
+ * @param {AccountingConfigsApiUpdateChartOfAccountsRequest} requestParameters Request parameters.
1094
+ * @param {*} [options] Override http request option.
1095
+ * @throws {RequiredError}
1096
+ * @memberof AccountingConfigsApi
1097
+ */
1098
+ public updateChartOfAccounts(requestParameters: AccountingConfigsApiUpdateChartOfAccountsRequest, options?: AxiosRequestConfig) {
1099
+ return AccountingConfigsApiFp(this.configuration).updateChartOfAccounts(requestParameters.code, requestParameters.inlineObject2, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1100
+ }
1101
+
1102
+ /**
1103
+ * This will update the chart of accounts from a file. **Required Permissions** \"accounting-management.financial-accounts.update\"
1104
+ * @summary Update the chart of accounts from file
1105
+ * @param {AccountingConfigsApiUpdateChartOfAccountsFromFileRequest} requestParameters Request parameters.
1106
+ * @param {*} [options] Override http request option.
1107
+ * @throws {RequiredError}
1108
+ * @memberof AccountingConfigsApi
1109
+ */
1110
+ public updateChartOfAccountsFromFile(requestParameters: AccountingConfigsApiUpdateChartOfAccountsFromFileRequest, options?: AxiosRequestConfig) {
1111
+ return AccountingConfigsApiFp(this.configuration).updateChartOfAccountsFromFile(requestParameters.code, requestParameters.file, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1112
+ }
1113
+
1114
+ /**
1115
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
1116
+ * @summary Create the validate accounting config
1117
+ * @param {AccountingConfigsApiValidateAccountingConfigRequest} requestParameters Request parameters.
1118
+ * @param {*} [options] Override http request option.
1119
+ * @throws {RequiredError}
1120
+ * @memberof AccountingConfigsApi
1121
+ */
1122
+ public validateAccountingConfig(requestParameters: AccountingConfigsApiValidateAccountingConfigRequest, options?: AxiosRequestConfig) {
1123
+ return AccountingConfigsApiFp(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1124
+ }
1125
+
1126
+ /**
1127
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
1128
+ * @summary Create the validate accounting config from file
1129
+ * @param {AccountingConfigsApiValidateAccountingConfigFromFileRequest} requestParameters Request parameters.
1130
+ * @param {*} [options] Override http request option.
1131
+ * @throws {RequiredError}
1132
+ * @memberof AccountingConfigsApi
1133
+ */
1134
+ public validateAccountingConfigFromFile(requestParameters: AccountingConfigsApiValidateAccountingConfigFromFileRequest, options?: AxiosRequestConfig) {
1135
+ return AccountingConfigsApiFp(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1136
+ }
1137
+ }