@cosmotech/aip-client 0.2.0-dev2 → 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 +3 -10
  20. package/dist/api/default-api.js +7 -13
  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 +97 -88
  26. package/dist/api/metric-api.js +185 -157
  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 +105 -108
  30. package/dist/api/metric-costs-per-year-api.js +199 -192
  31. package/dist/api/objective-api.d.ts +242 -21
  32. package/dist/api/objective-api.js +508 -37
  33. package/dist/api/objective-weight-api.d.ts +105 -108
  34. package/dist/api/objective-weight-api.js +189 -182
  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 +528 -21
  40. package/dist/api/value-framework-api.js +1138 -78
  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 +8 -1
  46. package/dist/api.js +8 -1
  47. package/dist/base.d.ts +1 -25
  48. package/dist/base.js +1 -20
  49. package/dist/common.d.ts +6 -37
  50. package/dist/common.js +17 -39
  51. package/dist/configuration.d.ts +25 -18
  52. package/dist/configuration.js +4 -3
  53. package/dist/esm/api/default-api.d.ts +3 -10
  54. package/dist/esm/api/default-api.js +7 -13
  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 +97 -88
  60. package/dist/esm/api/metric-api.js +185 -157
  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 +105 -108
  64. package/dist/esm/api/metric-costs-per-year-api.js +199 -192
  65. package/dist/esm/api/objective-api.d.ts +242 -21
  66. package/dist/esm/api/objective-api.js +508 -37
  67. package/dist/esm/api/objective-weight-api.d.ts +105 -108
  68. package/dist/esm/api/objective-weight-api.js +189 -182
  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 +528 -21
  74. package/dist/esm/api/value-framework-api.js +1137 -77
  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 +8 -1
  80. package/dist/esm/api.js +8 -1
  81. package/dist/esm/base.d.ts +1 -25
  82. package/dist/esm/base.js +1 -20
  83. package/dist/esm/common.d.ts +6 -37
  84. package/dist/esm/common.js +15 -38
  85. package/dist/esm/configuration.d.ts +25 -18
  86. package/dist/esm/configuration.js +4 -3
  87. package/dist/esm/index.d.ts +1 -1
  88. package/dist/esm/index.js +1 -1
  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 +2 -12
  92. package/dist/esm/models/httpvalidation-error.js +1 -1
  93. package/dist/esm/models/impact-apiresponse.d.ts +33 -0
  94. package/dist/esm/models/{validation-error-loc-inner.js → impact-apiresponse.js} +1 -1
  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 +11 -1
  100. package/dist/esm/models/index.js +11 -1
  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/{validation-error-loc-inner.d.ts → location-inner.d.ts} +2 -7
  108. package/dist/esm/models/location-inner.js +14 -0
  109. package/dist/esm/models/measurement-type.d.ts +1 -6
  110. package/dist/esm/models/measurement-type.js +1 -6
  111. package/dist/esm/models/metric-costs-per-year-create.d.ts +1 -17
  112. package/dist/esm/models/metric-costs-per-year-create.js +1 -1
  113. package/dist/esm/models/metric-costs-per-year-response.d.ts +1 -18
  114. package/dist/esm/models/metric-costs-per-year-response.js +1 -1
  115. package/dist/esm/models/metric-costs-per-year-update.d.ts +1 -13
  116. package/dist/esm/models/metric-costs-per-year-update.js +1 -1
  117. package/dist/esm/models/metric-create.d.ts +3 -28
  118. package/dist/esm/models/metric-create.js +1 -1
  119. package/dist/esm/models/metric-response.d.ts +3 -50
  120. package/dist/esm/models/metric-response.js +1 -1
  121. package/dist/esm/models/metric-type.d.ts +1 -6
  122. package/dist/esm/models/metric-type.js +1 -6
  123. package/dist/esm/models/metric-update.d.ts +3 -35
  124. package/dist/esm/models/metric-update.js +1 -1
  125. package/dist/esm/models/objective-create.d.ts +1 -10
  126. package/dist/esm/models/objective-create.js +1 -1
  127. package/dist/esm/models/objective-response.d.ts +1 -30
  128. package/dist/esm/models/objective-response.js +1 -1
  129. package/dist/esm/models/objective-update.d.ts +1 -13
  130. package/dist/esm/models/objective-update.js +1 -1
  131. package/dist/esm/models/objective-weight-create.d.ts +1 -9
  132. package/dist/esm/models/objective-weight-create.js +1 -1
  133. package/dist/esm/models/objective-weight-response.d.ts +1 -14
  134. package/dist/esm/models/objective-weight-response.js +1 -1
  135. package/dist/esm/models/objective-weight-update.d.ts +1 -8
  136. package/dist/esm/models/objective-weight-update.js +1 -1
  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 +3 -33
  144. package/dist/esm/models/validation-error.js +1 -1
  145. package/dist/esm/models/value-framework-create.d.ts +1 -10
  146. package/dist/esm/models/value-framework-create.js +1 -1
  147. package/dist/esm/models/value-framework-response.d.ts +1 -30
  148. package/dist/esm/models/value-framework-response.js +1 -1
  149. package/dist/esm/models/value-framework-update.d.ts +1 -13
  150. package/dist/esm/models/value-framework-update.js +1 -1
  151. package/dist/index.d.ts +1 -1
  152. package/dist/index.js +1 -1
  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 +2 -12
  156. package/dist/models/httpvalidation-error.js +1 -1
  157. package/dist/models/impact-apiresponse.d.ts +33 -0
  158. package/dist/models/{validation-error-loc-inner.js → impact-apiresponse.js} +1 -1
  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 +11 -1
  164. package/dist/models/index.js +11 -1
  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/{validation-error-loc-inner.d.ts → location-inner.d.ts} +2 -7
  172. package/dist/models/location-inner.js +15 -0
  173. package/dist/models/measurement-type.d.ts +1 -6
  174. package/dist/models/measurement-type.js +1 -6
  175. package/dist/models/metric-costs-per-year-create.d.ts +1 -17
  176. package/dist/models/metric-costs-per-year-create.js +1 -1
  177. package/dist/models/metric-costs-per-year-response.d.ts +1 -18
  178. package/dist/models/metric-costs-per-year-response.js +1 -1
  179. package/dist/models/metric-costs-per-year-update.d.ts +1 -13
  180. package/dist/models/metric-costs-per-year-update.js +1 -1
  181. package/dist/models/metric-create.d.ts +3 -28
  182. package/dist/models/metric-create.js +1 -1
  183. package/dist/models/metric-response.d.ts +3 -50
  184. package/dist/models/metric-response.js +1 -1
  185. package/dist/models/metric-type.d.ts +1 -6
  186. package/dist/models/metric-type.js +1 -6
  187. package/dist/models/metric-update.d.ts +3 -35
  188. package/dist/models/metric-update.js +1 -1
  189. package/dist/models/objective-create.d.ts +1 -10
  190. package/dist/models/objective-create.js +1 -1
  191. package/dist/models/objective-response.d.ts +1 -30
  192. package/dist/models/objective-response.js +1 -1
  193. package/dist/models/objective-update.d.ts +1 -13
  194. package/dist/models/objective-update.js +1 -1
  195. package/dist/models/objective-weight-create.d.ts +1 -9
  196. package/dist/models/objective-weight-create.js +1 -1
  197. package/dist/models/objective-weight-response.d.ts +1 -14
  198. package/dist/models/objective-weight-response.js +1 -1
  199. package/dist/models/objective-weight-update.d.ts +1 -8
  200. package/dist/models/objective-weight-update.js +1 -1
  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 +3 -33
  208. package/dist/models/validation-error.js +1 -1
  209. package/dist/models/value-framework-create.d.ts +1 -10
  210. package/dist/models/value-framework-create.js +1 -1
  211. package/dist/models/value-framework-response.d.ts +1 -30
  212. package/dist/models/value-framework-response.js +1 -1
  213. package/dist/models/value-framework-update.d.ts +1 -13
  214. package/dist/models/value-framework-update.js +1 -1
  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,925 @@
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
+
15
+
16
+ import type { Configuration } from '../configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import type { ImpactAPIResponse } from '../models';
26
+ // @ts-ignore
27
+ import type { ImpactCreate } from '../models';
28
+ // @ts-ignore
29
+ import type { ImpactUpdate } from '../models';
30
+ // @ts-ignore
31
+ import type { OptionCreate } from '../models';
32
+ // @ts-ignore
33
+ import type { OptionResponse } from '../models';
34
+ // @ts-ignore
35
+ import type { OptionUpdate } from '../models';
36
+ /**
37
+ * OptionApi - axios parameter creator
38
+ */
39
+ export const OptionApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ * Create a new impact under this option.
43
+ * @summary Create an impact for this option
44
+ * @param {string} optionId UUID of the option
45
+ * @param {string} investmentId UUID of the investment
46
+ * @param {ImpactCreate} impactCreate
47
+ * @param {*} [options] Override http request option.
48
+ * @throws {RequiredError}
49
+ */
50
+ createImpactForOption: async (optionId: string, investmentId: string, impactCreate: ImpactCreate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
51
+ // verify required parameter 'optionId' is not null or undefined
52
+ assertParamExists('createImpactForOption', 'optionId', optionId)
53
+ // verify required parameter 'investmentId' is not null or undefined
54
+ assertParamExists('createImpactForOption', 'investmentId', investmentId)
55
+ // verify required parameter 'impactCreate' is not null or undefined
56
+ assertParamExists('createImpactForOption', 'impactCreate', impactCreate)
57
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/`
58
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
59
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
60
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
61
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
62
+ let baseOptions;
63
+ if (configuration) {
64
+ baseOptions = configuration.baseOptions;
65
+ }
66
+
67
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
68
+ const localVarHeaderParameter = {} as any;
69
+ const localVarQueryParameter = {} as any;
70
+
71
+ // authentication OAuth2AuthorizationCodeBearer required
72
+ // oauth required
73
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
74
+
75
+ localVarHeaderParameter['Content-Type'] = 'application/json';
76
+ localVarHeaderParameter['Accept'] = 'application/json';
77
+
78
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
79
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
80
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
81
+ localVarRequestOptions.data = serializeDataIfNeeded(impactCreate, localVarRequestOptions, configuration)
82
+
83
+ return {
84
+ url: toPathString(localVarUrlObj),
85
+ options: localVarRequestOptions,
86
+ };
87
+ },
88
+ /**
89
+ * Create a new option under this investment.
90
+ * @summary Create an option for this investment
91
+ * @param {string} investmentId UUID of the investment
92
+ * @param {OptionCreate} optionCreate
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ createOptionForInvestment: async (investmentId: string, optionCreate: OptionCreate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
97
+ // verify required parameter 'investmentId' is not null or undefined
98
+ assertParamExists('createOptionForInvestment', 'investmentId', investmentId)
99
+ // verify required parameter 'optionCreate' is not null or undefined
100
+ assertParamExists('createOptionForInvestment', 'optionCreate', optionCreate)
101
+ const localVarPath = `/investment/{investment_id}/option/`
102
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
103
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
104
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
105
+ let baseOptions;
106
+ if (configuration) {
107
+ baseOptions = configuration.baseOptions;
108
+ }
109
+
110
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
111
+ const localVarHeaderParameter = {} as any;
112
+ const localVarQueryParameter = {} as any;
113
+
114
+ // authentication OAuth2AuthorizationCodeBearer required
115
+ // oauth required
116
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
117
+
118
+ localVarHeaderParameter['Content-Type'] = 'application/json';
119
+ localVarHeaderParameter['Accept'] = 'application/json';
120
+
121
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
122
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
123
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
124
+ localVarRequestOptions.data = serializeDataIfNeeded(optionCreate, localVarRequestOptions, configuration)
125
+
126
+ return {
127
+ url: toPathString(localVarUrlObj),
128
+ options: localVarRequestOptions,
129
+ };
130
+ },
131
+ /**
132
+ * Delete an existing impact by its ID.
133
+ * @summary Delete an impact for this option
134
+ * @param {string} impactId UUID of the impact
135
+ * @param {string} optionId UUID of the option
136
+ * @param {string} investmentId UUID of the investment
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ deleteImpactForOption: async (impactId: string, optionId: string, investmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
141
+ // verify required parameter 'impactId' is not null or undefined
142
+ assertParamExists('deleteImpactForOption', 'impactId', impactId)
143
+ // verify required parameter 'optionId' is not null or undefined
144
+ assertParamExists('deleteImpactForOption', 'optionId', optionId)
145
+ // verify required parameter 'investmentId' is not null or undefined
146
+ assertParamExists('deleteImpactForOption', 'investmentId', investmentId)
147
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
148
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
149
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
150
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
151
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
152
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
153
+ let baseOptions;
154
+ if (configuration) {
155
+ baseOptions = configuration.baseOptions;
156
+ }
157
+
158
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
159
+ const localVarHeaderParameter = {} as any;
160
+ const localVarQueryParameter = {} as any;
161
+
162
+ // authentication OAuth2AuthorizationCodeBearer required
163
+ // oauth required
164
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
165
+
166
+
167
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
168
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
169
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
170
+
171
+ return {
172
+ url: toPathString(localVarUrlObj),
173
+ options: localVarRequestOptions,
174
+ };
175
+ },
176
+ /**
177
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
178
+ * @summary Delete an option for this investment
179
+ * @param {string} optionId UUID of the option
180
+ * @param {string} investmentId UUID of the investment
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ deleteOptionForInvestment: async (optionId: string, investmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
185
+ // verify required parameter 'optionId' is not null or undefined
186
+ assertParamExists('deleteOptionForInvestment', 'optionId', optionId)
187
+ // verify required parameter 'investmentId' is not null or undefined
188
+ assertParamExists('deleteOptionForInvestment', 'investmentId', investmentId)
189
+ const localVarPath = `/investment/{investment_id}/option/{option_id}`
190
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
191
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
192
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
193
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
194
+ let baseOptions;
195
+ if (configuration) {
196
+ baseOptions = configuration.baseOptions;
197
+ }
198
+
199
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
200
+ const localVarHeaderParameter = {} as any;
201
+ const localVarQueryParameter = {} as any;
202
+
203
+ // authentication OAuth2AuthorizationCodeBearer required
204
+ // oauth required
205
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
206
+
207
+
208
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
209
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
210
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
211
+
212
+ return {
213
+ url: toPathString(localVarUrlObj),
214
+ options: localVarRequestOptions,
215
+ };
216
+ },
217
+ /**
218
+ * Retrieve a specific impact for the option.
219
+ * @summary Get an impact for this option
220
+ * @param {string} impactId UUID of the impact
221
+ * @param {string} optionId UUID of the option
222
+ * @param {string} investmentId UUID of the investment
223
+ * @param {*} [options] Override http request option.
224
+ * @throws {RequiredError}
225
+ */
226
+ getImpactForOption: async (impactId: string, optionId: string, investmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
227
+ // verify required parameter 'impactId' is not null or undefined
228
+ assertParamExists('getImpactForOption', 'impactId', impactId)
229
+ // verify required parameter 'optionId' is not null or undefined
230
+ assertParamExists('getImpactForOption', 'optionId', optionId)
231
+ // verify required parameter 'investmentId' is not null or undefined
232
+ assertParamExists('getImpactForOption', 'investmentId', investmentId)
233
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
234
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
235
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
236
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
237
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
238
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
239
+ let baseOptions;
240
+ if (configuration) {
241
+ baseOptions = configuration.baseOptions;
242
+ }
243
+
244
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
245
+ const localVarHeaderParameter = {} as any;
246
+ const localVarQueryParameter = {} as any;
247
+
248
+ // authentication OAuth2AuthorizationCodeBearer required
249
+ // oauth required
250
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
251
+
252
+ localVarHeaderParameter['Accept'] = 'application/json';
253
+
254
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
255
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
256
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
257
+
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: async (optionId: string, investmentId: string, offset?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
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
+
288
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
289
+ const localVarHeaderParameter = {} as any;
290
+ const localVarQueryParameter = {} as any;
291
+
292
+ // authentication OAuth2AuthorizationCodeBearer required
293
+ // oauth required
294
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
295
+
296
+ if (offset !== undefined) {
297
+ localVarQueryParameter['offset'] = offset;
298
+ }
299
+
300
+ if (limit !== undefined) {
301
+ localVarQueryParameter['limit'] = limit;
302
+ }
303
+
304
+ localVarHeaderParameter['Accept'] = 'application/json';
305
+
306
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
307
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
308
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
309
+
310
+ return {
311
+ url: toPathString(localVarUrlObj),
312
+ options: localVarRequestOptions,
313
+ };
314
+ },
315
+ /**
316
+ * Retrieve a specific option for the investment.
317
+ * @summary Get an option for this investment
318
+ * @param {string} optionId UUID of the option
319
+ * @param {string} investmentId UUID of the investment
320
+ * @param {*} [options] Override http request option.
321
+ * @throws {RequiredError}
322
+ */
323
+ getOptionForInvestment: async (optionId: string, investmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
324
+ // verify required parameter 'optionId' is not null or undefined
325
+ assertParamExists('getOptionForInvestment', 'optionId', optionId)
326
+ // verify required parameter 'investmentId' is not null or undefined
327
+ assertParamExists('getOptionForInvestment', 'investmentId', investmentId)
328
+ const localVarPath = `/investment/{investment_id}/option/{option_id}`
329
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
330
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
331
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
332
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
333
+ let baseOptions;
334
+ if (configuration) {
335
+ baseOptions = configuration.baseOptions;
336
+ }
337
+
338
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
339
+ const localVarHeaderParameter = {} as any;
340
+ const localVarQueryParameter = {} as any;
341
+
342
+ // authentication OAuth2AuthorizationCodeBearer required
343
+ // oauth required
344
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
345
+
346
+ localVarHeaderParameter['Accept'] = 'application/json';
347
+
348
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
349
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
350
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
351
+
352
+ return {
353
+ url: toPathString(localVarUrlObj),
354
+ options: localVarRequestOptions,
355
+ };
356
+ },
357
+ /**
358
+ * Retrieve a paginated list of all options for a specific investment.
359
+ * @summary List options for this investment
360
+ * @param {string} investmentId UUID of the investment
361
+ * @param {number} [offset] Number of records to skip
362
+ * @param {number} [limit] Max number of records to return
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ getOptionsForInvestment: async (investmentId: string, offset?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
367
+ // verify required parameter 'investmentId' is not null or undefined
368
+ assertParamExists('getOptionsForInvestment', 'investmentId', investmentId)
369
+ const localVarPath = `/investment/{investment_id}/option/`
370
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
371
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
372
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
373
+ let baseOptions;
374
+ if (configuration) {
375
+ baseOptions = configuration.baseOptions;
376
+ }
377
+
378
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
379
+ const localVarHeaderParameter = {} as any;
380
+ const localVarQueryParameter = {} as any;
381
+
382
+ // authentication OAuth2AuthorizationCodeBearer required
383
+ // oauth required
384
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
385
+
386
+ if (offset !== undefined) {
387
+ localVarQueryParameter['offset'] = offset;
388
+ }
389
+
390
+ if (limit !== undefined) {
391
+ localVarQueryParameter['limit'] = limit;
392
+ }
393
+
394
+ localVarHeaderParameter['Accept'] = 'application/json';
395
+
396
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
397
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
398
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
399
+
400
+ return {
401
+ url: toPathString(localVarUrlObj),
402
+ options: localVarRequestOptions,
403
+ };
404
+ },
405
+ /**
406
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
407
+ * @summary Partially update an impact for this option
408
+ * @param {string} impactId UUID of the impact
409
+ * @param {string} optionId UUID of the option
410
+ * @param {string} investmentId UUID of the investment
411
+ * @param {ImpactUpdate} impactUpdate
412
+ * @param {*} [options] Override http request option.
413
+ * @throws {RequiredError}
414
+ */
415
+ patchImpactForOption: async (impactId: string, optionId: string, investmentId: string, impactUpdate: ImpactUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
416
+ // verify required parameter 'impactId' is not null or undefined
417
+ assertParamExists('patchImpactForOption', 'impactId', impactId)
418
+ // verify required parameter 'optionId' is not null or undefined
419
+ assertParamExists('patchImpactForOption', 'optionId', optionId)
420
+ // verify required parameter 'investmentId' is not null or undefined
421
+ assertParamExists('patchImpactForOption', 'investmentId', investmentId)
422
+ // verify required parameter 'impactUpdate' is not null or undefined
423
+ assertParamExists('patchImpactForOption', 'impactUpdate', impactUpdate)
424
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
425
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
426
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
427
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
428
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
429
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
430
+ let baseOptions;
431
+ if (configuration) {
432
+ baseOptions = configuration.baseOptions;
433
+ }
434
+
435
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
436
+ const localVarHeaderParameter = {} as any;
437
+ const localVarQueryParameter = {} as any;
438
+
439
+ // authentication OAuth2AuthorizationCodeBearer required
440
+ // oauth required
441
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
442
+
443
+ localVarHeaderParameter['Content-Type'] = 'application/json';
444
+ localVarHeaderParameter['Accept'] = 'application/json';
445
+
446
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
447
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
448
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
449
+ localVarRequestOptions.data = serializeDataIfNeeded(impactUpdate, localVarRequestOptions, configuration)
450
+
451
+ return {
452
+ url: toPathString(localVarUrlObj),
453
+ options: localVarRequestOptions,
454
+ };
455
+ },
456
+ /**
457
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
458
+ * @summary Partially update an option for this investment
459
+ * @param {string} optionId UUID of the option
460
+ * @param {string} investmentId UUID of the investment
461
+ * @param {OptionUpdate} optionUpdate
462
+ * @param {*} [options] Override http request option.
463
+ * @throws {RequiredError}
464
+ */
465
+ patchOptionForInvestment: async (optionId: string, investmentId: string, optionUpdate: OptionUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
466
+ // verify required parameter 'optionId' is not null or undefined
467
+ assertParamExists('patchOptionForInvestment', 'optionId', optionId)
468
+ // verify required parameter 'investmentId' is not null or undefined
469
+ assertParamExists('patchOptionForInvestment', 'investmentId', investmentId)
470
+ // verify required parameter 'optionUpdate' is not null or undefined
471
+ assertParamExists('patchOptionForInvestment', 'optionUpdate', optionUpdate)
472
+ const localVarPath = `/investment/{investment_id}/option/{option_id}`
473
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
474
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
475
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
476
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
477
+ let baseOptions;
478
+ if (configuration) {
479
+ baseOptions = configuration.baseOptions;
480
+ }
481
+
482
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
483
+ const localVarHeaderParameter = {} as any;
484
+ const localVarQueryParameter = {} as any;
485
+
486
+ // authentication OAuth2AuthorizationCodeBearer required
487
+ // oauth required
488
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
489
+
490
+ localVarHeaderParameter['Content-Type'] = 'application/json';
491
+ localVarHeaderParameter['Accept'] = 'application/json';
492
+
493
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
494
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
495
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
496
+ localVarRequestOptions.data = serializeDataIfNeeded(optionUpdate, localVarRequestOptions, configuration)
497
+
498
+ return {
499
+ url: toPathString(localVarUrlObj),
500
+ options: localVarRequestOptions,
501
+ };
502
+ },
503
+ }
504
+ };
505
+
506
+ /**
507
+ * OptionApi - functional programming interface
508
+ */
509
+ export const OptionApiFp = function(configuration?: Configuration) {
510
+ const localVarAxiosParamCreator = OptionApiAxiosParamCreator(configuration)
511
+ return {
512
+ /**
513
+ * Create a new impact under this option.
514
+ * @summary Create an impact for this option
515
+ * @param {string} optionId UUID of the option
516
+ * @param {string} investmentId UUID of the investment
517
+ * @param {ImpactCreate} impactCreate
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ async createImpactForOption(optionId: string, investmentId: string, impactCreate: ImpactCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImpactAPIResponse>> {
522
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createImpactForOption(optionId, investmentId, impactCreate, options);
523
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
524
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.createImpactForOption']?.[localVarOperationServerIndex]?.url;
525
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
526
+ },
527
+ /**
528
+ * Create a new option under this investment.
529
+ * @summary Create an option for this investment
530
+ * @param {string} investmentId UUID of the investment
531
+ * @param {OptionCreate} optionCreate
532
+ * @param {*} [options] Override http request option.
533
+ * @throws {RequiredError}
534
+ */
535
+ async createOptionForInvestment(investmentId: string, optionCreate: OptionCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OptionResponse>> {
536
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createOptionForInvestment(investmentId, optionCreate, options);
537
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
538
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.createOptionForInvestment']?.[localVarOperationServerIndex]?.url;
539
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
540
+ },
541
+ /**
542
+ * Delete an existing impact by its ID.
543
+ * @summary Delete an impact for this option
544
+ * @param {string} impactId UUID of the impact
545
+ * @param {string} optionId UUID of the option
546
+ * @param {string} investmentId UUID of the investment
547
+ * @param {*} [options] Override http request option.
548
+ * @throws {RequiredError}
549
+ */
550
+ async deleteImpactForOption(impactId: string, optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
551
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteImpactForOption(impactId, optionId, investmentId, options);
552
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
553
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.deleteImpactForOption']?.[localVarOperationServerIndex]?.url;
554
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
555
+ },
556
+ /**
557
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
558
+ * @summary Delete an option for this investment
559
+ * @param {string} optionId UUID of the option
560
+ * @param {string} investmentId UUID of the investment
561
+ * @param {*} [options] Override http request option.
562
+ * @throws {RequiredError}
563
+ */
564
+ async deleteOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
565
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOptionForInvestment(optionId, investmentId, options);
566
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
567
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.deleteOptionForInvestment']?.[localVarOperationServerIndex]?.url;
568
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
569
+ },
570
+ /**
571
+ * Retrieve a specific impact for the option.
572
+ * @summary Get an impact for this option
573
+ * @param {string} impactId UUID of the impact
574
+ * @param {string} optionId UUID of the option
575
+ * @param {string} investmentId UUID of the investment
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ */
579
+ async getImpactForOption(impactId: string, optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImpactAPIResponse>> {
580
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getImpactForOption(impactId, optionId, investmentId, options);
581
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
582
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.getImpactForOption']?.[localVarOperationServerIndex]?.url;
583
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
584
+ },
585
+ /**
586
+ * Retrieve a paginated list of all impacts for a specific option.
587
+ * @summary List impacts for this option
588
+ * @param {string} optionId UUID of the option
589
+ * @param {string} investmentId UUID of the investment
590
+ * @param {number} [offset] Number of records to skip
591
+ * @param {number} [limit] Max number of records to return
592
+ * @param {*} [options] Override http request option.
593
+ * @throws {RequiredError}
594
+ */
595
+ async getImpactsForOption(optionId: string, investmentId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ImpactAPIResponse>>> {
596
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getImpactsForOption(optionId, investmentId, offset, limit, options);
597
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
598
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.getImpactsForOption']?.[localVarOperationServerIndex]?.url;
599
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
600
+ },
601
+ /**
602
+ * Retrieve a specific option for the investment.
603
+ * @summary Get an option for this investment
604
+ * @param {string} optionId UUID of the option
605
+ * @param {string} investmentId UUID of the investment
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ */
609
+ async getOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OptionResponse>> {
610
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOptionForInvestment(optionId, investmentId, options);
611
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
612
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.getOptionForInvestment']?.[localVarOperationServerIndex]?.url;
613
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
614
+ },
615
+ /**
616
+ * Retrieve a paginated list of all options for a specific investment.
617
+ * @summary List options for this investment
618
+ * @param {string} investmentId UUID of the investment
619
+ * @param {number} [offset] Number of records to skip
620
+ * @param {number} [limit] Max number of records to return
621
+ * @param {*} [options] Override http request option.
622
+ * @throws {RequiredError}
623
+ */
624
+ async getOptionsForInvestment(investmentId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<OptionResponse>>> {
625
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOptionsForInvestment(investmentId, offset, limit, options);
626
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
627
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.getOptionsForInvestment']?.[localVarOperationServerIndex]?.url;
628
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
629
+ },
630
+ /**
631
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
632
+ * @summary Partially update an impact for this option
633
+ * @param {string} impactId UUID of the impact
634
+ * @param {string} optionId UUID of the option
635
+ * @param {string} investmentId UUID of the investment
636
+ * @param {ImpactUpdate} impactUpdate
637
+ * @param {*} [options] Override http request option.
638
+ * @throws {RequiredError}
639
+ */
640
+ async patchImpactForOption(impactId: string, optionId: string, investmentId: string, impactUpdate: ImpactUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImpactAPIResponse>> {
641
+ const localVarAxiosArgs = await localVarAxiosParamCreator.patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options);
642
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
643
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.patchImpactForOption']?.[localVarOperationServerIndex]?.url;
644
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
645
+ },
646
+ /**
647
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
648
+ * @summary Partially update an option for this investment
649
+ * @param {string} optionId UUID of the option
650
+ * @param {string} investmentId UUID of the investment
651
+ * @param {OptionUpdate} optionUpdate
652
+ * @param {*} [options] Override http request option.
653
+ * @throws {RequiredError}
654
+ */
655
+ async patchOptionForInvestment(optionId: string, investmentId: string, optionUpdate: OptionUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OptionResponse>> {
656
+ const localVarAxiosArgs = await localVarAxiosParamCreator.patchOptionForInvestment(optionId, investmentId, optionUpdate, options);
657
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
658
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.patchOptionForInvestment']?.[localVarOperationServerIndex]?.url;
659
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
660
+ },
661
+ }
662
+ };
663
+
664
+ /**
665
+ * OptionApi - factory interface
666
+ */
667
+ export const OptionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
668
+ const localVarFp = OptionApiFp(configuration)
669
+ return {
670
+ /**
671
+ * Create a new impact under this option.
672
+ * @summary Create an impact for this option
673
+ * @param {string} optionId UUID of the option
674
+ * @param {string} investmentId UUID of the investment
675
+ * @param {ImpactCreate} impactCreate
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ */
679
+ createImpactForOption(optionId: string, investmentId: string, impactCreate: ImpactCreate, options?: RawAxiosRequestConfig): AxiosPromise<ImpactAPIResponse> {
680
+ return localVarFp.createImpactForOption(optionId, investmentId, impactCreate, options).then((request) => request(axios, basePath));
681
+ },
682
+ /**
683
+ * Create a new option under this investment.
684
+ * @summary Create an option for this investment
685
+ * @param {string} investmentId UUID of the investment
686
+ * @param {OptionCreate} optionCreate
687
+ * @param {*} [options] Override http request option.
688
+ * @throws {RequiredError}
689
+ */
690
+ createOptionForInvestment(investmentId: string, optionCreate: OptionCreate, options?: RawAxiosRequestConfig): AxiosPromise<OptionResponse> {
691
+ return localVarFp.createOptionForInvestment(investmentId, optionCreate, options).then((request) => request(axios, basePath));
692
+ },
693
+ /**
694
+ * Delete an existing impact by its ID.
695
+ * @summary Delete an impact for this option
696
+ * @param {string} impactId UUID of the impact
697
+ * @param {string} optionId UUID of the option
698
+ * @param {string} investmentId UUID of the investment
699
+ * @param {*} [options] Override http request option.
700
+ * @throws {RequiredError}
701
+ */
702
+ deleteImpactForOption(impactId: string, optionId: string, investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
703
+ return localVarFp.deleteImpactForOption(impactId, optionId, investmentId, options).then((request) => request(axios, basePath));
704
+ },
705
+ /**
706
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
707
+ * @summary Delete an option for this investment
708
+ * @param {string} optionId UUID of the option
709
+ * @param {string} investmentId UUID of the investment
710
+ * @param {*} [options] Override http request option.
711
+ * @throws {RequiredError}
712
+ */
713
+ deleteOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
714
+ return localVarFp.deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
715
+ },
716
+ /**
717
+ * Retrieve a specific impact for the option.
718
+ * @summary Get an impact for this option
719
+ * @param {string} impactId UUID of the impact
720
+ * @param {string} optionId UUID of the option
721
+ * @param {string} investmentId UUID of the investment
722
+ * @param {*} [options] Override http request option.
723
+ * @throws {RequiredError}
724
+ */
725
+ getImpactForOption(impactId: string, optionId: string, investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<ImpactAPIResponse> {
726
+ return localVarFp.getImpactForOption(impactId, optionId, investmentId, options).then((request) => request(axios, basePath));
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: string, investmentId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<ImpactAPIResponse>> {
739
+ return localVarFp.getImpactsForOption(optionId, investmentId, offset, limit, options).then((request) => request(axios, basePath));
740
+ },
741
+ /**
742
+ * Retrieve a specific option for the investment.
743
+ * @summary Get an option for this investment
744
+ * @param {string} optionId UUID of the option
745
+ * @param {string} investmentId UUID of the investment
746
+ * @param {*} [options] Override http request option.
747
+ * @throws {RequiredError}
748
+ */
749
+ getOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<OptionResponse> {
750
+ return localVarFp.getOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
751
+ },
752
+ /**
753
+ * Retrieve a paginated list of all options for a specific investment.
754
+ * @summary List options for this investment
755
+ * @param {string} investmentId UUID of the investment
756
+ * @param {number} [offset] Number of records to skip
757
+ * @param {number} [limit] Max number of records to return
758
+ * @param {*} [options] Override http request option.
759
+ * @throws {RequiredError}
760
+ */
761
+ getOptionsForInvestment(investmentId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<OptionResponse>> {
762
+ return localVarFp.getOptionsForInvestment(investmentId, offset, limit, options).then((request) => request(axios, basePath));
763
+ },
764
+ /**
765
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
766
+ * @summary Partially update an impact for this option
767
+ * @param {string} impactId UUID of the impact
768
+ * @param {string} optionId UUID of the option
769
+ * @param {string} investmentId UUID of the investment
770
+ * @param {ImpactUpdate} impactUpdate
771
+ * @param {*} [options] Override http request option.
772
+ * @throws {RequiredError}
773
+ */
774
+ patchImpactForOption(impactId: string, optionId: string, investmentId: string, impactUpdate: ImpactUpdate, options?: RawAxiosRequestConfig): AxiosPromise<ImpactAPIResponse> {
775
+ return localVarFp.patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options).then((request) => request(axios, basePath));
776
+ },
777
+ /**
778
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
779
+ * @summary Partially update an option for this investment
780
+ * @param {string} optionId UUID of the option
781
+ * @param {string} investmentId UUID of the investment
782
+ * @param {OptionUpdate} optionUpdate
783
+ * @param {*} [options] Override http request option.
784
+ * @throws {RequiredError}
785
+ */
786
+ patchOptionForInvestment(optionId: string, investmentId: string, optionUpdate: OptionUpdate, options?: RawAxiosRequestConfig): AxiosPromise<OptionResponse> {
787
+ return localVarFp.patchOptionForInvestment(optionId, investmentId, optionUpdate, options).then((request) => request(axios, basePath));
788
+ },
789
+ };
790
+ };
791
+
792
+ /**
793
+ * OptionApi - object-oriented interface
794
+ */
795
+ export class OptionApi extends BaseAPI {
796
+ /**
797
+ * Create a new impact under this option.
798
+ * @summary Create an impact for this option
799
+ * @param {string} optionId UUID of the option
800
+ * @param {string} investmentId UUID of the investment
801
+ * @param {ImpactCreate} impactCreate
802
+ * @param {*} [options] Override http request option.
803
+ * @throws {RequiredError}
804
+ */
805
+ public createImpactForOption(optionId: string, investmentId: string, impactCreate: ImpactCreate, options?: RawAxiosRequestConfig) {
806
+ return OptionApiFp(this.configuration).createImpactForOption(optionId, investmentId, impactCreate, options).then((request) => request(this.axios, this.basePath));
807
+ }
808
+
809
+ /**
810
+ * Create a new option under this investment.
811
+ * @summary Create an option for this investment
812
+ * @param {string} investmentId UUID of the investment
813
+ * @param {OptionCreate} optionCreate
814
+ * @param {*} [options] Override http request option.
815
+ * @throws {RequiredError}
816
+ */
817
+ public createOptionForInvestment(investmentId: string, optionCreate: OptionCreate, options?: RawAxiosRequestConfig) {
818
+ return OptionApiFp(this.configuration).createOptionForInvestment(investmentId, optionCreate, options).then((request) => request(this.axios, this.basePath));
819
+ }
820
+
821
+ /**
822
+ * Delete an existing impact by its ID.
823
+ * @summary Delete an impact for this option
824
+ * @param {string} impactId UUID of the impact
825
+ * @param {string} optionId UUID of the option
826
+ * @param {string} investmentId UUID of the investment
827
+ * @param {*} [options] Override http request option.
828
+ * @throws {RequiredError}
829
+ */
830
+ public deleteImpactForOption(impactId: string, optionId: string, investmentId: string, options?: RawAxiosRequestConfig) {
831
+ return OptionApiFp(this.configuration).deleteImpactForOption(impactId, optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
832
+ }
833
+
834
+ /**
835
+ * Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
836
+ * @summary Delete an option for this investment
837
+ * @param {string} optionId UUID of the option
838
+ * @param {string} investmentId UUID of the investment
839
+ * @param {*} [options] Override http request option.
840
+ * @throws {RequiredError}
841
+ */
842
+ public deleteOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig) {
843
+ return OptionApiFp(this.configuration).deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
844
+ }
845
+
846
+ /**
847
+ * Retrieve a specific impact for the option.
848
+ * @summary Get an impact for this option
849
+ * @param {string} impactId UUID of the impact
850
+ * @param {string} optionId UUID of the option
851
+ * @param {string} investmentId UUID of the investment
852
+ * @param {*} [options] Override http request option.
853
+ * @throws {RequiredError}
854
+ */
855
+ public getImpactForOption(impactId: string, optionId: string, investmentId: string, options?: RawAxiosRequestConfig) {
856
+ return OptionApiFp(this.configuration).getImpactForOption(impactId, optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
857
+ }
858
+
859
+ /**
860
+ * Retrieve a paginated list of all impacts for a specific option.
861
+ * @summary List impacts for this option
862
+ * @param {string} optionId UUID of the option
863
+ * @param {string} investmentId UUID of the investment
864
+ * @param {number} [offset] Number of records to skip
865
+ * @param {number} [limit] Max number of records to return
866
+ * @param {*} [options] Override http request option.
867
+ * @throws {RequiredError}
868
+ */
869
+ public getImpactsForOption(optionId: string, investmentId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig) {
870
+ return OptionApiFp(this.configuration).getImpactsForOption(optionId, investmentId, offset, limit, options).then((request) => request(this.axios, this.basePath));
871
+ }
872
+
873
+ /**
874
+ * Retrieve a specific option for the investment.
875
+ * @summary Get an option for this investment
876
+ * @param {string} optionId UUID of the option
877
+ * @param {string} investmentId UUID of the investment
878
+ * @param {*} [options] Override http request option.
879
+ * @throws {RequiredError}
880
+ */
881
+ public getOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig) {
882
+ return OptionApiFp(this.configuration).getOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
883
+ }
884
+
885
+ /**
886
+ * Retrieve a paginated list of all options for a specific investment.
887
+ * @summary List options for this investment
888
+ * @param {string} investmentId UUID of the investment
889
+ * @param {number} [offset] Number of records to skip
890
+ * @param {number} [limit] Max number of records to return
891
+ * @param {*} [options] Override http request option.
892
+ * @throws {RequiredError}
893
+ */
894
+ public getOptionsForInvestment(investmentId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig) {
895
+ return OptionApiFp(this.configuration).getOptionsForInvestment(investmentId, offset, limit, options).then((request) => request(this.axios, this.basePath));
896
+ }
897
+
898
+ /**
899
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
900
+ * @summary Partially update an impact for this option
901
+ * @param {string} impactId UUID of the impact
902
+ * @param {string} optionId UUID of the option
903
+ * @param {string} investmentId UUID of the investment
904
+ * @param {ImpactUpdate} impactUpdate
905
+ * @param {*} [options] Override http request option.
906
+ * @throws {RequiredError}
907
+ */
908
+ public patchImpactForOption(impactId: string, optionId: string, investmentId: string, impactUpdate: ImpactUpdate, options?: RawAxiosRequestConfig) {
909
+ return OptionApiFp(this.configuration).patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options).then((request) => request(this.axios, this.basePath));
910
+ }
911
+
912
+ /**
913
+ * Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
914
+ * @summary Partially update an option for this investment
915
+ * @param {string} optionId UUID of the option
916
+ * @param {string} investmentId UUID of the investment
917
+ * @param {OptionUpdate} optionUpdate
918
+ * @param {*} [options] Override http request option.
919
+ * @throws {RequiredError}
920
+ */
921
+ public patchOptionForInvestment(optionId: string, investmentId: string, optionUpdate: OptionUpdate, options?: RawAxiosRequestConfig) {
922
+ return OptionApiFp(this.configuration).patchOptionForInvestment(optionId, investmentId, optionUpdate, options).then((request) => request(this.axios, this.basePath));
923
+ }
924
+ }
925
+