@emilgroup/accounting-sdk-node 1.32.1-beta.78 → 1.32.1-beta.79

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 (204) hide show
  1. package/.openapi-generator/FILES +50 -0
  2. package/README.md +2 -2
  3. package/api/accounting-configs-api.ts +868 -0
  4. package/api/booking-entries-api.ts +234 -10
  5. package/api/commission-account-mappings-api.ts +1211 -0
  6. package/api/financial-accounts-api.ts +154 -24
  7. package/api/financial-transactions-api.ts +8 -4
  8. package/api/number-ranges-api.ts +16 -8
  9. package/api/personal-accounts-api.ts +16 -8
  10. package/api/product-account-mappings-api.ts +1719 -0
  11. package/api.ts +6 -0
  12. package/common.ts +3 -2
  13. package/dist/api/accounting-configs-api.d.ts +451 -0
  14. package/dist/api/accounting-configs-api.js +887 -0
  15. package/dist/api/booking-entries-api.d.ts +121 -7
  16. package/dist/api/booking-entries-api.js +211 -14
  17. package/dist/api/commission-account-mappings-api.d.ts +685 -0
  18. package/dist/api/commission-account-mappings-api.js +1026 -0
  19. package/dist/api/financial-accounts-api.d.ts +86 -20
  20. package/dist/api/financial-accounts-api.js +137 -27
  21. package/dist/api/financial-transactions-api.d.ts +2 -2
  22. package/dist/api/financial-transactions-api.js +8 -6
  23. package/dist/api/health-api.d.ts +1 -1
  24. package/dist/api/number-ranges-api.d.ts +4 -4
  25. package/dist/api/number-ranges-api.js +22 -14
  26. package/dist/api/personal-accounts-api.d.ts +4 -4
  27. package/dist/api/personal-accounts-api.js +22 -14
  28. package/dist/api/product-account-mappings-api.d.ts +972 -0
  29. package/dist/api/product-account-mappings-api.js +1451 -0
  30. package/dist/api.d.ts +3 -0
  31. package/dist/api.js +3 -0
  32. package/dist/common.d.ts +1 -1
  33. package/dist/common.js +1 -0
  34. package/dist/models/account-mapping-class.d.ts +73 -0
  35. package/dist/models/account-mapping-class.js +40 -0
  36. package/dist/models/accounting-category-class.d.ts +45 -0
  37. package/dist/models/accounting-category-class.js +24 -0
  38. package/dist/models/accounting-config-class.d.ts +78 -0
  39. package/dist/models/accounting-config-class.js +20 -0
  40. package/dist/models/accounting-config-data-class.d.ts +38 -0
  41. package/dist/models/accounting-config-data-class.js +15 -0
  42. package/dist/models/accounting-config-data-dto-accounting-configuration.d.ts +46 -0
  43. package/dist/models/accounting-config-data-dto-accounting-configuration.js +24 -0
  44. package/dist/models/accounting-config-data-dto-default-account-mappings.d.ts +79 -0
  45. package/dist/models/accounting-config-data-dto-default-account-mappings.js +40 -0
  46. package/dist/models/accounting-config-data-dto.d.ts +38 -0
  47. package/dist/models/accounting-config-data-dto.js +15 -0
  48. package/dist/models/accounting-configuration-class.d.ts +36 -0
  49. package/dist/models/accounting-configuration-class.js +15 -0
  50. package/dist/models/booking-entry-class.d.ts +34 -0
  51. package/dist/models/booking-entry-class.js +10 -1
  52. package/dist/models/commission-account-mapping-class.d.ts +49 -0
  53. package/dist/models/commission-account-mapping-class.js +15 -0
  54. package/dist/models/commission-agreement-account-mapping-detail-class.d.ts +44 -0
  55. package/dist/models/commission-agreement-account-mapping-detail-class.js +15 -0
  56. package/dist/models/commission-agreement-partner-class.d.ts +30 -0
  57. package/dist/models/commission-agreement-partner-class.js +15 -0
  58. package/dist/models/commission-agreement-with-account-mapping-class.d.ts +43 -0
  59. package/dist/models/commission-agreement-with-account-mapping-class.js +15 -0
  60. package/dist/models/commission-type-account-mapping-class.d.ts +31 -0
  61. package/dist/models/commission-type-account-mapping-class.js +15 -0
  62. package/dist/models/create-and-enable-subledger-request-dto.d.ts +25 -0
  63. package/dist/models/create-and-enable-subledger-request-dto.js +15 -0
  64. package/dist/models/create-and-enable-subledger-response-class.d.ts +25 -0
  65. package/dist/models/create-and-enable-subledger-response-class.js +15 -0
  66. package/dist/models/create-booking-entry-request-dto.d.ts +25 -2
  67. package/dist/models/create-booking-entry-request-dto.js +9 -0
  68. package/dist/models/create-financial-account-request-dto.d.ts +50 -5
  69. package/dist/models/create-financial-account-request-dto.js +26 -2
  70. package/dist/models/create-number-range-request-dto.d.ts +4 -4
  71. package/dist/models/create-number-range-request-dto.js +4 -4
  72. package/dist/models/create-or-correct-opening-balance-dto.d.ts +25 -0
  73. package/dist/models/create-or-correct-opening-balance-dto.js +15 -0
  74. package/dist/models/create-or-correct-opening-balance-response-class.d.ts +25 -0
  75. package/dist/models/create-or-correct-opening-balance-response-class.js +15 -0
  76. package/dist/models/create-personal-account-request-dto.d.ts +14 -6
  77. package/dist/models/create-personal-account-request-dto.js +3 -3
  78. package/dist/models/export-accounting-config-response-class.d.ts +25 -0
  79. package/dist/models/export-accounting-config-response-class.js +15 -0
  80. package/dist/models/financial-account-class.d.ts +49 -2
  81. package/dist/models/financial-account-class.js +6 -2
  82. package/dist/models/financial-transaction-class.d.ts +6 -0
  83. package/dist/models/financial-transaction-data-dto.d.ts +11 -2
  84. package/dist/models/financial-transaction-data-dto.js +1 -0
  85. package/dist/models/get-accounting-categories-response-class.d.ts +25 -0
  86. package/dist/models/get-accounting-categories-response-class.js +15 -0
  87. package/dist/models/get-activation-snapshot-response-class.d.ts +25 -0
  88. package/dist/models/get-activation-snapshot-response-class.js +15 -0
  89. package/dist/models/index.d.ts +47 -0
  90. package/dist/models/index.js +47 -0
  91. package/dist/models/list-commission-account-mappings-response-class.d.ts +43 -0
  92. package/dist/models/list-commission-account-mappings-response-class.js +15 -0
  93. package/dist/models/list-commission-agreements-with-account-mappings-response-class.d.ts +43 -0
  94. package/dist/models/list-commission-agreements-with-account-mappings-response-class.js +15 -0
  95. package/dist/models/list-commission-type-account-mappings-response-class.d.ts +43 -0
  96. package/dist/models/list-commission-type-account-mappings-response-class.js +15 -0
  97. package/dist/models/list-product-account-mappings-response-class.d.ts +43 -0
  98. package/dist/models/list-product-account-mappings-response-class.js +15 -0
  99. package/dist/models/list-products-with-account-mappings-response-class.d.ts +43 -0
  100. package/dist/models/list-products-with-account-mappings-response-class.js +15 -0
  101. package/dist/models/opening-balance-item-dto.d.ts +41 -0
  102. package/dist/models/opening-balance-item-dto.js +20 -0
  103. package/dist/models/personal-account-class.d.ts +8 -2
  104. package/dist/models/personal-account-class.js +1 -1
  105. package/dist/models/post-financial-event-request-dto.d.ts +45 -0
  106. package/dist/models/post-financial-event-request-dto.js +24 -0
  107. package/dist/models/post-financial-event-response-class.d.ts +25 -0
  108. package/dist/models/post-financial-event-response-class.js +15 -0
  109. package/dist/models/premium-item-account-mapping-class.d.ts +37 -0
  110. package/dist/models/premium-item-account-mapping-class.js +15 -0
  111. package/dist/models/product-account-mapping-class.d.ts +61 -0
  112. package/dist/models/product-account-mapping-class.js +15 -0
  113. package/dist/models/product-account-mapping-detail-class.d.ts +56 -0
  114. package/dist/models/product-account-mapping-detail-class.js +15 -0
  115. package/dist/models/product-risk-carrier-class.d.ts +42 -0
  116. package/dist/models/product-risk-carrier-class.js +15 -0
  117. package/dist/models/product-version-account-mapping-detail-class.d.ts +50 -0
  118. package/dist/models/product-version-account-mapping-detail-class.js +15 -0
  119. package/dist/models/product-version-with-account-mappings-class.d.ts +42 -0
  120. package/dist/models/product-version-with-account-mappings-class.js +15 -0
  121. package/dist/models/product-with-account-mappings-class.d.ts +49 -0
  122. package/dist/models/product-with-account-mappings-class.js +15 -0
  123. package/dist/models/put-premium-item-account-body-dto.d.ts +24 -0
  124. package/dist/models/put-premium-item-account-body-dto.js +15 -0
  125. package/dist/models/put-product-category-account-body-dto.d.ts +24 -0
  126. package/dist/models/put-product-category-account-body-dto.js +15 -0
  127. package/dist/models/put-product-risk-carrier-body-dto.d.ts +24 -0
  128. package/dist/models/put-product-risk-carrier-body-dto.js +15 -0
  129. package/dist/models/put-product-version-category-account-body-dto.d.ts +24 -0
  130. package/dist/models/put-product-version-category-account-body-dto.js +15 -0
  131. package/dist/models/resolved-account-mapping-class.d.ts +31 -0
  132. package/dist/models/resolved-account-mapping-class.js +15 -0
  133. package/dist/models/resolved-commission-account-mapping-class.d.ts +37 -0
  134. package/dist/models/resolved-commission-account-mapping-class.js +21 -0
  135. package/dist/models/update-commission-agreement-account-body-dto.d.ts +24 -0
  136. package/dist/models/update-commission-agreement-account-body-dto.js +15 -0
  137. package/dist/models/update-commission-type-account-body-dto.d.ts +24 -0
  138. package/dist/models/update-commission-type-account-body-dto.js +15 -0
  139. package/dist/models/update-financial-account-body-dto.d.ts +48 -0
  140. package/dist/models/update-financial-account-body-dto.js +15 -0
  141. package/dist/models/update-financial-account-response-class.d.ts +25 -0
  142. package/dist/models/update-financial-account-response-class.js +15 -0
  143. package/dist/models/validate-accounting-config-request-dto.d.ts +25 -0
  144. package/dist/models/validate-accounting-config-request-dto.js +15 -0
  145. package/dist/models/validate-accounting-config-response-class.d.ts +30 -0
  146. package/dist/models/validate-accounting-config-response-class.js +15 -0
  147. package/models/account-mapping-class.ts +82 -0
  148. package/models/accounting-category-class.ts +54 -0
  149. package/models/accounting-config-class.ts +87 -0
  150. package/models/accounting-config-data-class.ts +44 -0
  151. package/models/accounting-config-data-dto-accounting-configuration.ts +56 -0
  152. package/models/accounting-config-data-dto-default-account-mappings.ts +88 -0
  153. package/models/accounting-config-data-dto.ts +44 -0
  154. package/models/accounting-configuration-class.ts +42 -0
  155. package/models/booking-entry-class.ts +35 -0
  156. package/models/commission-account-mapping-class.ts +55 -0
  157. package/models/commission-agreement-account-mapping-detail-class.ts +50 -0
  158. package/models/commission-agreement-partner-class.ts +36 -0
  159. package/models/commission-agreement-with-account-mapping-class.ts +49 -0
  160. package/models/commission-type-account-mapping-class.ts +37 -0
  161. package/models/create-and-enable-subledger-request-dto.ts +31 -0
  162. package/models/create-and-enable-subledger-response-class.ts +31 -0
  163. package/models/create-booking-entry-request-dto.ts +26 -2
  164. package/models/create-financial-account-request-dto.ts +49 -5
  165. package/models/create-number-range-request-dto.ts +4 -4
  166. package/models/create-or-correct-opening-balance-dto.ts +31 -0
  167. package/models/create-or-correct-opening-balance-response-class.ts +31 -0
  168. package/models/create-personal-account-request-dto.ts +12 -6
  169. package/models/export-accounting-config-response-class.ts +31 -0
  170. package/models/financial-account-class.ts +50 -2
  171. package/models/financial-transaction-class.ts +6 -0
  172. package/models/financial-transaction-data-dto.ts +9 -2
  173. package/models/get-accounting-categories-response-class.ts +31 -0
  174. package/models/get-activation-snapshot-response-class.ts +31 -0
  175. package/models/index.ts +47 -0
  176. package/models/list-commission-account-mappings-response-class.ts +49 -0
  177. package/models/list-commission-agreements-with-account-mappings-response-class.ts +49 -0
  178. package/models/list-commission-type-account-mappings-response-class.ts +49 -0
  179. package/models/list-product-account-mappings-response-class.ts +49 -0
  180. package/models/list-products-with-account-mappings-response-class.ts +49 -0
  181. package/models/opening-balance-item-dto.ts +50 -0
  182. package/models/personal-account-class.ts +8 -2
  183. package/models/post-financial-event-request-dto.ts +54 -0
  184. package/models/post-financial-event-response-class.ts +31 -0
  185. package/models/premium-item-account-mapping-class.ts +43 -0
  186. package/models/product-account-mapping-class.ts +67 -0
  187. package/models/product-account-mapping-detail-class.ts +62 -0
  188. package/models/product-risk-carrier-class.ts +48 -0
  189. package/models/product-version-account-mapping-detail-class.ts +56 -0
  190. package/models/product-version-with-account-mappings-class.ts +48 -0
  191. package/models/product-with-account-mappings-class.ts +55 -0
  192. package/models/put-premium-item-account-body-dto.ts +30 -0
  193. package/models/put-product-category-account-body-dto.ts +30 -0
  194. package/models/put-product-risk-carrier-body-dto.ts +30 -0
  195. package/models/put-product-version-category-account-body-dto.ts +30 -0
  196. package/models/resolved-account-mapping-class.ts +37 -0
  197. package/models/resolved-commission-account-mapping-class.ts +46 -0
  198. package/models/update-commission-agreement-account-body-dto.ts +30 -0
  199. package/models/update-commission-type-account-body-dto.ts +30 -0
  200. package/models/update-financial-account-body-dto.ts +54 -0
  201. package/models/update-financial-account-response-class.ts +31 -0
  202. package/models/validate-accounting-config-request-dto.ts +31 -0
  203. package/models/validate-accounting-config-response-class.ts +36 -0
  204. package/package.json +2 -2
@@ -0,0 +1,887 @@
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, authorizationValue, 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/subledger";
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
+ // Only Authorization falls back to the configured token; an empty value is never sent.
129
+ ];
130
+ case 1:
131
+ // authentication bearer required
132
+ // http bearer authentication required
133
+ _a.sent();
134
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
135
+ if (authorizationValue) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
137
+ }
138
+ localVarHeaderParameter['Content-Type'] = 'application/json';
139
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
140
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
141
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
142
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createAndEnableSubledgerRequestDto, localVarRequestOptions, configuration);
143
+ return [2 /*return*/, {
144
+ url: (0, common_1.toPathString)(localVarUrlObj),
145
+ options: localVarRequestOptions,
146
+ }];
147
+ }
148
+ });
149
+ });
150
+ },
151
+ /**
152
+ * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
153
+ * @summary Create the create and enable subledger from file
154
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
155
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
156
+ * @param {*} [options] Override http request option.
157
+ * @throws {RequiredError}
158
+ */
159
+ createAndEnableSubledgerFromFile: function (file, authorization, options) {
160
+ if (options === void 0) { options = {}; }
161
+ return __awaiter(_this, void 0, void 0, function () {
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationValue, headersFromBaseOptions;
163
+ return __generator(this, function (_a) {
164
+ switch (_a.label) {
165
+ case 0:
166
+ // verify required parameter 'file' is not null or undefined
167
+ (0, common_1.assertParamExists)('createAndEnableSubledgerFromFile', 'file', file);
168
+ localVarPath = "/accountingservice/v1/subledger/upload";
169
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
170
+ if (configuration) {
171
+ baseOptions = configuration.baseOptions;
172
+ baseAccessToken = configuration.accessToken;
173
+ }
174
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
175
+ localVarHeaderParameter = {};
176
+ localVarQueryParameter = {};
177
+ localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
181
+ // Only Authorization falls back to the configured token; an empty value is never sent.
182
+ ];
183
+ case 1:
184
+ // authentication bearer required
185
+ // http bearer authentication required
186
+ _a.sent();
187
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
188
+ if (authorizationValue) {
189
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
190
+ }
191
+ if (file !== undefined) {
192
+ localVarFormParams.append('file', file);
193
+ }
194
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data; boundary=' + localVarFormParams.getBoundary();
195
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
196
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
197
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
198
+ localVarRequestOptions.data = localVarFormParams;
199
+ return [2 /*return*/, {
200
+ url: (0, common_1.toPathString)(localVarUrlObj),
201
+ options: localVarRequestOptions,
202
+ }];
203
+ }
204
+ });
205
+ });
206
+ },
207
+ /**
208
+ * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
209
+ * @summary Retrieve the export accounting config
210
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ */
214
+ exportAccountingConfig: function (authorization, options) {
215
+ if (options === void 0) { options = {}; }
216
+ return __awaiter(_this, void 0, void 0, function () {
217
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
218
+ return __generator(this, function (_a) {
219
+ switch (_a.label) {
220
+ case 0:
221
+ localVarPath = "/accountingservice/v1/subledger/config/export";
222
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
223
+ if (configuration) {
224
+ baseOptions = configuration.baseOptions;
225
+ baseAccessToken = configuration.accessToken;
226
+ }
227
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
228
+ localVarHeaderParameter = {};
229
+ localVarQueryParameter = {};
230
+ // authentication bearer required
231
+ // http bearer authentication required
232
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
233
+ // Only Authorization falls back to the configured token; an empty value is never sent.
234
+ ];
235
+ case 1:
236
+ // authentication bearer required
237
+ // http bearer authentication required
238
+ _a.sent();
239
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
240
+ if (authorizationValue) {
241
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
242
+ }
243
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
244
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
245
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
246
+ return [2 /*return*/, {
247
+ url: (0, common_1.toPathString)(localVarUrlObj),
248
+ options: localVarRequestOptions,
249
+ }];
250
+ }
251
+ });
252
+ });
253
+ },
254
+ /**
255
+ * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
256
+ * @summary Retrieve the accounting categories
257
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
258
+ * @param {*} [options] Override http request option.
259
+ * @throws {RequiredError}
260
+ */
261
+ getAccountingCategories: function (authorization, options) {
262
+ if (options === void 0) { options = {}; }
263
+ return __awaiter(_this, void 0, void 0, function () {
264
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
265
+ return __generator(this, function (_a) {
266
+ switch (_a.label) {
267
+ case 0:
268
+ localVarPath = "/accountingservice/v1/subledger/categories";
269
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
270
+ if (configuration) {
271
+ baseOptions = configuration.baseOptions;
272
+ baseAccessToken = configuration.accessToken;
273
+ }
274
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
275
+ localVarHeaderParameter = {};
276
+ localVarQueryParameter = {};
277
+ // authentication bearer required
278
+ // http bearer authentication required
279
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
280
+ // Only Authorization falls back to the configured token; an empty value is never sent.
281
+ ];
282
+ case 1:
283
+ // authentication bearer required
284
+ // http bearer authentication required
285
+ _a.sent();
286
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
287
+ if (authorizationValue) {
288
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
289
+ }
290
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
291
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
292
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
293
+ return [2 /*return*/, {
294
+ url: (0, common_1.toPathString)(localVarUrlObj),
295
+ options: localVarRequestOptions,
296
+ }];
297
+ }
298
+ });
299
+ });
300
+ },
301
+ /**
302
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
303
+ * @summary Retrieve the get activation snapshot
304
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
305
+ * @param {*} [options] Override http request option.
306
+ * @throws {RequiredError}
307
+ */
308
+ getActivationSnapshot: function (authorization, options) {
309
+ if (options === void 0) { options = {}; }
310
+ return __awaiter(_this, void 0, void 0, function () {
311
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
312
+ return __generator(this, function (_a) {
313
+ switch (_a.label) {
314
+ case 0:
315
+ localVarPath = "/accountingservice/v1/subledger/activation-snapshot";
316
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
317
+ if (configuration) {
318
+ baseOptions = configuration.baseOptions;
319
+ baseAccessToken = configuration.accessToken;
320
+ }
321
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
322
+ localVarHeaderParameter = {};
323
+ localVarQueryParameter = {};
324
+ // authentication bearer required
325
+ // http bearer authentication required
326
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
327
+ // Only Authorization falls back to the configured token; an empty value is never sent.
328
+ ];
329
+ case 1:
330
+ // authentication bearer required
331
+ // http bearer authentication required
332
+ _a.sent();
333
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
334
+ if (authorizationValue) {
335
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
336
+ }
337
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
338
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
339
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
340
+ return [2 /*return*/, {
341
+ url: (0, common_1.toPathString)(localVarUrlObj),
342
+ options: localVarRequestOptions,
343
+ }];
344
+ }
345
+ });
346
+ });
347
+ },
348
+ /**
349
+ * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
350
+ * @summary Delete the reset subledger
351
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
352
+ * @param {*} [options] Override http request option.
353
+ * @throws {RequiredError}
354
+ */
355
+ resetSubledger: function (authorization, options) {
356
+ if (options === void 0) { options = {}; }
357
+ return __awaiter(_this, void 0, void 0, function () {
358
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
359
+ return __generator(this, function (_a) {
360
+ switch (_a.label) {
361
+ case 0:
362
+ localVarPath = "/accountingservice/v1/subledger/reset";
363
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
364
+ if (configuration) {
365
+ baseOptions = configuration.baseOptions;
366
+ baseAccessToken = configuration.accessToken;
367
+ }
368
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
369
+ localVarHeaderParameter = {};
370
+ localVarQueryParameter = {};
371
+ // authentication bearer required
372
+ // http bearer authentication required
373
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
374
+ // Only Authorization falls back to the configured token; an empty value is never sent.
375
+ ];
376
+ case 1:
377
+ // authentication bearer required
378
+ // http bearer authentication required
379
+ _a.sent();
380
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
381
+ if (authorizationValue) {
382
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
383
+ }
384
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
385
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
386
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
387
+ return [2 /*return*/, {
388
+ url: (0, common_1.toPathString)(localVarUrlObj),
389
+ options: localVarRequestOptions,
390
+ }];
391
+ }
392
+ });
393
+ });
394
+ },
395
+ /**
396
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
397
+ * @summary Create the validate accounting config
398
+ * @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
399
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ */
403
+ validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
404
+ if (options === void 0) { options = {}; }
405
+ return __awaiter(_this, void 0, void 0, function () {
406
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
407
+ return __generator(this, function (_a) {
408
+ switch (_a.label) {
409
+ case 0:
410
+ // verify required parameter 'validateAccountingConfigRequestDto' is not null or undefined
411
+ (0, common_1.assertParamExists)('validateAccountingConfig', 'validateAccountingConfigRequestDto', validateAccountingConfigRequestDto);
412
+ localVarPath = "/accountingservice/v1/subledger/config/validate";
413
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
414
+ if (configuration) {
415
+ baseOptions = configuration.baseOptions;
416
+ baseAccessToken = configuration.accessToken;
417
+ }
418
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
419
+ localVarHeaderParameter = {};
420
+ localVarQueryParameter = {};
421
+ // authentication bearer required
422
+ // http bearer authentication required
423
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
424
+ // Only Authorization falls back to the configured token; an empty value is never sent.
425
+ ];
426
+ case 1:
427
+ // authentication bearer required
428
+ // http bearer authentication required
429
+ _a.sent();
430
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
431
+ if (authorizationValue) {
432
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
433
+ }
434
+ localVarHeaderParameter['Content-Type'] = 'application/json';
435
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
436
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
437
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
438
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(validateAccountingConfigRequestDto, localVarRequestOptions, configuration);
439
+ return [2 /*return*/, {
440
+ url: (0, common_1.toPathString)(localVarUrlObj),
441
+ options: localVarRequestOptions,
442
+ }];
443
+ }
444
+ });
445
+ });
446
+ },
447
+ /**
448
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
449
+ * @summary Create the validate accounting config from file
450
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
451
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
452
+ * @param {*} [options] Override http request option.
453
+ * @throws {RequiredError}
454
+ */
455
+ validateAccountingConfigFromFile: function (file, authorization, options) {
456
+ if (options === void 0) { options = {}; }
457
+ return __awaiter(_this, void 0, void 0, function () {
458
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, authorizationValue, headersFromBaseOptions;
459
+ return __generator(this, function (_a) {
460
+ switch (_a.label) {
461
+ case 0:
462
+ // verify required parameter 'file' is not null or undefined
463
+ (0, common_1.assertParamExists)('validateAccountingConfigFromFile', 'file', file);
464
+ localVarPath = "/accountingservice/v1/subledger/config/validate/upload";
465
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
466
+ if (configuration) {
467
+ baseOptions = configuration.baseOptions;
468
+ baseAccessToken = configuration.accessToken;
469
+ }
470
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
471
+ localVarHeaderParameter = {};
472
+ localVarQueryParameter = {};
473
+ localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
474
+ // authentication bearer required
475
+ // http bearer authentication required
476
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
477
+ // Only Authorization falls back to the configured token; an empty value is never sent.
478
+ ];
479
+ case 1:
480
+ // authentication bearer required
481
+ // http bearer authentication required
482
+ _a.sent();
483
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
484
+ if (authorizationValue) {
485
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
486
+ }
487
+ if (file !== undefined) {
488
+ localVarFormParams.append('file', file);
489
+ }
490
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data; boundary=' + localVarFormParams.getBoundary();
491
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
492
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
493
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
494
+ localVarRequestOptions.data = localVarFormParams;
495
+ return [2 /*return*/, {
496
+ url: (0, common_1.toPathString)(localVarUrlObj),
497
+ options: localVarRequestOptions,
498
+ }];
499
+ }
500
+ });
501
+ });
502
+ },
503
+ };
504
+ };
505
+ exports.AccountingConfigsApiAxiosParamCreator = AccountingConfigsApiAxiosParamCreator;
506
+ /**
507
+ * AccountingConfigsApi - functional programming interface
508
+ * @export
509
+ */
510
+ var AccountingConfigsApiFp = function (configuration) {
511
+ var localVarAxiosParamCreator = (0, exports.AccountingConfigsApiAxiosParamCreator)(configuration);
512
+ return {
513
+ /**
514
+ * This will create and enable the subledger, using an accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
515
+ * @summary Create the create and enable subledger
516
+ * @param {CreateAndEnableSubledgerRequestDto} createAndEnableSubledgerRequestDto
517
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ createAndEnableSubledger: function (createAndEnableSubledgerRequestDto, authorization, options) {
522
+ return __awaiter(this, void 0, void 0, function () {
523
+ var localVarAxiosArgs;
524
+ return __generator(this, function (_a) {
525
+ switch (_a.label) {
526
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAndEnableSubledger(createAndEnableSubledgerRequestDto, authorization, options)];
527
+ case 1:
528
+ localVarAxiosArgs = _a.sent();
529
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
530
+ }
531
+ });
532
+ });
533
+ },
534
+ /**
535
+ * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
536
+ * @summary Create the create and enable subledger 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
+ createAndEnableSubledgerFromFile: function (file, authorization, options) {
543
+ return __awaiter(this, void 0, void 0, function () {
544
+ var localVarAxiosArgs;
545
+ return __generator(this, function (_a) {
546
+ switch (_a.label) {
547
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAndEnableSubledgerFromFile(file, authorization, options)];
548
+ case 1:
549
+ localVarAxiosArgs = _a.sent();
550
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
551
+ }
552
+ });
553
+ });
554
+ },
555
+ /**
556
+ * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
557
+ * @summary Retrieve the export accounting config
558
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
559
+ * @param {*} [options] Override http request option.
560
+ * @throws {RequiredError}
561
+ */
562
+ exportAccountingConfig: function (authorization, options) {
563
+ return __awaiter(this, void 0, void 0, function () {
564
+ var localVarAxiosArgs;
565
+ return __generator(this, function (_a) {
566
+ switch (_a.label) {
567
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.exportAccountingConfig(authorization, options)];
568
+ case 1:
569
+ localVarAxiosArgs = _a.sent();
570
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
571
+ }
572
+ });
573
+ });
574
+ },
575
+ /**
576
+ * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
577
+ * @summary Retrieve the accounting categories
578
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
579
+ * @param {*} [options] Override http request option.
580
+ * @throws {RequiredError}
581
+ */
582
+ getAccountingCategories: function (authorization, options) {
583
+ return __awaiter(this, void 0, void 0, function () {
584
+ var localVarAxiosArgs;
585
+ return __generator(this, function (_a) {
586
+ switch (_a.label) {
587
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAccountingCategories(authorization, options)];
588
+ case 1:
589
+ localVarAxiosArgs = _a.sent();
590
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
591
+ }
592
+ });
593
+ });
594
+ },
595
+ /**
596
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
597
+ * @summary Retrieve the get activation snapshot
598
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
599
+ * @param {*} [options] Override http request option.
600
+ * @throws {RequiredError}
601
+ */
602
+ getActivationSnapshot: function (authorization, options) {
603
+ return __awaiter(this, void 0, void 0, function () {
604
+ var localVarAxiosArgs;
605
+ return __generator(this, function (_a) {
606
+ switch (_a.label) {
607
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActivationSnapshot(authorization, options)];
608
+ case 1:
609
+ localVarAxiosArgs = _a.sent();
610
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
611
+ }
612
+ });
613
+ });
614
+ },
615
+ /**
616
+ * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
617
+ * @summary Delete the reset subledger
618
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
619
+ * @param {*} [options] Override http request option.
620
+ * @throws {RequiredError}
621
+ */
622
+ resetSubledger: function (authorization, options) {
623
+ return __awaiter(this, void 0, void 0, function () {
624
+ var localVarAxiosArgs;
625
+ return __generator(this, function (_a) {
626
+ switch (_a.label) {
627
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.resetSubledger(authorization, options)];
628
+ case 1:
629
+ localVarAxiosArgs = _a.sent();
630
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
631
+ }
632
+ });
633
+ });
634
+ },
635
+ /**
636
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
637
+ * @summary Create the validate accounting config
638
+ * @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
639
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
640
+ * @param {*} [options] Override http request option.
641
+ * @throws {RequiredError}
642
+ */
643
+ validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
644
+ return __awaiter(this, void 0, void 0, function () {
645
+ var localVarAxiosArgs;
646
+ return __generator(this, function (_a) {
647
+ switch (_a.label) {
648
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.validateAccountingConfig(validateAccountingConfigRequestDto, authorization, options)];
649
+ case 1:
650
+ localVarAxiosArgs = _a.sent();
651
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
652
+ }
653
+ });
654
+ });
655
+ },
656
+ /**
657
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
658
+ * @summary Create the validate accounting config from file
659
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
660
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
661
+ * @param {*} [options] Override http request option.
662
+ * @throws {RequiredError}
663
+ */
664
+ validateAccountingConfigFromFile: function (file, authorization, options) {
665
+ return __awaiter(this, void 0, void 0, function () {
666
+ var localVarAxiosArgs;
667
+ return __generator(this, function (_a) {
668
+ switch (_a.label) {
669
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.validateAccountingConfigFromFile(file, authorization, options)];
670
+ case 1:
671
+ localVarAxiosArgs = _a.sent();
672
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
673
+ }
674
+ });
675
+ });
676
+ },
677
+ };
678
+ };
679
+ exports.AccountingConfigsApiFp = AccountingConfigsApiFp;
680
+ /**
681
+ * AccountingConfigsApi - factory interface
682
+ * @export
683
+ */
684
+ var AccountingConfigsApiFactory = function (configuration, basePath, axios) {
685
+ var localVarFp = (0, exports.AccountingConfigsApiFp)(configuration);
686
+ return {
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 {CreateAndEnableSubledgerRequestDto} createAndEnableSubledgerRequestDto
691
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
692
+ * @param {*} [options] Override http request option.
693
+ * @throws {RequiredError}
694
+ */
695
+ createAndEnableSubledger: function (createAndEnableSubledgerRequestDto, authorization, options) {
696
+ return localVarFp.createAndEnableSubledger(createAndEnableSubledgerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
697
+ },
698
+ /**
699
+ * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
700
+ * @summary Create the create and enable subledger from file
701
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
702
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
703
+ * @param {*} [options] Override http request option.
704
+ * @throws {RequiredError}
705
+ */
706
+ createAndEnableSubledgerFromFile: function (file, authorization, options) {
707
+ return localVarFp.createAndEnableSubledgerFromFile(file, authorization, options).then(function (request) { return request(axios, basePath); });
708
+ },
709
+ /**
710
+ * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
711
+ * @summary Retrieve the export accounting config
712
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
713
+ * @param {*} [options] Override http request option.
714
+ * @throws {RequiredError}
715
+ */
716
+ exportAccountingConfig: function (authorization, options) {
717
+ return localVarFp.exportAccountingConfig(authorization, options).then(function (request) { return request(axios, basePath); });
718
+ },
719
+ /**
720
+ * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
721
+ * @summary Retrieve the accounting categories
722
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
723
+ * @param {*} [options] Override http request option.
724
+ * @throws {RequiredError}
725
+ */
726
+ getAccountingCategories: function (authorization, options) {
727
+ return localVarFp.getAccountingCategories(authorization, options).then(function (request) { return request(axios, basePath); });
728
+ },
729
+ /**
730
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
731
+ * @summary Retrieve the get activation snapshot
732
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
733
+ * @param {*} [options] Override http request option.
734
+ * @throws {RequiredError}
735
+ */
736
+ getActivationSnapshot: function (authorization, options) {
737
+ return localVarFp.getActivationSnapshot(authorization, options).then(function (request) { return request(axios, basePath); });
738
+ },
739
+ /**
740
+ * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
741
+ * @summary Delete the reset subledger
742
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
743
+ * @param {*} [options] Override http request option.
744
+ * @throws {RequiredError}
745
+ */
746
+ resetSubledger: function (authorization, options) {
747
+ return localVarFp.resetSubledger(authorization, options).then(function (request) { return request(axios, basePath); });
748
+ },
749
+ /**
750
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
751
+ * @summary Create the validate accounting config
752
+ * @param {ValidateAccountingConfigRequestDto} validateAccountingConfigRequestDto
753
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
754
+ * @param {*} [options] Override http request option.
755
+ * @throws {RequiredError}
756
+ */
757
+ validateAccountingConfig: function (validateAccountingConfigRequestDto, authorization, options) {
758
+ return localVarFp.validateAccountingConfig(validateAccountingConfigRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
759
+ },
760
+ /**
761
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
762
+ * @summary Create the validate accounting config from file
763
+ * @param {any} file JSON or YAML file containing the config. Supported formats: .json, .yaml, .yml
764
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
765
+ * @param {*} [options] Override http request option.
766
+ * @throws {RequiredError}
767
+ */
768
+ validateAccountingConfigFromFile: function (file, authorization, options) {
769
+ return localVarFp.validateAccountingConfigFromFile(file, authorization, options).then(function (request) { return request(axios, basePath); });
770
+ },
771
+ };
772
+ };
773
+ exports.AccountingConfigsApiFactory = AccountingConfigsApiFactory;
774
+ /**
775
+ * AccountingConfigsApi - object-oriented interface
776
+ * @export
777
+ * @class AccountingConfigsApi
778
+ * @extends {BaseAPI}
779
+ */
780
+ var AccountingConfigsApi = /** @class */ (function (_super) {
781
+ __extends(AccountingConfigsApi, _super);
782
+ function AccountingConfigsApi() {
783
+ return _super !== null && _super.apply(this, arguments) || this;
784
+ }
785
+ /**
786
+ * This will create and enable the subledger, using an accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
787
+ * @summary Create the create and enable subledger
788
+ * @param {AccountingConfigsApiCreateAndEnableSubledgerRequest} requestParameters Request parameters.
789
+ * @param {*} [options] Override http request option.
790
+ * @throws {RequiredError}
791
+ * @memberof AccountingConfigsApi
792
+ */
793
+ AccountingConfigsApi.prototype.createAndEnableSubledger = function (requestParameters, options) {
794
+ var _this = this;
795
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledger(requestParameters.createAndEnableSubledgerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
796
+ };
797
+ /**
798
+ * This will create and enable the subledger, using an accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
799
+ * @summary Create the create and enable subledger from file
800
+ * @param {AccountingConfigsApiCreateAndEnableSubledgerFromFileRequest} requestParameters Request parameters.
801
+ * @param {*} [options] Override http request option.
802
+ * @throws {RequiredError}
803
+ * @memberof AccountingConfigsApi
804
+ */
805
+ AccountingConfigsApi.prototype.createAndEnableSubledgerFromFile = function (requestParameters, options) {
806
+ var _this = this;
807
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).createAndEnableSubledgerFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
808
+ };
809
+ /**
810
+ * This will export the accounting config. **Required Permissions** \"accounting-management.financial-accounts.view\"
811
+ * @summary Retrieve the export accounting config
812
+ * @param {AccountingConfigsApiExportAccountingConfigRequest} requestParameters Request parameters.
813
+ * @param {*} [options] Override http request option.
814
+ * @throws {RequiredError}
815
+ * @memberof AccountingConfigsApi
816
+ */
817
+ AccountingConfigsApi.prototype.exportAccountingConfig = function (requestParameters, options) {
818
+ var _this = this;
819
+ if (requestParameters === void 0) { requestParameters = {}; }
820
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).exportAccountingConfig(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
821
+ };
822
+ /**
823
+ * This will get the accounting categories. **Required Permissions** \"accounting-management.financial-accounts.view\"
824
+ * @summary Retrieve the accounting categories
825
+ * @param {AccountingConfigsApiGetAccountingCategoriesRequest} requestParameters Request parameters.
826
+ * @param {*} [options] Override http request option.
827
+ * @throws {RequiredError}
828
+ * @memberof AccountingConfigsApi
829
+ */
830
+ AccountingConfigsApi.prototype.getAccountingCategories = function (requestParameters, options) {
831
+ var _this = this;
832
+ if (requestParameters === void 0) { requestParameters = {}; }
833
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getAccountingCategories(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
834
+ };
835
+ /**
836
+ * Returns the subledger configuration as it was when the subledger was enabled, along with who created it, when, and its enablement status. **Required Permissions** \"accounting-management.financial-accounts.view\"
837
+ * @summary Retrieve the get activation snapshot
838
+ * @param {AccountingConfigsApiGetActivationSnapshotRequest} requestParameters Request parameters.
839
+ * @param {*} [options] Override http request option.
840
+ * @throws {RequiredError}
841
+ * @memberof AccountingConfigsApi
842
+ */
843
+ AccountingConfigsApi.prototype.getActivationSnapshot = function (requestParameters, options) {
844
+ var _this = this;
845
+ if (requestParameters === void 0) { requestParameters = {}; }
846
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).getActivationSnapshot(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
847
+ };
848
+ /**
849
+ * This will reset the subledger, and remove all config and accounts. **Required Permissions** \"accounting-management.financial-accounts.delete\"
850
+ * @summary Delete the reset subledger
851
+ * @param {AccountingConfigsApiResetSubledgerRequest} requestParameters Request parameters.
852
+ * @param {*} [options] Override http request option.
853
+ * @throws {RequiredError}
854
+ * @memberof AccountingConfigsApi
855
+ */
856
+ AccountingConfigsApi.prototype.resetSubledger = function (requestParameters, options) {
857
+ var _this = this;
858
+ if (requestParameters === void 0) { requestParameters = {}; }
859
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).resetSubledger(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
860
+ };
861
+ /**
862
+ * This will validate accounting config. **Required Permissions** \"accounting-management.financial-accounts.create\"
863
+ * @summary Create the validate accounting config
864
+ * @param {AccountingConfigsApiValidateAccountingConfigRequest} requestParameters Request parameters.
865
+ * @param {*} [options] Override http request option.
866
+ * @throws {RequiredError}
867
+ * @memberof AccountingConfigsApi
868
+ */
869
+ AccountingConfigsApi.prototype.validateAccountingConfig = function (requestParameters, options) {
870
+ var _this = this;
871
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfig(requestParameters.validateAccountingConfigRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
872
+ };
873
+ /**
874
+ * This will validate accounting config from a file. **Required Permissions** \"accounting-management.financial-accounts.create\"
875
+ * @summary Create the validate accounting config from file
876
+ * @param {AccountingConfigsApiValidateAccountingConfigFromFileRequest} requestParameters Request parameters.
877
+ * @param {*} [options] Override http request option.
878
+ * @throws {RequiredError}
879
+ * @memberof AccountingConfigsApi
880
+ */
881
+ AccountingConfigsApi.prototype.validateAccountingConfigFromFile = function (requestParameters, options) {
882
+ var _this = this;
883
+ return (0, exports.AccountingConfigsApiFp)(this.configuration).validateAccountingConfigFromFile(requestParameters.file, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
884
+ };
885
+ return AccountingConfigsApi;
886
+ }(base_1.BaseAPI));
887
+ exports.AccountingConfigsApi = AccountingConfigsApi;