@cosmotech/aip-client 0.2.0-dev6 → 0.3.0-dev1

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 (343) hide show
  1. package/README.md +25 -2
  2. package/api/budget-api.ts +835 -0
  3. package/api/default-api.ts +1 -1
  4. package/api/impact-api.ts +1 -1
  5. package/api/investment-api.ts +166 -5
  6. package/api/metric-api.ts +1 -1
  7. package/api/metric-costs-api.ts +1 -1
  8. package/api/metric-costs-per-year-api.ts +1 -1
  9. package/api/objective-api.ts +1 -1
  10. package/api/objective-weight-api.ts +1 -1
  11. package/api/objective-weights-api.ts +1 -1
  12. package/api/option-api.ts +89 -5
  13. package/api/preferred-option-api.ts +1 -1
  14. package/api/value-framework-api.ts +1 -1
  15. package/api/value-framework-costs-api.ts +1 -1
  16. package/api/value-framework-weights-api.ts +1 -1
  17. package/api.ts +2 -1
  18. package/base.ts +1 -1
  19. package/common.ts +1 -1
  20. package/configuration.ts +1 -1
  21. package/dist/api/budget-api.d.ts +382 -0
  22. package/dist/api/budget-api.js +794 -0
  23. package/dist/api/default-api.d.ts +1 -1
  24. package/dist/api/default-api.js +1 -1
  25. package/dist/api/impact-api.d.ts +1 -1
  26. package/dist/api/impact-api.js +1 -1
  27. package/dist/api/investment-api.d.ts +75 -5
  28. package/dist/api/investment-api.js +154 -5
  29. package/dist/api/metric-api.d.ts +1 -1
  30. package/dist/api/metric-api.js +1 -1
  31. package/dist/api/metric-costs-api.d.ts +1 -1
  32. package/dist/api/metric-costs-api.js +1 -1
  33. package/dist/api/metric-costs-per-year-api.d.ts +1 -1
  34. package/dist/api/metric-costs-per-year-api.js +1 -1
  35. package/dist/api/objective-api.d.ts +1 -1
  36. package/dist/api/objective-api.js +1 -1
  37. package/dist/api/objective-weight-api.d.ts +1 -1
  38. package/dist/api/objective-weight-api.js +1 -1
  39. package/dist/api/objective-weights-api.d.ts +1 -1
  40. package/dist/api/objective-weights-api.js +1 -1
  41. package/dist/api/option-api.d.ts +42 -5
  42. package/dist/api/option-api.js +83 -5
  43. package/dist/api/preferred-option-api.d.ts +1 -1
  44. package/dist/api/preferred-option-api.js +1 -1
  45. package/dist/api/value-framework-api.d.ts +1 -1
  46. package/dist/api/value-framework-api.js +1 -1
  47. package/dist/api/value-framework-costs-api.d.ts +1 -1
  48. package/dist/api/value-framework-costs-api.js +1 -1
  49. package/dist/api/value-framework-weights-api.d.ts +1 -1
  50. package/dist/api/value-framework-weights-api.js +1 -1
  51. package/dist/api.d.ts +2 -1
  52. package/dist/api.js +2 -1
  53. package/dist/base.d.ts +1 -1
  54. package/dist/base.js +1 -1
  55. package/dist/common.d.ts +1 -1
  56. package/dist/common.js +1 -1
  57. package/dist/configuration.d.ts +1 -1
  58. package/dist/configuration.js +1 -1
  59. package/dist/esm/api/budget-api.d.ts +382 -0
  60. package/dist/esm/api/budget-api.js +787 -0
  61. package/dist/esm/api/default-api.d.ts +1 -1
  62. package/dist/esm/api/default-api.js +1 -1
  63. package/dist/esm/api/impact-api.d.ts +1 -1
  64. package/dist/esm/api/impact-api.js +1 -1
  65. package/dist/esm/api/investment-api.d.ts +75 -5
  66. package/dist/esm/api/investment-api.js +154 -5
  67. package/dist/esm/api/metric-api.d.ts +1 -1
  68. package/dist/esm/api/metric-api.js +1 -1
  69. package/dist/esm/api/metric-costs-api.d.ts +1 -1
  70. package/dist/esm/api/metric-costs-api.js +1 -1
  71. package/dist/esm/api/metric-costs-per-year-api.d.ts +1 -1
  72. package/dist/esm/api/metric-costs-per-year-api.js +1 -1
  73. package/dist/esm/api/objective-api.d.ts +1 -1
  74. package/dist/esm/api/objective-api.js +1 -1
  75. package/dist/esm/api/objective-weight-api.d.ts +1 -1
  76. package/dist/esm/api/objective-weight-api.js +1 -1
  77. package/dist/esm/api/objective-weights-api.d.ts +1 -1
  78. package/dist/esm/api/objective-weights-api.js +1 -1
  79. package/dist/esm/api/option-api.d.ts +42 -5
  80. package/dist/esm/api/option-api.js +83 -5
  81. package/dist/esm/api/preferred-option-api.d.ts +1 -1
  82. package/dist/esm/api/preferred-option-api.js +1 -1
  83. package/dist/esm/api/value-framework-api.d.ts +1 -1
  84. package/dist/esm/api/value-framework-api.js +1 -1
  85. package/dist/esm/api/value-framework-costs-api.d.ts +1 -1
  86. package/dist/esm/api/value-framework-costs-api.js +1 -1
  87. package/dist/esm/api/value-framework-weights-api.d.ts +1 -1
  88. package/dist/esm/api/value-framework-weights-api.js +1 -1
  89. package/dist/esm/api.d.ts +2 -1
  90. package/dist/esm/api.js +2 -1
  91. package/dist/esm/base.d.ts +1 -1
  92. package/dist/esm/base.js +1 -1
  93. package/dist/esm/common.d.ts +1 -1
  94. package/dist/esm/common.js +1 -1
  95. package/dist/esm/configuration.d.ts +1 -1
  96. package/dist/esm/configuration.js +1 -1
  97. package/dist/esm/index.d.ts +1 -1
  98. package/dist/esm/index.js +1 -1
  99. package/dist/esm/models/budget-bulk-delete-request.d.ts +20 -0
  100. package/dist/esm/models/budget-bulk-delete-request.js +14 -0
  101. package/dist/esm/models/budget-create.d.ts +22 -0
  102. package/dist/esm/models/budget-create.js +14 -0
  103. package/dist/esm/models/budget-investment-response.d.ts +34 -0
  104. package/dist/esm/models/budget-investment-response.js +14 -0
  105. package/dist/esm/models/budget-link-options-request.d.ts +20 -0
  106. package/dist/esm/models/budget-link-options-request.js +14 -0
  107. package/dist/esm/models/budget-option-response.d.ts +50 -0
  108. package/dist/esm/models/budget-option-response.js +14 -0
  109. package/dist/esm/models/budget-overview-response.d.ts +25 -0
  110. package/dist/esm/models/budget-overview-response.js +14 -0
  111. package/dist/esm/models/budget-response.d.ts +26 -0
  112. package/dist/esm/models/budget-response.js +14 -0
  113. package/dist/esm/models/budget-update.d.ts +19 -0
  114. package/dist/esm/models/budget-update.js +14 -0
  115. package/dist/esm/models/evolution-type.d.ts +1 -1
  116. package/dist/esm/models/evolution-type.js +1 -1
  117. package/dist/esm/models/httpvalidation-error.d.ts +1 -1
  118. package/dist/esm/models/httpvalidation-error.js +1 -1
  119. package/dist/esm/models/impact-apiresponse.d.ts +1 -1
  120. package/dist/esm/models/impact-apiresponse.js +1 -1
  121. package/dist/esm/models/impact-create.d.ts +1 -1
  122. package/dist/esm/models/impact-create.js +1 -1
  123. package/dist/esm/models/impact-update.d.ts +1 -1
  124. package/dist/esm/models/impact-update.js +1 -1
  125. package/dist/esm/models/index.d.ts +10 -0
  126. package/dist/esm/models/index.js +10 -0
  127. package/dist/esm/models/investment-create.d.ts +1 -1
  128. package/dist/esm/models/investment-create.js +1 -1
  129. package/dist/esm/models/investment-overview-response.d.ts +29 -0
  130. package/dist/esm/models/investment-overview-response.js +14 -0
  131. package/dist/esm/models/investment-response.d.ts +1 -1
  132. package/dist/esm/models/investment-response.js +1 -1
  133. package/dist/esm/models/investment-update.d.ts +1 -1
  134. package/dist/esm/models/investment-update.js +1 -1
  135. package/dist/esm/models/location-inner.d.ts +1 -1
  136. package/dist/esm/models/location-inner.js +1 -1
  137. package/dist/esm/models/measurement-type.d.ts +1 -1
  138. package/dist/esm/models/measurement-type.js +1 -1
  139. package/dist/esm/models/metric-costs-per-year-create.d.ts +1 -1
  140. package/dist/esm/models/metric-costs-per-year-create.js +1 -1
  141. package/dist/esm/models/metric-costs-per-year-response.d.ts +1 -1
  142. package/dist/esm/models/metric-costs-per-year-response.js +1 -1
  143. package/dist/esm/models/metric-costs-per-year-update.d.ts +1 -1
  144. package/dist/esm/models/metric-costs-per-year-update.js +1 -1
  145. package/dist/esm/models/metric-create.d.ts +1 -1
  146. package/dist/esm/models/metric-create.js +1 -1
  147. package/dist/esm/models/metric-response.d.ts +1 -1
  148. package/dist/esm/models/metric-response.js +1 -1
  149. package/dist/esm/models/metric-type.d.ts +1 -1
  150. package/dist/esm/models/metric-type.js +1 -1
  151. package/dist/esm/models/metric-update.d.ts +1 -1
  152. package/dist/esm/models/metric-update.js +1 -1
  153. package/dist/esm/models/objective-create.d.ts +1 -1
  154. package/dist/esm/models/objective-create.js +1 -1
  155. package/dist/esm/models/objective-response.d.ts +1 -1
  156. package/dist/esm/models/objective-response.js +1 -1
  157. package/dist/esm/models/objective-update.d.ts +1 -1
  158. package/dist/esm/models/objective-update.js +1 -1
  159. package/dist/esm/models/objective-weight-create.d.ts +1 -1
  160. package/dist/esm/models/objective-weight-create.js +1 -1
  161. package/dist/esm/models/objective-weight-response.d.ts +1 -1
  162. package/dist/esm/models/objective-weight-response.js +1 -1
  163. package/dist/esm/models/objective-weight-update.d.ts +1 -1
  164. package/dist/esm/models/objective-weight-update.js +1 -1
  165. package/dist/esm/models/option-chart-kpi.d.ts +1 -1
  166. package/dist/esm/models/option-chart-kpi.js +1 -1
  167. package/dist/esm/models/option-chart-kpis-yearly.d.ts +1 -1
  168. package/dist/esm/models/option-chart-kpis-yearly.js +1 -1
  169. package/dist/esm/models/option-create.d.ts +2 -1
  170. package/dist/esm/models/option-create.js +1 -1
  171. package/dist/esm/models/option-overview-response.d.ts +38 -0
  172. package/dist/esm/models/option-overview-response.js +14 -0
  173. package/dist/esm/models/option-response.d.ts +2 -1
  174. package/dist/esm/models/option-response.js +1 -1
  175. package/dist/esm/models/option-update.d.ts +2 -1
  176. package/dist/esm/models/option-update.js +1 -1
  177. package/dist/esm/models/preferred-option-request.d.ts +1 -1
  178. package/dist/esm/models/preferred-option-request.js +1 -1
  179. package/dist/esm/models/preferred-option-response.d.ts +1 -1
  180. package/dist/esm/models/preferred-option-response.js +1 -1
  181. package/dist/esm/models/validation-error.d.ts +1 -1
  182. package/dist/esm/models/validation-error.js +1 -1
  183. package/dist/esm/models/value-framework-create.d.ts +1 -1
  184. package/dist/esm/models/value-framework-create.js +1 -1
  185. package/dist/esm/models/value-framework-response.d.ts +1 -1
  186. package/dist/esm/models/value-framework-response.js +1 -1
  187. package/dist/esm/models/value-framework-update.d.ts +1 -1
  188. package/dist/esm/models/value-framework-update.js +1 -1
  189. package/dist/index.d.ts +1 -1
  190. package/dist/index.js +1 -1
  191. package/dist/models/budget-bulk-delete-request.d.ts +20 -0
  192. package/dist/models/budget-bulk-delete-request.js +15 -0
  193. package/dist/models/budget-create.d.ts +22 -0
  194. package/dist/models/budget-create.js +15 -0
  195. package/dist/models/budget-investment-response.d.ts +34 -0
  196. package/dist/models/budget-investment-response.js +15 -0
  197. package/dist/models/budget-link-options-request.d.ts +20 -0
  198. package/dist/models/budget-link-options-request.js +15 -0
  199. package/dist/models/budget-option-response.d.ts +50 -0
  200. package/dist/models/budget-option-response.js +15 -0
  201. package/dist/models/budget-overview-response.d.ts +25 -0
  202. package/dist/models/budget-overview-response.js +15 -0
  203. package/dist/models/budget-response.d.ts +26 -0
  204. package/dist/models/budget-response.js +15 -0
  205. package/dist/models/budget-update.d.ts +19 -0
  206. package/dist/models/budget-update.js +15 -0
  207. package/dist/models/evolution-type.d.ts +1 -1
  208. package/dist/models/evolution-type.js +1 -1
  209. package/dist/models/httpvalidation-error.d.ts +1 -1
  210. package/dist/models/httpvalidation-error.js +1 -1
  211. package/dist/models/impact-apiresponse.d.ts +1 -1
  212. package/dist/models/impact-apiresponse.js +1 -1
  213. package/dist/models/impact-create.d.ts +1 -1
  214. package/dist/models/impact-create.js +1 -1
  215. package/dist/models/impact-update.d.ts +1 -1
  216. package/dist/models/impact-update.js +1 -1
  217. package/dist/models/index.d.ts +10 -0
  218. package/dist/models/index.js +10 -0
  219. package/dist/models/investment-create.d.ts +1 -1
  220. package/dist/models/investment-create.js +1 -1
  221. package/dist/models/investment-overview-response.d.ts +29 -0
  222. package/dist/models/investment-overview-response.js +15 -0
  223. package/dist/models/investment-response.d.ts +1 -1
  224. package/dist/models/investment-response.js +1 -1
  225. package/dist/models/investment-update.d.ts +1 -1
  226. package/dist/models/investment-update.js +1 -1
  227. package/dist/models/location-inner.d.ts +1 -1
  228. package/dist/models/location-inner.js +1 -1
  229. package/dist/models/measurement-type.d.ts +1 -1
  230. package/dist/models/measurement-type.js +1 -1
  231. package/dist/models/metric-costs-per-year-create.d.ts +1 -1
  232. package/dist/models/metric-costs-per-year-create.js +1 -1
  233. package/dist/models/metric-costs-per-year-response.d.ts +1 -1
  234. package/dist/models/metric-costs-per-year-response.js +1 -1
  235. package/dist/models/metric-costs-per-year-update.d.ts +1 -1
  236. package/dist/models/metric-costs-per-year-update.js +1 -1
  237. package/dist/models/metric-create.d.ts +1 -1
  238. package/dist/models/metric-create.js +1 -1
  239. package/dist/models/metric-response.d.ts +1 -1
  240. package/dist/models/metric-response.js +1 -1
  241. package/dist/models/metric-type.d.ts +1 -1
  242. package/dist/models/metric-type.js +1 -1
  243. package/dist/models/metric-update.d.ts +1 -1
  244. package/dist/models/metric-update.js +1 -1
  245. package/dist/models/objective-create.d.ts +1 -1
  246. package/dist/models/objective-create.js +1 -1
  247. package/dist/models/objective-response.d.ts +1 -1
  248. package/dist/models/objective-response.js +1 -1
  249. package/dist/models/objective-update.d.ts +1 -1
  250. package/dist/models/objective-update.js +1 -1
  251. package/dist/models/objective-weight-create.d.ts +1 -1
  252. package/dist/models/objective-weight-create.js +1 -1
  253. package/dist/models/objective-weight-response.d.ts +1 -1
  254. package/dist/models/objective-weight-response.js +1 -1
  255. package/dist/models/objective-weight-update.d.ts +1 -1
  256. package/dist/models/objective-weight-update.js +1 -1
  257. package/dist/models/option-chart-kpi.d.ts +1 -1
  258. package/dist/models/option-chart-kpi.js +1 -1
  259. package/dist/models/option-chart-kpis-yearly.d.ts +1 -1
  260. package/dist/models/option-chart-kpis-yearly.js +1 -1
  261. package/dist/models/option-create.d.ts +2 -1
  262. package/dist/models/option-create.js +1 -1
  263. package/dist/models/option-overview-response.d.ts +38 -0
  264. package/dist/models/option-overview-response.js +15 -0
  265. package/dist/models/option-response.d.ts +2 -1
  266. package/dist/models/option-response.js +1 -1
  267. package/dist/models/option-update.d.ts +2 -1
  268. package/dist/models/option-update.js +1 -1
  269. package/dist/models/preferred-option-request.d.ts +1 -1
  270. package/dist/models/preferred-option-request.js +1 -1
  271. package/dist/models/preferred-option-response.d.ts +1 -1
  272. package/dist/models/preferred-option-response.js +1 -1
  273. package/dist/models/validation-error.d.ts +1 -1
  274. package/dist/models/validation-error.js +1 -1
  275. package/dist/models/value-framework-create.d.ts +1 -1
  276. package/dist/models/value-framework-create.js +1 -1
  277. package/dist/models/value-framework-response.d.ts +1 -1
  278. package/dist/models/value-framework-response.js +1 -1
  279. package/dist/models/value-framework-update.d.ts +1 -1
  280. package/dist/models/value-framework-update.js +1 -1
  281. package/docs/BudgetApi.md +559 -0
  282. package/docs/BudgetBulkDeleteRequest.md +21 -0
  283. package/docs/BudgetCreate.md +25 -0
  284. package/docs/BudgetInvestmentResponse.md +37 -0
  285. package/docs/BudgetLinkOptionsRequest.md +21 -0
  286. package/docs/BudgetOptionResponse.md +39 -0
  287. package/docs/BudgetOverviewResponse.md +25 -0
  288. package/docs/BudgetResponse.md +33 -0
  289. package/docs/BudgetUpdate.md +25 -0
  290. package/docs/InvestmentApi.md +111 -2
  291. package/docs/InvestmentOverviewResponse.md +33 -0
  292. package/docs/OptionApi.md +58 -2
  293. package/docs/OptionCreate.md +2 -0
  294. package/docs/OptionOverviewResponse.md +33 -0
  295. package/docs/OptionResponse.md +2 -0
  296. package/docs/OptionUpdate.md +2 -0
  297. package/index.ts +1 -1
  298. package/models/budget-bulk-delete-request.ts +26 -0
  299. package/models/budget-create.ts +28 -0
  300. package/models/budget-investment-response.ts +40 -0
  301. package/models/budget-link-options-request.ts +26 -0
  302. package/models/budget-option-response.ts +56 -0
  303. package/models/budget-overview-response.ts +31 -0
  304. package/models/budget-response.ts +32 -0
  305. package/models/budget-update.ts +25 -0
  306. package/models/evolution-type.ts +1 -1
  307. package/models/httpvalidation-error.ts +1 -1
  308. package/models/impact-apiresponse.ts +1 -1
  309. package/models/impact-create.ts +1 -1
  310. package/models/impact-update.ts +1 -1
  311. package/models/index.ts +10 -0
  312. package/models/investment-create.ts +1 -1
  313. package/models/investment-overview-response.ts +35 -0
  314. package/models/investment-response.ts +1 -1
  315. package/models/investment-update.ts +1 -1
  316. package/models/location-inner.ts +1 -1
  317. package/models/measurement-type.ts +1 -1
  318. package/models/metric-costs-per-year-create.ts +1 -1
  319. package/models/metric-costs-per-year-response.ts +1 -1
  320. package/models/metric-costs-per-year-update.ts +1 -1
  321. package/models/metric-create.ts +1 -1
  322. package/models/metric-response.ts +1 -1
  323. package/models/metric-type.ts +1 -1
  324. package/models/metric-update.ts +1 -1
  325. package/models/objective-create.ts +1 -1
  326. package/models/objective-response.ts +1 -1
  327. package/models/objective-update.ts +1 -1
  328. package/models/objective-weight-create.ts +1 -1
  329. package/models/objective-weight-response.ts +1 -1
  330. package/models/objective-weight-update.ts +1 -1
  331. package/models/option-chart-kpi.ts +1 -1
  332. package/models/option-chart-kpis-yearly.ts +1 -1
  333. package/models/option-create.ts +2 -1
  334. package/models/option-overview-response.ts +44 -0
  335. package/models/option-response.ts +2 -1
  336. package/models/option-update.ts +2 -1
  337. package/models/preferred-option-request.ts +1 -1
  338. package/models/preferred-option-response.ts +1 -1
  339. package/models/validation-error.ts +1 -1
  340. package/models/value-framework-create.ts +1 -1
  341. package/models/value-framework-response.ts +1 -1
  342. package/models/value-framework-update.ts +1 -1
  343. package/package.json +1 -1
@@ -0,0 +1,787 @@
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.3.0-dev1
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
+ * BudgetApi - axios parameter creator
31
+ */
32
+ export const BudgetApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * Delete multiple budgets at once. Options linked to deleted budgets will have their budget link removed (set to null).
36
+ * @summary Bulk delete budgets
37
+ * @param {BudgetBulkDeleteRequest} budgetBulkDeleteRequest
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ bulkDeleteBudgets: (budgetBulkDeleteRequest_1, ...args_1) => __awaiter(this, [budgetBulkDeleteRequest_1, ...args_1], void 0, function* (budgetBulkDeleteRequest, options = {}) {
42
+ // verify required parameter 'budgetBulkDeleteRequest' is not null or undefined
43
+ assertParamExists('bulkDeleteBudgets', 'budgetBulkDeleteRequest', budgetBulkDeleteRequest);
44
+ const localVarPath = `/budget/bulk`;
45
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
46
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
47
+ let baseOptions;
48
+ if (configuration) {
49
+ baseOptions = configuration.baseOptions;
50
+ }
51
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
52
+ const localVarHeaderParameter = {};
53
+ const localVarQueryParameter = {};
54
+ // authentication OAuth2AuthorizationCodeBearer required
55
+ // oauth required
56
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
57
+ localVarHeaderParameter['Content-Type'] = 'application/json';
58
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
59
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
60
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
61
+ localVarRequestOptions.data = serializeDataIfNeeded(budgetBulkDeleteRequest, localVarRequestOptions, configuration);
62
+ return {
63
+ url: toPathString(localVarUrlObj),
64
+ options: localVarRequestOptions,
65
+ };
66
+ }),
67
+ /**
68
+ * Delete an existing budget by its ID. Options linked to this budget will have their budget link removed (set to null).
69
+ * @summary Delete a budget
70
+ * @param {string} budgetId UUID of the budget
71
+ * @param {*} [options] Override http request option.
72
+ * @throws {RequiredError}
73
+ */
74
+ deleteBudget: (budgetId_1, ...args_1) => __awaiter(this, [budgetId_1, ...args_1], void 0, function* (budgetId, options = {}) {
75
+ // verify required parameter 'budgetId' is not null or undefined
76
+ assertParamExists('deleteBudget', 'budgetId', budgetId);
77
+ const localVarPath = `/budget/{budget_id}`
78
+ .replace(`{${"budget_id"}}`, encodeURIComponent(String(budgetId)));
79
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
80
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
81
+ let baseOptions;
82
+ if (configuration) {
83
+ baseOptions = configuration.baseOptions;
84
+ }
85
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
86
+ const localVarHeaderParameter = {};
87
+ const localVarQueryParameter = {};
88
+ // authentication OAuth2AuthorizationCodeBearer required
89
+ // oauth required
90
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
91
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
92
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
93
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
94
+ return {
95
+ url: toPathString(localVarUrlObj),
96
+ options: localVarRequestOptions,
97
+ };
98
+ }),
99
+ /**
100
+ * Retrieve a single budget by its ID.
101
+ * @summary Get a budget by ID
102
+ * @param {string} budgetId UUID of the budget
103
+ * @param {*} [options] Override http request option.
104
+ * @throws {RequiredError}
105
+ */
106
+ getBudgetById: (budgetId_1, ...args_1) => __awaiter(this, [budgetId_1, ...args_1], void 0, function* (budgetId, options = {}) {
107
+ // verify required parameter 'budgetId' is not null or undefined
108
+ assertParamExists('getBudgetById', 'budgetId', budgetId);
109
+ const localVarPath = `/budget/{budget_id}`
110
+ .replace(`{${"budget_id"}}`, encodeURIComponent(String(budgetId)));
111
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
112
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
113
+ let baseOptions;
114
+ if (configuration) {
115
+ baseOptions = configuration.baseOptions;
116
+ }
117
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
118
+ const localVarHeaderParameter = {};
119
+ const localVarQueryParameter = {};
120
+ // authentication OAuth2AuthorizationCodeBearer required
121
+ // oauth required
122
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
123
+ localVarHeaderParameter['Accept'] = 'application/json';
124
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
125
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
126
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
127
+ return {
128
+ url: toPathString(localVarUrlObj),
129
+ options: localVarRequestOptions,
130
+ };
131
+ }),
132
+ /**
133
+ * Return all distinct investments that have at least one option linked to this budget. Each row shows the investment\'s current preferred option data and a flag indicating whether the preferred option is the one linked to the budget. NPV is computed for the preferred option from the v_option_npv view.
134
+ * @summary List investments linked to this budget via options
135
+ * @param {string} budgetId UUID of the budget
136
+ * @param {string} valueFrameworkId UUID of the value framework
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ getBudgetInvestments: (budgetId_1, valueFrameworkId_1, ...args_1) => __awaiter(this, [budgetId_1, valueFrameworkId_1, ...args_1], void 0, function* (budgetId, valueFrameworkId, options = {}) {
141
+ // verify required parameter 'budgetId' is not null or undefined
142
+ assertParamExists('getBudgetInvestments', 'budgetId', budgetId);
143
+ // verify required parameter 'valueFrameworkId' is not null or undefined
144
+ assertParamExists('getBudgetInvestments', 'valueFrameworkId', valueFrameworkId);
145
+ const localVarPath = `/budget/{budget_id}/investments`
146
+ .replace(`{${"budget_id"}}`, encodeURIComponent(String(budgetId)));
147
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
148
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
149
+ let baseOptions;
150
+ if (configuration) {
151
+ baseOptions = configuration.baseOptions;
152
+ }
153
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
154
+ const localVarHeaderParameter = {};
155
+ const localVarQueryParameter = {};
156
+ // authentication OAuth2AuthorizationCodeBearer required
157
+ // oauth required
158
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
159
+ if (valueFrameworkId !== undefined) {
160
+ localVarQueryParameter['value_framework_id'] = valueFrameworkId;
161
+ }
162
+ localVarHeaderParameter['Accept'] = 'application/json';
163
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
164
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
165
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
166
+ return {
167
+ url: toPathString(localVarUrlObj),
168
+ options: localVarRequestOptions,
169
+ };
170
+ }),
171
+ /**
172
+ * Return all options linked to this budget. Rows are ordered by investment name then option name. NPV is computed from the v_option_npv view for the given value framework.
173
+ * @summary List options linked to this budget
174
+ * @param {string} budgetId UUID of the budget
175
+ * @param {string} valueFrameworkId UUID of the value framework
176
+ * @param {*} [options] Override http request option.
177
+ * @throws {RequiredError}
178
+ */
179
+ getBudgetOptions: (budgetId_1, valueFrameworkId_1, ...args_1) => __awaiter(this, [budgetId_1, valueFrameworkId_1, ...args_1], void 0, function* (budgetId, valueFrameworkId, options = {}) {
180
+ // verify required parameter 'budgetId' is not null or undefined
181
+ assertParamExists('getBudgetOptions', 'budgetId', budgetId);
182
+ // verify required parameter 'valueFrameworkId' is not null or undefined
183
+ assertParamExists('getBudgetOptions', 'valueFrameworkId', valueFrameworkId);
184
+ const localVarPath = `/budget/{budget_id}/options`
185
+ .replace(`{${"budget_id"}}`, encodeURIComponent(String(budgetId)));
186
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
187
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
188
+ let baseOptions;
189
+ if (configuration) {
190
+ baseOptions = configuration.baseOptions;
191
+ }
192
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
193
+ const localVarHeaderParameter = {};
194
+ const localVarQueryParameter = {};
195
+ // authentication OAuth2AuthorizationCodeBearer required
196
+ // oauth required
197
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
198
+ if (valueFrameworkId !== undefined) {
199
+ localVarQueryParameter['value_framework_id'] = valueFrameworkId;
200
+ }
201
+ localVarHeaderParameter['Accept'] = 'application/json';
202
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
203
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
204
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
205
+ return {
206
+ url: toPathString(localVarUrlObj),
207
+ options: localVarRequestOptions,
208
+ };
209
+ }),
210
+ /**
211
+ * Return aggregated overview data for a budget: annual capacity, number of options linked to it, and number of distinct investments that have at least one option linked to it.
212
+ * @summary Get budget overview
213
+ * @param {string} budgetId UUID of the budget
214
+ * @param {*} [options] Override http request option.
215
+ * @throws {RequiredError}
216
+ */
217
+ getBudgetOverview: (budgetId_1, ...args_1) => __awaiter(this, [budgetId_1, ...args_1], void 0, function* (budgetId, options = {}) {
218
+ // verify required parameter 'budgetId' is not null or undefined
219
+ assertParamExists('getBudgetOverview', 'budgetId', budgetId);
220
+ const localVarPath = `/budget/{budget_id}/overview`
221
+ .replace(`{${"budget_id"}}`, encodeURIComponent(String(budgetId)));
222
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
223
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
224
+ let baseOptions;
225
+ if (configuration) {
226
+ baseOptions = configuration.baseOptions;
227
+ }
228
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
229
+ const localVarHeaderParameter = {};
230
+ const localVarQueryParameter = {};
231
+ // authentication OAuth2AuthorizationCodeBearer required
232
+ // oauth required
233
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
234
+ localVarHeaderParameter['Accept'] = 'application/json';
235
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
236
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
237
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
238
+ return {
239
+ url: toPathString(localVarUrlObj),
240
+ options: localVarRequestOptions,
241
+ };
242
+ }),
243
+ /**
244
+ * Retrieve a paginated list of all budgets, ordered by name.
245
+ * @summary List all budgets
246
+ * @param {number} [offset] Number of records to skip
247
+ * @param {number} [limit] Max number of records to return
248
+ * @param {*} [options] Override http request option.
249
+ * @throws {RequiredError}
250
+ */
251
+ getBudgets: (offset_1, limit_1, ...args_1) => __awaiter(this, [offset_1, limit_1, ...args_1], void 0, function* (offset, limit, options = {}) {
252
+ const localVarPath = `/budget/`;
253
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
254
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
255
+ let baseOptions;
256
+ if (configuration) {
257
+ baseOptions = configuration.baseOptions;
258
+ }
259
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
260
+ const localVarHeaderParameter = {};
261
+ const localVarQueryParameter = {};
262
+ // authentication OAuth2AuthorizationCodeBearer required
263
+ // oauth required
264
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
265
+ if (offset !== undefined) {
266
+ localVarQueryParameter['offset'] = offset;
267
+ }
268
+ if (limit !== undefined) {
269
+ localVarQueryParameter['limit'] = limit;
270
+ }
271
+ localVarHeaderParameter['Accept'] = 'application/json';
272
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
273
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
274
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
275
+ return {
276
+ url: toPathString(localVarUrlObj),
277
+ options: localVarRequestOptions,
278
+ };
279
+ }),
280
+ /**
281
+ * Link all specified options to this budget. Any previous budget assignment on these options is overwritten. Returns the list of option IDs that were successfully linked.
282
+ * @summary Bulk-link options to this budget
283
+ * @param {string} budgetId UUID of the budget
284
+ * @param {BudgetLinkOptionsRequest} budgetLinkOptionsRequest
285
+ * @param {*} [options] Override http request option.
286
+ * @throws {RequiredError}
287
+ */
288
+ linkOptionsToBudget: (budgetId_1, budgetLinkOptionsRequest_1, ...args_1) => __awaiter(this, [budgetId_1, budgetLinkOptionsRequest_1, ...args_1], void 0, function* (budgetId, budgetLinkOptionsRequest, options = {}) {
289
+ // verify required parameter 'budgetId' is not null or undefined
290
+ assertParamExists('linkOptionsToBudget', 'budgetId', budgetId);
291
+ // verify required parameter 'budgetLinkOptionsRequest' is not null or undefined
292
+ assertParamExists('linkOptionsToBudget', 'budgetLinkOptionsRequest', budgetLinkOptionsRequest);
293
+ const localVarPath = `/budget/{budget_id}/link-options`
294
+ .replace(`{${"budget_id"}}`, encodeURIComponent(String(budgetId)));
295
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
296
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
297
+ let baseOptions;
298
+ if (configuration) {
299
+ baseOptions = configuration.baseOptions;
300
+ }
301
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
302
+ const localVarHeaderParameter = {};
303
+ const localVarQueryParameter = {};
304
+ // authentication OAuth2AuthorizationCodeBearer required
305
+ // oauth required
306
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
307
+ localVarHeaderParameter['Content-Type'] = 'application/json';
308
+ localVarHeaderParameter['Accept'] = 'application/json';
309
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
310
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
311
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
312
+ localVarRequestOptions.data = serializeDataIfNeeded(budgetLinkOptionsRequest, localVarRequestOptions, configuration);
313
+ return {
314
+ url: toPathString(localVarUrlObj),
315
+ options: localVarRequestOptions,
316
+ };
317
+ }),
318
+ /**
319
+ * Update one or more fields of an existing budget. Only the fields included in the request body will be modified; omitted fields remain unchanged.
320
+ * @summary Partially update a budget
321
+ * @param {string} budgetId UUID of the budget
322
+ * @param {BudgetUpdate} budgetUpdate
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ patchBudget: (budgetId_1, budgetUpdate_1, ...args_1) => __awaiter(this, [budgetId_1, budgetUpdate_1, ...args_1], void 0, function* (budgetId, budgetUpdate, options = {}) {
327
+ // verify required parameter 'budgetId' is not null or undefined
328
+ assertParamExists('patchBudget', 'budgetId', budgetId);
329
+ // verify required parameter 'budgetUpdate' is not null or undefined
330
+ assertParamExists('patchBudget', 'budgetUpdate', budgetUpdate);
331
+ const localVarPath = `/budget/{budget_id}`
332
+ .replace(`{${"budget_id"}}`, encodeURIComponent(String(budgetId)));
333
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
334
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
335
+ let baseOptions;
336
+ if (configuration) {
337
+ baseOptions = configuration.baseOptions;
338
+ }
339
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
340
+ const localVarHeaderParameter = {};
341
+ const localVarQueryParameter = {};
342
+ // authentication OAuth2AuthorizationCodeBearer required
343
+ // oauth required
344
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
345
+ localVarHeaderParameter['Content-Type'] = 'application/json';
346
+ localVarHeaderParameter['Accept'] = 'application/json';
347
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
348
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
349
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
350
+ localVarRequestOptions.data = serializeDataIfNeeded(budgetUpdate, localVarRequestOptions, configuration);
351
+ return {
352
+ url: toPathString(localVarUrlObj),
353
+ options: localVarRequestOptions,
354
+ };
355
+ }),
356
+ /**
357
+ * Create a new budget.
358
+ * @summary Create a budget
359
+ * @param {BudgetCreate} budgetCreate
360
+ * @param {*} [options] Override http request option.
361
+ * @throws {RequiredError}
362
+ */
363
+ postBudget: (budgetCreate_1, ...args_1) => __awaiter(this, [budgetCreate_1, ...args_1], void 0, function* (budgetCreate, options = {}) {
364
+ // verify required parameter 'budgetCreate' is not null or undefined
365
+ assertParamExists('postBudget', 'budgetCreate', budgetCreate);
366
+ const localVarPath = `/budget/`;
367
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
368
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
369
+ let baseOptions;
370
+ if (configuration) {
371
+ baseOptions = configuration.baseOptions;
372
+ }
373
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
374
+ const localVarHeaderParameter = {};
375
+ const localVarQueryParameter = {};
376
+ // authentication OAuth2AuthorizationCodeBearer required
377
+ // oauth required
378
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
379
+ localVarHeaderParameter['Content-Type'] = 'application/json';
380
+ localVarHeaderParameter['Accept'] = 'application/json';
381
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
382
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
383
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
384
+ localVarRequestOptions.data = serializeDataIfNeeded(budgetCreate, localVarRequestOptions, configuration);
385
+ return {
386
+ url: toPathString(localVarUrlObj),
387
+ options: localVarRequestOptions,
388
+ };
389
+ }),
390
+ };
391
+ };
392
+ /**
393
+ * BudgetApi - functional programming interface
394
+ */
395
+ export const BudgetApiFp = function (configuration) {
396
+ const localVarAxiosParamCreator = BudgetApiAxiosParamCreator(configuration);
397
+ return {
398
+ /**
399
+ * Delete multiple budgets at once. Options linked to deleted budgets will have their budget link removed (set to null).
400
+ * @summary Bulk delete budgets
401
+ * @param {BudgetBulkDeleteRequest} budgetBulkDeleteRequest
402
+ * @param {*} [options] Override http request option.
403
+ * @throws {RequiredError}
404
+ */
405
+ bulkDeleteBudgets(budgetBulkDeleteRequest, options) {
406
+ return __awaiter(this, void 0, void 0, function* () {
407
+ var _a, _b, _c;
408
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.bulkDeleteBudgets(budgetBulkDeleteRequest, options);
409
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
410
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BudgetApi.bulkDeleteBudgets']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
411
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
412
+ });
413
+ },
414
+ /**
415
+ * Delete an existing budget by its ID. Options linked to this budget will have their budget link removed (set to null).
416
+ * @summary Delete a budget
417
+ * @param {string} budgetId UUID of the budget
418
+ * @param {*} [options] Override http request option.
419
+ * @throws {RequiredError}
420
+ */
421
+ deleteBudget(budgetId, options) {
422
+ return __awaiter(this, void 0, void 0, function* () {
423
+ var _a, _b, _c;
424
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteBudget(budgetId, options);
425
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
426
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BudgetApi.deleteBudget']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
427
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
428
+ });
429
+ },
430
+ /**
431
+ * Retrieve a single budget by its ID.
432
+ * @summary Get a budget by ID
433
+ * @param {string} budgetId UUID of the budget
434
+ * @param {*} [options] Override http request option.
435
+ * @throws {RequiredError}
436
+ */
437
+ getBudgetById(budgetId, options) {
438
+ return __awaiter(this, void 0, void 0, function* () {
439
+ var _a, _b, _c;
440
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBudgetById(budgetId, options);
441
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
442
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BudgetApi.getBudgetById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
443
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
444
+ });
445
+ },
446
+ /**
447
+ * Return all distinct investments that have at least one option linked to this budget. Each row shows the investment\'s current preferred option data and a flag indicating whether the preferred option is the one linked to the budget. NPV is computed for the preferred option from the v_option_npv view.
448
+ * @summary List investments linked to this budget via options
449
+ * @param {string} budgetId UUID of the budget
450
+ * @param {string} valueFrameworkId UUID of the value framework
451
+ * @param {*} [options] Override http request option.
452
+ * @throws {RequiredError}
453
+ */
454
+ getBudgetInvestments(budgetId, valueFrameworkId, options) {
455
+ return __awaiter(this, void 0, void 0, function* () {
456
+ var _a, _b, _c;
457
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBudgetInvestments(budgetId, valueFrameworkId, options);
458
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
459
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BudgetApi.getBudgetInvestments']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
460
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
461
+ });
462
+ },
463
+ /**
464
+ * Return all options linked to this budget. Rows are ordered by investment name then option name. NPV is computed from the v_option_npv view for the given value framework.
465
+ * @summary List options linked to this budget
466
+ * @param {string} budgetId UUID of the budget
467
+ * @param {string} valueFrameworkId UUID of the value framework
468
+ * @param {*} [options] Override http request option.
469
+ * @throws {RequiredError}
470
+ */
471
+ getBudgetOptions(budgetId, valueFrameworkId, options) {
472
+ return __awaiter(this, void 0, void 0, function* () {
473
+ var _a, _b, _c;
474
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBudgetOptions(budgetId, valueFrameworkId, options);
475
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
476
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BudgetApi.getBudgetOptions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
477
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
478
+ });
479
+ },
480
+ /**
481
+ * Return aggregated overview data for a budget: annual capacity, number of options linked to it, and number of distinct investments that have at least one option linked to it.
482
+ * @summary Get budget overview
483
+ * @param {string} budgetId UUID of the budget
484
+ * @param {*} [options] Override http request option.
485
+ * @throws {RequiredError}
486
+ */
487
+ getBudgetOverview(budgetId, options) {
488
+ return __awaiter(this, void 0, void 0, function* () {
489
+ var _a, _b, _c;
490
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBudgetOverview(budgetId, options);
491
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
492
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BudgetApi.getBudgetOverview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
493
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
494
+ });
495
+ },
496
+ /**
497
+ * Retrieve a paginated list of all budgets, ordered by name.
498
+ * @summary List all budgets
499
+ * @param {number} [offset] Number of records to skip
500
+ * @param {number} [limit] Max number of records to return
501
+ * @param {*} [options] Override http request option.
502
+ * @throws {RequiredError}
503
+ */
504
+ getBudgets(offset, limit, options) {
505
+ return __awaiter(this, void 0, void 0, function* () {
506
+ var _a, _b, _c;
507
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBudgets(offset, limit, options);
508
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
509
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BudgetApi.getBudgets']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
510
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
511
+ });
512
+ },
513
+ /**
514
+ * Link all specified options to this budget. Any previous budget assignment on these options is overwritten. Returns the list of option IDs that were successfully linked.
515
+ * @summary Bulk-link options to this budget
516
+ * @param {string} budgetId UUID of the budget
517
+ * @param {BudgetLinkOptionsRequest} budgetLinkOptionsRequest
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ linkOptionsToBudget(budgetId, budgetLinkOptionsRequest, options) {
522
+ return __awaiter(this, void 0, void 0, function* () {
523
+ var _a, _b, _c;
524
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.linkOptionsToBudget(budgetId, budgetLinkOptionsRequest, options);
525
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
526
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BudgetApi.linkOptionsToBudget']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
527
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
528
+ });
529
+ },
530
+ /**
531
+ * Update one or more fields of an existing budget. Only the fields included in the request body will be modified; omitted fields remain unchanged.
532
+ * @summary Partially update a budget
533
+ * @param {string} budgetId UUID of the budget
534
+ * @param {BudgetUpdate} budgetUpdate
535
+ * @param {*} [options] Override http request option.
536
+ * @throws {RequiredError}
537
+ */
538
+ patchBudget(budgetId, budgetUpdate, options) {
539
+ return __awaiter(this, void 0, void 0, function* () {
540
+ var _a, _b, _c;
541
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.patchBudget(budgetId, budgetUpdate, options);
542
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
543
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BudgetApi.patchBudget']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
544
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
545
+ });
546
+ },
547
+ /**
548
+ * Create a new budget.
549
+ * @summary Create a budget
550
+ * @param {BudgetCreate} budgetCreate
551
+ * @param {*} [options] Override http request option.
552
+ * @throws {RequiredError}
553
+ */
554
+ postBudget(budgetCreate, options) {
555
+ return __awaiter(this, void 0, void 0, function* () {
556
+ var _a, _b, _c;
557
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.postBudget(budgetCreate, options);
558
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
559
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BudgetApi.postBudget']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
560
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
561
+ });
562
+ },
563
+ };
564
+ };
565
+ /**
566
+ * BudgetApi - factory interface
567
+ */
568
+ export const BudgetApiFactory = function (configuration, basePath, axios) {
569
+ const localVarFp = BudgetApiFp(configuration);
570
+ return {
571
+ /**
572
+ * Delete multiple budgets at once. Options linked to deleted budgets will have their budget link removed (set to null).
573
+ * @summary Bulk delete budgets
574
+ * @param {BudgetBulkDeleteRequest} budgetBulkDeleteRequest
575
+ * @param {*} [options] Override http request option.
576
+ * @throws {RequiredError}
577
+ */
578
+ bulkDeleteBudgets(budgetBulkDeleteRequest, options) {
579
+ return localVarFp.bulkDeleteBudgets(budgetBulkDeleteRequest, options).then((request) => request(axios, basePath));
580
+ },
581
+ /**
582
+ * Delete an existing budget by its ID. Options linked to this budget will have their budget link removed (set to null).
583
+ * @summary Delete a budget
584
+ * @param {string} budgetId UUID of the budget
585
+ * @param {*} [options] Override http request option.
586
+ * @throws {RequiredError}
587
+ */
588
+ deleteBudget(budgetId, options) {
589
+ return localVarFp.deleteBudget(budgetId, options).then((request) => request(axios, basePath));
590
+ },
591
+ /**
592
+ * Retrieve a single budget by its ID.
593
+ * @summary Get a budget by ID
594
+ * @param {string} budgetId UUID of the budget
595
+ * @param {*} [options] Override http request option.
596
+ * @throws {RequiredError}
597
+ */
598
+ getBudgetById(budgetId, options) {
599
+ return localVarFp.getBudgetById(budgetId, options).then((request) => request(axios, basePath));
600
+ },
601
+ /**
602
+ * Return all distinct investments that have at least one option linked to this budget. Each row shows the investment\'s current preferred option data and a flag indicating whether the preferred option is the one linked to the budget. NPV is computed for the preferred option from the v_option_npv view.
603
+ * @summary List investments linked to this budget via options
604
+ * @param {string} budgetId UUID of the budget
605
+ * @param {string} valueFrameworkId UUID of the value framework
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ */
609
+ getBudgetInvestments(budgetId, valueFrameworkId, options) {
610
+ return localVarFp.getBudgetInvestments(budgetId, valueFrameworkId, options).then((request) => request(axios, basePath));
611
+ },
612
+ /**
613
+ * Return all options linked to this budget. Rows are ordered by investment name then option name. NPV is computed from the v_option_npv view for the given value framework.
614
+ * @summary List options linked to this budget
615
+ * @param {string} budgetId UUID of the budget
616
+ * @param {string} valueFrameworkId UUID of the value framework
617
+ * @param {*} [options] Override http request option.
618
+ * @throws {RequiredError}
619
+ */
620
+ getBudgetOptions(budgetId, valueFrameworkId, options) {
621
+ return localVarFp.getBudgetOptions(budgetId, valueFrameworkId, options).then((request) => request(axios, basePath));
622
+ },
623
+ /**
624
+ * Return aggregated overview data for a budget: annual capacity, number of options linked to it, and number of distinct investments that have at least one option linked to it.
625
+ * @summary Get budget overview
626
+ * @param {string} budgetId UUID of the budget
627
+ * @param {*} [options] Override http request option.
628
+ * @throws {RequiredError}
629
+ */
630
+ getBudgetOverview(budgetId, options) {
631
+ return localVarFp.getBudgetOverview(budgetId, options).then((request) => request(axios, basePath));
632
+ },
633
+ /**
634
+ * Retrieve a paginated list of all budgets, ordered by name.
635
+ * @summary List all budgets
636
+ * @param {number} [offset] Number of records to skip
637
+ * @param {number} [limit] Max number of records to return
638
+ * @param {*} [options] Override http request option.
639
+ * @throws {RequiredError}
640
+ */
641
+ getBudgets(offset, limit, options) {
642
+ return localVarFp.getBudgets(offset, limit, options).then((request) => request(axios, basePath));
643
+ },
644
+ /**
645
+ * Link all specified options to this budget. Any previous budget assignment on these options is overwritten. Returns the list of option IDs that were successfully linked.
646
+ * @summary Bulk-link options to this budget
647
+ * @param {string} budgetId UUID of the budget
648
+ * @param {BudgetLinkOptionsRequest} budgetLinkOptionsRequest
649
+ * @param {*} [options] Override http request option.
650
+ * @throws {RequiredError}
651
+ */
652
+ linkOptionsToBudget(budgetId, budgetLinkOptionsRequest, options) {
653
+ return localVarFp.linkOptionsToBudget(budgetId, budgetLinkOptionsRequest, options).then((request) => request(axios, basePath));
654
+ },
655
+ /**
656
+ * Update one or more fields of an existing budget. Only the fields included in the request body will be modified; omitted fields remain unchanged.
657
+ * @summary Partially update a budget
658
+ * @param {string} budgetId UUID of the budget
659
+ * @param {BudgetUpdate} budgetUpdate
660
+ * @param {*} [options] Override http request option.
661
+ * @throws {RequiredError}
662
+ */
663
+ patchBudget(budgetId, budgetUpdate, options) {
664
+ return localVarFp.patchBudget(budgetId, budgetUpdate, options).then((request) => request(axios, basePath));
665
+ },
666
+ /**
667
+ * Create a new budget.
668
+ * @summary Create a budget
669
+ * @param {BudgetCreate} budgetCreate
670
+ * @param {*} [options] Override http request option.
671
+ * @throws {RequiredError}
672
+ */
673
+ postBudget(budgetCreate, options) {
674
+ return localVarFp.postBudget(budgetCreate, options).then((request) => request(axios, basePath));
675
+ },
676
+ };
677
+ };
678
+ /**
679
+ * BudgetApi - object-oriented interface
680
+ */
681
+ export class BudgetApi extends BaseAPI {
682
+ /**
683
+ * Delete multiple budgets at once. Options linked to deleted budgets will have their budget link removed (set to null).
684
+ * @summary Bulk delete budgets
685
+ * @param {BudgetBulkDeleteRequest} budgetBulkDeleteRequest
686
+ * @param {*} [options] Override http request option.
687
+ * @throws {RequiredError}
688
+ */
689
+ bulkDeleteBudgets(budgetBulkDeleteRequest, options) {
690
+ return BudgetApiFp(this.configuration).bulkDeleteBudgets(budgetBulkDeleteRequest, options).then((request) => request(this.axios, this.basePath));
691
+ }
692
+ /**
693
+ * Delete an existing budget by its ID. Options linked to this budget will have their budget link removed (set to null).
694
+ * @summary Delete a budget
695
+ * @param {string} budgetId UUID of the budget
696
+ * @param {*} [options] Override http request option.
697
+ * @throws {RequiredError}
698
+ */
699
+ deleteBudget(budgetId, options) {
700
+ return BudgetApiFp(this.configuration).deleteBudget(budgetId, options).then((request) => request(this.axios, this.basePath));
701
+ }
702
+ /**
703
+ * Retrieve a single budget by its ID.
704
+ * @summary Get a budget by ID
705
+ * @param {string} budgetId UUID of the budget
706
+ * @param {*} [options] Override http request option.
707
+ * @throws {RequiredError}
708
+ */
709
+ getBudgetById(budgetId, options) {
710
+ return BudgetApiFp(this.configuration).getBudgetById(budgetId, options).then((request) => request(this.axios, this.basePath));
711
+ }
712
+ /**
713
+ * Return all distinct investments that have at least one option linked to this budget. Each row shows the investment\'s current preferred option data and a flag indicating whether the preferred option is the one linked to the budget. NPV is computed for the preferred option from the v_option_npv view.
714
+ * @summary List investments linked to this budget via options
715
+ * @param {string} budgetId UUID of the budget
716
+ * @param {string} valueFrameworkId UUID of the value framework
717
+ * @param {*} [options] Override http request option.
718
+ * @throws {RequiredError}
719
+ */
720
+ getBudgetInvestments(budgetId, valueFrameworkId, options) {
721
+ return BudgetApiFp(this.configuration).getBudgetInvestments(budgetId, valueFrameworkId, options).then((request) => request(this.axios, this.basePath));
722
+ }
723
+ /**
724
+ * Return all options linked to this budget. Rows are ordered by investment name then option name. NPV is computed from the v_option_npv view for the given value framework.
725
+ * @summary List options linked to this budget
726
+ * @param {string} budgetId UUID of the budget
727
+ * @param {string} valueFrameworkId UUID of the value framework
728
+ * @param {*} [options] Override http request option.
729
+ * @throws {RequiredError}
730
+ */
731
+ getBudgetOptions(budgetId, valueFrameworkId, options) {
732
+ return BudgetApiFp(this.configuration).getBudgetOptions(budgetId, valueFrameworkId, options).then((request) => request(this.axios, this.basePath));
733
+ }
734
+ /**
735
+ * Return aggregated overview data for a budget: annual capacity, number of options linked to it, and number of distinct investments that have at least one option linked to it.
736
+ * @summary Get budget overview
737
+ * @param {string} budgetId UUID of the budget
738
+ * @param {*} [options] Override http request option.
739
+ * @throws {RequiredError}
740
+ */
741
+ getBudgetOverview(budgetId, options) {
742
+ return BudgetApiFp(this.configuration).getBudgetOverview(budgetId, options).then((request) => request(this.axios, this.basePath));
743
+ }
744
+ /**
745
+ * Retrieve a paginated list of all budgets, ordered by name.
746
+ * @summary List all budgets
747
+ * @param {number} [offset] Number of records to skip
748
+ * @param {number} [limit] Max number of records to return
749
+ * @param {*} [options] Override http request option.
750
+ * @throws {RequiredError}
751
+ */
752
+ getBudgets(offset, limit, options) {
753
+ return BudgetApiFp(this.configuration).getBudgets(offset, limit, options).then((request) => request(this.axios, this.basePath));
754
+ }
755
+ /**
756
+ * Link all specified options to this budget. Any previous budget assignment on these options is overwritten. Returns the list of option IDs that were successfully linked.
757
+ * @summary Bulk-link options to this budget
758
+ * @param {string} budgetId UUID of the budget
759
+ * @param {BudgetLinkOptionsRequest} budgetLinkOptionsRequest
760
+ * @param {*} [options] Override http request option.
761
+ * @throws {RequiredError}
762
+ */
763
+ linkOptionsToBudget(budgetId, budgetLinkOptionsRequest, options) {
764
+ return BudgetApiFp(this.configuration).linkOptionsToBudget(budgetId, budgetLinkOptionsRequest, options).then((request) => request(this.axios, this.basePath));
765
+ }
766
+ /**
767
+ * Update one or more fields of an existing budget. Only the fields included in the request body will be modified; omitted fields remain unchanged.
768
+ * @summary Partially update a budget
769
+ * @param {string} budgetId UUID of the budget
770
+ * @param {BudgetUpdate} budgetUpdate
771
+ * @param {*} [options] Override http request option.
772
+ * @throws {RequiredError}
773
+ */
774
+ patchBudget(budgetId, budgetUpdate, options) {
775
+ return BudgetApiFp(this.configuration).patchBudget(budgetId, budgetUpdate, options).then((request) => request(this.axios, this.basePath));
776
+ }
777
+ /**
778
+ * Create a new budget.
779
+ * @summary Create a budget
780
+ * @param {BudgetCreate} budgetCreate
781
+ * @param {*} [options] Override http request option.
782
+ * @throws {RequiredError}
783
+ */
784
+ postBudget(budgetCreate, options) {
785
+ return BudgetApiFp(this.configuration).postBudget(budgetCreate, options).then((request) => request(this.axios, this.basePath));
786
+ }
787
+ }