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

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 (161) hide show
  1. package/README.md +2 -2
  2. package/api/default-api.ts +1 -1
  3. package/api/metric-api.ts +1 -1
  4. package/api/metric-costs-per-year-api.ts +1 -1
  5. package/api/objective-api.ts +1 -1
  6. package/api/objective-weight-api.ts +1 -1
  7. package/api/value-framework-api.ts +1 -1
  8. package/api.ts +1 -1
  9. package/base.ts +1 -1
  10. package/common.ts +1 -1
  11. package/configuration.ts +1 -1
  12. package/dist/api/default-api.d.ts +69 -0
  13. package/dist/api/default-api.js +128 -0
  14. package/dist/api/metric-api.d.ts +216 -0
  15. package/dist/api/metric-api.js +430 -0
  16. package/dist/api/metric-costs-per-year-api.d.ts +240 -0
  17. package/dist/api/metric-costs-per-year-api.js +472 -0
  18. package/dist/api/objective-api.d.ts +216 -0
  19. package/dist/api/objective-api.js +430 -0
  20. package/dist/api/objective-weight-api.d.ts +228 -0
  21. package/dist/api/objective-weight-api.js +451 -0
  22. package/dist/api/value-framework-api.d.ts +216 -0
  23. package/dist/api/value-framework-api.js +430 -0
  24. package/dist/api.d.ts +17 -0
  25. package/dist/api.js +35 -0
  26. package/dist/base.d.ts +66 -0
  27. package/dist/base.js +65 -0
  28. package/dist/common.d.ts +65 -0
  29. package/dist/common.js +161 -0
  30. package/dist/configuration.d.ts +91 -0
  31. package/dist/configuration.js +43 -0
  32. package/dist/esm/api/default-api.d.ts +69 -0
  33. package/dist/esm/api/default-api.js +121 -0
  34. package/dist/esm/api/metric-api.d.ts +216 -0
  35. package/dist/esm/api/metric-api.js +423 -0
  36. package/dist/esm/api/metric-costs-per-year-api.d.ts +240 -0
  37. package/dist/esm/api/metric-costs-per-year-api.js +465 -0
  38. package/dist/esm/api/objective-api.d.ts +216 -0
  39. package/dist/esm/api/objective-api.js +423 -0
  40. package/dist/esm/api/objective-weight-api.d.ts +228 -0
  41. package/dist/esm/api/objective-weight-api.js +444 -0
  42. package/dist/esm/api/value-framework-api.d.ts +216 -0
  43. package/dist/esm/api/value-framework-api.js +423 -0
  44. package/dist/esm/api.d.ts +17 -0
  45. package/dist/esm/api.js +19 -0
  46. package/dist/esm/base.d.ts +66 -0
  47. package/dist/esm/base.js +60 -0
  48. package/dist/esm/common.d.ts +65 -0
  49. package/dist/esm/common.js +149 -0
  50. package/dist/esm/configuration.d.ts +91 -0
  51. package/dist/esm/configuration.js +39 -0
  52. package/dist/esm/index.d.ts +14 -0
  53. package/dist/esm/index.js +16 -0
  54. package/dist/esm/models/httpvalidation-error.d.ts +25 -0
  55. package/dist/esm/models/httpvalidation-error.js +14 -0
  56. package/dist/esm/models/index.d.ts +20 -0
  57. package/dist/esm/models/index.js +20 -0
  58. package/dist/esm/models/measurement-type.d.ts +21 -0
  59. package/dist/esm/models/measurement-type.js +22 -0
  60. package/dist/esm/models/metric-costs-per-year-create.d.ts +48 -0
  61. package/dist/esm/models/metric-costs-per-year-create.js +14 -0
  62. package/dist/esm/models/metric-costs-per-year-response.d.ts +54 -0
  63. package/dist/esm/models/metric-costs-per-year-response.js +14 -0
  64. package/dist/esm/models/metric-costs-per-year-update.d.ts +30 -0
  65. package/dist/esm/models/metric-costs-per-year-update.js +14 -0
  66. package/dist/esm/models/metric-create.d.ts +68 -0
  67. package/dist/esm/models/metric-create.js +14 -0
  68. package/dist/esm/models/metric-response.d.ts +92 -0
  69. package/dist/esm/models/metric-response.js +14 -0
  70. package/dist/esm/models/metric-type.d.ts +22 -0
  71. package/dist/esm/models/metric-type.js +23 -0
  72. package/dist/esm/models/metric-update.d.ts +56 -0
  73. package/dist/esm/models/metric-update.js +14 -0
  74. package/dist/esm/models/objective-create.d.ts +30 -0
  75. package/dist/esm/models/objective-create.js +14 -0
  76. package/dist/esm/models/objective-response.d.ts +54 -0
  77. package/dist/esm/models/objective-response.js +14 -0
  78. package/dist/esm/models/objective-update.d.ts +30 -0
  79. package/dist/esm/models/objective-update.js +14 -0
  80. package/dist/esm/models/objective-weight-create.d.ts +36 -0
  81. package/dist/esm/models/objective-weight-create.js +14 -0
  82. package/dist/esm/models/objective-weight-response.d.ts +42 -0
  83. package/dist/esm/models/objective-weight-response.js +14 -0
  84. package/dist/esm/models/objective-weight-update.d.ts +24 -0
  85. package/dist/esm/models/objective-weight-update.js +14 -0
  86. package/dist/esm/models/validation-error-loc-inner.d.ts +18 -0
  87. package/dist/esm/models/validation-error-loc-inner.js +14 -0
  88. package/dist/esm/models/validation-error.d.ts +49 -0
  89. package/dist/esm/models/validation-error.js +14 -0
  90. package/dist/esm/models/value-framework-create.d.ts +30 -0
  91. package/dist/esm/models/value-framework-create.js +14 -0
  92. package/dist/esm/models/value-framework-response.d.ts +54 -0
  93. package/dist/esm/models/value-framework-response.js +14 -0
  94. package/dist/esm/models/value-framework-update.d.ts +30 -0
  95. package/dist/esm/models/value-framework-update.js +14 -0
  96. package/dist/index.d.ts +14 -0
  97. package/dist/index.js +32 -0
  98. package/dist/models/httpvalidation-error.d.ts +25 -0
  99. package/dist/models/httpvalidation-error.js +15 -0
  100. package/dist/models/index.d.ts +20 -0
  101. package/dist/models/index.js +36 -0
  102. package/dist/models/measurement-type.d.ts +21 -0
  103. package/dist/models/measurement-type.js +25 -0
  104. package/dist/models/metric-costs-per-year-create.d.ts +48 -0
  105. package/dist/models/metric-costs-per-year-create.js +15 -0
  106. package/dist/models/metric-costs-per-year-response.d.ts +54 -0
  107. package/dist/models/metric-costs-per-year-response.js +15 -0
  108. package/dist/models/metric-costs-per-year-update.d.ts +30 -0
  109. package/dist/models/metric-costs-per-year-update.js +15 -0
  110. package/dist/models/metric-create.d.ts +68 -0
  111. package/dist/models/metric-create.js +15 -0
  112. package/dist/models/metric-response.d.ts +92 -0
  113. package/dist/models/metric-response.js +15 -0
  114. package/dist/models/metric-type.d.ts +22 -0
  115. package/dist/models/metric-type.js +26 -0
  116. package/dist/models/metric-update.d.ts +56 -0
  117. package/dist/models/metric-update.js +15 -0
  118. package/dist/models/objective-create.d.ts +30 -0
  119. package/dist/models/objective-create.js +15 -0
  120. package/dist/models/objective-response.d.ts +54 -0
  121. package/dist/models/objective-response.js +15 -0
  122. package/dist/models/objective-update.d.ts +30 -0
  123. package/dist/models/objective-update.js +15 -0
  124. package/dist/models/objective-weight-create.d.ts +36 -0
  125. package/dist/models/objective-weight-create.js +15 -0
  126. package/dist/models/objective-weight-response.d.ts +42 -0
  127. package/dist/models/objective-weight-response.js +15 -0
  128. package/dist/models/objective-weight-update.d.ts +24 -0
  129. package/dist/models/objective-weight-update.js +15 -0
  130. package/dist/models/validation-error-loc-inner.d.ts +18 -0
  131. package/dist/models/validation-error-loc-inner.js +15 -0
  132. package/dist/models/validation-error.d.ts +49 -0
  133. package/dist/models/validation-error.js +15 -0
  134. package/dist/models/value-framework-create.d.ts +30 -0
  135. package/dist/models/value-framework-create.js +15 -0
  136. package/dist/models/value-framework-response.d.ts +54 -0
  137. package/dist/models/value-framework-response.js +15 -0
  138. package/dist/models/value-framework-update.d.ts +30 -0
  139. package/dist/models/value-framework-update.js +15 -0
  140. package/index.ts +1 -1
  141. package/models/httpvalidation-error.ts +1 -1
  142. package/models/measurement-type.ts +1 -1
  143. package/models/metric-costs-per-year-create.ts +1 -1
  144. package/models/metric-costs-per-year-response.ts +1 -1
  145. package/models/metric-costs-per-year-update.ts +1 -1
  146. package/models/metric-create.ts +1 -1
  147. package/models/metric-response.ts +1 -1
  148. package/models/metric-type.ts +1 -1
  149. package/models/metric-update.ts +1 -1
  150. package/models/objective-create.ts +1 -1
  151. package/models/objective-response.ts +1 -1
  152. package/models/objective-update.ts +1 -1
  153. package/models/objective-weight-create.ts +1 -1
  154. package/models/objective-weight-response.ts +1 -1
  155. package/models/objective-weight-update.ts +1 -1
  156. package/models/validation-error-loc-inner.ts +1 -1
  157. package/models/validation-error.ts +1 -1
  158. package/models/value-framework-create.ts +1 -1
  159. package/models/value-framework-response.ts +1 -1
  160. package/models/value-framework-update.ts +1 -1
  161. package/package.json +1 -1
@@ -0,0 +1,465 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Asset Investment Planning
5
+ * API for Asset Investment Planning
6
+ *
7
+ * The version of the OpenAPI document: 0.2.0-dev2
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
+ * MetricCostsPerYearApi - axios parameter creator
31
+ * @export
32
+ */
33
+ export const MetricCostsPerYearApiAxiosParamCreator = function (configuration) {
34
+ return {
35
+ /**
36
+ * Delete a metric cost entry by its composite key (metric_id, framework_id, year).
37
+ * @summary Delete metric costs for a year
38
+ * @param {string} metricId UUID of the metric
39
+ * @param {string} frameworkId UUID of the value framework
40
+ * @param {number} year Year (1600-3000)
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ deleteMetricCost: (metricId, frameworkId, year, options = {}) => __awaiter(this, void 0, void 0, function* () {
45
+ // verify required parameter 'metricId' is not null or undefined
46
+ assertParamExists('deleteMetricCost', 'metricId', metricId);
47
+ // verify required parameter 'frameworkId' is not null or undefined
48
+ assertParamExists('deleteMetricCost', 'frameworkId', frameworkId);
49
+ // verify required parameter 'year' is not null or undefined
50
+ assertParamExists('deleteMetricCost', 'year', year);
51
+ const localVarPath = `/metric_costs_per_year/{metric_id}/{framework_id}/{year}`
52
+ .replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)))
53
+ .replace(`{${"framework_id"}}`, encodeURIComponent(String(frameworkId)))
54
+ .replace(`{${"year"}}`, encodeURIComponent(String(year)));
55
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
56
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
57
+ let baseOptions;
58
+ if (configuration) {
59
+ baseOptions = configuration.baseOptions;
60
+ }
61
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
62
+ const localVarHeaderParameter = {};
63
+ const localVarQueryParameter = {};
64
+ // authentication OAuth2AuthorizationCodeBearer required
65
+ // oauth required
66
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
67
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
68
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
69
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
70
+ return {
71
+ url: toPathString(localVarUrlObj),
72
+ options: localVarRequestOptions,
73
+ };
74
+ }),
75
+ /**
76
+ * Retrieve cost data for a specific metric within a framework for a given year.
77
+ * @summary Get a yearly metric cost by metric, framework, and year
78
+ * @param {string} metricId UUID of the metric
79
+ * @param {string} frameworkId UUID of the value framework
80
+ * @param {number} year Year (1600-3000)
81
+ * @param {*} [options] Override http request option.
82
+ * @throws {RequiredError}
83
+ */
84
+ getMetricCostByKeys: (metricId, frameworkId, year, options = {}) => __awaiter(this, void 0, void 0, function* () {
85
+ // verify required parameter 'metricId' is not null or undefined
86
+ assertParamExists('getMetricCostByKeys', 'metricId', metricId);
87
+ // verify required parameter 'frameworkId' is not null or undefined
88
+ assertParamExists('getMetricCostByKeys', 'frameworkId', frameworkId);
89
+ // verify required parameter 'year' is not null or undefined
90
+ assertParamExists('getMetricCostByKeys', 'year', year);
91
+ const localVarPath = `/metric_costs_per_year/{metric_id}/{framework_id}/{year}`
92
+ .replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)))
93
+ .replace(`{${"framework_id"}}`, encodeURIComponent(String(frameworkId)))
94
+ .replace(`{${"year"}}`, encodeURIComponent(String(year)));
95
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
97
+ let baseOptions;
98
+ if (configuration) {
99
+ baseOptions = configuration.baseOptions;
100
+ }
101
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
102
+ const localVarHeaderParameter = {};
103
+ const localVarQueryParameter = {};
104
+ // authentication OAuth2AuthorizationCodeBearer required
105
+ // oauth required
106
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
107
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
108
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
109
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
110
+ return {
111
+ url: toPathString(localVarUrlObj),
112
+ options: localVarRequestOptions,
113
+ };
114
+ }),
115
+ /**
116
+ * Retrieve a paginated list of all yearly metric cost overrides.
117
+ * @summary List yearly metric costs
118
+ * @param {number} [offset] Number of records to skip
119
+ * @param {number} [limit] Max number of records to return
120
+ * @param {*} [options] Override http request option.
121
+ * @throws {RequiredError}
122
+ */
123
+ getMetricCosts: (offset, limit, options = {}) => __awaiter(this, void 0, void 0, function* () {
124
+ const localVarPath = `/metric_costs_per_year/`;
125
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
126
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
127
+ let baseOptions;
128
+ if (configuration) {
129
+ baseOptions = configuration.baseOptions;
130
+ }
131
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
132
+ const localVarHeaderParameter = {};
133
+ const localVarQueryParameter = {};
134
+ // authentication OAuth2AuthorizationCodeBearer required
135
+ // oauth required
136
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
137
+ if (offset !== undefined) {
138
+ localVarQueryParameter['offset'] = offset;
139
+ }
140
+ if (limit !== undefined) {
141
+ localVarQueryParameter['limit'] = limit;
142
+ }
143
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
144
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
145
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
146
+ return {
147
+ url: toPathString(localVarUrlObj),
148
+ options: localVarRequestOptions,
149
+ };
150
+ }),
151
+ /**
152
+ * Update the perceived and/or direct cost of a metric for a specific year and framework. Identified by the composite key (metric_id, framework_id, year).
153
+ * @summary Partially update metric costs for a year
154
+ * @param {string} metricId UUID of the metric
155
+ * @param {string} frameworkId UUID of the value framework
156
+ * @param {number} year Year (1600-3000)
157
+ * @param {MetricCostsPerYearUpdate} metricCostsPerYearUpdate
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ */
161
+ patchMetricCost: (metricId, frameworkId, year, metricCostsPerYearUpdate, options = {}) => __awaiter(this, void 0, void 0, function* () {
162
+ // verify required parameter 'metricId' is not null or undefined
163
+ assertParamExists('patchMetricCost', 'metricId', metricId);
164
+ // verify required parameter 'frameworkId' is not null or undefined
165
+ assertParamExists('patchMetricCost', 'frameworkId', frameworkId);
166
+ // verify required parameter 'year' is not null or undefined
167
+ assertParamExists('patchMetricCost', 'year', year);
168
+ // verify required parameter 'metricCostsPerYearUpdate' is not null or undefined
169
+ assertParamExists('patchMetricCost', 'metricCostsPerYearUpdate', metricCostsPerYearUpdate);
170
+ const localVarPath = `/metric_costs_per_year/{metric_id}/{framework_id}/{year}`
171
+ .replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)))
172
+ .replace(`{${"framework_id"}}`, encodeURIComponent(String(frameworkId)))
173
+ .replace(`{${"year"}}`, encodeURIComponent(String(year)));
174
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
175
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
176
+ let baseOptions;
177
+ if (configuration) {
178
+ baseOptions = configuration.baseOptions;
179
+ }
180
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
181
+ const localVarHeaderParameter = {};
182
+ const localVarQueryParameter = {};
183
+ // authentication OAuth2AuthorizationCodeBearer required
184
+ // oauth required
185
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
186
+ localVarHeaderParameter['Content-Type'] = 'application/json';
187
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
188
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
189
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
190
+ localVarRequestOptions.data = serializeDataIfNeeded(metricCostsPerYearUpdate, localVarRequestOptions, configuration);
191
+ return {
192
+ url: toPathString(localVarUrlObj),
193
+ options: localVarRequestOptions,
194
+ };
195
+ }),
196
+ /**
197
+ * Create a yearly cost override for a metric within a framework. Year must be between 1600 and 3000, costs must be >= 0.
198
+ * @summary Create a yearly metric cost
199
+ * @param {MetricCostsPerYearCreate} metricCostsPerYearCreate
200
+ * @param {*} [options] Override http request option.
201
+ * @throws {RequiredError}
202
+ */
203
+ postMetricCost: (metricCostsPerYearCreate, options = {}) => __awaiter(this, void 0, void 0, function* () {
204
+ // verify required parameter 'metricCostsPerYearCreate' is not null or undefined
205
+ assertParamExists('postMetricCost', 'metricCostsPerYearCreate', metricCostsPerYearCreate);
206
+ const localVarPath = `/metric_costs_per_year/`;
207
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
208
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
209
+ let baseOptions;
210
+ if (configuration) {
211
+ baseOptions = configuration.baseOptions;
212
+ }
213
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
214
+ const localVarHeaderParameter = {};
215
+ const localVarQueryParameter = {};
216
+ // authentication OAuth2AuthorizationCodeBearer required
217
+ // oauth required
218
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
219
+ localVarHeaderParameter['Content-Type'] = 'application/json';
220
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
221
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
222
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
223
+ localVarRequestOptions.data = serializeDataIfNeeded(metricCostsPerYearCreate, localVarRequestOptions, configuration);
224
+ return {
225
+ url: toPathString(localVarUrlObj),
226
+ options: localVarRequestOptions,
227
+ };
228
+ }),
229
+ };
230
+ };
231
+ /**
232
+ * MetricCostsPerYearApi - functional programming interface
233
+ * @export
234
+ */
235
+ export const MetricCostsPerYearApiFp = function (configuration) {
236
+ const localVarAxiosParamCreator = MetricCostsPerYearApiAxiosParamCreator(configuration);
237
+ return {
238
+ /**
239
+ * Delete a metric cost entry by its composite key (metric_id, framework_id, year).
240
+ * @summary Delete metric costs for a year
241
+ * @param {string} metricId UUID of the metric
242
+ * @param {string} frameworkId UUID of the value framework
243
+ * @param {number} year Year (1600-3000)
244
+ * @param {*} [options] Override http request option.
245
+ * @throws {RequiredError}
246
+ */
247
+ deleteMetricCost(metricId, frameworkId, year, options) {
248
+ var _a, _b, _c;
249
+ return __awaiter(this, void 0, void 0, function* () {
250
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteMetricCost(metricId, frameworkId, year, options);
251
+ const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
252
+ const operationBasePath = (_c = (_b = operationServerMap['MetricCostsPerYearApi.deleteMetricCost']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
253
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
254
+ });
255
+ },
256
+ /**
257
+ * Retrieve cost data for a specific metric within a framework for a given year.
258
+ * @summary Get a yearly metric cost by metric, framework, and year
259
+ * @param {string} metricId UUID of the metric
260
+ * @param {string} frameworkId UUID of the value framework
261
+ * @param {number} year Year (1600-3000)
262
+ * @param {*} [options] Override http request option.
263
+ * @throws {RequiredError}
264
+ */
265
+ getMetricCostByKeys(metricId, frameworkId, year, options) {
266
+ var _a, _b, _c;
267
+ return __awaiter(this, void 0, void 0, function* () {
268
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getMetricCostByKeys(metricId, frameworkId, year, options);
269
+ const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
270
+ const operationBasePath = (_c = (_b = operationServerMap['MetricCostsPerYearApi.getMetricCostByKeys']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
271
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
272
+ });
273
+ },
274
+ /**
275
+ * Retrieve a paginated list of all yearly metric cost overrides.
276
+ * @summary List yearly metric costs
277
+ * @param {number} [offset] Number of records to skip
278
+ * @param {number} [limit] Max number of records to return
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ */
282
+ getMetricCosts(offset, limit, options) {
283
+ var _a, _b, _c;
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getMetricCosts(offset, limit, options);
286
+ const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
287
+ const operationBasePath = (_c = (_b = operationServerMap['MetricCostsPerYearApi.getMetricCosts']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
288
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
289
+ });
290
+ },
291
+ /**
292
+ * Update the perceived and/or direct cost of a metric for a specific year and framework. Identified by the composite key (metric_id, framework_id, year).
293
+ * @summary Partially update metric costs for a year
294
+ * @param {string} metricId UUID of the metric
295
+ * @param {string} frameworkId UUID of the value framework
296
+ * @param {number} year Year (1600-3000)
297
+ * @param {MetricCostsPerYearUpdate} metricCostsPerYearUpdate
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ */
301
+ patchMetricCost(metricId, frameworkId, year, metricCostsPerYearUpdate, options) {
302
+ var _a, _b, _c;
303
+ return __awaiter(this, void 0, void 0, function* () {
304
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.patchMetricCost(metricId, frameworkId, year, metricCostsPerYearUpdate, options);
305
+ const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
306
+ const operationBasePath = (_c = (_b = operationServerMap['MetricCostsPerYearApi.patchMetricCost']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
307
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
308
+ });
309
+ },
310
+ /**
311
+ * Create a yearly cost override for a metric within a framework. Year must be between 1600 and 3000, costs must be >= 0.
312
+ * @summary Create a yearly metric cost
313
+ * @param {MetricCostsPerYearCreate} metricCostsPerYearCreate
314
+ * @param {*} [options] Override http request option.
315
+ * @throws {RequiredError}
316
+ */
317
+ postMetricCost(metricCostsPerYearCreate, options) {
318
+ var _a, _b, _c;
319
+ return __awaiter(this, void 0, void 0, function* () {
320
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.postMetricCost(metricCostsPerYearCreate, options);
321
+ const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
322
+ const operationBasePath = (_c = (_b = operationServerMap['MetricCostsPerYearApi.postMetricCost']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url;
323
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
324
+ });
325
+ },
326
+ };
327
+ };
328
+ /**
329
+ * MetricCostsPerYearApi - factory interface
330
+ * @export
331
+ */
332
+ export const MetricCostsPerYearApiFactory = function (configuration, basePath, axios) {
333
+ const localVarFp = MetricCostsPerYearApiFp(configuration);
334
+ return {
335
+ /**
336
+ * Delete a metric cost entry by its composite key (metric_id, framework_id, year).
337
+ * @summary Delete metric costs for a year
338
+ * @param {string} metricId UUID of the metric
339
+ * @param {string} frameworkId UUID of the value framework
340
+ * @param {number} year Year (1600-3000)
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ */
344
+ deleteMetricCost(metricId, frameworkId, year, options) {
345
+ return localVarFp.deleteMetricCost(metricId, frameworkId, year, options).then((request) => request(axios, basePath));
346
+ },
347
+ /**
348
+ * Retrieve cost data for a specific metric within a framework for a given year.
349
+ * @summary Get a yearly metric cost by metric, framework, and year
350
+ * @param {string} metricId UUID of the metric
351
+ * @param {string} frameworkId UUID of the value framework
352
+ * @param {number} year Year (1600-3000)
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ getMetricCostByKeys(metricId, frameworkId, year, options) {
357
+ return localVarFp.getMetricCostByKeys(metricId, frameworkId, year, options).then((request) => request(axios, basePath));
358
+ },
359
+ /**
360
+ * Retrieve a paginated list of all yearly metric cost overrides.
361
+ * @summary List yearly metric costs
362
+ * @param {number} [offset] Number of records to skip
363
+ * @param {number} [limit] Max number of records to return
364
+ * @param {*} [options] Override http request option.
365
+ * @throws {RequiredError}
366
+ */
367
+ getMetricCosts(offset, limit, options) {
368
+ return localVarFp.getMetricCosts(offset, limit, options).then((request) => request(axios, basePath));
369
+ },
370
+ /**
371
+ * Update the perceived and/or direct cost of a metric for a specific year and framework. Identified by the composite key (metric_id, framework_id, year).
372
+ * @summary Partially update metric costs for a year
373
+ * @param {string} metricId UUID of the metric
374
+ * @param {string} frameworkId UUID of the value framework
375
+ * @param {number} year Year (1600-3000)
376
+ * @param {MetricCostsPerYearUpdate} metricCostsPerYearUpdate
377
+ * @param {*} [options] Override http request option.
378
+ * @throws {RequiredError}
379
+ */
380
+ patchMetricCost(metricId, frameworkId, year, metricCostsPerYearUpdate, options) {
381
+ return localVarFp.patchMetricCost(metricId, frameworkId, year, metricCostsPerYearUpdate, options).then((request) => request(axios, basePath));
382
+ },
383
+ /**
384
+ * Create a yearly cost override for a metric within a framework. Year must be between 1600 and 3000, costs must be >= 0.
385
+ * @summary Create a yearly metric cost
386
+ * @param {MetricCostsPerYearCreate} metricCostsPerYearCreate
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ */
390
+ postMetricCost(metricCostsPerYearCreate, options) {
391
+ return localVarFp.postMetricCost(metricCostsPerYearCreate, options).then((request) => request(axios, basePath));
392
+ },
393
+ };
394
+ };
395
+ /**
396
+ * MetricCostsPerYearApi - object-oriented interface
397
+ * @export
398
+ * @class MetricCostsPerYearApi
399
+ * @extends {BaseAPI}
400
+ */
401
+ export class MetricCostsPerYearApi extends BaseAPI {
402
+ /**
403
+ * Delete a metric cost entry by its composite key (metric_id, framework_id, year).
404
+ * @summary Delete metric costs for a year
405
+ * @param {string} metricId UUID of the metric
406
+ * @param {string} frameworkId UUID of the value framework
407
+ * @param {number} year Year (1600-3000)
408
+ * @param {*} [options] Override http request option.
409
+ * @throws {RequiredError}
410
+ * @memberof MetricCostsPerYearApi
411
+ */
412
+ deleteMetricCost(metricId, frameworkId, year, options) {
413
+ return MetricCostsPerYearApiFp(this.configuration).deleteMetricCost(metricId, frameworkId, year, options).then((request) => request(this.axios, this.basePath));
414
+ }
415
+ /**
416
+ * Retrieve cost data for a specific metric within a framework for a given year.
417
+ * @summary Get a yearly metric cost by metric, framework, and year
418
+ * @param {string} metricId UUID of the metric
419
+ * @param {string} frameworkId UUID of the value framework
420
+ * @param {number} year Year (1600-3000)
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ * @memberof MetricCostsPerYearApi
424
+ */
425
+ getMetricCostByKeys(metricId, frameworkId, year, options) {
426
+ return MetricCostsPerYearApiFp(this.configuration).getMetricCostByKeys(metricId, frameworkId, year, options).then((request) => request(this.axios, this.basePath));
427
+ }
428
+ /**
429
+ * Retrieve a paginated list of all yearly metric cost overrides.
430
+ * @summary List yearly metric costs
431
+ * @param {number} [offset] Number of records to skip
432
+ * @param {number} [limit] Max number of records to return
433
+ * @param {*} [options] Override http request option.
434
+ * @throws {RequiredError}
435
+ * @memberof MetricCostsPerYearApi
436
+ */
437
+ getMetricCosts(offset, limit, options) {
438
+ return MetricCostsPerYearApiFp(this.configuration).getMetricCosts(offset, limit, options).then((request) => request(this.axios, this.basePath));
439
+ }
440
+ /**
441
+ * Update the perceived and/or direct cost of a metric for a specific year and framework. Identified by the composite key (metric_id, framework_id, year).
442
+ * @summary Partially update metric costs for a year
443
+ * @param {string} metricId UUID of the metric
444
+ * @param {string} frameworkId UUID of the value framework
445
+ * @param {number} year Year (1600-3000)
446
+ * @param {MetricCostsPerYearUpdate} metricCostsPerYearUpdate
447
+ * @param {*} [options] Override http request option.
448
+ * @throws {RequiredError}
449
+ * @memberof MetricCostsPerYearApi
450
+ */
451
+ patchMetricCost(metricId, frameworkId, year, metricCostsPerYearUpdate, options) {
452
+ return MetricCostsPerYearApiFp(this.configuration).patchMetricCost(metricId, frameworkId, year, metricCostsPerYearUpdate, options).then((request) => request(this.axios, this.basePath));
453
+ }
454
+ /**
455
+ * Create a yearly cost override for a metric within a framework. Year must be between 1600 and 3000, costs must be >= 0.
456
+ * @summary Create a yearly metric cost
457
+ * @param {MetricCostsPerYearCreate} metricCostsPerYearCreate
458
+ * @param {*} [options] Override http request option.
459
+ * @throws {RequiredError}
460
+ * @memberof MetricCostsPerYearApi
461
+ */
462
+ postMetricCost(metricCostsPerYearCreate, options) {
463
+ return MetricCostsPerYearApiFp(this.configuration).postMetricCost(metricCostsPerYearCreate, options).then((request) => request(this.axios, this.basePath));
464
+ }
465
+ }