@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,987 @@
1
+ # InvestmentApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**createImpactForOption**](#createimpactforoption) | **POST** /investment/{investment_id}/option/{option_id}/impact/ | Create an impact for this option|
8
+ |[**createOptionForInvestment**](#createoptionforinvestment) | **POST** /investment/{investment_id}/option/ | Create an option for this investment|
9
+ |[**deleteImpactForOption**](#deleteimpactforoption) | **DELETE** /investment/{investment_id}/option/{option_id}/impact/{impact_id} | Delete an impact for this option|
10
+ |[**deleteInvestment**](#deleteinvestment) | **DELETE** /investment/{investment_id} | Delete an investment|
11
+ |[**deleteOptionForInvestment**](#deleteoptionforinvestment) | **DELETE** /investment/{investment_id}/option/{option_id} | Delete an option for this investment|
12
+ |[**getFavoredOption**](#getfavoredoption) | **GET** /investment/{investment_id}/favored_option | Get the preferred option for an investment|
13
+ |[**getImpactForOption**](#getimpactforoption) | **GET** /investment/{investment_id}/option/{option_id}/impact/{impact_id} | Get an impact for this option|
14
+ |[**getImpactsForOption**](#getimpactsforoption) | **GET** /investment/{investment_id}/option/{option_id}/impact/ | List impacts for this option|
15
+ |[**getInvestmentById**](#getinvestmentbyid) | **GET** /investment/{investment_id} | Get an investment by ID|
16
+ |[**getInvestments**](#getinvestments) | **GET** /investment/ | List investments|
17
+ |[**getOptionForInvestment**](#getoptionforinvestment) | **GET** /investment/{investment_id}/option/{option_id} | Get an option for this investment|
18
+ |[**getOptionsForInvestment**](#getoptionsforinvestment) | **GET** /investment/{investment_id}/option/ | List options for this investment|
19
+ |[**patchImpactForOption**](#patchimpactforoption) | **PATCH** /investment/{investment_id}/option/{option_id}/impact/{impact_id} | Partially update an impact for this option|
20
+ |[**patchInvestment**](#patchinvestment) | **PATCH** /investment/{investment_id} | Partially update an investment|
21
+ |[**patchOptionForInvestment**](#patchoptionforinvestment) | **PATCH** /investment/{investment_id}/option/{option_id} | Partially update an option for this investment|
22
+ |[**postInvestment**](#postinvestment) | **POST** /investment/ | Create an investment|
23
+ |[**setFavoredOption**](#setfavoredoption) | **POST** /investment/{investment_id}/favored_option | Set the preferred option for an investment|
24
+
25
+ # **createImpactForOption**
26
+ > ImpactAPIResponse createImpactForOption(impactCreate)
27
+
28
+ Create a new impact under this option.
29
+
30
+ ### Example
31
+
32
+ ```typescript
33
+ import {
34
+ InvestmentApi,
35
+ Configuration,
36
+ ImpactCreate
37
+ } from '@cosmotech/aip-client';
38
+
39
+ const configuration = new Configuration();
40
+ const apiInstance = new InvestmentApi(configuration);
41
+
42
+ let optionId: string; //UUID of the option (default to undefined)
43
+ let investmentId: string; //UUID of the investment (default to undefined)
44
+ let impactCreate: ImpactCreate; //
45
+
46
+ const { status, data } = await apiInstance.createImpactForOption(
47
+ optionId,
48
+ investmentId,
49
+ impactCreate
50
+ );
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+ |Name | Type | Description | Notes|
56
+ |------------- | ------------- | ------------- | -------------|
57
+ | **impactCreate** | **ImpactCreate**| | |
58
+ | **optionId** | [**string**] | UUID of the option | defaults to undefined|
59
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
60
+
61
+
62
+ ### Return type
63
+
64
+ **ImpactAPIResponse**
65
+
66
+ ### Authorization
67
+
68
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: application/json
73
+ - **Accept**: application/json
74
+
75
+
76
+ ### HTTP response details
77
+ | Status code | Description | Response headers |
78
+ |-------------|-------------|------------------|
79
+ |**201** | Impact created successfully | - |
80
+ |**400** | Invalid input or constraint violation | - |
81
+ |**404** | Investment or option not found | - |
82
+
83
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
84
+
85
+ # **createOptionForInvestment**
86
+ > OptionResponse createOptionForInvestment(optionCreate)
87
+
88
+ Create a new option under this investment.
89
+
90
+ ### Example
91
+
92
+ ```typescript
93
+ import {
94
+ InvestmentApi,
95
+ Configuration,
96
+ OptionCreate
97
+ } from '@cosmotech/aip-client';
98
+
99
+ const configuration = new Configuration();
100
+ const apiInstance = new InvestmentApi(configuration);
101
+
102
+ let investmentId: string; //UUID of the investment (default to undefined)
103
+ let optionCreate: OptionCreate; //
104
+
105
+ const { status, data } = await apiInstance.createOptionForInvestment(
106
+ investmentId,
107
+ optionCreate
108
+ );
109
+ ```
110
+
111
+ ### Parameters
112
+
113
+ |Name | Type | Description | Notes|
114
+ |------------- | ------------- | ------------- | -------------|
115
+ | **optionCreate** | **OptionCreate**| | |
116
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
117
+
118
+
119
+ ### Return type
120
+
121
+ **OptionResponse**
122
+
123
+ ### Authorization
124
+
125
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
126
+
127
+ ### HTTP request headers
128
+
129
+ - **Content-Type**: application/json
130
+ - **Accept**: application/json
131
+
132
+
133
+ ### HTTP response details
134
+ | Status code | Description | Response headers |
135
+ |-------------|-------------|------------------|
136
+ |**201** | Option created successfully | - |
137
+ |**400** | Invalid input or constraint violation | - |
138
+ |**404** | Investment not found | - |
139
+
140
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
141
+
142
+ # **deleteImpactForOption**
143
+ > deleteImpactForOption()
144
+
145
+ Delete an existing impact by its ID.
146
+
147
+ ### Example
148
+
149
+ ```typescript
150
+ import {
151
+ InvestmentApi,
152
+ Configuration
153
+ } from '@cosmotech/aip-client';
154
+
155
+ const configuration = new Configuration();
156
+ const apiInstance = new InvestmentApi(configuration);
157
+
158
+ let impactId: string; //UUID of the impact (default to undefined)
159
+ let optionId: string; //UUID of the option (default to undefined)
160
+ let investmentId: string; //UUID of the investment (default to undefined)
161
+
162
+ const { status, data } = await apiInstance.deleteImpactForOption(
163
+ impactId,
164
+ optionId,
165
+ investmentId
166
+ );
167
+ ```
168
+
169
+ ### Parameters
170
+
171
+ |Name | Type | Description | Notes|
172
+ |------------- | ------------- | ------------- | -------------|
173
+ | **impactId** | [**string**] | UUID of the impact | defaults to undefined|
174
+ | **optionId** | [**string**] | UUID of the option | defaults to undefined|
175
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
176
+
177
+
178
+ ### Return type
179
+
180
+ void (empty response body)
181
+
182
+ ### Authorization
183
+
184
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
185
+
186
+ ### HTTP request headers
187
+
188
+ - **Content-Type**: Not defined
189
+ - **Accept**: Not defined
190
+
191
+
192
+ ### HTTP response details
193
+ | Status code | Description | Response headers |
194
+ |-------------|-------------|------------------|
195
+ |**204** | Impact successfully deleted | - |
196
+ |**404** | Investment, option, or impact not found | - |
197
+
198
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
199
+
200
+ # **deleteInvestment**
201
+ > deleteInvestment()
202
+
203
+ Delete an existing investment by its ID. Associated options are also deleted via cascade.
204
+
205
+ ### Example
206
+
207
+ ```typescript
208
+ import {
209
+ InvestmentApi,
210
+ Configuration
211
+ } from '@cosmotech/aip-client';
212
+
213
+ const configuration = new Configuration();
214
+ const apiInstance = new InvestmentApi(configuration);
215
+
216
+ let investmentId: string; //UUID of the investment (default to undefined)
217
+
218
+ const { status, data } = await apiInstance.deleteInvestment(
219
+ investmentId
220
+ );
221
+ ```
222
+
223
+ ### Parameters
224
+
225
+ |Name | Type | Description | Notes|
226
+ |------------- | ------------- | ------------- | -------------|
227
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
228
+
229
+
230
+ ### Return type
231
+
232
+ void (empty response body)
233
+
234
+ ### Authorization
235
+
236
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
237
+
238
+ ### HTTP request headers
239
+
240
+ - **Content-Type**: Not defined
241
+ - **Accept**: Not defined
242
+
243
+
244
+ ### HTTP response details
245
+ | Status code | Description | Response headers |
246
+ |-------------|-------------|------------------|
247
+ |**204** | Investment successfully deleted | - |
248
+ |**404** | Investment not found | - |
249
+
250
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
251
+
252
+ # **deleteOptionForInvestment**
253
+ > deleteOptionForInvestment()
254
+
255
+ Delete an existing option by its ID. Associated phases and impacts are also deleted via cascade.
256
+
257
+ ### Example
258
+
259
+ ```typescript
260
+ import {
261
+ InvestmentApi,
262
+ Configuration
263
+ } from '@cosmotech/aip-client';
264
+
265
+ const configuration = new Configuration();
266
+ const apiInstance = new InvestmentApi(configuration);
267
+
268
+ let optionId: string; //UUID of the option (default to undefined)
269
+ let investmentId: string; //UUID of the investment (default to undefined)
270
+
271
+ const { status, data } = await apiInstance.deleteOptionForInvestment(
272
+ optionId,
273
+ investmentId
274
+ );
275
+ ```
276
+
277
+ ### Parameters
278
+
279
+ |Name | Type | Description | Notes|
280
+ |------------- | ------------- | ------------- | -------------|
281
+ | **optionId** | [**string**] | UUID of the option | defaults to undefined|
282
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
283
+
284
+
285
+ ### Return type
286
+
287
+ void (empty response body)
288
+
289
+ ### Authorization
290
+
291
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
292
+
293
+ ### HTTP request headers
294
+
295
+ - **Content-Type**: Not defined
296
+ - **Accept**: Not defined
297
+
298
+
299
+ ### HTTP response details
300
+ | Status code | Description | Response headers |
301
+ |-------------|-------------|------------------|
302
+ |**204** | Option successfully deleted | - |
303
+ |**404** | Investment or option not found | - |
304
+
305
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
306
+
307
+ # **getFavoredOption**
308
+ > FavoredOptionResponse getFavoredOption()
309
+
310
+ Get the preferred option for an investment.
311
+
312
+ ### Example
313
+
314
+ ```typescript
315
+ import {
316
+ InvestmentApi,
317
+ Configuration
318
+ } from '@cosmotech/aip-client';
319
+
320
+ const configuration = new Configuration();
321
+ const apiInstance = new InvestmentApi(configuration);
322
+
323
+ let investmentId: string; //UUID of the investment (default to undefined)
324
+
325
+ const { status, data } = await apiInstance.getFavoredOption(
326
+ investmentId
327
+ );
328
+ ```
329
+
330
+ ### Parameters
331
+
332
+ |Name | Type | Description | Notes|
333
+ |------------- | ------------- | ------------- | -------------|
334
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
335
+
336
+
337
+ ### Return type
338
+
339
+ **FavoredOptionResponse**
340
+
341
+ ### Authorization
342
+
343
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
344
+
345
+ ### HTTP request headers
346
+
347
+ - **Content-Type**: Not defined
348
+ - **Accept**: application/json
349
+
350
+
351
+ ### HTTP response details
352
+ | Status code | Description | Response headers |
353
+ |-------------|-------------|------------------|
354
+ |**200** | Preferred option exists | - |
355
+ |**204** | Investment exists but no options are associated | - |
356
+ |**404** | Investment not found | - |
357
+
358
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
359
+
360
+ # **getImpactForOption**
361
+ > ImpactAPIResponse getImpactForOption()
362
+
363
+ Retrieve a specific impact for the option.
364
+
365
+ ### Example
366
+
367
+ ```typescript
368
+ import {
369
+ InvestmentApi,
370
+ Configuration
371
+ } from '@cosmotech/aip-client';
372
+
373
+ const configuration = new Configuration();
374
+ const apiInstance = new InvestmentApi(configuration);
375
+
376
+ let impactId: string; //UUID of the impact (default to undefined)
377
+ let optionId: string; //UUID of the option (default to undefined)
378
+ let investmentId: string; //UUID of the investment (default to undefined)
379
+
380
+ const { status, data } = await apiInstance.getImpactForOption(
381
+ impactId,
382
+ optionId,
383
+ investmentId
384
+ );
385
+ ```
386
+
387
+ ### Parameters
388
+
389
+ |Name | Type | Description | Notes|
390
+ |------------- | ------------- | ------------- | -------------|
391
+ | **impactId** | [**string**] | UUID of the impact | defaults to undefined|
392
+ | **optionId** | [**string**] | UUID of the option | defaults to undefined|
393
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
394
+
395
+
396
+ ### Return type
397
+
398
+ **ImpactAPIResponse**
399
+
400
+ ### Authorization
401
+
402
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
403
+
404
+ ### HTTP request headers
405
+
406
+ - **Content-Type**: Not defined
407
+ - **Accept**: application/json
408
+
409
+
410
+ ### HTTP response details
411
+ | Status code | Description | Response headers |
412
+ |-------------|-------------|------------------|
413
+ |**200** | The requested impact | - |
414
+ |**404** | Investment, option, or impact not found | - |
415
+
416
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
417
+
418
+ # **getImpactsForOption**
419
+ > Array<ImpactAPIResponse> getImpactsForOption()
420
+
421
+ Retrieve a paginated list of all impacts for a specific option.
422
+
423
+ ### Example
424
+
425
+ ```typescript
426
+ import {
427
+ InvestmentApi,
428
+ Configuration
429
+ } from '@cosmotech/aip-client';
430
+
431
+ const configuration = new Configuration();
432
+ const apiInstance = new InvestmentApi(configuration);
433
+
434
+ let optionId: string; //UUID of the option (default to undefined)
435
+ let investmentId: string; //UUID of the investment (default to undefined)
436
+ let offset: number; //Number of records to skip (optional) (default to 0)
437
+ let limit: number; //Max number of records to return (optional) (default to 100)
438
+
439
+ const { status, data } = await apiInstance.getImpactsForOption(
440
+ optionId,
441
+ investmentId,
442
+ offset,
443
+ limit
444
+ );
445
+ ```
446
+
447
+ ### Parameters
448
+
449
+ |Name | Type | Description | Notes|
450
+ |------------- | ------------- | ------------- | -------------|
451
+ | **optionId** | [**string**] | UUID of the option | defaults to undefined|
452
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
453
+ | **offset** | [**number**] | Number of records to skip | (optional) defaults to 0|
454
+ | **limit** | [**number**] | Max number of records to return | (optional) defaults to 100|
455
+
456
+
457
+ ### Return type
458
+
459
+ **Array<ImpactAPIResponse>**
460
+
461
+ ### Authorization
462
+
463
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
464
+
465
+ ### HTTP request headers
466
+
467
+ - **Content-Type**: Not defined
468
+ - **Accept**: application/json
469
+
470
+
471
+ ### HTTP response details
472
+ | Status code | Description | Response headers |
473
+ |-------------|-------------|------------------|
474
+ |**200** | List of impacts for the option | - |
475
+ |**404** | Investment or option not found | - |
476
+
477
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
478
+
479
+ # **getInvestmentById**
480
+ > InvestmentResponse getInvestmentById()
481
+
482
+ Retrieve a single investment by its ID.
483
+
484
+ ### Example
485
+
486
+ ```typescript
487
+ import {
488
+ InvestmentApi,
489
+ Configuration
490
+ } from '@cosmotech/aip-client';
491
+
492
+ const configuration = new Configuration();
493
+ const apiInstance = new InvestmentApi(configuration);
494
+
495
+ let investmentId: string; //UUID of the investment (default to undefined)
496
+
497
+ const { status, data } = await apiInstance.getInvestmentById(
498
+ investmentId
499
+ );
500
+ ```
501
+
502
+ ### Parameters
503
+
504
+ |Name | Type | Description | Notes|
505
+ |------------- | ------------- | ------------- | -------------|
506
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
507
+
508
+
509
+ ### Return type
510
+
511
+ **InvestmentResponse**
512
+
513
+ ### Authorization
514
+
515
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
516
+
517
+ ### HTTP request headers
518
+
519
+ - **Content-Type**: Not defined
520
+ - **Accept**: application/json
521
+
522
+
523
+ ### HTTP response details
524
+ | Status code | Description | Response headers |
525
+ |-------------|-------------|------------------|
526
+ |**200** | The requested investment | - |
527
+ |**404** | Investment not found | - |
528
+
529
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
530
+
531
+ # **getInvestments**
532
+ > Array<InvestmentResponse> getInvestments()
533
+
534
+ Retrieve a paginated list of all investments.
535
+
536
+ ### Example
537
+
538
+ ```typescript
539
+ import {
540
+ InvestmentApi,
541
+ Configuration
542
+ } from '@cosmotech/aip-client';
543
+
544
+ const configuration = new Configuration();
545
+ const apiInstance = new InvestmentApi(configuration);
546
+
547
+ let offset: number; //Number of records to skip (optional) (default to 0)
548
+ let limit: number; //Max number of records to return (optional) (default to 100)
549
+
550
+ const { status, data } = await apiInstance.getInvestments(
551
+ offset,
552
+ limit
553
+ );
554
+ ```
555
+
556
+ ### Parameters
557
+
558
+ |Name | Type | Description | Notes|
559
+ |------------- | ------------- | ------------- | -------------|
560
+ | **offset** | [**number**] | Number of records to skip | (optional) defaults to 0|
561
+ | **limit** | [**number**] | Max number of records to return | (optional) defaults to 100|
562
+
563
+
564
+ ### Return type
565
+
566
+ **Array<InvestmentResponse>**
567
+
568
+ ### Authorization
569
+
570
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
571
+
572
+ ### HTTP request headers
573
+
574
+ - **Content-Type**: Not defined
575
+ - **Accept**: application/json
576
+
577
+
578
+ ### HTTP response details
579
+ | Status code | Description | Response headers |
580
+ |-------------|-------------|------------------|
581
+ |**200** | List of investments | - |
582
+
583
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
584
+
585
+ # **getOptionForInvestment**
586
+ > OptionResponse getOptionForInvestment()
587
+
588
+ Retrieve a specific option for the investment.
589
+
590
+ ### Example
591
+
592
+ ```typescript
593
+ import {
594
+ InvestmentApi,
595
+ Configuration
596
+ } from '@cosmotech/aip-client';
597
+
598
+ const configuration = new Configuration();
599
+ const apiInstance = new InvestmentApi(configuration);
600
+
601
+ let optionId: string; //UUID of the option (default to undefined)
602
+ let investmentId: string; //UUID of the investment (default to undefined)
603
+
604
+ const { status, data } = await apiInstance.getOptionForInvestment(
605
+ optionId,
606
+ investmentId
607
+ );
608
+ ```
609
+
610
+ ### Parameters
611
+
612
+ |Name | Type | Description | Notes|
613
+ |------------- | ------------- | ------------- | -------------|
614
+ | **optionId** | [**string**] | UUID of the option | defaults to undefined|
615
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
616
+
617
+
618
+ ### Return type
619
+
620
+ **OptionResponse**
621
+
622
+ ### Authorization
623
+
624
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
625
+
626
+ ### HTTP request headers
627
+
628
+ - **Content-Type**: Not defined
629
+ - **Accept**: application/json
630
+
631
+
632
+ ### HTTP response details
633
+ | Status code | Description | Response headers |
634
+ |-------------|-------------|------------------|
635
+ |**200** | The requested option | - |
636
+ |**404** | Investment or option not found | - |
637
+
638
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
639
+
640
+ # **getOptionsForInvestment**
641
+ > Array<OptionResponse> getOptionsForInvestment()
642
+
643
+ Retrieve a paginated list of all options for a specific investment.
644
+
645
+ ### Example
646
+
647
+ ```typescript
648
+ import {
649
+ InvestmentApi,
650
+ Configuration
651
+ } from '@cosmotech/aip-client';
652
+
653
+ const configuration = new Configuration();
654
+ const apiInstance = new InvestmentApi(configuration);
655
+
656
+ let investmentId: string; //UUID of the investment (default to undefined)
657
+ let offset: number; //Number of records to skip (optional) (default to 0)
658
+ let limit: number; //Max number of records to return (optional) (default to 100)
659
+
660
+ const { status, data } = await apiInstance.getOptionsForInvestment(
661
+ investmentId,
662
+ offset,
663
+ limit
664
+ );
665
+ ```
666
+
667
+ ### Parameters
668
+
669
+ |Name | Type | Description | Notes|
670
+ |------------- | ------------- | ------------- | -------------|
671
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
672
+ | **offset** | [**number**] | Number of records to skip | (optional) defaults to 0|
673
+ | **limit** | [**number**] | Max number of records to return | (optional) defaults to 100|
674
+
675
+
676
+ ### Return type
677
+
678
+ **Array<OptionResponse>**
679
+
680
+ ### Authorization
681
+
682
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
683
+
684
+ ### HTTP request headers
685
+
686
+ - **Content-Type**: Not defined
687
+ - **Accept**: application/json
688
+
689
+
690
+ ### HTTP response details
691
+ | Status code | Description | Response headers |
692
+ |-------------|-------------|------------------|
693
+ |**200** | List of options for the investment | - |
694
+ |**404** | Investment not found | - |
695
+
696
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
697
+
698
+ # **patchImpactForOption**
699
+ > ImpactAPIResponse patchImpactForOption(impactUpdate)
700
+
701
+ Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
702
+
703
+ ### Example
704
+
705
+ ```typescript
706
+ import {
707
+ InvestmentApi,
708
+ Configuration,
709
+ ImpactUpdate
710
+ } from '@cosmotech/aip-client';
711
+
712
+ const configuration = new Configuration();
713
+ const apiInstance = new InvestmentApi(configuration);
714
+
715
+ let impactId: string; //UUID of the impact (default to undefined)
716
+ let optionId: string; //UUID of the option (default to undefined)
717
+ let investmentId: string; //UUID of the investment (default to undefined)
718
+ let impactUpdate: ImpactUpdate; //
719
+
720
+ const { status, data } = await apiInstance.patchImpactForOption(
721
+ impactId,
722
+ optionId,
723
+ investmentId,
724
+ impactUpdate
725
+ );
726
+ ```
727
+
728
+ ### Parameters
729
+
730
+ |Name | Type | Description | Notes|
731
+ |------------- | ------------- | ------------- | -------------|
732
+ | **impactUpdate** | **ImpactUpdate**| | |
733
+ | **impactId** | [**string**] | UUID of the impact | defaults to undefined|
734
+ | **optionId** | [**string**] | UUID of the option | defaults to undefined|
735
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
736
+
737
+
738
+ ### Return type
739
+
740
+ **ImpactAPIResponse**
741
+
742
+ ### Authorization
743
+
744
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
745
+
746
+ ### HTTP request headers
747
+
748
+ - **Content-Type**: application/json
749
+ - **Accept**: application/json
750
+
751
+
752
+ ### HTTP response details
753
+ | Status code | Description | Response headers |
754
+ |-------------|-------------|------------------|
755
+ |**200** | Impact updated successfully | - |
756
+ |**400** | Validation or constraint error | - |
757
+ |**404** | Investment, option, or impact not found | - |
758
+
759
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
760
+
761
+ # **patchInvestment**
762
+ > InvestmentResponse patchInvestment(investmentUpdate)
763
+
764
+ Update one or more fields of an existing investment. Only the fields included in the request body will be modified; omitted fields remain unchanged.
765
+
766
+ ### Example
767
+
768
+ ```typescript
769
+ import {
770
+ InvestmentApi,
771
+ Configuration,
772
+ InvestmentUpdate
773
+ } from '@cosmotech/aip-client';
774
+
775
+ const configuration = new Configuration();
776
+ const apiInstance = new InvestmentApi(configuration);
777
+
778
+ let investmentId: string; //UUID of the investment (default to undefined)
779
+ let investmentUpdate: InvestmentUpdate; //
780
+
781
+ const { status, data } = await apiInstance.patchInvestment(
782
+ investmentId,
783
+ investmentUpdate
784
+ );
785
+ ```
786
+
787
+ ### Parameters
788
+
789
+ |Name | Type | Description | Notes|
790
+ |------------- | ------------- | ------------- | -------------|
791
+ | **investmentUpdate** | **InvestmentUpdate**| | |
792
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
793
+
794
+
795
+ ### Return type
796
+
797
+ **InvestmentResponse**
798
+
799
+ ### Authorization
800
+
801
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
802
+
803
+ ### HTTP request headers
804
+
805
+ - **Content-Type**: application/json
806
+ - **Accept**: application/json
807
+
808
+
809
+ ### HTTP response details
810
+ | Status code | Description | Response headers |
811
+ |-------------|-------------|------------------|
812
+ |**200** | Investment updated successfully | - |
813
+ |**400** | Validation or constraint error | - |
814
+ |**404** | Investment not found | - |
815
+
816
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
817
+
818
+ # **patchOptionForInvestment**
819
+ > OptionResponse patchOptionForInvestment(optionUpdate)
820
+
821
+ Update one or more fields of an existing option. Only the fields included in the request body will be modified; omitted fields remain unchanged.
822
+
823
+ ### Example
824
+
825
+ ```typescript
826
+ import {
827
+ InvestmentApi,
828
+ Configuration,
829
+ OptionUpdate
830
+ } from '@cosmotech/aip-client';
831
+
832
+ const configuration = new Configuration();
833
+ const apiInstance = new InvestmentApi(configuration);
834
+
835
+ let optionId: string; //UUID of the option (default to undefined)
836
+ let investmentId: string; //UUID of the investment (default to undefined)
837
+ let optionUpdate: OptionUpdate; //
838
+
839
+ const { status, data } = await apiInstance.patchOptionForInvestment(
840
+ optionId,
841
+ investmentId,
842
+ optionUpdate
843
+ );
844
+ ```
845
+
846
+ ### Parameters
847
+
848
+ |Name | Type | Description | Notes|
849
+ |------------- | ------------- | ------------- | -------------|
850
+ | **optionUpdate** | **OptionUpdate**| | |
851
+ | **optionId** | [**string**] | UUID of the option | defaults to undefined|
852
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
853
+
854
+
855
+ ### Return type
856
+
857
+ **OptionResponse**
858
+
859
+ ### Authorization
860
+
861
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
862
+
863
+ ### HTTP request headers
864
+
865
+ - **Content-Type**: application/json
866
+ - **Accept**: application/json
867
+
868
+
869
+ ### HTTP response details
870
+ | Status code | Description | Response headers |
871
+ |-------------|-------------|------------------|
872
+ |**200** | Option updated successfully | - |
873
+ |**400** | Validation or constraint error | - |
874
+ |**404** | Investment or option not found | - |
875
+
876
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
877
+
878
+ # **postInvestment**
879
+ > InvestmentResponse postInvestment(investmentCreate)
880
+
881
+ Create a new investment.
882
+
883
+ ### Example
884
+
885
+ ```typescript
886
+ import {
887
+ InvestmentApi,
888
+ Configuration,
889
+ InvestmentCreate
890
+ } from '@cosmotech/aip-client';
891
+
892
+ const configuration = new Configuration();
893
+ const apiInstance = new InvestmentApi(configuration);
894
+
895
+ let investmentCreate: InvestmentCreate; //
896
+
897
+ const { status, data } = await apiInstance.postInvestment(
898
+ investmentCreate
899
+ );
900
+ ```
901
+
902
+ ### Parameters
903
+
904
+ |Name | Type | Description | Notes|
905
+ |------------- | ------------- | ------------- | -------------|
906
+ | **investmentCreate** | **InvestmentCreate**| | |
907
+
908
+
909
+ ### Return type
910
+
911
+ **InvestmentResponse**
912
+
913
+ ### Authorization
914
+
915
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
916
+
917
+ ### HTTP request headers
918
+
919
+ - **Content-Type**: application/json
920
+ - **Accept**: application/json
921
+
922
+
923
+ ### HTTP response details
924
+ | Status code | Description | Response headers |
925
+ |-------------|-------------|------------------|
926
+ |**201** | Investment created successfully | - |
927
+ |**400** | Invalid input or constraint violation | - |
928
+
929
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
930
+
931
+ # **setFavoredOption**
932
+ > FavoredOptionResponse setFavoredOption(favoredOptionRequest)
933
+
934
+ Set the preferred option for an investment.
935
+
936
+ ### Example
937
+
938
+ ```typescript
939
+ import {
940
+ InvestmentApi,
941
+ Configuration,
942
+ FavoredOptionRequest
943
+ } from '@cosmotech/aip-client';
944
+
945
+ const configuration = new Configuration();
946
+ const apiInstance = new InvestmentApi(configuration);
947
+
948
+ let investmentId: string; //UUID of the investment (default to undefined)
949
+ let favoredOptionRequest: FavoredOptionRequest; //
950
+
951
+ const { status, data } = await apiInstance.setFavoredOption(
952
+ investmentId,
953
+ favoredOptionRequest
954
+ );
955
+ ```
956
+
957
+ ### Parameters
958
+
959
+ |Name | Type | Description | Notes|
960
+ |------------- | ------------- | ------------- | -------------|
961
+ | **favoredOptionRequest** | **FavoredOptionRequest**| | |
962
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
963
+
964
+
965
+ ### Return type
966
+
967
+ **FavoredOptionResponse**
968
+
969
+ ### Authorization
970
+
971
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
972
+
973
+ ### HTTP request headers
974
+
975
+ - **Content-Type**: application/json
976
+ - **Accept**: application/json
977
+
978
+
979
+ ### HTTP response details
980
+ | Status code | Description | Response headers |
981
+ |-------------|-------------|------------------|
982
+ |**200** | Preferred option updated successfully | - |
983
+ |**400** | Option does not belong to this investment | - |
984
+ |**404** | Investment or option not found | - |
985
+
986
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
987
+