@emilgroup/accounting-sdk 1.34.1-beta.77 → 1.34.1-beta.78

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