@cosmotech/aip-client 0.2.0-dev → 0.2.0-dev3

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