@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,881 @@
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
+ * OptionApi - axios parameter creator
31
+ */
32
+ export const OptionApiAxiosParamCreator = 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 option by its ID. Associated phases and impacts are also deleted via cascade.
156
+ * @summary Delete an option for this investment
157
+ * @param {string} optionId UUID of the option
158
+ * @param {string} investmentId UUID of the investment
159
+ * @param {*} [options] Override http request option.
160
+ * @throws {RequiredError}
161
+ */
162
+ deleteOptionForInvestment: (optionId_1, investmentId_1, ...args_1) => __awaiter(this, [optionId_1, investmentId_1, ...args_1], void 0, function* (optionId, investmentId, options = {}) {
163
+ // verify required parameter 'optionId' is not null or undefined
164
+ assertParamExists('deleteOptionForInvestment', 'optionId', optionId);
165
+ // verify required parameter 'investmentId' is not null or undefined
166
+ assertParamExists('deleteOptionForInvestment', 'investmentId', investmentId);
167
+ const localVarPath = `/investment/{investment_id}/option/{option_id}`
168
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
169
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
170
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
171
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
172
+ let baseOptions;
173
+ if (configuration) {
174
+ baseOptions = configuration.baseOptions;
175
+ }
176
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
177
+ const localVarHeaderParameter = {};
178
+ const localVarQueryParameter = {};
179
+ // authentication OAuth2AuthorizationCodeBearer required
180
+ // oauth required
181
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
182
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
183
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
184
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
185
+ return {
186
+ url: toPathString(localVarUrlObj),
187
+ options: localVarRequestOptions,
188
+ };
189
+ }),
190
+ /**
191
+ * Retrieve a specific impact for the option.
192
+ * @summary Get an impact for this option
193
+ * @param {string} impactId UUID of the impact
194
+ * @param {string} optionId UUID of the option
195
+ * @param {string} investmentId UUID of the investment
196
+ * @param {*} [options] Override http request option.
197
+ * @throws {RequiredError}
198
+ */
199
+ 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 = {}) {
200
+ // verify required parameter 'impactId' is not null or undefined
201
+ assertParamExists('getImpactForOption', 'impactId', impactId);
202
+ // verify required parameter 'optionId' is not null or undefined
203
+ assertParamExists('getImpactForOption', 'optionId', optionId);
204
+ // verify required parameter 'investmentId' is not null or undefined
205
+ assertParamExists('getImpactForOption', 'investmentId', investmentId);
206
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
207
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
208
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
209
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
210
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
211
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
212
+ let baseOptions;
213
+ if (configuration) {
214
+ baseOptions = configuration.baseOptions;
215
+ }
216
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
217
+ const localVarHeaderParameter = {};
218
+ const localVarQueryParameter = {};
219
+ // authentication OAuth2AuthorizationCodeBearer required
220
+ // oauth required
221
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
222
+ localVarHeaderParameter['Accept'] = 'application/json';
223
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
224
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
225
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
226
+ return {
227
+ url: toPathString(localVarUrlObj),
228
+ options: localVarRequestOptions,
229
+ };
230
+ }),
231
+ /**
232
+ * Retrieve a paginated list of all impacts for a specific option.
233
+ * @summary List impacts for this option
234
+ * @param {string} optionId UUID of the option
235
+ * @param {string} investmentId UUID of the investment
236
+ * @param {number} [offset] Number of records to skip
237
+ * @param {number} [limit] Max number of records to return
238
+ * @param {*} [options] Override http request option.
239
+ * @throws {RequiredError}
240
+ */
241
+ 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 = {}) {
242
+ // verify required parameter 'optionId' is not null or undefined
243
+ assertParamExists('getImpactsForOption', 'optionId', optionId);
244
+ // verify required parameter 'investmentId' is not null or undefined
245
+ assertParamExists('getImpactsForOption', 'investmentId', investmentId);
246
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/`
247
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
248
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
249
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
250
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
251
+ let baseOptions;
252
+ if (configuration) {
253
+ baseOptions = configuration.baseOptions;
254
+ }
255
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
256
+ const localVarHeaderParameter = {};
257
+ const localVarQueryParameter = {};
258
+ // authentication OAuth2AuthorizationCodeBearer required
259
+ // oauth required
260
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
261
+ if (offset !== undefined) {
262
+ localVarQueryParameter['offset'] = offset;
263
+ }
264
+ if (limit !== undefined) {
265
+ localVarQueryParameter['limit'] = limit;
266
+ }
267
+ localVarHeaderParameter['Accept'] = 'application/json';
268
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
269
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
270
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
271
+ return {
272
+ url: toPathString(localVarUrlObj),
273
+ options: localVarRequestOptions,
274
+ };
275
+ }),
276
+ /**
277
+ * Retrieve a specific option for the investment.
278
+ * @summary Get an option for this investment
279
+ * @param {string} optionId UUID of the option
280
+ * @param {string} investmentId UUID of the investment
281
+ * @param {*} [options] Override http request option.
282
+ * @throws {RequiredError}
283
+ */
284
+ getOptionForInvestment: (optionId_1, investmentId_1, ...args_1) => __awaiter(this, [optionId_1, investmentId_1, ...args_1], void 0, function* (optionId, investmentId, options = {}) {
285
+ // verify required parameter 'optionId' is not null or undefined
286
+ assertParamExists('getOptionForInvestment', 'optionId', optionId);
287
+ // verify required parameter 'investmentId' is not null or undefined
288
+ assertParamExists('getOptionForInvestment', 'investmentId', investmentId);
289
+ const localVarPath = `/investment/{investment_id}/option/{option_id}`
290
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
291
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
292
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
293
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
294
+ let baseOptions;
295
+ if (configuration) {
296
+ baseOptions = configuration.baseOptions;
297
+ }
298
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
299
+ const localVarHeaderParameter = {};
300
+ const localVarQueryParameter = {};
301
+ // authentication OAuth2AuthorizationCodeBearer required
302
+ // oauth required
303
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
304
+ localVarHeaderParameter['Accept'] = 'application/json';
305
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
306
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
307
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
308
+ return {
309
+ url: toPathString(localVarUrlObj),
310
+ options: localVarRequestOptions,
311
+ };
312
+ }),
313
+ /**
314
+ * Retrieve a paginated list of all options for a specific investment.
315
+ * @summary List options for this investment
316
+ * @param {string} investmentId UUID of the investment
317
+ * @param {number} [offset] Number of records to skip
318
+ * @param {number} [limit] Max number of records to return
319
+ * @param {*} [options] Override http request option.
320
+ * @throws {RequiredError}
321
+ */
322
+ 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 = {}) {
323
+ // verify required parameter 'investmentId' is not null or undefined
324
+ assertParamExists('getOptionsForInvestment', 'investmentId', investmentId);
325
+ const localVarPath = `/investment/{investment_id}/option/`
326
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
327
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
328
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
329
+ let baseOptions;
330
+ if (configuration) {
331
+ baseOptions = configuration.baseOptions;
332
+ }
333
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
334
+ const localVarHeaderParameter = {};
335
+ const localVarQueryParameter = {};
336
+ // authentication OAuth2AuthorizationCodeBearer required
337
+ // oauth required
338
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
339
+ if (offset !== undefined) {
340
+ localVarQueryParameter['offset'] = offset;
341
+ }
342
+ if (limit !== undefined) {
343
+ localVarQueryParameter['limit'] = limit;
344
+ }
345
+ localVarHeaderParameter['Accept'] = 'application/json';
346
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
347
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
348
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
349
+ return {
350
+ url: toPathString(localVarUrlObj),
351
+ options: localVarRequestOptions,
352
+ };
353
+ }),
354
+ /**
355
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
356
+ * @summary Partially update an impact for this option
357
+ * @param {string} impactId UUID of the impact
358
+ * @param {string} optionId UUID of the option
359
+ * @param {string} investmentId UUID of the investment
360
+ * @param {ImpactUpdate} impactUpdate
361
+ * @param {*} [options] Override http request option.
362
+ * @throws {RequiredError}
363
+ */
364
+ 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 = {}) {
365
+ // verify required parameter 'impactId' is not null or undefined
366
+ assertParamExists('patchImpactForOption', 'impactId', impactId);
367
+ // verify required parameter 'optionId' is not null or undefined
368
+ assertParamExists('patchImpactForOption', 'optionId', optionId);
369
+ // verify required parameter 'investmentId' is not null or undefined
370
+ assertParamExists('patchImpactForOption', 'investmentId', investmentId);
371
+ // verify required parameter 'impactUpdate' is not null or undefined
372
+ assertParamExists('patchImpactForOption', 'impactUpdate', impactUpdate);
373
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
374
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
375
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
376
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
377
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
378
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
379
+ let baseOptions;
380
+ if (configuration) {
381
+ baseOptions = configuration.baseOptions;
382
+ }
383
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
384
+ const localVarHeaderParameter = {};
385
+ const localVarQueryParameter = {};
386
+ // authentication OAuth2AuthorizationCodeBearer required
387
+ // oauth required
388
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
389
+ localVarHeaderParameter['Content-Type'] = 'application/json';
390
+ localVarHeaderParameter['Accept'] = 'application/json';
391
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
392
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
393
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
394
+ localVarRequestOptions.data = serializeDataIfNeeded(impactUpdate, localVarRequestOptions, configuration);
395
+ return {
396
+ url: toPathString(localVarUrlObj),
397
+ options: localVarRequestOptions,
398
+ };
399
+ }),
400
+ /**
401
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
402
+ * @summary Partially update an option for this investment
403
+ * @param {string} optionId UUID of the option
404
+ * @param {string} investmentId UUID of the investment
405
+ * @param {OptionUpdate} optionUpdate
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ */
409
+ 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 = {}) {
410
+ // verify required parameter 'optionId' is not null or undefined
411
+ assertParamExists('patchOptionForInvestment', 'optionId', optionId);
412
+ // verify required parameter 'investmentId' is not null or undefined
413
+ assertParamExists('patchOptionForInvestment', 'investmentId', investmentId);
414
+ // verify required parameter 'optionUpdate' is not null or undefined
415
+ assertParamExists('patchOptionForInvestment', 'optionUpdate', optionUpdate);
416
+ const localVarPath = `/investment/{investment_id}/option/{option_id}`
417
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
418
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
419
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
420
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
421
+ let baseOptions;
422
+ if (configuration) {
423
+ baseOptions = configuration.baseOptions;
424
+ }
425
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
426
+ const localVarHeaderParameter = {};
427
+ const localVarQueryParameter = {};
428
+ // authentication OAuth2AuthorizationCodeBearer required
429
+ // oauth required
430
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
431
+ localVarHeaderParameter['Content-Type'] = 'application/json';
432
+ localVarHeaderParameter['Accept'] = 'application/json';
433
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
434
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
435
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
436
+ localVarRequestOptions.data = serializeDataIfNeeded(optionUpdate, localVarRequestOptions, configuration);
437
+ return {
438
+ url: toPathString(localVarUrlObj),
439
+ options: localVarRequestOptions,
440
+ };
441
+ }),
442
+ };
443
+ };
444
+ /**
445
+ * OptionApi - functional programming interface
446
+ */
447
+ export const OptionApiFp = function (configuration) {
448
+ const localVarAxiosParamCreator = OptionApiAxiosParamCreator(configuration);
449
+ return {
450
+ /**
451
+ * Create a new impact under this option.
452
+ * @summary Create an impact for this option
453
+ * @param {string} optionId UUID of the option
454
+ * @param {string} investmentId UUID of the investment
455
+ * @param {ImpactCreate} impactCreate
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ */
459
+ createImpactForOption(optionId, investmentId, impactCreate, options) {
460
+ return __awaiter(this, void 0, void 0, function* () {
461
+ var _a, _b, _c;
462
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createImpactForOption(optionId, investmentId, impactCreate, options);
463
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
464
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.createImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
465
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
466
+ });
467
+ },
468
+ /**
469
+ * Create a new option under this investment.
470
+ * @summary Create an option for this investment
471
+ * @param {string} investmentId UUID of the investment
472
+ * @param {OptionCreate} optionCreate
473
+ * @param {*} [options] Override http request option.
474
+ * @throws {RequiredError}
475
+ */
476
+ createOptionForInvestment(investmentId, optionCreate, options) {
477
+ return __awaiter(this, void 0, void 0, function* () {
478
+ var _a, _b, _c;
479
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createOptionForInvestment(investmentId, optionCreate, options);
480
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
481
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.createOptionForInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
482
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
483
+ });
484
+ },
485
+ /**
486
+ * Delete an existing impact by its ID.
487
+ * @summary Delete an impact for this option
488
+ * @param {string} impactId UUID of the impact
489
+ * @param {string} optionId UUID of the option
490
+ * @param {string} investmentId UUID of the investment
491
+ * @param {*} [options] Override http request option.
492
+ * @throws {RequiredError}
493
+ */
494
+ deleteImpactForOption(impactId, optionId, investmentId, options) {
495
+ return __awaiter(this, void 0, void 0, function* () {
496
+ var _a, _b, _c;
497
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteImpactForOption(impactId, optionId, investmentId, options);
498
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
499
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.deleteImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
500
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
501
+ });
502
+ },
503
+ /**
504
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
505
+ * @summary Delete an option for this investment
506
+ * @param {string} optionId UUID of the option
507
+ * @param {string} investmentId UUID of the investment
508
+ * @param {*} [options] Override http request option.
509
+ * @throws {RequiredError}
510
+ */
511
+ deleteOptionForInvestment(optionId, investmentId, options) {
512
+ return __awaiter(this, void 0, void 0, function* () {
513
+ var _a, _b, _c;
514
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteOptionForInvestment(optionId, investmentId, options);
515
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
516
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.deleteOptionForInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
517
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
518
+ });
519
+ },
520
+ /**
521
+ * Retrieve a specific impact for the option.
522
+ * @summary Get an impact for this option
523
+ * @param {string} impactId UUID of the impact
524
+ * @param {string} optionId UUID of the option
525
+ * @param {string} investmentId UUID of the investment
526
+ * @param {*} [options] Override http request option.
527
+ * @throws {RequiredError}
528
+ */
529
+ getImpactForOption(impactId, optionId, investmentId, options) {
530
+ return __awaiter(this, void 0, void 0, function* () {
531
+ var _a, _b, _c;
532
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getImpactForOption(impactId, optionId, investmentId, options);
533
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
534
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.getImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
535
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
536
+ });
537
+ },
538
+ /**
539
+ * Retrieve a paginated list of all impacts for a specific option.
540
+ * @summary List impacts for this option
541
+ * @param {string} optionId UUID of the option
542
+ * @param {string} investmentId UUID of the investment
543
+ * @param {number} [offset] Number of records to skip
544
+ * @param {number} [limit] Max number of records to return
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ getImpactsForOption(optionId, investmentId, offset, limit, options) {
549
+ return __awaiter(this, void 0, void 0, function* () {
550
+ var _a, _b, _c;
551
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getImpactsForOption(optionId, investmentId, offset, limit, options);
552
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
553
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.getImpactsForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
554
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
555
+ });
556
+ },
557
+ /**
558
+ * Retrieve a specific option for the investment.
559
+ * @summary Get an option for this investment
560
+ * @param {string} optionId UUID of the option
561
+ * @param {string} investmentId UUID of the investment
562
+ * @param {*} [options] Override http request option.
563
+ * @throws {RequiredError}
564
+ */
565
+ getOptionForInvestment(optionId, investmentId, options) {
566
+ return __awaiter(this, void 0, void 0, function* () {
567
+ var _a, _b, _c;
568
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOptionForInvestment(optionId, investmentId, options);
569
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
570
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.getOptionForInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
571
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
572
+ });
573
+ },
574
+ /**
575
+ * Retrieve a paginated list of all options for a specific investment.
576
+ * @summary List options for this investment
577
+ * @param {string} investmentId UUID of the investment
578
+ * @param {number} [offset] Number of records to skip
579
+ * @param {number} [limit] Max number of records to return
580
+ * @param {*} [options] Override http request option.
581
+ * @throws {RequiredError}
582
+ */
583
+ getOptionsForInvestment(investmentId, offset, limit, options) {
584
+ return __awaiter(this, void 0, void 0, function* () {
585
+ var _a, _b, _c;
586
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOptionsForInvestment(investmentId, offset, limit, options);
587
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
588
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.getOptionsForInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
589
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
590
+ });
591
+ },
592
+ /**
593
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
594
+ * @summary Partially update an impact for this option
595
+ * @param {string} impactId UUID of the impact
596
+ * @param {string} optionId UUID of the option
597
+ * @param {string} investmentId UUID of the investment
598
+ * @param {ImpactUpdate} impactUpdate
599
+ * @param {*} [options] Override http request option.
600
+ * @throws {RequiredError}
601
+ */
602
+ patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options) {
603
+ return __awaiter(this, void 0, void 0, function* () {
604
+ var _a, _b, _c;
605
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options);
606
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
607
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.patchImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
608
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
609
+ });
610
+ },
611
+ /**
612
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
613
+ * @summary Partially update an option for this investment
614
+ * @param {string} optionId UUID of the option
615
+ * @param {string} investmentId UUID of the investment
616
+ * @param {OptionUpdate} optionUpdate
617
+ * @param {*} [options] Override http request option.
618
+ * @throws {RequiredError}
619
+ */
620
+ patchOptionForInvestment(optionId, investmentId, optionUpdate, options) {
621
+ return __awaiter(this, void 0, void 0, function* () {
622
+ var _a, _b, _c;
623
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.patchOptionForInvestment(optionId, investmentId, optionUpdate, options);
624
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
625
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.patchOptionForInvestment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
626
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
627
+ });
628
+ },
629
+ };
630
+ };
631
+ /**
632
+ * OptionApi - factory interface
633
+ */
634
+ export const OptionApiFactory = function (configuration, basePath, axios) {
635
+ const localVarFp = OptionApiFp(configuration);
636
+ return {
637
+ /**
638
+ * Create a new impact under this option.
639
+ * @summary Create an impact for this option
640
+ * @param {string} optionId UUID of the option
641
+ * @param {string} investmentId UUID of the investment
642
+ * @param {ImpactCreate} impactCreate
643
+ * @param {*} [options] Override http request option.
644
+ * @throws {RequiredError}
645
+ */
646
+ createImpactForOption(optionId, investmentId, impactCreate, options) {
647
+ return localVarFp.createImpactForOption(optionId, investmentId, impactCreate, options).then((request) => request(axios, basePath));
648
+ },
649
+ /**
650
+ * Create a new option under this investment.
651
+ * @summary Create an option for this investment
652
+ * @param {string} investmentId UUID of the investment
653
+ * @param {OptionCreate} optionCreate
654
+ * @param {*} [options] Override http request option.
655
+ * @throws {RequiredError}
656
+ */
657
+ createOptionForInvestment(investmentId, optionCreate, options) {
658
+ return localVarFp.createOptionForInvestment(investmentId, optionCreate, options).then((request) => request(axios, basePath));
659
+ },
660
+ /**
661
+ * Delete an existing impact by its ID.
662
+ * @summary Delete an impact for this option
663
+ * @param {string} impactId UUID of the impact
664
+ * @param {string} optionId UUID of the option
665
+ * @param {string} investmentId UUID of the investment
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ */
669
+ deleteImpactForOption(impactId, optionId, investmentId, options) {
670
+ return localVarFp.deleteImpactForOption(impactId, optionId, investmentId, options).then((request) => request(axios, basePath));
671
+ },
672
+ /**
673
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
674
+ * @summary Delete an option for this investment
675
+ * @param {string} optionId UUID of the option
676
+ * @param {string} investmentId UUID of the investment
677
+ * @param {*} [options] Override http request option.
678
+ * @throws {RequiredError}
679
+ */
680
+ deleteOptionForInvestment(optionId, investmentId, options) {
681
+ return localVarFp.deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
682
+ },
683
+ /**
684
+ * Retrieve a specific impact for the option.
685
+ * @summary Get an impact for this option
686
+ * @param {string} impactId UUID of the impact
687
+ * @param {string} optionId UUID of the option
688
+ * @param {string} investmentId UUID of the investment
689
+ * @param {*} [options] Override http request option.
690
+ * @throws {RequiredError}
691
+ */
692
+ getImpactForOption(impactId, optionId, investmentId, options) {
693
+ return localVarFp.getImpactForOption(impactId, optionId, investmentId, options).then((request) => request(axios, basePath));
694
+ },
695
+ /**
696
+ * Retrieve a paginated list of all impacts for a specific option.
697
+ * @summary List impacts for this option
698
+ * @param {string} optionId UUID of the option
699
+ * @param {string} investmentId UUID of the investment
700
+ * @param {number} [offset] Number of records to skip
701
+ * @param {number} [limit] Max number of records to return
702
+ * @param {*} [options] Override http request option.
703
+ * @throws {RequiredError}
704
+ */
705
+ getImpactsForOption(optionId, investmentId, offset, limit, options) {
706
+ return localVarFp.getImpactsForOption(optionId, investmentId, offset, limit, options).then((request) => request(axios, basePath));
707
+ },
708
+ /**
709
+ * Retrieve a specific option for the investment.
710
+ * @summary Get an option for this investment
711
+ * @param {string} optionId UUID of the option
712
+ * @param {string} investmentId UUID of the investment
713
+ * @param {*} [options] Override http request option.
714
+ * @throws {RequiredError}
715
+ */
716
+ getOptionForInvestment(optionId, investmentId, options) {
717
+ return localVarFp.getOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
718
+ },
719
+ /**
720
+ * Retrieve a paginated list of all options for a specific investment.
721
+ * @summary List options for this investment
722
+ * @param {string} investmentId UUID of the investment
723
+ * @param {number} [offset] Number of records to skip
724
+ * @param {number} [limit] Max number of records to return
725
+ * @param {*} [options] Override http request option.
726
+ * @throws {RequiredError}
727
+ */
728
+ getOptionsForInvestment(investmentId, offset, limit, options) {
729
+ return localVarFp.getOptionsForInvestment(investmentId, offset, limit, options).then((request) => request(axios, basePath));
730
+ },
731
+ /**
732
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
733
+ * @summary Partially update an impact for this option
734
+ * @param {string} impactId UUID of the impact
735
+ * @param {string} optionId UUID of the option
736
+ * @param {string} investmentId UUID of the investment
737
+ * @param {ImpactUpdate} impactUpdate
738
+ * @param {*} [options] Override http request option.
739
+ * @throws {RequiredError}
740
+ */
741
+ patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options) {
742
+ return localVarFp.patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options).then((request) => request(axios, basePath));
743
+ },
744
+ /**
745
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
746
+ * @summary Partially update an option for this investment
747
+ * @param {string} optionId UUID of the option
748
+ * @param {string} investmentId UUID of the investment
749
+ * @param {OptionUpdate} optionUpdate
750
+ * @param {*} [options] Override http request option.
751
+ * @throws {RequiredError}
752
+ */
753
+ patchOptionForInvestment(optionId, investmentId, optionUpdate, options) {
754
+ return localVarFp.patchOptionForInvestment(optionId, investmentId, optionUpdate, options).then((request) => request(axios, basePath));
755
+ },
756
+ };
757
+ };
758
+ /**
759
+ * OptionApi - object-oriented interface
760
+ */
761
+ export class OptionApi extends BaseAPI {
762
+ /**
763
+ * Create a new impact under this option.
764
+ * @summary Create an impact for this option
765
+ * @param {string} optionId UUID of the option
766
+ * @param {string} investmentId UUID of the investment
767
+ * @param {ImpactCreate} impactCreate
768
+ * @param {*} [options] Override http request option.
769
+ * @throws {RequiredError}
770
+ */
771
+ createImpactForOption(optionId, investmentId, impactCreate, options) {
772
+ return OptionApiFp(this.configuration).createImpactForOption(optionId, investmentId, impactCreate, options).then((request) => request(this.axios, this.basePath));
773
+ }
774
+ /**
775
+ * Create a new option under this investment.
776
+ * @summary Create an option for this investment
777
+ * @param {string} investmentId UUID of the investment
778
+ * @param {OptionCreate} optionCreate
779
+ * @param {*} [options] Override http request option.
780
+ * @throws {RequiredError}
781
+ */
782
+ createOptionForInvestment(investmentId, optionCreate, options) {
783
+ return OptionApiFp(this.configuration).createOptionForInvestment(investmentId, optionCreate, options).then((request) => request(this.axios, this.basePath));
784
+ }
785
+ /**
786
+ * Delete an existing impact by its ID.
787
+ * @summary Delete an impact for this option
788
+ * @param {string} impactId UUID of the impact
789
+ * @param {string} optionId UUID of the option
790
+ * @param {string} investmentId UUID of the investment
791
+ * @param {*} [options] Override http request option.
792
+ * @throws {RequiredError}
793
+ */
794
+ deleteImpactForOption(impactId, optionId, investmentId, options) {
795
+ return OptionApiFp(this.configuration).deleteImpactForOption(impactId, optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
796
+ }
797
+ /**
798
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
799
+ * @summary Delete an option for this investment
800
+ * @param {string} optionId UUID of the option
801
+ * @param {string} investmentId UUID of the investment
802
+ * @param {*} [options] Override http request option.
803
+ * @throws {RequiredError}
804
+ */
805
+ deleteOptionForInvestment(optionId, investmentId, options) {
806
+ return OptionApiFp(this.configuration).deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
807
+ }
808
+ /**
809
+ * Retrieve a specific impact for the option.
810
+ * @summary Get an impact for this option
811
+ * @param {string} impactId UUID of the impact
812
+ * @param {string} optionId UUID of the option
813
+ * @param {string} investmentId UUID of the investment
814
+ * @param {*} [options] Override http request option.
815
+ * @throws {RequiredError}
816
+ */
817
+ getImpactForOption(impactId, optionId, investmentId, options) {
818
+ return OptionApiFp(this.configuration).getImpactForOption(impactId, optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
819
+ }
820
+ /**
821
+ * Retrieve a paginated list of all impacts for a specific option.
822
+ * @summary List impacts for this option
823
+ * @param {string} optionId UUID of the option
824
+ * @param {string} investmentId UUID of the investment
825
+ * @param {number} [offset] Number of records to skip
826
+ * @param {number} [limit] Max number of records to return
827
+ * @param {*} [options] Override http request option.
828
+ * @throws {RequiredError}
829
+ */
830
+ getImpactsForOption(optionId, investmentId, offset, limit, options) {
831
+ return OptionApiFp(this.configuration).getImpactsForOption(optionId, investmentId, offset, limit, options).then((request) => request(this.axios, this.basePath));
832
+ }
833
+ /**
834
+ * Retrieve a specific option for the investment.
835
+ * @summary Get an option for this investment
836
+ * @param {string} optionId UUID of the option
837
+ * @param {string} investmentId UUID of the investment
838
+ * @param {*} [options] Override http request option.
839
+ * @throws {RequiredError}
840
+ */
841
+ getOptionForInvestment(optionId, investmentId, options) {
842
+ return OptionApiFp(this.configuration).getOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
843
+ }
844
+ /**
845
+ * Retrieve a paginated list of all options for a specific investment.
846
+ * @summary List options for this investment
847
+ * @param {string} investmentId UUID of the investment
848
+ * @param {number} [offset] Number of records to skip
849
+ * @param {number} [limit] Max number of records to return
850
+ * @param {*} [options] Override http request option.
851
+ * @throws {RequiredError}
852
+ */
853
+ getOptionsForInvestment(investmentId, offset, limit, options) {
854
+ return OptionApiFp(this.configuration).getOptionsForInvestment(investmentId, offset, limit, options).then((request) => request(this.axios, this.basePath));
855
+ }
856
+ /**
857
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
858
+ * @summary Partially update an impact for this option
859
+ * @param {string} impactId UUID of the impact
860
+ * @param {string} optionId UUID of the option
861
+ * @param {string} investmentId UUID of the investment
862
+ * @param {ImpactUpdate} impactUpdate
863
+ * @param {*} [options] Override http request option.
864
+ * @throws {RequiredError}
865
+ */
866
+ patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options) {
867
+ return OptionApiFp(this.configuration).patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options).then((request) => request(this.axios, this.basePath));
868
+ }
869
+ /**
870
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
871
+ * @summary Partially update an option for this investment
872
+ * @param {string} optionId UUID of the option
873
+ * @param {string} investmentId UUID of the investment
874
+ * @param {OptionUpdate} optionUpdate
875
+ * @param {*} [options] Override http request option.
876
+ * @throws {RequiredError}
877
+ */
878
+ patchOptionForInvestment(optionId, investmentId, optionUpdate, options) {
879
+ return OptionApiFp(this.configuration).patchOptionForInvestment(optionId, investmentId, optionUpdate, options).then((request) => request(this.axios, this.basePath));
880
+ }
881
+ }