@cosmotech/aip-client 0.2.0-dev2 → 0.2.0-dev4

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 (308) hide show
  1. package/README.md +147 -4
  2. package/api/default-api.ts +8 -15
  3. package/api/favored-option-api.ts +210 -0
  4. package/api/impact-api.ts +507 -0
  5. package/api/investment-api.ts +1464 -0
  6. package/api/metric-api.ts +185 -164
  7. package/api/metric-costs-api.ts +144 -0
  8. package/api/metric-costs-per-year-api.ts +200 -200
  9. package/api/objective-api.ts +538 -44
  10. package/api/objective-weight-api.ts +190 -190
  11. package/api/objective-weights-api.ts +144 -0
  12. package/api/option-api.ts +925 -0
  13. package/api/value-framework-api.ts +1223 -109
  14. package/api/value-framework-costs-api.ts +239 -0
  15. package/api/value-framework-weights-api.ts +144 -0
  16. package/api.ts +9 -1
  17. package/base.ts +1 -25
  18. package/common.ts +20 -43
  19. package/configuration.ts +31 -20
  20. package/dist/api/default-api.d.ts +3 -10
  21. package/dist/api/default-api.js +7 -13
  22. package/dist/api/favored-option-api.d.ts +104 -0
  23. package/dist/api/favored-option-api.js +209 -0
  24. package/dist/api/impact-api.d.ts +245 -0
  25. package/dist/api/impact-api.js +493 -0
  26. package/dist/api/investment-api.d.ts +677 -0
  27. package/dist/api/investment-api.js +1394 -0
  28. package/dist/api/metric-api.d.ts +97 -88
  29. package/dist/api/metric-api.js +185 -157
  30. package/dist/api/metric-costs-api.d.ts +75 -0
  31. package/dist/api/metric-costs-api.js +146 -0
  32. package/dist/api/metric-costs-per-year-api.d.ts +105 -108
  33. package/dist/api/metric-costs-per-year-api.js +199 -192
  34. package/dist/api/objective-api.d.ts +242 -21
  35. package/dist/api/objective-api.js +508 -37
  36. package/dist/api/objective-weight-api.d.ts +105 -108
  37. package/dist/api/objective-weight-api.js +189 -182
  38. package/dist/api/objective-weights-api.d.ts +75 -0
  39. package/dist/api/objective-weights-api.js +146 -0
  40. package/dist/api/option-api.d.ts +436 -0
  41. package/dist/api/option-api.js +888 -0
  42. package/dist/api/value-framework-api.d.ts +528 -21
  43. package/dist/api/value-framework-api.js +1138 -78
  44. package/dist/api/value-framework-costs-api.d.ts +119 -0
  45. package/dist/api/value-framework-costs-api.js +236 -0
  46. package/dist/api/value-framework-weights-api.d.ts +75 -0
  47. package/dist/api/value-framework-weights-api.js +146 -0
  48. package/dist/api.d.ts +9 -1
  49. package/dist/api.js +9 -1
  50. package/dist/base.d.ts +1 -25
  51. package/dist/base.js +1 -20
  52. package/dist/common.d.ts +6 -37
  53. package/dist/common.js +17 -39
  54. package/dist/configuration.d.ts +25 -18
  55. package/dist/configuration.js +4 -3
  56. package/dist/esm/api/default-api.d.ts +3 -10
  57. package/dist/esm/api/default-api.js +7 -13
  58. package/dist/esm/api/favored-option-api.d.ts +104 -0
  59. package/dist/esm/api/favored-option-api.js +202 -0
  60. package/dist/esm/api/impact-api.d.ts +245 -0
  61. package/dist/esm/api/impact-api.js +486 -0
  62. package/dist/esm/api/investment-api.d.ts +677 -0
  63. package/dist/esm/api/investment-api.js +1387 -0
  64. package/dist/esm/api/metric-api.d.ts +97 -88
  65. package/dist/esm/api/metric-api.js +185 -157
  66. package/dist/esm/api/metric-costs-api.d.ts +75 -0
  67. package/dist/esm/api/metric-costs-api.js +139 -0
  68. package/dist/esm/api/metric-costs-per-year-api.d.ts +105 -108
  69. package/dist/esm/api/metric-costs-per-year-api.js +199 -192
  70. package/dist/esm/api/objective-api.d.ts +242 -21
  71. package/dist/esm/api/objective-api.js +508 -37
  72. package/dist/esm/api/objective-weight-api.d.ts +105 -108
  73. package/dist/esm/api/objective-weight-api.js +189 -182
  74. package/dist/esm/api/objective-weights-api.d.ts +75 -0
  75. package/dist/esm/api/objective-weights-api.js +139 -0
  76. package/dist/esm/api/option-api.d.ts +436 -0
  77. package/dist/esm/api/option-api.js +881 -0
  78. package/dist/esm/api/value-framework-api.d.ts +528 -21
  79. package/dist/esm/api/value-framework-api.js +1137 -77
  80. package/dist/esm/api/value-framework-costs-api.d.ts +119 -0
  81. package/dist/esm/api/value-framework-costs-api.js +229 -0
  82. package/dist/esm/api/value-framework-weights-api.d.ts +75 -0
  83. package/dist/esm/api/value-framework-weights-api.js +139 -0
  84. package/dist/esm/api.d.ts +9 -1
  85. package/dist/esm/api.js +9 -1
  86. package/dist/esm/base.d.ts +1 -25
  87. package/dist/esm/base.js +1 -20
  88. package/dist/esm/common.d.ts +6 -37
  89. package/dist/esm/common.js +15 -38
  90. package/dist/esm/configuration.d.ts +25 -18
  91. package/dist/esm/configuration.js +4 -3
  92. package/dist/esm/index.d.ts +1 -1
  93. package/dist/esm/index.js +1 -1
  94. package/dist/esm/models/evolution-type.d.ts +16 -0
  95. package/dist/esm/models/evolution-type.js +17 -0
  96. package/dist/esm/models/favored-option-request.d.ts +20 -0
  97. package/dist/esm/models/{validation-error-loc-inner.js → favored-option-request.js} +1 -1
  98. package/dist/esm/models/favored-option-response.d.ts +20 -0
  99. package/dist/esm/models/favored-option-response.js +14 -0
  100. package/dist/esm/models/httpvalidation-error.d.ts +2 -12
  101. package/dist/esm/models/httpvalidation-error.js +1 -1
  102. package/dist/esm/models/impact-apiresponse.d.ts +33 -0
  103. package/dist/esm/models/impact-apiresponse.js +14 -0
  104. package/dist/esm/models/impact-create.d.ts +37 -0
  105. package/dist/esm/models/impact-create.js +14 -0
  106. package/dist/esm/models/impact-update.d.ts +22 -0
  107. package/dist/esm/models/impact-update.js +14 -0
  108. package/dist/esm/models/index.d.ts +13 -1
  109. package/dist/esm/models/index.js +13 -1
  110. package/dist/esm/models/investment-create.d.ts +21 -0
  111. package/dist/esm/models/investment-create.js +14 -0
  112. package/dist/esm/models/investment-response.d.ts +26 -0
  113. package/dist/esm/models/investment-response.js +14 -0
  114. package/dist/esm/models/investment-update.d.ts +18 -0
  115. package/dist/esm/models/investment-update.js +14 -0
  116. package/dist/esm/models/{validation-error-loc-inner.d.ts → location-inner.d.ts} +2 -7
  117. package/dist/esm/models/location-inner.js +14 -0
  118. package/dist/esm/models/measurement-type.d.ts +1 -6
  119. package/dist/esm/models/measurement-type.js +1 -6
  120. package/dist/esm/models/metric-costs-per-year-create.d.ts +1 -17
  121. package/dist/esm/models/metric-costs-per-year-create.js +1 -1
  122. package/dist/esm/models/metric-costs-per-year-response.d.ts +1 -18
  123. package/dist/esm/models/metric-costs-per-year-response.js +1 -1
  124. package/dist/esm/models/metric-costs-per-year-update.d.ts +1 -13
  125. package/dist/esm/models/metric-costs-per-year-update.js +1 -1
  126. package/dist/esm/models/metric-create.d.ts +3 -28
  127. package/dist/esm/models/metric-create.js +1 -1
  128. package/dist/esm/models/metric-response.d.ts +3 -50
  129. package/dist/esm/models/metric-response.js +1 -1
  130. package/dist/esm/models/metric-type.d.ts +1 -6
  131. package/dist/esm/models/metric-type.js +1 -6
  132. package/dist/esm/models/metric-update.d.ts +3 -35
  133. package/dist/esm/models/metric-update.js +1 -1
  134. package/dist/esm/models/objective-create.d.ts +1 -10
  135. package/dist/esm/models/objective-create.js +1 -1
  136. package/dist/esm/models/objective-response.d.ts +1 -30
  137. package/dist/esm/models/objective-response.js +1 -1
  138. package/dist/esm/models/objective-update.d.ts +1 -13
  139. package/dist/esm/models/objective-update.js +1 -1
  140. package/dist/esm/models/objective-weight-create.d.ts +1 -9
  141. package/dist/esm/models/objective-weight-create.js +1 -1
  142. package/dist/esm/models/objective-weight-response.d.ts +1 -14
  143. package/dist/esm/models/objective-weight-response.js +1 -1
  144. package/dist/esm/models/objective-weight-update.d.ts +1 -8
  145. package/dist/esm/models/objective-weight-update.js +1 -1
  146. package/dist/esm/models/option-create.d.ts +33 -0
  147. package/dist/esm/models/option-create.js +14 -0
  148. package/dist/esm/models/option-response.d.ts +32 -0
  149. package/dist/esm/models/option-response.js +14 -0
  150. package/dist/esm/models/option-update.d.ts +21 -0
  151. package/dist/esm/models/option-update.js +14 -0
  152. package/dist/esm/models/validation-error.d.ts +3 -33
  153. package/dist/esm/models/validation-error.js +1 -1
  154. package/dist/esm/models/value-framework-create.d.ts +1 -10
  155. package/dist/esm/models/value-framework-create.js +1 -1
  156. package/dist/esm/models/value-framework-response.d.ts +1 -30
  157. package/dist/esm/models/value-framework-response.js +1 -1
  158. package/dist/esm/models/value-framework-update.d.ts +1 -13
  159. package/dist/esm/models/value-framework-update.js +1 -1
  160. package/dist/index.d.ts +1 -1
  161. package/dist/index.js +1 -1
  162. package/dist/models/evolution-type.d.ts +16 -0
  163. package/dist/models/evolution-type.js +20 -0
  164. package/dist/models/favored-option-request.d.ts +20 -0
  165. package/dist/models/{validation-error-loc-inner.js → favored-option-request.js} +1 -1
  166. package/dist/models/favored-option-response.d.ts +20 -0
  167. package/dist/models/favored-option-response.js +15 -0
  168. package/dist/models/httpvalidation-error.d.ts +2 -12
  169. package/dist/models/httpvalidation-error.js +1 -1
  170. package/dist/models/impact-apiresponse.d.ts +33 -0
  171. package/dist/models/impact-apiresponse.js +15 -0
  172. package/dist/models/impact-create.d.ts +37 -0
  173. package/dist/models/impact-create.js +15 -0
  174. package/dist/models/impact-update.d.ts +22 -0
  175. package/dist/models/impact-update.js +15 -0
  176. package/dist/models/index.d.ts +13 -1
  177. package/dist/models/index.js +13 -1
  178. package/dist/models/investment-create.d.ts +21 -0
  179. package/dist/models/investment-create.js +15 -0
  180. package/dist/models/investment-response.d.ts +26 -0
  181. package/dist/models/investment-response.js +15 -0
  182. package/dist/models/investment-update.d.ts +18 -0
  183. package/dist/models/investment-update.js +15 -0
  184. package/dist/models/{validation-error-loc-inner.d.ts → location-inner.d.ts} +2 -7
  185. package/dist/models/location-inner.js +15 -0
  186. package/dist/models/measurement-type.d.ts +1 -6
  187. package/dist/models/measurement-type.js +1 -6
  188. package/dist/models/metric-costs-per-year-create.d.ts +1 -17
  189. package/dist/models/metric-costs-per-year-create.js +1 -1
  190. package/dist/models/metric-costs-per-year-response.d.ts +1 -18
  191. package/dist/models/metric-costs-per-year-response.js +1 -1
  192. package/dist/models/metric-costs-per-year-update.d.ts +1 -13
  193. package/dist/models/metric-costs-per-year-update.js +1 -1
  194. package/dist/models/metric-create.d.ts +3 -28
  195. package/dist/models/metric-create.js +1 -1
  196. package/dist/models/metric-response.d.ts +3 -50
  197. package/dist/models/metric-response.js +1 -1
  198. package/dist/models/metric-type.d.ts +1 -6
  199. package/dist/models/metric-type.js +1 -6
  200. package/dist/models/metric-update.d.ts +3 -35
  201. package/dist/models/metric-update.js +1 -1
  202. package/dist/models/objective-create.d.ts +1 -10
  203. package/dist/models/objective-create.js +1 -1
  204. package/dist/models/objective-response.d.ts +1 -30
  205. package/dist/models/objective-response.js +1 -1
  206. package/dist/models/objective-update.d.ts +1 -13
  207. package/dist/models/objective-update.js +1 -1
  208. package/dist/models/objective-weight-create.d.ts +1 -9
  209. package/dist/models/objective-weight-create.js +1 -1
  210. package/dist/models/objective-weight-response.d.ts +1 -14
  211. package/dist/models/objective-weight-response.js +1 -1
  212. package/dist/models/objective-weight-update.d.ts +1 -8
  213. package/dist/models/objective-weight-update.js +1 -1
  214. package/dist/models/option-create.d.ts +33 -0
  215. package/dist/models/option-create.js +15 -0
  216. package/dist/models/option-response.d.ts +32 -0
  217. package/dist/models/option-response.js +15 -0
  218. package/dist/models/option-update.d.ts +21 -0
  219. package/dist/models/option-update.js +15 -0
  220. package/dist/models/validation-error.d.ts +3 -33
  221. package/dist/models/validation-error.js +1 -1
  222. package/dist/models/value-framework-create.d.ts +1 -10
  223. package/dist/models/value-framework-create.js +1 -1
  224. package/dist/models/value-framework-response.d.ts +1 -30
  225. package/dist/models/value-framework-response.js +1 -1
  226. package/dist/models/value-framework-update.d.ts +1 -13
  227. package/dist/models/value-framework-update.js +1 -1
  228. package/docs/DefaultApi.md +51 -0
  229. package/docs/EvolutionType.md +10 -0
  230. package/docs/FavoredOptionApi.md +119 -0
  231. package/docs/FavoredOptionRequest.md +21 -0
  232. package/docs/FavoredOptionResponse.md +21 -0
  233. package/docs/HTTPValidationError.md +20 -0
  234. package/docs/ImpactAPIResponse.md +39 -0
  235. package/docs/ImpactApi.md +312 -0
  236. package/docs/ImpactCreate.md +29 -0
  237. package/docs/ImpactUpdate.md +29 -0
  238. package/docs/InvestmentApi.md +987 -0
  239. package/docs/InvestmentCreate.md +23 -0
  240. package/docs/InvestmentResponse.md +33 -0
  241. package/docs/InvestmentUpdate.md +23 -0
  242. package/docs/LocationInner.md +18 -0
  243. package/docs/MeasurementType.md +10 -0
  244. package/docs/MetricApi.md +299 -0
  245. package/docs/MetricCostsApi.md +66 -0
  246. package/docs/MetricCostsPerYearApi.md +307 -0
  247. package/docs/MetricCostsPerYearCreate.md +27 -0
  248. package/docs/MetricCostsPerYearResponse.md +31 -0
  249. package/docs/MetricCostsPerYearUpdate.md +23 -0
  250. package/docs/MetricCreate.md +33 -0
  251. package/docs/MetricResponse.md +43 -0
  252. package/docs/MetricType.md +12 -0
  253. package/docs/MetricUpdate.md +31 -0
  254. package/docs/ObjectiveApi.md +633 -0
  255. package/docs/ObjectiveCreate.md +23 -0
  256. package/docs/ObjectiveResponse.md +31 -0
  257. package/docs/ObjectiveUpdate.md +23 -0
  258. package/docs/ObjectiveWeightApi.md +298 -0
  259. package/docs/ObjectiveWeightCreate.md +25 -0
  260. package/docs/ObjectiveWeightResponse.md +27 -0
  261. package/docs/ObjectiveWeightUpdate.md +21 -0
  262. package/docs/ObjectiveWeightsApi.md +66 -0
  263. package/docs/OptionApi.md +602 -0
  264. package/docs/OptionCreate.md +29 -0
  265. package/docs/OptionResponse.md +39 -0
  266. package/docs/OptionUpdate.md +29 -0
  267. package/docs/ValidationError.md +28 -0
  268. package/docs/ValueFrameworkApi.md +1053 -0
  269. package/docs/ValueFrameworkCostsApi.md +128 -0
  270. package/docs/ValueFrameworkCreate.md +23 -0
  271. package/docs/ValueFrameworkResponse.md +31 -0
  272. package/docs/ValueFrameworkUpdate.md +23 -0
  273. package/docs/ValueFrameworkWeightsApi.md +66 -0
  274. package/index.ts +1 -1
  275. package/models/evolution-type.ts +26 -0
  276. package/models/favored-option-request.ts +26 -0
  277. package/models/favored-option-response.ts +26 -0
  278. package/models/httpvalidation-error.ts +2 -12
  279. package/models/impact-apiresponse.ts +43 -0
  280. package/models/impact-create.ts +47 -0
  281. package/models/impact-update.ts +32 -0
  282. package/models/index.ts +13 -1
  283. package/models/investment-create.ts +27 -0
  284. package/models/investment-response.ts +32 -0
  285. package/models/investment-update.ts +24 -0
  286. package/models/{validation-error-loc-inner.ts → location-inner.ts} +2 -7
  287. package/models/measurement-type.ts +1 -6
  288. package/models/metric-costs-per-year-create.ts +1 -17
  289. package/models/metric-costs-per-year-response.ts +1 -18
  290. package/models/metric-costs-per-year-update.ts +1 -13
  291. package/models/metric-create.ts +3 -28
  292. package/models/metric-response.ts +3 -50
  293. package/models/metric-type.ts +1 -6
  294. package/models/metric-update.ts +3 -35
  295. package/models/objective-create.ts +1 -10
  296. package/models/objective-response.ts +1 -30
  297. package/models/objective-update.ts +1 -13
  298. package/models/objective-weight-create.ts +1 -9
  299. package/models/objective-weight-response.ts +1 -14
  300. package/models/objective-weight-update.ts +1 -8
  301. package/models/option-create.ts +39 -0
  302. package/models/option-response.ts +38 -0
  303. package/models/option-update.ts +27 -0
  304. package/models/validation-error.ts +3 -33
  305. package/models/value-framework-create.ts +1 -10
  306. package/models/value-framework-response.ts +1 -30
  307. package/models/value-framework-update.ts +1 -13
  308. package/package.json +4 -4
@@ -0,0 +1,1394 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Asset Investment Planning
6
+ * API for Asset Investment Planning
7
+ *
8
+ * The version of the OpenAPI document: 0.2.0-dev3
9
+ *
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.InvestmentApi = exports.InvestmentApiFactory = exports.InvestmentApiFp = exports.InvestmentApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("../common");
30
+ // @ts-ignore
31
+ const base_1 = require("../base");
32
+ /**
33
+ * InvestmentApi - axios parameter creator
34
+ */
35
+ const InvestmentApiAxiosParamCreator = function (configuration) {
36
+ return {
37
+ /**
38
+ * Create a new impact under this option.
39
+ * @summary Create an impact for this option
40
+ * @param {string} optionId UUID of the option
41
+ * @param {string} investmentId UUID of the investment
42
+ * @param {ImpactCreate} impactCreate
43
+ * @param {*} [options] Override http request option.
44
+ * @throws {RequiredError}
45
+ */
46
+ createImpactForOption: (optionId_1, investmentId_1, impactCreate_1, ...args_1) => __awaiter(this, [optionId_1, investmentId_1, impactCreate_1, ...args_1], void 0, function* (optionId, investmentId, impactCreate, options = {}) {
47
+ // verify required parameter 'optionId' is not null or undefined
48
+ (0, common_1.assertParamExists)('createImpactForOption', 'optionId', optionId);
49
+ // verify required parameter 'investmentId' is not null or undefined
50
+ (0, common_1.assertParamExists)('createImpactForOption', 'investmentId', investmentId);
51
+ // verify required parameter 'impactCreate' is not null or undefined
52
+ (0, common_1.assertParamExists)('createImpactForOption', 'impactCreate', impactCreate);
53
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/`
54
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
55
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
56
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
57
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
58
+ let baseOptions;
59
+ if (configuration) {
60
+ baseOptions = configuration.baseOptions;
61
+ }
62
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
63
+ const localVarHeaderParameter = {};
64
+ const localVarQueryParameter = {};
65
+ // authentication OAuth2AuthorizationCodeBearer required
66
+ // oauth required
67
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
68
+ localVarHeaderParameter['Content-Type'] = 'application/json';
69
+ localVarHeaderParameter['Accept'] = 'application/json';
70
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
71
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
72
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
73
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(impactCreate, localVarRequestOptions, configuration);
74
+ return {
75
+ url: (0, common_1.toPathString)(localVarUrlObj),
76
+ options: localVarRequestOptions,
77
+ };
78
+ }),
79
+ /**
80
+ * Create a new option under this investment.
81
+ * @summary Create an option for this investment
82
+ * @param {string} investmentId UUID of the investment
83
+ * @param {OptionCreate} optionCreate
84
+ * @param {*} [options] Override http request option.
85
+ * @throws {RequiredError}
86
+ */
87
+ createOptionForInvestment: (investmentId_1, optionCreate_1, ...args_1) => __awaiter(this, [investmentId_1, optionCreate_1, ...args_1], void 0, function* (investmentId, optionCreate, options = {}) {
88
+ // verify required parameter 'investmentId' is not null or undefined
89
+ (0, common_1.assertParamExists)('createOptionForInvestment', 'investmentId', investmentId);
90
+ // verify required parameter 'optionCreate' is not null or undefined
91
+ (0, common_1.assertParamExists)('createOptionForInvestment', 'optionCreate', optionCreate);
92
+ const localVarPath = `/investment/{investment_id}/option/`
93
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
94
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
95
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
96
+ let baseOptions;
97
+ if (configuration) {
98
+ baseOptions = configuration.baseOptions;
99
+ }
100
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
101
+ const localVarHeaderParameter = {};
102
+ const localVarQueryParameter = {};
103
+ // authentication OAuth2AuthorizationCodeBearer required
104
+ // oauth required
105
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
106
+ localVarHeaderParameter['Content-Type'] = 'application/json';
107
+ localVarHeaderParameter['Accept'] = 'application/json';
108
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
109
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
110
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
111
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(optionCreate, localVarRequestOptions, configuration);
112
+ return {
113
+ url: (0, common_1.toPathString)(localVarUrlObj),
114
+ options: localVarRequestOptions,
115
+ };
116
+ }),
117
+ /**
118
+ * Delete an existing impact by its ID.
119
+ * @summary Delete an impact for this option
120
+ * @param {string} impactId UUID of the impact
121
+ * @param {string} optionId UUID of the option
122
+ * @param {string} investmentId UUID of the investment
123
+ * @param {*} [options] Override http request option.
124
+ * @throws {RequiredError}
125
+ */
126
+ deleteImpactForOption: (impactId_1, optionId_1, investmentId_1, ...args_1) => __awaiter(this, [impactId_1, optionId_1, investmentId_1, ...args_1], void 0, function* (impactId, optionId, investmentId, options = {}) {
127
+ // verify required parameter 'impactId' is not null or undefined
128
+ (0, common_1.assertParamExists)('deleteImpactForOption', 'impactId', impactId);
129
+ // verify required parameter 'optionId' is not null or undefined
130
+ (0, common_1.assertParamExists)('deleteImpactForOption', 'optionId', optionId);
131
+ // verify required parameter 'investmentId' is not null or undefined
132
+ (0, common_1.assertParamExists)('deleteImpactForOption', 'investmentId', investmentId);
133
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
134
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
135
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
136
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
137
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
138
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
139
+ let baseOptions;
140
+ if (configuration) {
141
+ baseOptions = configuration.baseOptions;
142
+ }
143
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
144
+ const localVarHeaderParameter = {};
145
+ const localVarQueryParameter = {};
146
+ // authentication OAuth2AuthorizationCodeBearer required
147
+ // oauth required
148
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
149
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
150
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
151
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
152
+ return {
153
+ url: (0, common_1.toPathString)(localVarUrlObj),
154
+ options: localVarRequestOptions,
155
+ };
156
+ }),
157
+ /**
158
+ * Delete an existing investment by its ID. Associated options are also deleted via cascade.
159
+ * @summary Delete an investment
160
+ * @param {string} investmentId UUID of the investment
161
+ * @param {*} [options] Override http request option.
162
+ * @throws {RequiredError}
163
+ */
164
+ deleteInvestment: (investmentId_1, ...args_1) => __awaiter(this, [investmentId_1, ...args_1], void 0, function* (investmentId, options = {}) {
165
+ // verify required parameter 'investmentId' is not null or undefined
166
+ (0, common_1.assertParamExists)('deleteInvestment', 'investmentId', investmentId);
167
+ const localVarPath = `/investment/{investment_id}`
168
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
169
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
170
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
171
+ let baseOptions;
172
+ if (configuration) {
173
+ baseOptions = configuration.baseOptions;
174
+ }
175
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
176
+ const localVarHeaderParameter = {};
177
+ const localVarQueryParameter = {};
178
+ // authentication OAuth2AuthorizationCodeBearer required
179
+ // oauth required
180
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
181
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
183
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
184
+ return {
185
+ url: (0, common_1.toPathString)(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ };
188
+ }),
189
+ /**
190
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
191
+ * @summary Delete an option for this investment
192
+ * @param {string} optionId UUID of the option
193
+ * @param {string} investmentId UUID of the investment
194
+ * @param {*} [options] Override http request option.
195
+ * @throws {RequiredError}
196
+ */
197
+ deleteOptionForInvestment: (optionId_1, investmentId_1, ...args_1) => __awaiter(this, [optionId_1, investmentId_1, ...args_1], void 0, function* (optionId, investmentId, options = {}) {
198
+ // verify required parameter 'optionId' is not null or undefined
199
+ (0, common_1.assertParamExists)('deleteOptionForInvestment', 'optionId', optionId);
200
+ // verify required parameter 'investmentId' is not null or undefined
201
+ (0, common_1.assertParamExists)('deleteOptionForInvestment', 'investmentId', investmentId);
202
+ const localVarPath = `/investment/{investment_id}/option/{option_id}`
203
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
204
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
205
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
206
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
207
+ let baseOptions;
208
+ if (configuration) {
209
+ baseOptions = configuration.baseOptions;
210
+ }
211
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
212
+ const localVarHeaderParameter = {};
213
+ const localVarQueryParameter = {};
214
+ // authentication OAuth2AuthorizationCodeBearer required
215
+ // oauth required
216
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
217
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
218
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
219
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
220
+ return {
221
+ url: (0, common_1.toPathString)(localVarUrlObj),
222
+ options: localVarRequestOptions,
223
+ };
224
+ }),
225
+ /**
226
+ * Get the preferred option for an investment.
227
+ * @summary Get the preferred option for an investment
228
+ * @param {string} investmentId UUID of the investment
229
+ * @param {*} [options] Override http request option.
230
+ * @throws {RequiredError}
231
+ */
232
+ getFavoredOption: (investmentId_1, ...args_1) => __awaiter(this, [investmentId_1, ...args_1], void 0, function* (investmentId, options = {}) {
233
+ // verify required parameter 'investmentId' is not null or undefined
234
+ (0, common_1.assertParamExists)('getFavoredOption', 'investmentId', investmentId);
235
+ const localVarPath = `/investment/{investment_id}/favored_option`
236
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
237
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
238
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
239
+ let baseOptions;
240
+ if (configuration) {
241
+ baseOptions = configuration.baseOptions;
242
+ }
243
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
244
+ const localVarHeaderParameter = {};
245
+ const localVarQueryParameter = {};
246
+ // authentication OAuth2AuthorizationCodeBearer required
247
+ // oauth required
248
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
249
+ localVarHeaderParameter['Accept'] = 'application/json';
250
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
251
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
252
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
253
+ return {
254
+ url: (0, common_1.toPathString)(localVarUrlObj),
255
+ options: localVarRequestOptions,
256
+ };
257
+ }),
258
+ /**
259
+ * Retrieve a specific impact for the option.
260
+ * @summary Get an impact for this option
261
+ * @param {string} impactId UUID of the impact
262
+ * @param {string} optionId UUID of the option
263
+ * @param {string} investmentId UUID of the investment
264
+ * @param {*} [options] Override http request option.
265
+ * @throws {RequiredError}
266
+ */
267
+ getImpactForOption: (impactId_1, optionId_1, investmentId_1, ...args_1) => __awaiter(this, [impactId_1, optionId_1, investmentId_1, ...args_1], void 0, function* (impactId, optionId, investmentId, options = {}) {
268
+ // verify required parameter 'impactId' is not null or undefined
269
+ (0, common_1.assertParamExists)('getImpactForOption', 'impactId', impactId);
270
+ // verify required parameter 'optionId' is not null or undefined
271
+ (0, common_1.assertParamExists)('getImpactForOption', 'optionId', optionId);
272
+ // verify required parameter 'investmentId' is not null or undefined
273
+ (0, common_1.assertParamExists)('getImpactForOption', 'investmentId', investmentId);
274
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
275
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
276
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
277
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
278
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
279
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
280
+ let baseOptions;
281
+ if (configuration) {
282
+ baseOptions = configuration.baseOptions;
283
+ }
284
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
285
+ const localVarHeaderParameter = {};
286
+ const localVarQueryParameter = {};
287
+ // authentication OAuth2AuthorizationCodeBearer required
288
+ // oauth required
289
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
290
+ localVarHeaderParameter['Accept'] = 'application/json';
291
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
292
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
293
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
294
+ return {
295
+ url: (0, common_1.toPathString)(localVarUrlObj),
296
+ options: localVarRequestOptions,
297
+ };
298
+ }),
299
+ /**
300
+ * Retrieve a paginated list of all impacts for a specific option.
301
+ * @summary List impacts for this option
302
+ * @param {string} optionId UUID of the option
303
+ * @param {string} investmentId UUID of the investment
304
+ * @param {number} [offset] Number of records to skip
305
+ * @param {number} [limit] Max number of records to return
306
+ * @param {*} [options] Override http request option.
307
+ * @throws {RequiredError}
308
+ */
309
+ getImpactsForOption: (optionId_1, investmentId_1, offset_1, limit_1, ...args_1) => __awaiter(this, [optionId_1, investmentId_1, offset_1, limit_1, ...args_1], void 0, function* (optionId, investmentId, offset, limit, options = {}) {
310
+ // verify required parameter 'optionId' is not null or undefined
311
+ (0, common_1.assertParamExists)('getImpactsForOption', 'optionId', optionId);
312
+ // verify required parameter 'investmentId' is not null or undefined
313
+ (0, common_1.assertParamExists)('getImpactsForOption', 'investmentId', investmentId);
314
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/`
315
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
316
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
317
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
318
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
319
+ let baseOptions;
320
+ if (configuration) {
321
+ baseOptions = configuration.baseOptions;
322
+ }
323
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
324
+ const localVarHeaderParameter = {};
325
+ const localVarQueryParameter = {};
326
+ // authentication OAuth2AuthorizationCodeBearer required
327
+ // oauth required
328
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
329
+ if (offset !== undefined) {
330
+ localVarQueryParameter['offset'] = offset;
331
+ }
332
+ if (limit !== undefined) {
333
+ localVarQueryParameter['limit'] = limit;
334
+ }
335
+ localVarHeaderParameter['Accept'] = 'application/json';
336
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
337
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
338
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
339
+ return {
340
+ url: (0, common_1.toPathString)(localVarUrlObj),
341
+ options: localVarRequestOptions,
342
+ };
343
+ }),
344
+ /**
345
+ * Retrieve a single investment by its ID.
346
+ * @summary Get an investment by ID
347
+ * @param {string} investmentId UUID of the investment
348
+ * @param {*} [options] Override http request option.
349
+ * @throws {RequiredError}
350
+ */
351
+ getInvestmentById: (investmentId_1, ...args_1) => __awaiter(this, [investmentId_1, ...args_1], void 0, function* (investmentId, options = {}) {
352
+ // verify required parameter 'investmentId' is not null or undefined
353
+ (0, common_1.assertParamExists)('getInvestmentById', 'investmentId', investmentId);
354
+ const localVarPath = `/investment/{investment_id}`
355
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
356
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
357
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
358
+ let baseOptions;
359
+ if (configuration) {
360
+ baseOptions = configuration.baseOptions;
361
+ }
362
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
363
+ const localVarHeaderParameter = {};
364
+ const localVarQueryParameter = {};
365
+ // authentication OAuth2AuthorizationCodeBearer required
366
+ // oauth required
367
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
368
+ localVarHeaderParameter['Accept'] = 'application/json';
369
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
370
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
371
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
372
+ return {
373
+ url: (0, common_1.toPathString)(localVarUrlObj),
374
+ options: localVarRequestOptions,
375
+ };
376
+ }),
377
+ /**
378
+ * Retrieve a paginated list of all investments.
379
+ * @summary List investments
380
+ * @param {number} [offset] Number of records to skip
381
+ * @param {number} [limit] Max number of records to return
382
+ * @param {*} [options] Override http request option.
383
+ * @throws {RequiredError}
384
+ */
385
+ getInvestments: (offset_1, limit_1, ...args_1) => __awaiter(this, [offset_1, limit_1, ...args_1], void 0, function* (offset, limit, options = {}) {
386
+ const localVarPath = `/investment/`;
387
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
388
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
389
+ let baseOptions;
390
+ if (configuration) {
391
+ baseOptions = configuration.baseOptions;
392
+ }
393
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
394
+ const localVarHeaderParameter = {};
395
+ const localVarQueryParameter = {};
396
+ // authentication OAuth2AuthorizationCodeBearer required
397
+ // oauth required
398
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
399
+ if (offset !== undefined) {
400
+ localVarQueryParameter['offset'] = offset;
401
+ }
402
+ if (limit !== undefined) {
403
+ localVarQueryParameter['limit'] = limit;
404
+ }
405
+ localVarHeaderParameter['Accept'] = 'application/json';
406
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
407
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
408
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
409
+ return {
410
+ url: (0, common_1.toPathString)(localVarUrlObj),
411
+ options: localVarRequestOptions,
412
+ };
413
+ }),
414
+ /**
415
+ * Retrieve a specific option for the investment.
416
+ * @summary Get an option for this investment
417
+ * @param {string} optionId UUID of the option
418
+ * @param {string} investmentId UUID of the investment
419
+ * @param {*} [options] Override http request option.
420
+ * @throws {RequiredError}
421
+ */
422
+ getOptionForInvestment: (optionId_1, investmentId_1, ...args_1) => __awaiter(this, [optionId_1, investmentId_1, ...args_1], void 0, function* (optionId, investmentId, options = {}) {
423
+ // verify required parameter 'optionId' is not null or undefined
424
+ (0, common_1.assertParamExists)('getOptionForInvestment', 'optionId', optionId);
425
+ // verify required parameter 'investmentId' is not null or undefined
426
+ (0, common_1.assertParamExists)('getOptionForInvestment', 'investmentId', investmentId);
427
+ const localVarPath = `/investment/{investment_id}/option/{option_id}`
428
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
429
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
430
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
431
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
432
+ let baseOptions;
433
+ if (configuration) {
434
+ baseOptions = configuration.baseOptions;
435
+ }
436
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
437
+ const localVarHeaderParameter = {};
438
+ const localVarQueryParameter = {};
439
+ // authentication OAuth2AuthorizationCodeBearer required
440
+ // oauth required
441
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
442
+ localVarHeaderParameter['Accept'] = 'application/json';
443
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
444
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
445
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
446
+ return {
447
+ url: (0, common_1.toPathString)(localVarUrlObj),
448
+ options: localVarRequestOptions,
449
+ };
450
+ }),
451
+ /**
452
+ * Retrieve a paginated list of all options for a specific investment.
453
+ * @summary List options for this investment
454
+ * @param {string} investmentId UUID of the investment
455
+ * @param {number} [offset] Number of records to skip
456
+ * @param {number} [limit] Max number of records to return
457
+ * @param {*} [options] Override http request option.
458
+ * @throws {RequiredError}
459
+ */
460
+ getOptionsForInvestment: (investmentId_1, offset_1, limit_1, ...args_1) => __awaiter(this, [investmentId_1, offset_1, limit_1, ...args_1], void 0, function* (investmentId, offset, limit, options = {}) {
461
+ // verify required parameter 'investmentId' is not null or undefined
462
+ (0, common_1.assertParamExists)('getOptionsForInvestment', 'investmentId', investmentId);
463
+ const localVarPath = `/investment/{investment_id}/option/`
464
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
465
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
466
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
467
+ let baseOptions;
468
+ if (configuration) {
469
+ baseOptions = configuration.baseOptions;
470
+ }
471
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
472
+ const localVarHeaderParameter = {};
473
+ const localVarQueryParameter = {};
474
+ // authentication OAuth2AuthorizationCodeBearer required
475
+ // oauth required
476
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
477
+ if (offset !== undefined) {
478
+ localVarQueryParameter['offset'] = offset;
479
+ }
480
+ if (limit !== undefined) {
481
+ localVarQueryParameter['limit'] = limit;
482
+ }
483
+ localVarHeaderParameter['Accept'] = 'application/json';
484
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
485
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
486
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
487
+ return {
488
+ url: (0, common_1.toPathString)(localVarUrlObj),
489
+ options: localVarRequestOptions,
490
+ };
491
+ }),
492
+ /**
493
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
494
+ * @summary Partially update an impact for this option
495
+ * @param {string} impactId UUID of the impact
496
+ * @param {string} optionId UUID of the option
497
+ * @param {string} investmentId UUID of the investment
498
+ * @param {ImpactUpdate} impactUpdate
499
+ * @param {*} [options] Override http request option.
500
+ * @throws {RequiredError}
501
+ */
502
+ patchImpactForOption: (impactId_1, optionId_1, investmentId_1, impactUpdate_1, ...args_1) => __awaiter(this, [impactId_1, optionId_1, investmentId_1, impactUpdate_1, ...args_1], void 0, function* (impactId, optionId, investmentId, impactUpdate, options = {}) {
503
+ // verify required parameter 'impactId' is not null or undefined
504
+ (0, common_1.assertParamExists)('patchImpactForOption', 'impactId', impactId);
505
+ // verify required parameter 'optionId' is not null or undefined
506
+ (0, common_1.assertParamExists)('patchImpactForOption', 'optionId', optionId);
507
+ // verify required parameter 'investmentId' is not null or undefined
508
+ (0, common_1.assertParamExists)('patchImpactForOption', 'investmentId', investmentId);
509
+ // verify required parameter 'impactUpdate' is not null or undefined
510
+ (0, common_1.assertParamExists)('patchImpactForOption', 'impactUpdate', impactUpdate);
511
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
512
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
513
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
514
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
515
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
516
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
517
+ let baseOptions;
518
+ if (configuration) {
519
+ baseOptions = configuration.baseOptions;
520
+ }
521
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
522
+ const localVarHeaderParameter = {};
523
+ const localVarQueryParameter = {};
524
+ // authentication OAuth2AuthorizationCodeBearer required
525
+ // oauth required
526
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
527
+ localVarHeaderParameter['Content-Type'] = 'application/json';
528
+ localVarHeaderParameter['Accept'] = 'application/json';
529
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
530
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
531
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
532
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(impactUpdate, localVarRequestOptions, configuration);
533
+ return {
534
+ url: (0, common_1.toPathString)(localVarUrlObj),
535
+ options: localVarRequestOptions,
536
+ };
537
+ }),
538
+ /**
539
+ * Update one or more fields of an existing investment. Only the fields included in the request body will be modified; omitted fields remain unchanged.
540
+ * @summary Partially update an investment
541
+ * @param {string} investmentId UUID of the investment
542
+ * @param {InvestmentUpdate} investmentUpdate
543
+ * @param {*} [options] Override http request option.
544
+ * @throws {RequiredError}
545
+ */
546
+ patchInvestment: (investmentId_1, investmentUpdate_1, ...args_1) => __awaiter(this, [investmentId_1, investmentUpdate_1, ...args_1], void 0, function* (investmentId, investmentUpdate, options = {}) {
547
+ // verify required parameter 'investmentId' is not null or undefined
548
+ (0, common_1.assertParamExists)('patchInvestment', 'investmentId', investmentId);
549
+ // verify required parameter 'investmentUpdate' is not null or undefined
550
+ (0, common_1.assertParamExists)('patchInvestment', 'investmentUpdate', investmentUpdate);
551
+ const localVarPath = `/investment/{investment_id}`
552
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
553
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
554
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
555
+ let baseOptions;
556
+ if (configuration) {
557
+ baseOptions = configuration.baseOptions;
558
+ }
559
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
560
+ const localVarHeaderParameter = {};
561
+ const localVarQueryParameter = {};
562
+ // authentication OAuth2AuthorizationCodeBearer required
563
+ // oauth required
564
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
565
+ localVarHeaderParameter['Content-Type'] = 'application/json';
566
+ localVarHeaderParameter['Accept'] = 'application/json';
567
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
568
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
569
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
570
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(investmentUpdate, localVarRequestOptions, configuration);
571
+ return {
572
+ url: (0, common_1.toPathString)(localVarUrlObj),
573
+ options: localVarRequestOptions,
574
+ };
575
+ }),
576
+ /**
577
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
578
+ * @summary Partially update an option for this investment
579
+ * @param {string} optionId UUID of the option
580
+ * @param {string} investmentId UUID of the investment
581
+ * @param {OptionUpdate} optionUpdate
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ */
585
+ patchOptionForInvestment: (optionId_1, investmentId_1, optionUpdate_1, ...args_1) => __awaiter(this, [optionId_1, investmentId_1, optionUpdate_1, ...args_1], void 0, function* (optionId, investmentId, optionUpdate, options = {}) {
586
+ // verify required parameter 'optionId' is not null or undefined
587
+ (0, common_1.assertParamExists)('patchOptionForInvestment', 'optionId', optionId);
588
+ // verify required parameter 'investmentId' is not null or undefined
589
+ (0, common_1.assertParamExists)('patchOptionForInvestment', 'investmentId', investmentId);
590
+ // verify required parameter 'optionUpdate' is not null or undefined
591
+ (0, common_1.assertParamExists)('patchOptionForInvestment', 'optionUpdate', optionUpdate);
592
+ const localVarPath = `/investment/{investment_id}/option/{option_id}`
593
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
594
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
595
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
596
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
597
+ let baseOptions;
598
+ if (configuration) {
599
+ baseOptions = configuration.baseOptions;
600
+ }
601
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
602
+ const localVarHeaderParameter = {};
603
+ const localVarQueryParameter = {};
604
+ // authentication OAuth2AuthorizationCodeBearer required
605
+ // oauth required
606
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
607
+ localVarHeaderParameter['Content-Type'] = 'application/json';
608
+ localVarHeaderParameter['Accept'] = 'application/json';
609
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
610
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
611
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
612
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(optionUpdate, localVarRequestOptions, configuration);
613
+ return {
614
+ url: (0, common_1.toPathString)(localVarUrlObj),
615
+ options: localVarRequestOptions,
616
+ };
617
+ }),
618
+ /**
619
+ * Create a new investment.
620
+ * @summary Create an investment
621
+ * @param {InvestmentCreate} investmentCreate
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ */
625
+ postInvestment: (investmentCreate_1, ...args_1) => __awaiter(this, [investmentCreate_1, ...args_1], void 0, function* (investmentCreate, options = {}) {
626
+ // verify required parameter 'investmentCreate' is not null or undefined
627
+ (0, common_1.assertParamExists)('postInvestment', 'investmentCreate', investmentCreate);
628
+ const localVarPath = `/investment/`;
629
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
630
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
631
+ let baseOptions;
632
+ if (configuration) {
633
+ baseOptions = configuration.baseOptions;
634
+ }
635
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
636
+ const localVarHeaderParameter = {};
637
+ const localVarQueryParameter = {};
638
+ // authentication OAuth2AuthorizationCodeBearer required
639
+ // oauth required
640
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
641
+ localVarHeaderParameter['Content-Type'] = 'application/json';
642
+ localVarHeaderParameter['Accept'] = 'application/json';
643
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
644
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
645
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
646
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(investmentCreate, localVarRequestOptions, configuration);
647
+ return {
648
+ url: (0, common_1.toPathString)(localVarUrlObj),
649
+ options: localVarRequestOptions,
650
+ };
651
+ }),
652
+ /**
653
+ * Set the preferred option for an investment.
654
+ * @summary Set the preferred option for an investment
655
+ * @param {string} investmentId UUID of the investment
656
+ * @param {FavoredOptionRequest} favoredOptionRequest
657
+ * @param {*} [options] Override http request option.
658
+ * @throws {RequiredError}
659
+ */
660
+ setFavoredOption: (investmentId_1, favoredOptionRequest_1, ...args_1) => __awaiter(this, [investmentId_1, favoredOptionRequest_1, ...args_1], void 0, function* (investmentId, favoredOptionRequest, options = {}) {
661
+ // verify required parameter 'investmentId' is not null or undefined
662
+ (0, common_1.assertParamExists)('setFavoredOption', 'investmentId', investmentId);
663
+ // verify required parameter 'favoredOptionRequest' is not null or undefined
664
+ (0, common_1.assertParamExists)('setFavoredOption', 'favoredOptionRequest', favoredOptionRequest);
665
+ const localVarPath = `/investment/{investment_id}/favored_option`
666
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
667
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
668
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
669
+ let baseOptions;
670
+ if (configuration) {
671
+ baseOptions = configuration.baseOptions;
672
+ }
673
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
674
+ const localVarHeaderParameter = {};
675
+ const localVarQueryParameter = {};
676
+ // authentication OAuth2AuthorizationCodeBearer required
677
+ // oauth required
678
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
679
+ localVarHeaderParameter['Content-Type'] = 'application/json';
680
+ localVarHeaderParameter['Accept'] = 'application/json';
681
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
682
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
683
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
684
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(favoredOptionRequest, localVarRequestOptions, configuration);
685
+ return {
686
+ url: (0, common_1.toPathString)(localVarUrlObj),
687
+ options: localVarRequestOptions,
688
+ };
689
+ }),
690
+ };
691
+ };
692
+ exports.InvestmentApiAxiosParamCreator = InvestmentApiAxiosParamCreator;
693
+ /**
694
+ * InvestmentApi - functional programming interface
695
+ */
696
+ const InvestmentApiFp = function (configuration) {
697
+ const localVarAxiosParamCreator = (0, exports.InvestmentApiAxiosParamCreator)(configuration);
698
+ return {
699
+ /**
700
+ * Create a new impact under this option.
701
+ * @summary Create an impact for this option
702
+ * @param {string} optionId UUID of the option
703
+ * @param {string} investmentId UUID of the investment
704
+ * @param {ImpactCreate} impactCreate
705
+ * @param {*} [options] Override http request option.
706
+ * @throws {RequiredError}
707
+ */
708
+ createImpactForOption(optionId, investmentId, impactCreate, options) {
709
+ return __awaiter(this, void 0, void 0, function* () {
710
+ var _a, _b, _c;
711
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createImpactForOption(optionId, investmentId, impactCreate, options);
712
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
713
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.createImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
714
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
715
+ });
716
+ },
717
+ /**
718
+ * Create a new option under this investment.
719
+ * @summary Create an option for this investment
720
+ * @param {string} investmentId UUID of the investment
721
+ * @param {OptionCreate} optionCreate
722
+ * @param {*} [options] Override http request option.
723
+ * @throws {RequiredError}
724
+ */
725
+ createOptionForInvestment(investmentId, optionCreate, options) {
726
+ return __awaiter(this, void 0, void 0, function* () {
727
+ var _a, _b, _c;
728
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createOptionForInvestment(investmentId, optionCreate, options);
729
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
730
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.createOptionForInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
731
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
732
+ });
733
+ },
734
+ /**
735
+ * Delete an existing impact by its ID.
736
+ * @summary Delete an impact for this option
737
+ * @param {string} impactId UUID of the impact
738
+ * @param {string} optionId UUID of the option
739
+ * @param {string} investmentId UUID of the investment
740
+ * @param {*} [options] Override http request option.
741
+ * @throws {RequiredError}
742
+ */
743
+ deleteImpactForOption(impactId, optionId, investmentId, options) {
744
+ return __awaiter(this, void 0, void 0, function* () {
745
+ var _a, _b, _c;
746
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteImpactForOption(impactId, optionId, investmentId, options);
747
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
748
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.deleteImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
749
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
750
+ });
751
+ },
752
+ /**
753
+ * Delete an existing investment by its ID. Associated options are also deleted via cascade.
754
+ * @summary Delete an investment
755
+ * @param {string} investmentId UUID of the investment
756
+ * @param {*} [options] Override http request option.
757
+ * @throws {RequiredError}
758
+ */
759
+ deleteInvestment(investmentId, options) {
760
+ return __awaiter(this, void 0, void 0, function* () {
761
+ var _a, _b, _c;
762
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInvestment(investmentId, options);
763
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
764
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.deleteInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
765
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
766
+ });
767
+ },
768
+ /**
769
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
770
+ * @summary Delete an option for this investment
771
+ * @param {string} optionId UUID of the option
772
+ * @param {string} investmentId UUID of the investment
773
+ * @param {*} [options] Override http request option.
774
+ * @throws {RequiredError}
775
+ */
776
+ deleteOptionForInvestment(optionId, investmentId, options) {
777
+ return __awaiter(this, void 0, void 0, function* () {
778
+ var _a, _b, _c;
779
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteOptionForInvestment(optionId, investmentId, options);
780
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
781
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.deleteOptionForInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
782
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
783
+ });
784
+ },
785
+ /**
786
+ * Get the preferred option for an investment.
787
+ * @summary Get the preferred option for an investment
788
+ * @param {string} investmentId UUID of the investment
789
+ * @param {*} [options] Override http request option.
790
+ * @throws {RequiredError}
791
+ */
792
+ getFavoredOption(investmentId, options) {
793
+ return __awaiter(this, void 0, void 0, function* () {
794
+ var _a, _b, _c;
795
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFavoredOption(investmentId, options);
796
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
797
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.getFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
798
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
799
+ });
800
+ },
801
+ /**
802
+ * Retrieve a specific impact for the option.
803
+ * @summary Get an impact for this option
804
+ * @param {string} impactId UUID of the impact
805
+ * @param {string} optionId UUID of the option
806
+ * @param {string} investmentId UUID of the investment
807
+ * @param {*} [options] Override http request option.
808
+ * @throws {RequiredError}
809
+ */
810
+ getImpactForOption(impactId, optionId, investmentId, options) {
811
+ return __awaiter(this, void 0, void 0, function* () {
812
+ var _a, _b, _c;
813
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getImpactForOption(impactId, optionId, investmentId, options);
814
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
815
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.getImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
816
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
817
+ });
818
+ },
819
+ /**
820
+ * Retrieve a paginated list of all impacts for a specific option.
821
+ * @summary List impacts for this option
822
+ * @param {string} optionId UUID of the option
823
+ * @param {string} investmentId UUID of the investment
824
+ * @param {number} [offset] Number of records to skip
825
+ * @param {number} [limit] Max number of records to return
826
+ * @param {*} [options] Override http request option.
827
+ * @throws {RequiredError}
828
+ */
829
+ getImpactsForOption(optionId, investmentId, offset, limit, options) {
830
+ return __awaiter(this, void 0, void 0, function* () {
831
+ var _a, _b, _c;
832
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getImpactsForOption(optionId, investmentId, offset, limit, options);
833
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
834
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.getImpactsForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
835
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
836
+ });
837
+ },
838
+ /**
839
+ * Retrieve a single investment by its ID.
840
+ * @summary Get an investment by ID
841
+ * @param {string} investmentId UUID of the investment
842
+ * @param {*} [options] Override http request option.
843
+ * @throws {RequiredError}
844
+ */
845
+ getInvestmentById(investmentId, options) {
846
+ return __awaiter(this, void 0, void 0, function* () {
847
+ var _a, _b, _c;
848
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getInvestmentById(investmentId, options);
849
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
850
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.getInvestmentById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
851
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
852
+ });
853
+ },
854
+ /**
855
+ * Retrieve a paginated list of all investments.
856
+ * @summary List investments
857
+ * @param {number} [offset] Number of records to skip
858
+ * @param {number} [limit] Max number of records to return
859
+ * @param {*} [options] Override http request option.
860
+ * @throws {RequiredError}
861
+ */
862
+ getInvestments(offset, limit, options) {
863
+ return __awaiter(this, void 0, void 0, function* () {
864
+ var _a, _b, _c;
865
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getInvestments(offset, limit, options);
866
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
867
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.getInvestments']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
868
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
869
+ });
870
+ },
871
+ /**
872
+ * Retrieve a specific option for the investment.
873
+ * @summary Get an option for this investment
874
+ * @param {string} optionId UUID of the option
875
+ * @param {string} investmentId UUID of the investment
876
+ * @param {*} [options] Override http request option.
877
+ * @throws {RequiredError}
878
+ */
879
+ getOptionForInvestment(optionId, investmentId, options) {
880
+ return __awaiter(this, void 0, void 0, function* () {
881
+ var _a, _b, _c;
882
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOptionForInvestment(optionId, investmentId, options);
883
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
884
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.getOptionForInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
885
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
886
+ });
887
+ },
888
+ /**
889
+ * Retrieve a paginated list of all options for a specific investment.
890
+ * @summary List options for this investment
891
+ * @param {string} investmentId UUID of the investment
892
+ * @param {number} [offset] Number of records to skip
893
+ * @param {number} [limit] Max number of records to return
894
+ * @param {*} [options] Override http request option.
895
+ * @throws {RequiredError}
896
+ */
897
+ getOptionsForInvestment(investmentId, offset, limit, options) {
898
+ return __awaiter(this, void 0, void 0, function* () {
899
+ var _a, _b, _c;
900
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOptionsForInvestment(investmentId, offset, limit, options);
901
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
902
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.getOptionsForInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
903
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
904
+ });
905
+ },
906
+ /**
907
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
908
+ * @summary Partially update an impact for this option
909
+ * @param {string} impactId UUID of the impact
910
+ * @param {string} optionId UUID of the option
911
+ * @param {string} investmentId UUID of the investment
912
+ * @param {ImpactUpdate} impactUpdate
913
+ * @param {*} [options] Override http request option.
914
+ * @throws {RequiredError}
915
+ */
916
+ patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options) {
917
+ return __awaiter(this, void 0, void 0, function* () {
918
+ var _a, _b, _c;
919
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options);
920
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
921
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.patchImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
922
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
923
+ });
924
+ },
925
+ /**
926
+ * Update one or more fields of an existing investment. Only the fields included in the request body will be modified; omitted fields remain unchanged.
927
+ * @summary Partially update an investment
928
+ * @param {string} investmentId UUID of the investment
929
+ * @param {InvestmentUpdate} investmentUpdate
930
+ * @param {*} [options] Override http request option.
931
+ * @throws {RequiredError}
932
+ */
933
+ patchInvestment(investmentId, investmentUpdate, options) {
934
+ return __awaiter(this, void 0, void 0, function* () {
935
+ var _a, _b, _c;
936
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.patchInvestment(investmentId, investmentUpdate, options);
937
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
938
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.patchInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
939
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
940
+ });
941
+ },
942
+ /**
943
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
944
+ * @summary Partially update an option for this investment
945
+ * @param {string} optionId UUID of the option
946
+ * @param {string} investmentId UUID of the investment
947
+ * @param {OptionUpdate} optionUpdate
948
+ * @param {*} [options] Override http request option.
949
+ * @throws {RequiredError}
950
+ */
951
+ patchOptionForInvestment(optionId, investmentId, optionUpdate, options) {
952
+ return __awaiter(this, void 0, void 0, function* () {
953
+ var _a, _b, _c;
954
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.patchOptionForInvestment(optionId, investmentId, optionUpdate, options);
955
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
956
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.patchOptionForInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
957
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
958
+ });
959
+ },
960
+ /**
961
+ * Create a new investment.
962
+ * @summary Create an investment
963
+ * @param {InvestmentCreate} investmentCreate
964
+ * @param {*} [options] Override http request option.
965
+ * @throws {RequiredError}
966
+ */
967
+ postInvestment(investmentCreate, options) {
968
+ return __awaiter(this, void 0, void 0, function* () {
969
+ var _a, _b, _c;
970
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.postInvestment(investmentCreate, options);
971
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
972
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.postInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
973
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
974
+ });
975
+ },
976
+ /**
977
+ * Set the preferred option for an investment.
978
+ * @summary Set the preferred option for an investment
979
+ * @param {string} investmentId UUID of the investment
980
+ * @param {FavoredOptionRequest} favoredOptionRequest
981
+ * @param {*} [options] Override http request option.
982
+ * @throws {RequiredError}
983
+ */
984
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
985
+ return __awaiter(this, void 0, void 0, function* () {
986
+ var _a, _b, _c;
987
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.setFavoredOption(investmentId, favoredOptionRequest, options);
988
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
989
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.setFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
990
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
991
+ });
992
+ },
993
+ };
994
+ };
995
+ exports.InvestmentApiFp = InvestmentApiFp;
996
+ /**
997
+ * InvestmentApi - factory interface
998
+ */
999
+ const InvestmentApiFactory = function (configuration, basePath, axios) {
1000
+ const localVarFp = (0, exports.InvestmentApiFp)(configuration);
1001
+ return {
1002
+ /**
1003
+ * Create a new impact under this option.
1004
+ * @summary Create an impact for this option
1005
+ * @param {string} optionId UUID of the option
1006
+ * @param {string} investmentId UUID of the investment
1007
+ * @param {ImpactCreate} impactCreate
1008
+ * @param {*} [options] Override http request option.
1009
+ * @throws {RequiredError}
1010
+ */
1011
+ createImpactForOption(optionId, investmentId, impactCreate, options) {
1012
+ return localVarFp.createImpactForOption(optionId, investmentId, impactCreate, options).then((request) => request(axios, basePath));
1013
+ },
1014
+ /**
1015
+ * Create a new option under this investment.
1016
+ * @summary Create an option for this investment
1017
+ * @param {string} investmentId UUID of the investment
1018
+ * @param {OptionCreate} optionCreate
1019
+ * @param {*} [options] Override http request option.
1020
+ * @throws {RequiredError}
1021
+ */
1022
+ createOptionForInvestment(investmentId, optionCreate, options) {
1023
+ return localVarFp.createOptionForInvestment(investmentId, optionCreate, options).then((request) => request(axios, basePath));
1024
+ },
1025
+ /**
1026
+ * Delete an existing impact by its ID.
1027
+ * @summary Delete an impact for this option
1028
+ * @param {string} impactId UUID of the impact
1029
+ * @param {string} optionId UUID of the option
1030
+ * @param {string} investmentId UUID of the investment
1031
+ * @param {*} [options] Override http request option.
1032
+ * @throws {RequiredError}
1033
+ */
1034
+ deleteImpactForOption(impactId, optionId, investmentId, options) {
1035
+ return localVarFp.deleteImpactForOption(impactId, optionId, investmentId, options).then((request) => request(axios, basePath));
1036
+ },
1037
+ /**
1038
+ * Delete an existing investment by its ID. Associated options are also deleted via cascade.
1039
+ * @summary Delete an investment
1040
+ * @param {string} investmentId UUID of the investment
1041
+ * @param {*} [options] Override http request option.
1042
+ * @throws {RequiredError}
1043
+ */
1044
+ deleteInvestment(investmentId, options) {
1045
+ return localVarFp.deleteInvestment(investmentId, options).then((request) => request(axios, basePath));
1046
+ },
1047
+ /**
1048
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
1049
+ * @summary Delete an option for this investment
1050
+ * @param {string} optionId UUID of the option
1051
+ * @param {string} investmentId UUID of the investment
1052
+ * @param {*} [options] Override http request option.
1053
+ * @throws {RequiredError}
1054
+ */
1055
+ deleteOptionForInvestment(optionId, investmentId, options) {
1056
+ return localVarFp.deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
1057
+ },
1058
+ /**
1059
+ * Get the preferred option for an investment.
1060
+ * @summary Get the preferred option for an investment
1061
+ * @param {string} investmentId UUID of the investment
1062
+ * @param {*} [options] Override http request option.
1063
+ * @throws {RequiredError}
1064
+ */
1065
+ getFavoredOption(investmentId, options) {
1066
+ return localVarFp.getFavoredOption(investmentId, options).then((request) => request(axios, basePath));
1067
+ },
1068
+ /**
1069
+ * Retrieve a specific impact for the option.
1070
+ * @summary Get an impact for this option
1071
+ * @param {string} impactId UUID of the impact
1072
+ * @param {string} optionId UUID of the option
1073
+ * @param {string} investmentId UUID of the investment
1074
+ * @param {*} [options] Override http request option.
1075
+ * @throws {RequiredError}
1076
+ */
1077
+ getImpactForOption(impactId, optionId, investmentId, options) {
1078
+ return localVarFp.getImpactForOption(impactId, optionId, investmentId, options).then((request) => request(axios, basePath));
1079
+ },
1080
+ /**
1081
+ * Retrieve a paginated list of all impacts for a specific option.
1082
+ * @summary List impacts for this option
1083
+ * @param {string} optionId UUID of the option
1084
+ * @param {string} investmentId UUID of the investment
1085
+ * @param {number} [offset] Number of records to skip
1086
+ * @param {number} [limit] Max number of records to return
1087
+ * @param {*} [options] Override http request option.
1088
+ * @throws {RequiredError}
1089
+ */
1090
+ getImpactsForOption(optionId, investmentId, offset, limit, options) {
1091
+ return localVarFp.getImpactsForOption(optionId, investmentId, offset, limit, options).then((request) => request(axios, basePath));
1092
+ },
1093
+ /**
1094
+ * Retrieve a single investment by its ID.
1095
+ * @summary Get an investment by ID
1096
+ * @param {string} investmentId UUID of the investment
1097
+ * @param {*} [options] Override http request option.
1098
+ * @throws {RequiredError}
1099
+ */
1100
+ getInvestmentById(investmentId, options) {
1101
+ return localVarFp.getInvestmentById(investmentId, options).then((request) => request(axios, basePath));
1102
+ },
1103
+ /**
1104
+ * Retrieve a paginated list of all investments.
1105
+ * @summary List investments
1106
+ * @param {number} [offset] Number of records to skip
1107
+ * @param {number} [limit] Max number of records to return
1108
+ * @param {*} [options] Override http request option.
1109
+ * @throws {RequiredError}
1110
+ */
1111
+ getInvestments(offset, limit, options) {
1112
+ return localVarFp.getInvestments(offset, limit, options).then((request) => request(axios, basePath));
1113
+ },
1114
+ /**
1115
+ * Retrieve a specific option for the investment.
1116
+ * @summary Get an option for this investment
1117
+ * @param {string} optionId UUID of the option
1118
+ * @param {string} investmentId UUID of the investment
1119
+ * @param {*} [options] Override http request option.
1120
+ * @throws {RequiredError}
1121
+ */
1122
+ getOptionForInvestment(optionId, investmentId, options) {
1123
+ return localVarFp.getOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
1124
+ },
1125
+ /**
1126
+ * Retrieve a paginated list of all options for a specific investment.
1127
+ * @summary List options for this investment
1128
+ * @param {string} investmentId UUID of the investment
1129
+ * @param {number} [offset] Number of records to skip
1130
+ * @param {number} [limit] Max number of records to return
1131
+ * @param {*} [options] Override http request option.
1132
+ * @throws {RequiredError}
1133
+ */
1134
+ getOptionsForInvestment(investmentId, offset, limit, options) {
1135
+ return localVarFp.getOptionsForInvestment(investmentId, offset, limit, options).then((request) => request(axios, basePath));
1136
+ },
1137
+ /**
1138
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
1139
+ * @summary Partially update an impact for this option
1140
+ * @param {string} impactId UUID of the impact
1141
+ * @param {string} optionId UUID of the option
1142
+ * @param {string} investmentId UUID of the investment
1143
+ * @param {ImpactUpdate} impactUpdate
1144
+ * @param {*} [options] Override http request option.
1145
+ * @throws {RequiredError}
1146
+ */
1147
+ patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options) {
1148
+ return localVarFp.patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options).then((request) => request(axios, basePath));
1149
+ },
1150
+ /**
1151
+ * Update one or more fields of an existing investment. Only the fields included in the request body will be modified; omitted fields remain unchanged.
1152
+ * @summary Partially update an investment
1153
+ * @param {string} investmentId UUID of the investment
1154
+ * @param {InvestmentUpdate} investmentUpdate
1155
+ * @param {*} [options] Override http request option.
1156
+ * @throws {RequiredError}
1157
+ */
1158
+ patchInvestment(investmentId, investmentUpdate, options) {
1159
+ return localVarFp.patchInvestment(investmentId, investmentUpdate, options).then((request) => request(axios, basePath));
1160
+ },
1161
+ /**
1162
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
1163
+ * @summary Partially update an option for this investment
1164
+ * @param {string} optionId UUID of the option
1165
+ * @param {string} investmentId UUID of the investment
1166
+ * @param {OptionUpdate} optionUpdate
1167
+ * @param {*} [options] Override http request option.
1168
+ * @throws {RequiredError}
1169
+ */
1170
+ patchOptionForInvestment(optionId, investmentId, optionUpdate, options) {
1171
+ return localVarFp.patchOptionForInvestment(optionId, investmentId, optionUpdate, options).then((request) => request(axios, basePath));
1172
+ },
1173
+ /**
1174
+ * Create a new investment.
1175
+ * @summary Create an investment
1176
+ * @param {InvestmentCreate} investmentCreate
1177
+ * @param {*} [options] Override http request option.
1178
+ * @throws {RequiredError}
1179
+ */
1180
+ postInvestment(investmentCreate, options) {
1181
+ return localVarFp.postInvestment(investmentCreate, options).then((request) => request(axios, basePath));
1182
+ },
1183
+ /**
1184
+ * Set the preferred option for an investment.
1185
+ * @summary Set the preferred option for an investment
1186
+ * @param {string} investmentId UUID of the investment
1187
+ * @param {FavoredOptionRequest} favoredOptionRequest
1188
+ * @param {*} [options] Override http request option.
1189
+ * @throws {RequiredError}
1190
+ */
1191
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
1192
+ return localVarFp.setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(axios, basePath));
1193
+ },
1194
+ };
1195
+ };
1196
+ exports.InvestmentApiFactory = InvestmentApiFactory;
1197
+ /**
1198
+ * InvestmentApi - object-oriented interface
1199
+ */
1200
+ class InvestmentApi extends base_1.BaseAPI {
1201
+ /**
1202
+ * Create a new impact under this option.
1203
+ * @summary Create an impact for this option
1204
+ * @param {string} optionId UUID of the option
1205
+ * @param {string} investmentId UUID of the investment
1206
+ * @param {ImpactCreate} impactCreate
1207
+ * @param {*} [options] Override http request option.
1208
+ * @throws {RequiredError}
1209
+ */
1210
+ createImpactForOption(optionId, investmentId, impactCreate, options) {
1211
+ return (0, exports.InvestmentApiFp)(this.configuration).createImpactForOption(optionId, investmentId, impactCreate, options).then((request) => request(this.axios, this.basePath));
1212
+ }
1213
+ /**
1214
+ * Create a new option under this investment.
1215
+ * @summary Create an option for this investment
1216
+ * @param {string} investmentId UUID of the investment
1217
+ * @param {OptionCreate} optionCreate
1218
+ * @param {*} [options] Override http request option.
1219
+ * @throws {RequiredError}
1220
+ */
1221
+ createOptionForInvestment(investmentId, optionCreate, options) {
1222
+ return (0, exports.InvestmentApiFp)(this.configuration).createOptionForInvestment(investmentId, optionCreate, options).then((request) => request(this.axios, this.basePath));
1223
+ }
1224
+ /**
1225
+ * Delete an existing impact by its ID.
1226
+ * @summary Delete an impact for this option
1227
+ * @param {string} impactId UUID of the impact
1228
+ * @param {string} optionId UUID of the option
1229
+ * @param {string} investmentId UUID of the investment
1230
+ * @param {*} [options] Override http request option.
1231
+ * @throws {RequiredError}
1232
+ */
1233
+ deleteImpactForOption(impactId, optionId, investmentId, options) {
1234
+ return (0, exports.InvestmentApiFp)(this.configuration).deleteImpactForOption(impactId, optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
1235
+ }
1236
+ /**
1237
+ * Delete an existing investment by its ID. Associated options are also deleted via cascade.
1238
+ * @summary Delete an investment
1239
+ * @param {string} investmentId UUID of the investment
1240
+ * @param {*} [options] Override http request option.
1241
+ * @throws {RequiredError}
1242
+ */
1243
+ deleteInvestment(investmentId, options) {
1244
+ return (0, exports.InvestmentApiFp)(this.configuration).deleteInvestment(investmentId, options).then((request) => request(this.axios, this.basePath));
1245
+ }
1246
+ /**
1247
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
1248
+ * @summary Delete an option for this investment
1249
+ * @param {string} optionId UUID of the option
1250
+ * @param {string} investmentId UUID of the investment
1251
+ * @param {*} [options] Override http request option.
1252
+ * @throws {RequiredError}
1253
+ */
1254
+ deleteOptionForInvestment(optionId, investmentId, options) {
1255
+ return (0, exports.InvestmentApiFp)(this.configuration).deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
1256
+ }
1257
+ /**
1258
+ * Get the preferred option for an investment.
1259
+ * @summary Get the preferred option for an investment
1260
+ * @param {string} investmentId UUID of the investment
1261
+ * @param {*} [options] Override http request option.
1262
+ * @throws {RequiredError}
1263
+ */
1264
+ getFavoredOption(investmentId, options) {
1265
+ return (0, exports.InvestmentApiFp)(this.configuration).getFavoredOption(investmentId, options).then((request) => request(this.axios, this.basePath));
1266
+ }
1267
+ /**
1268
+ * Retrieve a specific impact for the option.
1269
+ * @summary Get an impact for this option
1270
+ * @param {string} impactId UUID of the impact
1271
+ * @param {string} optionId UUID of the option
1272
+ * @param {string} investmentId UUID of the investment
1273
+ * @param {*} [options] Override http request option.
1274
+ * @throws {RequiredError}
1275
+ */
1276
+ getImpactForOption(impactId, optionId, investmentId, options) {
1277
+ return (0, exports.InvestmentApiFp)(this.configuration).getImpactForOption(impactId, optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
1278
+ }
1279
+ /**
1280
+ * Retrieve a paginated list of all impacts for a specific option.
1281
+ * @summary List impacts for this option
1282
+ * @param {string} optionId UUID of the option
1283
+ * @param {string} investmentId UUID of the investment
1284
+ * @param {number} [offset] Number of records to skip
1285
+ * @param {number} [limit] Max number of records to return
1286
+ * @param {*} [options] Override http request option.
1287
+ * @throws {RequiredError}
1288
+ */
1289
+ getImpactsForOption(optionId, investmentId, offset, limit, options) {
1290
+ return (0, exports.InvestmentApiFp)(this.configuration).getImpactsForOption(optionId, investmentId, offset, limit, options).then((request) => request(this.axios, this.basePath));
1291
+ }
1292
+ /**
1293
+ * Retrieve a single investment by its ID.
1294
+ * @summary Get an investment by ID
1295
+ * @param {string} investmentId UUID of the investment
1296
+ * @param {*} [options] Override http request option.
1297
+ * @throws {RequiredError}
1298
+ */
1299
+ getInvestmentById(investmentId, options) {
1300
+ return (0, exports.InvestmentApiFp)(this.configuration).getInvestmentById(investmentId, options).then((request) => request(this.axios, this.basePath));
1301
+ }
1302
+ /**
1303
+ * Retrieve a paginated list of all investments.
1304
+ * @summary List investments
1305
+ * @param {number} [offset] Number of records to skip
1306
+ * @param {number} [limit] Max number of records to return
1307
+ * @param {*} [options] Override http request option.
1308
+ * @throws {RequiredError}
1309
+ */
1310
+ getInvestments(offset, limit, options) {
1311
+ return (0, exports.InvestmentApiFp)(this.configuration).getInvestments(offset, limit, options).then((request) => request(this.axios, this.basePath));
1312
+ }
1313
+ /**
1314
+ * Retrieve a specific option for the investment.
1315
+ * @summary Get an option for this investment
1316
+ * @param {string} optionId UUID of the option
1317
+ * @param {string} investmentId UUID of the investment
1318
+ * @param {*} [options] Override http request option.
1319
+ * @throws {RequiredError}
1320
+ */
1321
+ getOptionForInvestment(optionId, investmentId, options) {
1322
+ return (0, exports.InvestmentApiFp)(this.configuration).getOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
1323
+ }
1324
+ /**
1325
+ * Retrieve a paginated list of all options for a specific investment.
1326
+ * @summary List options for this investment
1327
+ * @param {string} investmentId UUID of the investment
1328
+ * @param {number} [offset] Number of records to skip
1329
+ * @param {number} [limit] Max number of records to return
1330
+ * @param {*} [options] Override http request option.
1331
+ * @throws {RequiredError}
1332
+ */
1333
+ getOptionsForInvestment(investmentId, offset, limit, options) {
1334
+ return (0, exports.InvestmentApiFp)(this.configuration).getOptionsForInvestment(investmentId, offset, limit, options).then((request) => request(this.axios, this.basePath));
1335
+ }
1336
+ /**
1337
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
1338
+ * @summary Partially update an impact for this option
1339
+ * @param {string} impactId UUID of the impact
1340
+ * @param {string} optionId UUID of the option
1341
+ * @param {string} investmentId UUID of the investment
1342
+ * @param {ImpactUpdate} impactUpdate
1343
+ * @param {*} [options] Override http request option.
1344
+ * @throws {RequiredError}
1345
+ */
1346
+ patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options) {
1347
+ return (0, exports.InvestmentApiFp)(this.configuration).patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options).then((request) => request(this.axios, this.basePath));
1348
+ }
1349
+ /**
1350
+ * Update one or more fields of an existing investment. Only the fields included in the request body will be modified; omitted fields remain unchanged.
1351
+ * @summary Partially update an investment
1352
+ * @param {string} investmentId UUID of the investment
1353
+ * @param {InvestmentUpdate} investmentUpdate
1354
+ * @param {*} [options] Override http request option.
1355
+ * @throws {RequiredError}
1356
+ */
1357
+ patchInvestment(investmentId, investmentUpdate, options) {
1358
+ return (0, exports.InvestmentApiFp)(this.configuration).patchInvestment(investmentId, investmentUpdate, options).then((request) => request(this.axios, this.basePath));
1359
+ }
1360
+ /**
1361
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
1362
+ * @summary Partially update an option for this investment
1363
+ * @param {string} optionId UUID of the option
1364
+ * @param {string} investmentId UUID of the investment
1365
+ * @param {OptionUpdate} optionUpdate
1366
+ * @param {*} [options] Override http request option.
1367
+ * @throws {RequiredError}
1368
+ */
1369
+ patchOptionForInvestment(optionId, investmentId, optionUpdate, options) {
1370
+ return (0, exports.InvestmentApiFp)(this.configuration).patchOptionForInvestment(optionId, investmentId, optionUpdate, options).then((request) => request(this.axios, this.basePath));
1371
+ }
1372
+ /**
1373
+ * Create a new investment.
1374
+ * @summary Create an investment
1375
+ * @param {InvestmentCreate} investmentCreate
1376
+ * @param {*} [options] Override http request option.
1377
+ * @throws {RequiredError}
1378
+ */
1379
+ postInvestment(investmentCreate, options) {
1380
+ return (0, exports.InvestmentApiFp)(this.configuration).postInvestment(investmentCreate, options).then((request) => request(this.axios, this.basePath));
1381
+ }
1382
+ /**
1383
+ * Set the preferred option for an investment.
1384
+ * @summary Set the preferred option for an investment
1385
+ * @param {string} investmentId UUID of the investment
1386
+ * @param {FavoredOptionRequest} favoredOptionRequest
1387
+ * @param {*} [options] Override http request option.
1388
+ * @throws {RequiredError}
1389
+ */
1390
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
1391
+ return (0, exports.InvestmentApiFp)(this.configuration).setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(this.axios, this.basePath));
1392
+ }
1393
+ }
1394
+ exports.InvestmentApi = InvestmentApi;