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

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