@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,486 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Asset Investment Planning
5
+ * API for Asset Investment Planning
6
+ *
7
+ * The version of the OpenAPI document: 0.2.0-dev3
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * ImpactApi - axios parameter creator
31
+ */
32
+ export const ImpactApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * Create a new impact under this option.
36
+ * @summary Create an impact for this option
37
+ * @param {string} optionId UUID of the option
38
+ * @param {string} investmentId UUID of the investment
39
+ * @param {ImpactCreate} impactCreate
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ */
43
+ createImpactForOption: (optionId_1, investmentId_1, impactCreate_1, ...args_1) => __awaiter(this, [optionId_1, investmentId_1, impactCreate_1, ...args_1], void 0, function* (optionId, investmentId, impactCreate, options = {}) {
44
+ // verify required parameter 'optionId' is not null or undefined
45
+ assertParamExists('createImpactForOption', 'optionId', optionId);
46
+ // verify required parameter 'investmentId' is not null or undefined
47
+ assertParamExists('createImpactForOption', 'investmentId', investmentId);
48
+ // verify required parameter 'impactCreate' is not null or undefined
49
+ assertParamExists('createImpactForOption', 'impactCreate', impactCreate);
50
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/`
51
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
52
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
53
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
54
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
55
+ let baseOptions;
56
+ if (configuration) {
57
+ baseOptions = configuration.baseOptions;
58
+ }
59
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
60
+ const localVarHeaderParameter = {};
61
+ const localVarQueryParameter = {};
62
+ // authentication OAuth2AuthorizationCodeBearer required
63
+ // oauth required
64
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
65
+ localVarHeaderParameter['Content-Type'] = 'application/json';
66
+ localVarHeaderParameter['Accept'] = 'application/json';
67
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
68
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
69
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
70
+ localVarRequestOptions.data = serializeDataIfNeeded(impactCreate, localVarRequestOptions, configuration);
71
+ return {
72
+ url: toPathString(localVarUrlObj),
73
+ options: localVarRequestOptions,
74
+ };
75
+ }),
76
+ /**
77
+ * Delete an existing impact by its ID.
78
+ * @summary Delete an impact for this option
79
+ * @param {string} impactId UUID of the impact
80
+ * @param {string} optionId UUID of the option
81
+ * @param {string} investmentId UUID of the investment
82
+ * @param {*} [options] Override http request option.
83
+ * @throws {RequiredError}
84
+ */
85
+ 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 = {}) {
86
+ // verify required parameter 'impactId' is not null or undefined
87
+ assertParamExists('deleteImpactForOption', 'impactId', impactId);
88
+ // verify required parameter 'optionId' is not null or undefined
89
+ assertParamExists('deleteImpactForOption', 'optionId', optionId);
90
+ // verify required parameter 'investmentId' is not null or undefined
91
+ assertParamExists('deleteImpactForOption', 'investmentId', investmentId);
92
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
93
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
94
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
95
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
96
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
97
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
98
+ let baseOptions;
99
+ if (configuration) {
100
+ baseOptions = configuration.baseOptions;
101
+ }
102
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
103
+ const localVarHeaderParameter = {};
104
+ const localVarQueryParameter = {};
105
+ // authentication OAuth2AuthorizationCodeBearer required
106
+ // oauth required
107
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
108
+ 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
+ return {
112
+ url: toPathString(localVarUrlObj),
113
+ options: localVarRequestOptions,
114
+ };
115
+ }),
116
+ /**
117
+ * Retrieve a specific impact for the option.
118
+ * @summary Get an impact for this option
119
+ * @param {string} impactId UUID of the impact
120
+ * @param {string} optionId UUID of the option
121
+ * @param {string} investmentId UUID of the investment
122
+ * @param {*} [options] Override http request option.
123
+ * @throws {RequiredError}
124
+ */
125
+ 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 = {}) {
126
+ // verify required parameter 'impactId' is not null or undefined
127
+ assertParamExists('getImpactForOption', 'impactId', impactId);
128
+ // verify required parameter 'optionId' is not null or undefined
129
+ assertParamExists('getImpactForOption', 'optionId', optionId);
130
+ // verify required parameter 'investmentId' is not null or undefined
131
+ assertParamExists('getImpactForOption', 'investmentId', investmentId);
132
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
133
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
134
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
135
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
136
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
137
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
138
+ let baseOptions;
139
+ if (configuration) {
140
+ baseOptions = configuration.baseOptions;
141
+ }
142
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
143
+ const localVarHeaderParameter = {};
144
+ const localVarQueryParameter = {};
145
+ // authentication OAuth2AuthorizationCodeBearer required
146
+ // oauth required
147
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
148
+ localVarHeaderParameter['Accept'] = 'application/json';
149
+ 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: toPathString(localVarUrlObj),
154
+ options: localVarRequestOptions,
155
+ };
156
+ }),
157
+ /**
158
+ * Retrieve a paginated list of all impacts for a specific option.
159
+ * @summary List impacts for this option
160
+ * @param {string} optionId UUID of the option
161
+ * @param {string} investmentId UUID of the investment
162
+ * @param {number} [offset] Number of records to skip
163
+ * @param {number} [limit] Max number of records to return
164
+ * @param {*} [options] Override http request option.
165
+ * @throws {RequiredError}
166
+ */
167
+ 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 = {}) {
168
+ // verify required parameter 'optionId' is not null or undefined
169
+ assertParamExists('getImpactsForOption', 'optionId', optionId);
170
+ // verify required parameter 'investmentId' is not null or undefined
171
+ assertParamExists('getImpactsForOption', 'investmentId', investmentId);
172
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/`
173
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
174
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
175
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
176
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
177
+ let baseOptions;
178
+ if (configuration) {
179
+ baseOptions = configuration.baseOptions;
180
+ }
181
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
182
+ const localVarHeaderParameter = {};
183
+ const localVarQueryParameter = {};
184
+ // authentication OAuth2AuthorizationCodeBearer required
185
+ // oauth required
186
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
187
+ if (offset !== undefined) {
188
+ localVarQueryParameter['offset'] = offset;
189
+ }
190
+ if (limit !== undefined) {
191
+ localVarQueryParameter['limit'] = limit;
192
+ }
193
+ localVarHeaderParameter['Accept'] = 'application/json';
194
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
195
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
196
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
197
+ return {
198
+ url: toPathString(localVarUrlObj),
199
+ options: localVarRequestOptions,
200
+ };
201
+ }),
202
+ /**
203
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
204
+ * @summary Partially update an impact for this option
205
+ * @param {string} impactId UUID of the impact
206
+ * @param {string} optionId UUID of the option
207
+ * @param {string} investmentId UUID of the investment
208
+ * @param {ImpactUpdate} impactUpdate
209
+ * @param {*} [options] Override http request option.
210
+ * @throws {RequiredError}
211
+ */
212
+ 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 = {}) {
213
+ // verify required parameter 'impactId' is not null or undefined
214
+ assertParamExists('patchImpactForOption', 'impactId', impactId);
215
+ // verify required parameter 'optionId' is not null or undefined
216
+ assertParamExists('patchImpactForOption', 'optionId', optionId);
217
+ // verify required parameter 'investmentId' is not null or undefined
218
+ assertParamExists('patchImpactForOption', 'investmentId', investmentId);
219
+ // verify required parameter 'impactUpdate' is not null or undefined
220
+ assertParamExists('patchImpactForOption', 'impactUpdate', impactUpdate);
221
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/impact/{impact_id}`
222
+ .replace(`{${"impact_id"}}`, encodeURIComponent(String(impactId)))
223
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
224
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
225
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
226
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
227
+ let baseOptions;
228
+ if (configuration) {
229
+ baseOptions = configuration.baseOptions;
230
+ }
231
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
232
+ const localVarHeaderParameter = {};
233
+ const localVarQueryParameter = {};
234
+ // authentication OAuth2AuthorizationCodeBearer required
235
+ // oauth required
236
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
237
+ localVarHeaderParameter['Content-Type'] = 'application/json';
238
+ localVarHeaderParameter['Accept'] = 'application/json';
239
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
240
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
241
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
242
+ localVarRequestOptions.data = serializeDataIfNeeded(impactUpdate, localVarRequestOptions, configuration);
243
+ return {
244
+ url: toPathString(localVarUrlObj),
245
+ options: localVarRequestOptions,
246
+ };
247
+ }),
248
+ };
249
+ };
250
+ /**
251
+ * ImpactApi - functional programming interface
252
+ */
253
+ export const ImpactApiFp = function (configuration) {
254
+ const localVarAxiosParamCreator = ImpactApiAxiosParamCreator(configuration);
255
+ return {
256
+ /**
257
+ * Create a new impact under this option.
258
+ * @summary Create an impact for this option
259
+ * @param {string} optionId UUID of the option
260
+ * @param {string} investmentId UUID of the investment
261
+ * @param {ImpactCreate} impactCreate
262
+ * @param {*} [options] Override http request option.
263
+ * @throws {RequiredError}
264
+ */
265
+ createImpactForOption(optionId, investmentId, impactCreate, options) {
266
+ return __awaiter(this, void 0, void 0, function* () {
267
+ var _a, _b, _c;
268
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createImpactForOption(optionId, investmentId, impactCreate, options);
269
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
270
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ImpactApi.createImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
271
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
272
+ });
273
+ },
274
+ /**
275
+ * Delete an existing impact by its ID.
276
+ * @summary Delete an impact for this option
277
+ * @param {string} impactId UUID of the impact
278
+ * @param {string} optionId UUID of the option
279
+ * @param {string} investmentId UUID of the investment
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ deleteImpactForOption(impactId, optionId, investmentId, options) {
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ var _a, _b, _c;
286
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteImpactForOption(impactId, optionId, investmentId, options);
287
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
288
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ImpactApi.deleteImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
289
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
290
+ });
291
+ },
292
+ /**
293
+ * Retrieve a specific impact for the option.
294
+ * @summary Get an impact for this option
295
+ * @param {string} impactId UUID of the impact
296
+ * @param {string} optionId UUID of the option
297
+ * @param {string} investmentId UUID of the investment
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ */
301
+ getImpactForOption(impactId, optionId, investmentId, options) {
302
+ return __awaiter(this, void 0, void 0, function* () {
303
+ var _a, _b, _c;
304
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getImpactForOption(impactId, optionId, investmentId, options);
305
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
306
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ImpactApi.getImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
307
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
308
+ });
309
+ },
310
+ /**
311
+ * Retrieve a paginated list of all impacts for a specific option.
312
+ * @summary List impacts for this option
313
+ * @param {string} optionId UUID of the option
314
+ * @param {string} investmentId UUID of the investment
315
+ * @param {number} [offset] Number of records to skip
316
+ * @param {number} [limit] Max number of records to return
317
+ * @param {*} [options] Override http request option.
318
+ * @throws {RequiredError}
319
+ */
320
+ getImpactsForOption(optionId, investmentId, offset, limit, options) {
321
+ return __awaiter(this, void 0, void 0, function* () {
322
+ var _a, _b, _c;
323
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getImpactsForOption(optionId, investmentId, offset, limit, options);
324
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
325
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ImpactApi.getImpactsForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
326
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
327
+ });
328
+ },
329
+ /**
330
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
331
+ * @summary Partially update an impact for this option
332
+ * @param {string} impactId UUID of the impact
333
+ * @param {string} optionId UUID of the option
334
+ * @param {string} investmentId UUID of the investment
335
+ * @param {ImpactUpdate} impactUpdate
336
+ * @param {*} [options] Override http request option.
337
+ * @throws {RequiredError}
338
+ */
339
+ patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options) {
340
+ return __awaiter(this, void 0, void 0, function* () {
341
+ var _a, _b, _c;
342
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options);
343
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
344
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ImpactApi.patchImpactForOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
345
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
346
+ });
347
+ },
348
+ };
349
+ };
350
+ /**
351
+ * ImpactApi - factory interface
352
+ */
353
+ export const ImpactApiFactory = function (configuration, basePath, axios) {
354
+ const localVarFp = ImpactApiFp(configuration);
355
+ return {
356
+ /**
357
+ * Create a new impact under this option.
358
+ * @summary Create an impact for this option
359
+ * @param {string} optionId UUID of the option
360
+ * @param {string} investmentId UUID of the investment
361
+ * @param {ImpactCreate} impactCreate
362
+ * @param {*} [options] Override http request option.
363
+ * @throws {RequiredError}
364
+ */
365
+ createImpactForOption(optionId, investmentId, impactCreate, options) {
366
+ return localVarFp.createImpactForOption(optionId, investmentId, impactCreate, options).then((request) => request(axios, basePath));
367
+ },
368
+ /**
369
+ * Delete an existing impact by its ID.
370
+ * @summary Delete an impact for this option
371
+ * @param {string} impactId UUID of the impact
372
+ * @param {string} optionId UUID of the option
373
+ * @param {string} investmentId UUID of the investment
374
+ * @param {*} [options] Override http request option.
375
+ * @throws {RequiredError}
376
+ */
377
+ deleteImpactForOption(impactId, optionId, investmentId, options) {
378
+ return localVarFp.deleteImpactForOption(impactId, optionId, investmentId, options).then((request) => request(axios, basePath));
379
+ },
380
+ /**
381
+ * Retrieve a specific impact for the option.
382
+ * @summary Get an impact for this option
383
+ * @param {string} impactId UUID of the impact
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
+ getImpactForOption(impactId, optionId, investmentId, options) {
390
+ return localVarFp.getImpactForOption(impactId, optionId, investmentId, options).then((request) => request(axios, basePath));
391
+ },
392
+ /**
393
+ * Retrieve a paginated list of all impacts for a specific option.
394
+ * @summary List impacts for this option
395
+ * @param {string} optionId UUID of the option
396
+ * @param {string} investmentId UUID of the investment
397
+ * @param {number} [offset] Number of records to skip
398
+ * @param {number} [limit] Max number of records to return
399
+ * @param {*} [options] Override http request option.
400
+ * @throws {RequiredError}
401
+ */
402
+ getImpactsForOption(optionId, investmentId, offset, limit, options) {
403
+ return localVarFp.getImpactsForOption(optionId, investmentId, offset, limit, options).then((request) => request(axios, basePath));
404
+ },
405
+ /**
406
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
407
+ * @summary Partially update an impact for this option
408
+ * @param {string} impactId UUID of the impact
409
+ * @param {string} optionId UUID of the option
410
+ * @param {string} investmentId UUID of the investment
411
+ * @param {ImpactUpdate} impactUpdate
412
+ * @param {*} [options] Override http request option.
413
+ * @throws {RequiredError}
414
+ */
415
+ patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options) {
416
+ return localVarFp.patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options).then((request) => request(axios, basePath));
417
+ },
418
+ };
419
+ };
420
+ /**
421
+ * ImpactApi - object-oriented interface
422
+ */
423
+ export class ImpactApi extends BaseAPI {
424
+ /**
425
+ * Create a new impact under this option.
426
+ * @summary Create an impact for this option
427
+ * @param {string} optionId UUID of the option
428
+ * @param {string} investmentId UUID of the investment
429
+ * @param {ImpactCreate} impactCreate
430
+ * @param {*} [options] Override http request option.
431
+ * @throws {RequiredError}
432
+ */
433
+ createImpactForOption(optionId, investmentId, impactCreate, options) {
434
+ return ImpactApiFp(this.configuration).createImpactForOption(optionId, investmentId, impactCreate, options).then((request) => request(this.axios, this.basePath));
435
+ }
436
+ /**
437
+ * Delete an existing impact by its ID.
438
+ * @summary Delete an impact for this option
439
+ * @param {string} impactId UUID of the impact
440
+ * @param {string} optionId UUID of the option
441
+ * @param {string} investmentId UUID of the investment
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ deleteImpactForOption(impactId, optionId, investmentId, options) {
446
+ return ImpactApiFp(this.configuration).deleteImpactForOption(impactId, optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
447
+ }
448
+ /**
449
+ * Retrieve a specific impact for the option.
450
+ * @summary Get an impact for this option
451
+ * @param {string} impactId UUID of the impact
452
+ * @param {string} optionId UUID of the option
453
+ * @param {string} investmentId UUID of the investment
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ */
457
+ getImpactForOption(impactId, optionId, investmentId, options) {
458
+ return ImpactApiFp(this.configuration).getImpactForOption(impactId, optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
459
+ }
460
+ /**
461
+ * Retrieve a paginated list of all impacts for a specific option.
462
+ * @summary List impacts for this option
463
+ * @param {string} optionId UUID of the option
464
+ * @param {string} investmentId UUID of the investment
465
+ * @param {number} [offset] Number of records to skip
466
+ * @param {number} [limit] Max number of records to return
467
+ * @param {*} [options] Override http request option.
468
+ * @throws {RequiredError}
469
+ */
470
+ getImpactsForOption(optionId, investmentId, offset, limit, options) {
471
+ return ImpactApiFp(this.configuration).getImpactsForOption(optionId, investmentId, offset, limit, options).then((request) => request(this.axios, this.basePath));
472
+ }
473
+ /**
474
+ * Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
475
+ * @summary Partially update an impact for this option
476
+ * @param {string} impactId UUID of the impact
477
+ * @param {string} optionId UUID of the option
478
+ * @param {string} investmentId UUID of the investment
479
+ * @param {ImpactUpdate} impactUpdate
480
+ * @param {*} [options] Override http request option.
481
+ * @throws {RequiredError}
482
+ */
483
+ patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options) {
484
+ return ImpactApiFp(this.configuration).patchImpactForOption(impactId, optionId, investmentId, impactUpdate, options).then((request) => request(this.axios, this.basePath));
485
+ }
486
+ }