@emilgroup/accounting-sdk-node 1.27.1-beta.16 → 1.27.1-beta.19

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