@emilgroup/accounting-sdk-node 1.32.0 → 1.32.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +15 -0
- package/README.md +2 -2
- package/api/accounting-configs-api.ts +762 -0
- package/api/financial-accounts-api.ts +12 -12
- package/api.ts +2 -0
- package/dist/api/accounting-configs-api.d.ts +404 -0
- package/dist/api/accounting-configs-api.js +776 -0
- package/dist/api/financial-accounts-api.d.ts +12 -12
- package/dist/api/financial-accounts-api.js +9 -9
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/models/account-mapping-class.d.ts +71 -0
- package/dist/models/account-mapping-class.js +38 -0
- package/dist/models/accounting-category-class.d.ts +45 -0
- package/dist/models/accounting-category-class.js +24 -0
- package/dist/models/accounting-config-class.d.ts +67 -0
- package/dist/models/accounting-config-class.js +15 -0
- package/dist/models/accounting-config-data-class.d.ts +38 -0
- package/dist/models/accounting-config-data-class.js +15 -0
- package/dist/models/accounting-config-data-dto-accounting-configuration.d.ts +46 -0
- package/dist/models/accounting-config-data-dto-accounting-configuration.js +24 -0
- package/dist/models/accounting-config-data-dto-default-account-mappings.d.ts +71 -0
- package/dist/models/accounting-config-data-dto-default-account-mappings.js +38 -0
- package/dist/models/accounting-config-data-dto.d.ts +38 -0
- package/dist/models/accounting-config-data-dto.js +15 -0
- package/dist/models/accounting-configuration-class.d.ts +36 -0
- package/dist/models/accounting-configuration-class.js +15 -0
- package/dist/models/create-and-enable-subledger-request-dto.d.ts +25 -0
- package/dist/models/create-and-enable-subledger-request-dto.js +15 -0
- package/dist/models/create-and-enable-subledger-response-class.d.ts +25 -0
- package/dist/models/create-and-enable-subledger-response-class.js +15 -0
- package/dist/models/create-booking-entry-request-dto.d.ts +4 -2
- package/dist/models/create-financial-account-request-dto.d.ts +40 -3
- package/dist/models/create-financial-account-request-dto.js +24 -2
- package/dist/models/create-number-range-request-dto.d.ts +4 -4
- package/dist/models/create-number-range-request-dto.js +4 -4
- package/dist/models/create-personal-account-request-dto.d.ts +14 -6
- package/dist/models/create-personal-account-request-dto.js +3 -3
- package/dist/models/export-accounting-config-response-class.d.ts +25 -0
- package/dist/models/export-accounting-config-response-class.js +15 -0
- package/dist/models/financial-account-class.d.ts +20 -2
- package/dist/models/financial-account-class.js +1 -1
- package/dist/models/financial-transaction-data-dto.d.ts +4 -2
- package/dist/models/get-accounting-categories-response-class.d.ts +25 -0
- package/dist/models/get-accounting-categories-response-class.js +15 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/index.js +14 -0
- package/dist/models/personal-account-class.d.ts +8 -2
- package/dist/models/personal-account-class.js +1 -1
- package/dist/models/validate-accounting-config-request-dto.d.ts +25 -0
- package/dist/models/validate-accounting-config-request-dto.js +15 -0
- package/dist/models/validate-accounting-config-response-class.d.ts +30 -0
- package/dist/models/validate-accounting-config-response-class.js +15 -0
- package/models/account-mapping-class.ts +80 -0
- package/models/accounting-category-class.ts +54 -0
- package/models/accounting-config-class.ts +73 -0
- package/models/accounting-config-data-class.ts +44 -0
- package/models/accounting-config-data-dto-accounting-configuration.ts +56 -0
- package/models/accounting-config-data-dto-default-account-mappings.ts +80 -0
- package/models/accounting-config-data-dto.ts +44 -0
- package/models/accounting-configuration-class.ts +42 -0
- package/models/create-and-enable-subledger-request-dto.ts +31 -0
- package/models/create-and-enable-subledger-response-class.ts +31 -0
- package/models/create-booking-entry-request-dto.ts +2 -2
- package/models/create-financial-account-request-dto.ts +39 -3
- package/models/create-number-range-request-dto.ts +4 -4
- package/models/create-personal-account-request-dto.ts +12 -6
- package/models/export-accounting-config-response-class.ts +31 -0
- package/models/financial-account-class.ts +20 -2
- package/models/financial-transaction-data-dto.ts +2 -2
- package/models/get-accounting-categories-response-class.ts +31 -0
- package/models/index.ts +14 -0
- package/models/personal-account-class.ts +8 -2
- package/models/validate-accounting-config-request-dto.ts +31 -0
- package/models/validate-accounting-config-response-class.ts +36 -0
- package/package.json +1 -1
|
@@ -0,0 +1,776 @@
|
|
|
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 and enable the subledger, using an accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
101
|
+
* @summary Create the create and enable subledger
|
|
102
|
+
* @param {CreateAndEnableSubledgerRequestDto} createAndEnableSubledgerRequestDto
|
|
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
|
+
createAndEnableSubledger: function (createAndEnableSubledgerRequestDto, 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 'createAndEnableSubledgerRequestDto' is not null or undefined
|
|
115
|
+
(0, common_1.assertParamExists)('createAndEnableSubledger', 'createAndEnableSubledgerRequestDto', createAndEnableSubledgerRequestDto);
|
|
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)(createAndEnableSubledgerRequestDto, 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 and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
150
|
+
* @summary Create the create and enable subledger 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
|
+
createAndEnableSubledgerFromFile: 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)('createAndEnableSubledgerFromFile', '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 export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
203
|
+
* @summary Retrieve the export accounting config
|
|
204
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
205
|
+
* @param {*} [options] Override http request option.
|
|
206
|
+
* @throws {RequiredError}
|
|
207
|
+
*/
|
|
208
|
+
exportAccountingConfig: function (authorization, options) {
|
|
209
|
+
if (options === void 0) { options = {}; }
|
|
210
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
211
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
212
|
+
return __generator(this, function (_a) {
|
|
213
|
+
switch (_a.label) {
|
|
214
|
+
case 0:
|
|
215
|
+
localVarPath = "/accountingservice/v1/accountingconfigs";
|
|
216
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
217
|
+
if (configuration) {
|
|
218
|
+
baseOptions = configuration.baseOptions;
|
|
219
|
+
baseAccessToken = configuration.accessToken;
|
|
220
|
+
}
|
|
221
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
222
|
+
localVarHeaderParameter = {};
|
|
223
|
+
localVarQueryParameter = {};
|
|
224
|
+
// authentication bearer required
|
|
225
|
+
// http bearer authentication required
|
|
226
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
227
|
+
case 1:
|
|
228
|
+
// authentication bearer required
|
|
229
|
+
// http bearer authentication required
|
|
230
|
+
_a.sent();
|
|
231
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
232
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
233
|
+
}
|
|
234
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
235
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
236
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
237
|
+
return [2 /*return*/, {
|
|
238
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
239
|
+
options: localVarRequestOptions,
|
|
240
|
+
}];
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
},
|
|
245
|
+
/**
|
|
246
|
+
* This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
247
|
+
* @summary Retrieve the accounting categories
|
|
248
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
249
|
+
* @param {*} [options] Override http request option.
|
|
250
|
+
* @throws {RequiredError}
|
|
251
|
+
*/
|
|
252
|
+
getAccountingCategories: function (authorization, options) {
|
|
253
|
+
if (options === void 0) { options = {}; }
|
|
254
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
255
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
256
|
+
return __generator(this, function (_a) {
|
|
257
|
+
switch (_a.label) {
|
|
258
|
+
case 0:
|
|
259
|
+
localVarPath = "/accountingservice/v1/accountingconfigs/categories";
|
|
260
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
261
|
+
if (configuration) {
|
|
262
|
+
baseOptions = configuration.baseOptions;
|
|
263
|
+
baseAccessToken = configuration.accessToken;
|
|
264
|
+
}
|
|
265
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
266
|
+
localVarHeaderParameter = {};
|
|
267
|
+
localVarQueryParameter = {};
|
|
268
|
+
// authentication bearer required
|
|
269
|
+
// http bearer authentication required
|
|
270
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
271
|
+
case 1:
|
|
272
|
+
// authentication bearer required
|
|
273
|
+
// http bearer authentication required
|
|
274
|
+
_a.sent();
|
|
275
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
276
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
277
|
+
}
|
|
278
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
279
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
280
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
281
|
+
return [2 /*return*/, {
|
|
282
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
283
|
+
options: localVarRequestOptions,
|
|
284
|
+
}];
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
},
|
|
289
|
+
/**
|
|
290
|
+
* This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
|
|
291
|
+
* @summary Delete the reset subledger
|
|
292
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
293
|
+
* @param {*} [options] Override http request option.
|
|
294
|
+
* @throws {RequiredError}
|
|
295
|
+
*/
|
|
296
|
+
resetSubledger: function (authorization, options) {
|
|
297
|
+
if (options === void 0) { options = {}; }
|
|
298
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
299
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
300
|
+
return __generator(this, function (_a) {
|
|
301
|
+
switch (_a.label) {
|
|
302
|
+
case 0:
|
|
303
|
+
localVarPath = "/accountingservice/v1/accountingconfigs";
|
|
304
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
305
|
+
if (configuration) {
|
|
306
|
+
baseOptions = configuration.baseOptions;
|
|
307
|
+
baseAccessToken = configuration.accessToken;
|
|
308
|
+
}
|
|
309
|
+
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
310
|
+
localVarHeaderParameter = {};
|
|
311
|
+
localVarQueryParameter = {};
|
|
312
|
+
// authentication bearer required
|
|
313
|
+
// http bearer authentication required
|
|
314
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
315
|
+
case 1:
|
|
316
|
+
// authentication bearer required
|
|
317
|
+
// http bearer authentication required
|
|
318
|
+
_a.sent();
|
|
319
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
320
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
321
|
+
}
|
|
322
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
323
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
324
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
325
|
+
return [2 /*return*/, {
|
|
326
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
327
|
+
options: localVarRequestOptions,
|
|
328
|
+
}];
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
},
|
|
333
|
+
/**
|
|
334
|
+
* This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
335
|
+
* @summary Create the validate accounting config
|
|
336
|
+
* @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
|
|
337
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
338
|
+
* @param {*} [options] Override http request option.
|
|
339
|
+
* @throws {RequiredError}
|
|
340
|
+
*/
|
|
341
|
+
validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
|
|
342
|
+
if (options === void 0) { options = {}; }
|
|
343
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
344
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
345
|
+
return __generator(this, function (_a) {
|
|
346
|
+
switch (_a.label) {
|
|
347
|
+
case 0:
|
|
348
|
+
// verify required parameter 'validateAccountingConfigRequestDto' is not null or undefined
|
|
349
|
+
(0, common_1.assertParamExists)('validateAccountingConfig', 'validateAccountingConfigRequestDto', validateAccountingConfigRequestDto);
|
|
350
|
+
localVarPath = "/accountingservice/v1/accountingconfigs/validate";
|
|
351
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
352
|
+
if (configuration) {
|
|
353
|
+
baseOptions = configuration.baseOptions;
|
|
354
|
+
baseAccessToken = configuration.accessToken;
|
|
355
|
+
}
|
|
356
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
357
|
+
localVarHeaderParameter = {};
|
|
358
|
+
localVarQueryParameter = {};
|
|
359
|
+
// authentication bearer required
|
|
360
|
+
// http bearer authentication required
|
|
361
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
362
|
+
case 1:
|
|
363
|
+
// authentication bearer required
|
|
364
|
+
// http bearer authentication required
|
|
365
|
+
_a.sent();
|
|
366
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
367
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
368
|
+
}
|
|
369
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
370
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
371
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
372
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
373
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(validateAccountingConfigRequestDto, localVarRequestOptions, configuration);
|
|
374
|
+
return [2 /*return*/, {
|
|
375
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
376
|
+
options: localVarRequestOptions,
|
|
377
|
+
}];
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
},
|
|
382
|
+
/**
|
|
383
|
+
* This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
384
|
+
* @summary Create the validate accounting config from file
|
|
385
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
386
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
387
|
+
* @param {*} [options] Override http request option.
|
|
388
|
+
* @throws {RequiredError}
|
|
389
|
+
*/
|
|
390
|
+
validateAccountingConfigFromFile: function (file, authorization, options) {
|
|
391
|
+
if (options === void 0) { options = {}; }
|
|
392
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
393
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
|
|
394
|
+
return __generator(this, function (_a) {
|
|
395
|
+
switch (_a.label) {
|
|
396
|
+
case 0:
|
|
397
|
+
// verify required parameter 'file' is not null or undefined
|
|
398
|
+
(0, common_1.assertParamExists)('validateAccountingConfigFromFile', 'file', file);
|
|
399
|
+
localVarPath = "/accountingservice/v1/accountingconfigs/validate/upload";
|
|
400
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
401
|
+
if (configuration) {
|
|
402
|
+
baseOptions = configuration.baseOptions;
|
|
403
|
+
baseAccessToken = configuration.accessToken;
|
|
404
|
+
}
|
|
405
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
406
|
+
localVarHeaderParameter = {};
|
|
407
|
+
localVarQueryParameter = {};
|
|
408
|
+
localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
409
|
+
// authentication bearer required
|
|
410
|
+
// http bearer authentication required
|
|
411
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
412
|
+
case 1:
|
|
413
|
+
// authentication bearer required
|
|
414
|
+
// http bearer authentication required
|
|
415
|
+
_a.sent();
|
|
416
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
417
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
418
|
+
}
|
|
419
|
+
if (file !== undefined) {
|
|
420
|
+
localVarFormParams.append('file', file);
|
|
421
|
+
}
|
|
422
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data; boundary=' + localVarFormParams.getBoundary();
|
|
423
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
424
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
425
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
426
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
427
|
+
return [2 /*return*/, {
|
|
428
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
429
|
+
options: localVarRequestOptions,
|
|
430
|
+
}];
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
},
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
exports.AccountingConfigsApiAxiosParamCreator = AccountingConfigsApiAxiosParamCreator;
|
|
438
|
+
/**
|
|
439
|
+
* AccountingConfigsApi - functional programming interface
|
|
440
|
+
* @export
|
|
441
|
+
*/
|
|
442
|
+
var AccountingConfigsApiFp = function (configuration) {
|
|
443
|
+
var localVarAxiosParamCreator = (0, exports.AccountingConfigsApiAxiosParamCreator)(configuration);
|
|
444
|
+
return {
|
|
445
|
+
/**
|
|
446
|
+
* This will create and enable the subledger, using an accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
447
|
+
* @summary Create the create and enable subledger
|
|
448
|
+
* @param {CreateAndEnableSubledgerRequestDto} createAndEnableSubledgerRequestDto
|
|
449
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
450
|
+
* @param {*} [options] Override http request option.
|
|
451
|
+
* @throws {RequiredError}
|
|
452
|
+
*/
|
|
453
|
+
createAndEnableSubledger: function (createAndEnableSubledgerRequestDto, authorization, options) {
|
|
454
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
455
|
+
var localVarAxiosArgs;
|
|
456
|
+
return __generator(this, function (_a) {
|
|
457
|
+
switch (_a.label) {
|
|
458
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAndEnableSubledger(createAndEnableSubledgerRequestDto, authorization, options)];
|
|
459
|
+
case 1:
|
|
460
|
+
localVarAxiosArgs = _a.sent();
|
|
461
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
},
|
|
466
|
+
/**
|
|
467
|
+
* This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
468
|
+
* @summary Create the create and enable subledger from file
|
|
469
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
470
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
471
|
+
* @param {*} [options] Override http request option.
|
|
472
|
+
* @throws {RequiredError}
|
|
473
|
+
*/
|
|
474
|
+
createAndEnableSubledgerFromFile: function (file, authorization, options) {
|
|
475
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
476
|
+
var localVarAxiosArgs;
|
|
477
|
+
return __generator(this, function (_a) {
|
|
478
|
+
switch (_a.label) {
|
|
479
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAndEnableSubledgerFromFile(file, authorization, options)];
|
|
480
|
+
case 1:
|
|
481
|
+
localVarAxiosArgs = _a.sent();
|
|
482
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
});
|
|
486
|
+
},
|
|
487
|
+
/**
|
|
488
|
+
* This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
489
|
+
* @summary Retrieve the export accounting config
|
|
490
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
491
|
+
* @param {*} [options] Override http request option.
|
|
492
|
+
* @throws {RequiredError}
|
|
493
|
+
*/
|
|
494
|
+
exportAccountingConfig: function (authorization, options) {
|
|
495
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
496
|
+
var localVarAxiosArgs;
|
|
497
|
+
return __generator(this, function (_a) {
|
|
498
|
+
switch (_a.label) {
|
|
499
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.exportAccountingConfig(authorization, options)];
|
|
500
|
+
case 1:
|
|
501
|
+
localVarAxiosArgs = _a.sent();
|
|
502
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
},
|
|
507
|
+
/**
|
|
508
|
+
* This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
509
|
+
* @summary Retrieve the accounting categories
|
|
510
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
511
|
+
* @param {*} [options] Override http request option.
|
|
512
|
+
* @throws {RequiredError}
|
|
513
|
+
*/
|
|
514
|
+
getAccountingCategories: function (authorization, options) {
|
|
515
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
516
|
+
var localVarAxiosArgs;
|
|
517
|
+
return __generator(this, function (_a) {
|
|
518
|
+
switch (_a.label) {
|
|
519
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAccountingCategories(authorization, options)];
|
|
520
|
+
case 1:
|
|
521
|
+
localVarAxiosArgs = _a.sent();
|
|
522
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
},
|
|
527
|
+
/**
|
|
528
|
+
* This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
|
|
529
|
+
* @summary Delete the reset subledger
|
|
530
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
531
|
+
* @param {*} [options] Override http request option.
|
|
532
|
+
* @throws {RequiredError}
|
|
533
|
+
*/
|
|
534
|
+
resetSubledger: function (authorization, options) {
|
|
535
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
536
|
+
var localVarAxiosArgs;
|
|
537
|
+
return __generator(this, function (_a) {
|
|
538
|
+
switch (_a.label) {
|
|
539
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.resetSubledger(authorization, options)];
|
|
540
|
+
case 1:
|
|
541
|
+
localVarAxiosArgs = _a.sent();
|
|
542
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
});
|
|
546
|
+
},
|
|
547
|
+
/**
|
|
548
|
+
* This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
549
|
+
* @summary Create the validate accounting config
|
|
550
|
+
* @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
|
|
551
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
552
|
+
* @param {*} [options] Override http request option.
|
|
553
|
+
* @throws {RequiredError}
|
|
554
|
+
*/
|
|
555
|
+
validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
|
|
556
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
557
|
+
var localVarAxiosArgs;
|
|
558
|
+
return __generator(this, function (_a) {
|
|
559
|
+
switch (_a.label) {
|
|
560
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.validateAccountingConfig(validateAccountingConfigRequestDto, authorization, options)];
|
|
561
|
+
case 1:
|
|
562
|
+
localVarAxiosArgs = _a.sent();
|
|
563
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
});
|
|
567
|
+
},
|
|
568
|
+
/**
|
|
569
|
+
* This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
570
|
+
* @summary Create the validate accounting config from file
|
|
571
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
572
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
573
|
+
* @param {*} [options] Override http request option.
|
|
574
|
+
* @throws {RequiredError}
|
|
575
|
+
*/
|
|
576
|
+
validateAccountingConfigFromFile: function (file, authorization, options) {
|
|
577
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
578
|
+
var localVarAxiosArgs;
|
|
579
|
+
return __generator(this, function (_a) {
|
|
580
|
+
switch (_a.label) {
|
|
581
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.validateAccountingConfigFromFile(file, authorization, options)];
|
|
582
|
+
case 1:
|
|
583
|
+
localVarAxiosArgs = _a.sent();
|
|
584
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
});
|
|
588
|
+
},
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
exports.AccountingConfigsApiFp = AccountingConfigsApiFp;
|
|
592
|
+
/**
|
|
593
|
+
* AccountingConfigsApi - factory interface
|
|
594
|
+
* @export
|
|
595
|
+
*/
|
|
596
|
+
var AccountingConfigsApiFactory = function (configuration, basePath, axios) {
|
|
597
|
+
var localVarFp = (0, exports.AccountingConfigsApiFp)(configuration);
|
|
598
|
+
return {
|
|
599
|
+
/**
|
|
600
|
+
* This will create and enable the subledger, using an accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
601
|
+
* @summary Create the create and enable subledger
|
|
602
|
+
* @param {CreateAndEnableSubledgerRequestDto} createAndEnableSubledgerRequestDto
|
|
603
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
604
|
+
* @param {*} [options] Override http request option.
|
|
605
|
+
* @throws {RequiredError}
|
|
606
|
+
*/
|
|
607
|
+
createAndEnableSubledger: function (createAndEnableSubledgerRequestDto, authorization, options) {
|
|
608
|
+
return localVarFp.createAndEnableSubledger(createAndEnableSubledgerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
609
|
+
},
|
|
610
|
+
/**
|
|
611
|
+
* This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
612
|
+
* @summary Create the create and enable subledger from file
|
|
613
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
614
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
615
|
+
* @param {*} [options] Override http request option.
|
|
616
|
+
* @throws {RequiredError}
|
|
617
|
+
*/
|
|
618
|
+
createAndEnableSubledgerFromFile: function (file, authorization, options) {
|
|
619
|
+
return localVarFp.createAndEnableSubledgerFromFile(file, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
620
|
+
},
|
|
621
|
+
/**
|
|
622
|
+
* This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
623
|
+
* @summary Retrieve the export accounting config
|
|
624
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
625
|
+
* @param {*} [options] Override http request option.
|
|
626
|
+
* @throws {RequiredError}
|
|
627
|
+
*/
|
|
628
|
+
exportAccountingConfig: function (authorization, options) {
|
|
629
|
+
return localVarFp.exportAccountingConfig(authorization, options).then(function (request) { return request(axios, basePath); });
|
|
630
|
+
},
|
|
631
|
+
/**
|
|
632
|
+
* This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
633
|
+
* @summary Retrieve the accounting categories
|
|
634
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
635
|
+
* @param {*} [options] Override http request option.
|
|
636
|
+
* @throws {RequiredError}
|
|
637
|
+
*/
|
|
638
|
+
getAccountingCategories: function (authorization, options) {
|
|
639
|
+
return localVarFp.getAccountingCategories(authorization, options).then(function (request) { return request(axios, basePath); });
|
|
640
|
+
},
|
|
641
|
+
/**
|
|
642
|
+
* This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
|
|
643
|
+
* @summary Delete the reset subledger
|
|
644
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
645
|
+
* @param {*} [options] Override http request option.
|
|
646
|
+
* @throws {RequiredError}
|
|
647
|
+
*/
|
|
648
|
+
resetSubledger: function (authorization, options) {
|
|
649
|
+
return localVarFp.resetSubledger(authorization, options).then(function (request) { return request(axios, basePath); });
|
|
650
|
+
},
|
|
651
|
+
/**
|
|
652
|
+
* This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
653
|
+
* @summary Create the validate accounting config
|
|
654
|
+
* @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
|
|
655
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
656
|
+
* @param {*} [options] Override http request option.
|
|
657
|
+
* @throws {RequiredError}
|
|
658
|
+
*/
|
|
659
|
+
validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
|
|
660
|
+
return localVarFp.validateAccountingConfig(validateAccountingConfigRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
661
|
+
},
|
|
662
|
+
/**
|
|
663
|
+
* This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
664
|
+
* @summary Create the validate accounting config from file
|
|
665
|
+
* @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
|
|
666
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
667
|
+
* @param {*} [options] Override http request option.
|
|
668
|
+
* @throws {RequiredError}
|
|
669
|
+
*/
|
|
670
|
+
validateAccountingConfigFromFile: function (file, authorization, options) {
|
|
671
|
+
return localVarFp.validateAccountingConfigFromFile(file, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
672
|
+
},
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
exports.AccountingConfigsApiFactory = AccountingConfigsApiFactory;
|
|
676
|
+
/**
|
|
677
|
+
* AccountingConfigsApi - object-oriented interface
|
|
678
|
+
* @export
|
|
679
|
+
* @class AccountingConfigsApi
|
|
680
|
+
* @extends {BaseAPI}
|
|
681
|
+
*/
|
|
682
|
+
var AccountingConfigsApi = /** @class */ (function (_super) {
|
|
683
|
+
__extends(AccountingConfigsApi, _super);
|
|
684
|
+
function AccountingConfigsApi() {
|
|
685
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* This will create and enable the subledger, using an accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
689
|
+
* @summary Create the create and enable subledger
|
|
690
|
+
* @param {AccountingConfigsApiCreateAndEnableSubledgerRequest} requestParameters Request parameters.
|
|
691
|
+
* @param {*} [options] Override http request option.
|
|
692
|
+
* @throws {RequiredError}
|
|
693
|
+
* @memberof AccountingConfigsApi
|
|
694
|
+
*/
|
|
695
|
+
AccountingConfigsApi.prototype.createAndEnableSubledger = function (requestParameters, options) {
|
|
696
|
+
var _this = this;
|
|
697
|
+
return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
698
|
+
};
|
|
699
|
+
/**
|
|
700
|
+
* This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
701
|
+
* @summary Create the create and enable subledger from file
|
|
702
|
+
* @param {AccountingConfigsApiCreateAndEnableSubledgerFromFileRequest} requestParameters Request parameters.
|
|
703
|
+
* @param {*} [options] Override http request option.
|
|
704
|
+
* @throws {RequiredError}
|
|
705
|
+
* @memberof AccountingConfigsApi
|
|
706
|
+
*/
|
|
707
|
+
AccountingConfigsApi.prototype.createAndEnableSubledgerFromFile = function (requestParameters, options) {
|
|
708
|
+
var _this = this;
|
|
709
|
+
return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
710
|
+
};
|
|
711
|
+
/**
|
|
712
|
+
* This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
713
|
+
* @summary Retrieve the export accounting config
|
|
714
|
+
* @param {AccountingConfigsApiExportAccountingConfigRequest} requestParameters Request parameters.
|
|
715
|
+
* @param {*} [options] Override http request option.
|
|
716
|
+
* @throws {RequiredError}
|
|
717
|
+
* @memberof AccountingConfigsApi
|
|
718
|
+
*/
|
|
719
|
+
AccountingConfigsApi.prototype.exportAccountingConfig = function (requestParameters, options) {
|
|
720
|
+
var _this = this;
|
|
721
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
722
|
+
return (0, exports.AccountingConfigsApiFp)(this.configuration).exportAccountingConfig(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
723
|
+
};
|
|
724
|
+
/**
|
|
725
|
+
* This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
|
|
726
|
+
* @summary Retrieve the accounting categories
|
|
727
|
+
* @param {AccountingConfigsApiGetAccountingCategoriesRequest} requestParameters Request parameters.
|
|
728
|
+
* @param {*} [options] Override http request option.
|
|
729
|
+
* @throws {RequiredError}
|
|
730
|
+
* @memberof AccountingConfigsApi
|
|
731
|
+
*/
|
|
732
|
+
AccountingConfigsApi.prototype.getAccountingCategories = function (requestParameters, options) {
|
|
733
|
+
var _this = this;
|
|
734
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
735
|
+
return (0, exports.AccountingConfigsApiFp)(this.configuration).getAccountingCategories(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
736
|
+
};
|
|
737
|
+
/**
|
|
738
|
+
* This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
|
|
739
|
+
* @summary Delete the reset subledger
|
|
740
|
+
* @param {AccountingConfigsApiResetSubledgerRequest} requestParameters Request parameters.
|
|
741
|
+
* @param {*} [options] Override http request option.
|
|
742
|
+
* @throws {RequiredError}
|
|
743
|
+
* @memberof AccountingConfigsApi
|
|
744
|
+
*/
|
|
745
|
+
AccountingConfigsApi.prototype.resetSubledger = function (requestParameters, options) {
|
|
746
|
+
var _this = this;
|
|
747
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
748
|
+
return (0, exports.AccountingConfigsApiFp)(this.configuration).resetSubledger(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
749
|
+
};
|
|
750
|
+
/**
|
|
751
|
+
* This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
752
|
+
* @summary Create the validate accounting config
|
|
753
|
+
* @param {AccountingConfigsApiValidateAccountingConfigRequest} requestParameters Request parameters.
|
|
754
|
+
* @param {*} [options] Override http request option.
|
|
755
|
+
* @throws {RequiredError}
|
|
756
|
+
* @memberof AccountingConfigsApi
|
|
757
|
+
*/
|
|
758
|
+
AccountingConfigsApi.prototype.validateAccountingConfig = function (requestParameters, options) {
|
|
759
|
+
var _this = this;
|
|
760
|
+
return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
761
|
+
};
|
|
762
|
+
/**
|
|
763
|
+
* This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
|
|
764
|
+
* @summary Create the validate accounting config from file
|
|
765
|
+
* @param {AccountingConfigsApiValidateAccountingConfigFromFileRequest} requestParameters Request parameters.
|
|
766
|
+
* @param {*} [options] Override http request option.
|
|
767
|
+
* @throws {RequiredError}
|
|
768
|
+
* @memberof AccountingConfigsApi
|
|
769
|
+
*/
|
|
770
|
+
AccountingConfigsApi.prototype.validateAccountingConfigFromFile = function (requestParameters, options) {
|
|
771
|
+
var _this = this;
|
|
772
|
+
return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
773
|
+
};
|
|
774
|
+
return AccountingConfigsApi;
|
|
775
|
+
}(base_1.BaseAPI));
|
|
776
|
+
exports.AccountingConfigsApi = AccountingConfigsApi;
|