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