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

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