@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
@@ -4,7 +4,7 @@
4
4
  * Asset Investment Planning
5
5
  * API for Asset Investment Planning
6
6
  *
7
- * The version of the OpenAPI document: 0.2.0-dev2
7
+ * The version of the OpenAPI document: 0.2.0-dev3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -28,61 +28,70 @@ import { DUMMY_BASE_URL, assertParamExists, setOAuthToObject, setSearchParams, s
28
28
  import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
29
  /**
30
30
  * MetricApi - axios parameter creator
31
- * @export
32
31
  */
33
32
  export const MetricApiAxiosParamCreator = function (configuration) {
34
33
  return {
35
34
  /**
36
- * Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
37
- * @summary Delete a metric
38
- * @param {string} metricId UUID of the metric
35
+ * Create a new metric under this objective.
36
+ * @summary Create a metric for this objective
37
+ * @param {string} objectiveId UUID of the objective
38
+ * @param {MetricCreate} metricCreate
39
39
  * @param {*} [options] Override http request option.
40
40
  * @throws {RequiredError}
41
41
  */
42
- deleteMetric: (metricId, options = {}) => __awaiter(this, void 0, void 0, function* () {
43
- // verify required parameter 'metricId' is not null or undefined
44
- assertParamExists('deleteMetric', 'metricId', metricId);
45
- const localVarPath = `/metric/{metric_id}`
46
- .replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)));
42
+ createMetricForObjective: (objectiveId_1, metricCreate_1, ...args_1) => __awaiter(this, [objectiveId_1, metricCreate_1, ...args_1], void 0, function* (objectiveId, metricCreate, options = {}) {
43
+ // verify required parameter 'objectiveId' is not null or undefined
44
+ assertParamExists('createMetricForObjective', 'objectiveId', objectiveId);
45
+ // verify required parameter 'metricCreate' is not null or undefined
46
+ assertParamExists('createMetricForObjective', 'metricCreate', metricCreate);
47
+ const localVarPath = `/objective/{objective_id}/metric/`
48
+ .replace(`{${"objective_id"}}`, encodeURIComponent(String(objectiveId)));
47
49
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
48
50
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
49
51
  let baseOptions;
50
52
  if (configuration) {
51
53
  baseOptions = configuration.baseOptions;
52
54
  }
53
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
55
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
54
56
  const localVarHeaderParameter = {};
55
57
  const localVarQueryParameter = {};
56
58
  // authentication OAuth2AuthorizationCodeBearer required
57
59
  // oauth required
58
60
  yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
61
+ localVarHeaderParameter['Content-Type'] = 'application/json';
62
+ localVarHeaderParameter['Accept'] = 'application/json';
59
63
  setSearchParams(localVarUrlObj, localVarQueryParameter);
60
64
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
61
65
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
66
+ localVarRequestOptions.data = serializeDataIfNeeded(metricCreate, localVarRequestOptions, configuration);
62
67
  return {
63
68
  url: toPathString(localVarUrlObj),
64
69
  options: localVarRequestOptions,
65
70
  };
66
71
  }),
67
72
  /**
68
- * Retrieve a single metric by its ID.
69
- * @summary Get a metric by ID
73
+ * Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
74
+ * @summary Delete a metric for this objective
70
75
  * @param {string} metricId UUID of the metric
76
+ * @param {string} objectiveId UUID of the objective
71
77
  * @param {*} [options] Override http request option.
72
78
  * @throws {RequiredError}
73
79
  */
74
- getMetricById: (metricId, options = {}) => __awaiter(this, void 0, void 0, function* () {
80
+ deleteMetricForObjective: (metricId_1, objectiveId_1, ...args_1) => __awaiter(this, [metricId_1, objectiveId_1, ...args_1], void 0, function* (metricId, objectiveId, options = {}) {
75
81
  // verify required parameter 'metricId' is not null or undefined
76
- assertParamExists('getMetricById', 'metricId', metricId);
77
- const localVarPath = `/metric/{metric_id}`
78
- .replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)));
82
+ assertParamExists('deleteMetricForObjective', 'metricId', metricId);
83
+ // verify required parameter 'objectiveId' is not null or undefined
84
+ assertParamExists('deleteMetricForObjective', 'objectiveId', objectiveId);
85
+ const localVarPath = `/objective/{objective_id}/metric/{metric_id}`
86
+ .replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)))
87
+ .replace(`{${"objective_id"}}`, encodeURIComponent(String(objectiveId)));
79
88
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
80
89
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
81
90
  let baseOptions;
82
91
  if (configuration) {
83
92
  baseOptions = configuration.baseOptions;
84
93
  }
85
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
94
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
86
95
  const localVarHeaderParameter = {};
87
96
  const localVarQueryParameter = {};
88
97
  // authentication OAuth2AuthorizationCodeBearer required
@@ -97,15 +106,21 @@ export const MetricApiAxiosParamCreator = function (configuration) {
97
106
  };
98
107
  }),
99
108
  /**
100
- * Retrieve a paginated list of all metrics.
101
- * @summary List metrics
102
- * @param {number} [offset] Number of records to skip
103
- * @param {number} [limit] Max number of records to return
109
+ * Retrieve a specific metric for the objective.
110
+ * @summary Get a metric for this objective
111
+ * @param {string} metricId UUID of the metric
112
+ * @param {string} objectiveId UUID of the objective
104
113
  * @param {*} [options] Override http request option.
105
114
  * @throws {RequiredError}
106
115
  */
107
- getMetrics: (offset, limit, options = {}) => __awaiter(this, void 0, void 0, function* () {
108
- const localVarPath = `/metric/`;
116
+ getMetricForObjective: (metricId_1, objectiveId_1, ...args_1) => __awaiter(this, [metricId_1, objectiveId_1, ...args_1], void 0, function* (metricId, objectiveId, options = {}) {
117
+ // verify required parameter 'metricId' is not null or undefined
118
+ assertParamExists('getMetricForObjective', 'metricId', metricId);
119
+ // verify required parameter 'objectiveId' is not null or undefined
120
+ assertParamExists('getMetricForObjective', 'objectiveId', objectiveId);
121
+ const localVarPath = `/objective/{objective_id}/metric/{metric_id}`
122
+ .replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)))
123
+ .replace(`{${"objective_id"}}`, encodeURIComponent(String(objectiveId)));
109
124
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
110
125
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
111
126
  let baseOptions;
@@ -118,12 +133,7 @@ export const MetricApiAxiosParamCreator = function (configuration) {
118
133
  // authentication OAuth2AuthorizationCodeBearer required
119
134
  // oauth required
120
135
  yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
121
- if (offset !== undefined) {
122
- localVarQueryParameter['offset'] = offset;
123
- }
124
- if (limit !== undefined) {
125
- localVarQueryParameter['limit'] = limit;
126
- }
136
+ localVarHeaderParameter['Accept'] = 'application/json';
127
137
  setSearchParams(localVarUrlObj, localVarQueryParameter);
128
138
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
129
139
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -133,70 +143,83 @@ export const MetricApiAxiosParamCreator = function (configuration) {
133
143
  };
134
144
  }),
135
145
  /**
136
- * Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
137
- * @summary Partially update a metric
138
- * @param {string} metricId UUID of the metric
139
- * @param {MetricUpdate} metricUpdate
146
+ * Retrieve a paginated list of all metrics for a specific objective.
147
+ * @summary List metrics for this objective
148
+ * @param {string} objectiveId UUID of the objective
149
+ * @param {number} [offset] Number of records to skip
150
+ * @param {number} [limit] Max number of records to return
140
151
  * @param {*} [options] Override http request option.
141
152
  * @throws {RequiredError}
142
153
  */
143
- patchMetric: (metricId, metricUpdate, options = {}) => __awaiter(this, void 0, void 0, function* () {
144
- // verify required parameter 'metricId' is not null or undefined
145
- assertParamExists('patchMetric', 'metricId', metricId);
146
- // verify required parameter 'metricUpdate' is not null or undefined
147
- assertParamExists('patchMetric', 'metricUpdate', metricUpdate);
148
- const localVarPath = `/metric/{metric_id}`
149
- .replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)));
154
+ getMetricsForObjective: (objectiveId_1, offset_1, limit_1, ...args_1) => __awaiter(this, [objectiveId_1, offset_1, limit_1, ...args_1], void 0, function* (objectiveId, offset, limit, options = {}) {
155
+ // verify required parameter 'objectiveId' is not null or undefined
156
+ assertParamExists('getMetricsForObjective', 'objectiveId', objectiveId);
157
+ const localVarPath = `/objective/{objective_id}/metric/`
158
+ .replace(`{${"objective_id"}}`, encodeURIComponent(String(objectiveId)));
150
159
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
151
160
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
152
161
  let baseOptions;
153
162
  if (configuration) {
154
163
  baseOptions = configuration.baseOptions;
155
164
  }
156
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
165
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
157
166
  const localVarHeaderParameter = {};
158
167
  const localVarQueryParameter = {};
159
168
  // authentication OAuth2AuthorizationCodeBearer required
160
169
  // oauth required
161
170
  yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
162
- localVarHeaderParameter['Content-Type'] = 'application/json';
171
+ if (offset !== undefined) {
172
+ localVarQueryParameter['offset'] = offset;
173
+ }
174
+ if (limit !== undefined) {
175
+ localVarQueryParameter['limit'] = limit;
176
+ }
177
+ localVarHeaderParameter['Accept'] = 'application/json';
163
178
  setSearchParams(localVarUrlObj, localVarQueryParameter);
164
179
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
165
180
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
166
- localVarRequestOptions.data = serializeDataIfNeeded(metricUpdate, localVarRequestOptions, configuration);
167
181
  return {
168
182
  url: toPathString(localVarUrlObj),
169
183
  options: localVarRequestOptions,
170
184
  };
171
185
  }),
172
186
  /**
173
- * Create a new metric linked to an objective. Requires metric_type (monetized/tracked/bounded) and measurement_type (maximization/minimization).
174
- * @summary Create a metric
175
- * @param {MetricCreate} metricCreate
187
+ * Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
188
+ * @summary Partially update a metric for this objective
189
+ * @param {string} metricId UUID of the metric
190
+ * @param {string} objectiveId UUID of the objective
191
+ * @param {MetricUpdate} metricUpdate
176
192
  * @param {*} [options] Override http request option.
177
193
  * @throws {RequiredError}
178
194
  */
179
- postMetric: (metricCreate, options = {}) => __awaiter(this, void 0, void 0, function* () {
180
- // verify required parameter 'metricCreate' is not null or undefined
181
- assertParamExists('postMetric', 'metricCreate', metricCreate);
182
- const localVarPath = `/metric/`;
195
+ patchMetricForObjective: (metricId_1, objectiveId_1, metricUpdate_1, ...args_1) => __awaiter(this, [metricId_1, objectiveId_1, metricUpdate_1, ...args_1], void 0, function* (metricId, objectiveId, metricUpdate, options = {}) {
196
+ // verify required parameter 'metricId' is not null or undefined
197
+ assertParamExists('patchMetricForObjective', 'metricId', metricId);
198
+ // verify required parameter 'objectiveId' is not null or undefined
199
+ assertParamExists('patchMetricForObjective', 'objectiveId', objectiveId);
200
+ // verify required parameter 'metricUpdate' is not null or undefined
201
+ assertParamExists('patchMetricForObjective', 'metricUpdate', metricUpdate);
202
+ const localVarPath = `/objective/{objective_id}/metric/{metric_id}`
203
+ .replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)))
204
+ .replace(`{${"objective_id"}}`, encodeURIComponent(String(objectiveId)));
183
205
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
184
206
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
185
207
  let baseOptions;
186
208
  if (configuration) {
187
209
  baseOptions = configuration.baseOptions;
188
210
  }
189
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
211
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
190
212
  const localVarHeaderParameter = {};
191
213
  const localVarQueryParameter = {};
192
214
  // authentication OAuth2AuthorizationCodeBearer required
193
215
  // oauth required
194
216
  yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
195
217
  localVarHeaderParameter['Content-Type'] = 'application/json';
218
+ localVarHeaderParameter['Accept'] = 'application/json';
196
219
  setSearchParams(localVarUrlObj, localVarQueryParameter);
197
220
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
198
221
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
199
- localVarRequestOptions.data = serializeDataIfNeeded(metricCreate, localVarRequestOptions, configuration);
222
+ localVarRequestOptions.data = serializeDataIfNeeded(metricUpdate, localVarRequestOptions, configuration);
200
223
  return {
201
224
  url: toPathString(localVarUrlObj),
202
225
  options: localVarRequestOptions,
@@ -206,218 +229,223 @@ export const MetricApiAxiosParamCreator = function (configuration) {
206
229
  };
207
230
  /**
208
231
  * MetricApi - functional programming interface
209
- * @export
210
232
  */
211
233
  export const MetricApiFp = function (configuration) {
212
234
  const localVarAxiosParamCreator = MetricApiAxiosParamCreator(configuration);
213
235
  return {
214
236
  /**
215
- * Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
216
- * @summary Delete a metric
217
- * @param {string} metricId UUID of the metric
237
+ * Create a new metric under this objective.
238
+ * @summary Create a metric for this objective
239
+ * @param {string} objectiveId UUID of the objective
240
+ * @param {MetricCreate} metricCreate
218
241
  * @param {*} [options] Override http request option.
219
242
  * @throws {RequiredError}
220
243
  */
221
- deleteMetric(metricId, options) {
222
- var _a, _b, _c;
244
+ createMetricForObjective(objectiveId, metricCreate, options) {
223
245
  return __awaiter(this, void 0, void 0, function* () {
224
- const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteMetric(metricId, options);
225
- const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
226
- const operationBasePath = (_c = (_b = operationServerMap['MetricApi.deleteMetric']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
227
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
246
+ var _a, _b, _c;
247
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createMetricForObjective(objectiveId, metricCreate, options);
248
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
249
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MetricApi.createMetricForObjective']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
250
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
228
251
  });
229
252
  },
230
253
  /**
231
- * Retrieve a single metric by its ID.
232
- * @summary Get a metric by ID
254
+ * Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
255
+ * @summary Delete a metric for this objective
233
256
  * @param {string} metricId UUID of the metric
257
+ * @param {string} objectiveId UUID of the objective
234
258
  * @param {*} [options] Override http request option.
235
259
  * @throws {RequiredError}
236
260
  */
237
- getMetricById(metricId, options) {
238
- var _a, _b, _c;
261
+ deleteMetricForObjective(metricId, objectiveId, options) {
239
262
  return __awaiter(this, void 0, void 0, function* () {
240
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getMetricById(metricId, options);
241
- const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
242
- const operationBasePath = (_c = (_b = operationServerMap['MetricApi.getMetricById']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
243
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
263
+ var _a, _b, _c;
264
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteMetricForObjective(metricId, objectiveId, options);
265
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
266
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MetricApi.deleteMetricForObjective']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
267
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
244
268
  });
245
269
  },
246
270
  /**
247
- * Retrieve a paginated list of all metrics.
248
- * @summary List metrics
249
- * @param {number} [offset] Number of records to skip
250
- * @param {number} [limit] Max number of records to return
271
+ * Retrieve a specific metric for the objective.
272
+ * @summary Get a metric for this objective
273
+ * @param {string} metricId UUID of the metric
274
+ * @param {string} objectiveId UUID of the objective
251
275
  * @param {*} [options] Override http request option.
252
276
  * @throws {RequiredError}
253
277
  */
254
- getMetrics(offset, limit, options) {
255
- var _a, _b, _c;
278
+ getMetricForObjective(metricId, objectiveId, options) {
256
279
  return __awaiter(this, void 0, void 0, function* () {
257
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getMetrics(offset, limit, options);
258
- const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
259
- const operationBasePath = (_c = (_b = operationServerMap['MetricApi.getMetrics']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
260
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
280
+ var _a, _b, _c;
281
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getMetricForObjective(metricId, objectiveId, options);
282
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
283
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MetricApi.getMetricForObjective']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
284
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
261
285
  });
262
286
  },
263
287
  /**
264
- * Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
265
- * @summary Partially update a metric
266
- * @param {string} metricId UUID of the metric
267
- * @param {MetricUpdate} metricUpdate
288
+ * Retrieve a paginated list of all metrics for a specific objective.
289
+ * @summary List metrics for this objective
290
+ * @param {string} objectiveId UUID of the objective
291
+ * @param {number} [offset] Number of records to skip
292
+ * @param {number} [limit] Max number of records to return
268
293
  * @param {*} [options] Override http request option.
269
294
  * @throws {RequiredError}
270
295
  */
271
- patchMetric(metricId, metricUpdate, options) {
272
- var _a, _b, _c;
296
+ getMetricsForObjective(objectiveId, offset, limit, options) {
273
297
  return __awaiter(this, void 0, void 0, function* () {
274
- const localVarAxiosArgs = yield localVarAxiosParamCreator.patchMetric(metricId, metricUpdate, options);
275
- const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
276
- const operationBasePath = (_c = (_b = operationServerMap['MetricApi.patchMetric']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
277
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
298
+ var _a, _b, _c;
299
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getMetricsForObjective(objectiveId, offset, limit, options);
300
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
301
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MetricApi.getMetricsForObjective']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
302
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
278
303
  });
279
304
  },
280
305
  /**
281
- * Create a new metric linked to an objective. Requires metric_type (monetized/tracked/bounded) and measurement_type (maximization/minimization).
282
- * @summary Create a metric
283
- * @param {MetricCreate} metricCreate
306
+ * Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
307
+ * @summary Partially update a metric for this objective
308
+ * @param {string} metricId UUID of the metric
309
+ * @param {string} objectiveId UUID of the objective
310
+ * @param {MetricUpdate} metricUpdate
284
311
  * @param {*} [options] Override http request option.
285
312
  * @throws {RequiredError}
286
313
  */
287
- postMetric(metricCreate, options) {
288
- var _a, _b, _c;
314
+ patchMetricForObjective(metricId, objectiveId, metricUpdate, options) {
289
315
  return __awaiter(this, void 0, void 0, function* () {
290
- const localVarAxiosArgs = yield localVarAxiosParamCreator.postMetric(metricCreate, options);
291
- const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
292
- const operationBasePath = (_c = (_b = operationServerMap['MetricApi.postMetric']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
293
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
316
+ var _a, _b, _c;
317
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.patchMetricForObjective(metricId, objectiveId, metricUpdate, options);
318
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
319
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['MetricApi.patchMetricForObjective']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
320
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
294
321
  });
295
322
  },
296
323
  };
297
324
  };
298
325
  /**
299
326
  * MetricApi - factory interface
300
- * @export
301
327
  */
302
328
  export const MetricApiFactory = function (configuration, basePath, axios) {
303
329
  const localVarFp = MetricApiFp(configuration);
304
330
  return {
331
+ /**
332
+ * Create a new metric under this objective.
333
+ * @summary Create a metric for this objective
334
+ * @param {string} objectiveId UUID of the objective
335
+ * @param {MetricCreate} metricCreate
336
+ * @param {*} [options] Override http request option.
337
+ * @throws {RequiredError}
338
+ */
339
+ createMetricForObjective(objectiveId, metricCreate, options) {
340
+ return localVarFp.createMetricForObjective(objectiveId, metricCreate, options).then((request) => request(axios, basePath));
341
+ },
305
342
  /**
306
343
  * Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
307
- * @summary Delete a metric
344
+ * @summary Delete a metric for this objective
308
345
  * @param {string} metricId UUID of the metric
346
+ * @param {string} objectiveId UUID of the objective
309
347
  * @param {*} [options] Override http request option.
310
348
  * @throws {RequiredError}
311
349
  */
312
- deleteMetric(metricId, options) {
313
- return localVarFp.deleteMetric(metricId, options).then((request) => request(axios, basePath));
350
+ deleteMetricForObjective(metricId, objectiveId, options) {
351
+ return localVarFp.deleteMetricForObjective(metricId, objectiveId, options).then((request) => request(axios, basePath));
314
352
  },
315
353
  /**
316
- * Retrieve a single metric by its ID.
317
- * @summary Get a metric by ID
354
+ * Retrieve a specific metric for the objective.
355
+ * @summary Get a metric for this objective
318
356
  * @param {string} metricId UUID of the metric
357
+ * @param {string} objectiveId UUID of the objective
319
358
  * @param {*} [options] Override http request option.
320
359
  * @throws {RequiredError}
321
360
  */
322
- getMetricById(metricId, options) {
323
- return localVarFp.getMetricById(metricId, options).then((request) => request(axios, basePath));
361
+ getMetricForObjective(metricId, objectiveId, options) {
362
+ return localVarFp.getMetricForObjective(metricId, objectiveId, options).then((request) => request(axios, basePath));
324
363
  },
325
364
  /**
326
- * Retrieve a paginated list of all metrics.
327
- * @summary List metrics
365
+ * Retrieve a paginated list of all metrics for a specific objective.
366
+ * @summary List metrics for this objective
367
+ * @param {string} objectiveId UUID of the objective
328
368
  * @param {number} [offset] Number of records to skip
329
369
  * @param {number} [limit] Max number of records to return
330
370
  * @param {*} [options] Override http request option.
331
371
  * @throws {RequiredError}
332
372
  */
333
- getMetrics(offset, limit, options) {
334
- return localVarFp.getMetrics(offset, limit, options).then((request) => request(axios, basePath));
373
+ getMetricsForObjective(objectiveId, offset, limit, options) {
374
+ return localVarFp.getMetricsForObjective(objectiveId, offset, limit, options).then((request) => request(axios, basePath));
335
375
  },
336
376
  /**
337
377
  * Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
338
- * @summary Partially update a metric
378
+ * @summary Partially update a metric for this objective
339
379
  * @param {string} metricId UUID of the metric
380
+ * @param {string} objectiveId UUID of the objective
340
381
  * @param {MetricUpdate} metricUpdate
341
382
  * @param {*} [options] Override http request option.
342
383
  * @throws {RequiredError}
343
384
  */
344
- patchMetric(metricId, metricUpdate, options) {
345
- return localVarFp.patchMetric(metricId, metricUpdate, options).then((request) => request(axios, basePath));
346
- },
347
- /**
348
- * Create a new metric linked to an objective. Requires metric_type (monetized/tracked/bounded) and measurement_type (maximization/minimization).
349
- * @summary Create a metric
350
- * @param {MetricCreate} metricCreate
351
- * @param {*} [options] Override http request option.
352
- * @throws {RequiredError}
353
- */
354
- postMetric(metricCreate, options) {
355
- return localVarFp.postMetric(metricCreate, options).then((request) => request(axios, basePath));
385
+ patchMetricForObjective(metricId, objectiveId, metricUpdate, options) {
386
+ return localVarFp.patchMetricForObjective(metricId, objectiveId, metricUpdate, options).then((request) => request(axios, basePath));
356
387
  },
357
388
  };
358
389
  };
359
390
  /**
360
391
  * MetricApi - object-oriented interface
361
- * @export
362
- * @class MetricApi
363
- * @extends {BaseAPI}
364
392
  */
365
393
  export class MetricApi extends BaseAPI {
394
+ /**
395
+ * Create a new metric under this objective.
396
+ * @summary Create a metric for this objective
397
+ * @param {string} objectiveId UUID of the objective
398
+ * @param {MetricCreate} metricCreate
399
+ * @param {*} [options] Override http request option.
400
+ * @throws {RequiredError}
401
+ */
402
+ createMetricForObjective(objectiveId, metricCreate, options) {
403
+ return MetricApiFp(this.configuration).createMetricForObjective(objectiveId, metricCreate, options).then((request) => request(this.axios, this.basePath));
404
+ }
366
405
  /**
367
406
  * Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
368
- * @summary Delete a metric
407
+ * @summary Delete a metric for this objective
369
408
  * @param {string} metricId UUID of the metric
409
+ * @param {string} objectiveId UUID of the objective
370
410
  * @param {*} [options] Override http request option.
371
411
  * @throws {RequiredError}
372
- * @memberof MetricApi
373
412
  */
374
- deleteMetric(metricId, options) {
375
- return MetricApiFp(this.configuration).deleteMetric(metricId, options).then((request) => request(this.axios, this.basePath));
413
+ deleteMetricForObjective(metricId, objectiveId, options) {
414
+ return MetricApiFp(this.configuration).deleteMetricForObjective(metricId, objectiveId, options).then((request) => request(this.axios, this.basePath));
376
415
  }
377
416
  /**
378
- * Retrieve a single metric by its ID.
379
- * @summary Get a metric by ID
417
+ * Retrieve a specific metric for the objective.
418
+ * @summary Get a metric for this objective
380
419
  * @param {string} metricId UUID of the metric
420
+ * @param {string} objectiveId UUID of the objective
381
421
  * @param {*} [options] Override http request option.
382
422
  * @throws {RequiredError}
383
- * @memberof MetricApi
384
423
  */
385
- getMetricById(metricId, options) {
386
- return MetricApiFp(this.configuration).getMetricById(metricId, options).then((request) => request(this.axios, this.basePath));
424
+ getMetricForObjective(metricId, objectiveId, options) {
425
+ return MetricApiFp(this.configuration).getMetricForObjective(metricId, objectiveId, options).then((request) => request(this.axios, this.basePath));
387
426
  }
388
427
  /**
389
- * Retrieve a paginated list of all metrics.
390
- * @summary List metrics
428
+ * Retrieve a paginated list of all metrics for a specific objective.
429
+ * @summary List metrics for this objective
430
+ * @param {string} objectiveId UUID of the objective
391
431
  * @param {number} [offset] Number of records to skip
392
432
  * @param {number} [limit] Max number of records to return
393
433
  * @param {*} [options] Override http request option.
394
434
  * @throws {RequiredError}
395
- * @memberof MetricApi
396
435
  */
397
- getMetrics(offset, limit, options) {
398
- return MetricApiFp(this.configuration).getMetrics(offset, limit, options).then((request) => request(this.axios, this.basePath));
436
+ getMetricsForObjective(objectiveId, offset, limit, options) {
437
+ return MetricApiFp(this.configuration).getMetricsForObjective(objectiveId, offset, limit, options).then((request) => request(this.axios, this.basePath));
399
438
  }
400
439
  /**
401
440
  * Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
402
- * @summary Partially update a metric
441
+ * @summary Partially update a metric for this objective
403
442
  * @param {string} metricId UUID of the metric
443
+ * @param {string} objectiveId UUID of the objective
404
444
  * @param {MetricUpdate} metricUpdate
405
445
  * @param {*} [options] Override http request option.
406
446
  * @throws {RequiredError}
407
- * @memberof MetricApi
408
- */
409
- patchMetric(metricId, metricUpdate, options) {
410
- return MetricApiFp(this.configuration).patchMetric(metricId, metricUpdate, options).then((request) => request(this.axios, this.basePath));
411
- }
412
- /**
413
- * Create a new metric linked to an objective. Requires metric_type (monetized/tracked/bounded) and measurement_type (maximization/minimization).
414
- * @summary Create a metric
415
- * @param {MetricCreate} metricCreate
416
- * @param {*} [options] Override http request option.
417
- * @throws {RequiredError}
418
- * @memberof MetricApi
419
447
  */
420
- postMetric(metricCreate, options) {
421
- return MetricApiFp(this.configuration).postMetric(metricCreate, options).then((request) => request(this.axios, this.basePath));
448
+ patchMetricForObjective(metricId, objectiveId, metricUpdate, options) {
449
+ return MetricApiFp(this.configuration).patchMetricForObjective(metricId, objectiveId, metricUpdate, options).then((request) => request(this.axios, this.basePath));
422
450
  }
423
451
  }