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