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