@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.
- package/README.md +141 -4
- package/api/default-api.ts +8 -15
- package/api/impact-api.ts +507 -0
- package/api/investment-api.ts +1308 -0
- package/api/metric-api.ts +185 -164
- package/api/metric-costs-api.ts +144 -0
- package/api/metric-costs-per-year-api.ts +200 -200
- package/api/objective-api.ts +538 -44
- package/api/objective-weight-api.ts +190 -190
- package/api/objective-weights-api.ts +144 -0
- package/api/option-api.ts +925 -0
- package/api/value-framework-api.ts +1223 -109
- package/api/value-framework-costs-api.ts +239 -0
- package/api/value-framework-weights-api.ts +144 -0
- package/api.ts +8 -1
- package/base.ts +1 -25
- package/common.ts +20 -43
- package/configuration.ts +31 -20
- package/dist/api/default-api.d.ts +3 -10
- package/dist/api/default-api.js +7 -13
- package/dist/api/impact-api.d.ts +245 -0
- package/dist/api/impact-api.js +493 -0
- package/dist/api/investment-api.d.ts +607 -0
- package/dist/api/investment-api.js +1248 -0
- package/dist/api/metric-api.d.ts +97 -88
- package/dist/api/metric-api.js +185 -157
- package/dist/api/metric-costs-api.d.ts +75 -0
- package/dist/api/metric-costs-api.js +146 -0
- package/dist/api/metric-costs-per-year-api.d.ts +105 -108
- package/dist/api/metric-costs-per-year-api.js +199 -192
- package/dist/api/objective-api.d.ts +242 -21
- package/dist/api/objective-api.js +508 -37
- package/dist/api/objective-weight-api.d.ts +105 -108
- package/dist/api/objective-weight-api.js +189 -182
- package/dist/api/objective-weights-api.d.ts +75 -0
- package/dist/api/objective-weights-api.js +146 -0
- package/dist/api/option-api.d.ts +436 -0
- package/dist/api/option-api.js +888 -0
- package/dist/api/value-framework-api.d.ts +528 -21
- package/dist/api/value-framework-api.js +1138 -78
- package/dist/api/value-framework-costs-api.d.ts +119 -0
- package/dist/api/value-framework-costs-api.js +236 -0
- package/dist/api/value-framework-weights-api.d.ts +75 -0
- package/dist/api/value-framework-weights-api.js +146 -0
- package/dist/api.d.ts +8 -1
- package/dist/api.js +8 -1
- package/dist/base.d.ts +1 -25
- package/dist/base.js +1 -20
- package/dist/common.d.ts +6 -37
- package/dist/common.js +17 -39
- package/dist/configuration.d.ts +25 -18
- package/dist/configuration.js +4 -3
- package/dist/esm/api/default-api.d.ts +3 -10
- package/dist/esm/api/default-api.js +7 -13
- package/dist/esm/api/impact-api.d.ts +245 -0
- package/dist/esm/api/impact-api.js +486 -0
- package/dist/esm/api/investment-api.d.ts +607 -0
- package/dist/esm/api/investment-api.js +1241 -0
- package/dist/esm/api/metric-api.d.ts +97 -88
- package/dist/esm/api/metric-api.js +185 -157
- package/dist/esm/api/metric-costs-api.d.ts +75 -0
- package/dist/esm/api/metric-costs-api.js +139 -0
- package/dist/esm/api/metric-costs-per-year-api.d.ts +105 -108
- package/dist/esm/api/metric-costs-per-year-api.js +199 -192
- package/dist/esm/api/objective-api.d.ts +242 -21
- package/dist/esm/api/objective-api.js +508 -37
- package/dist/esm/api/objective-weight-api.d.ts +105 -108
- package/dist/esm/api/objective-weight-api.js +189 -182
- package/dist/esm/api/objective-weights-api.d.ts +75 -0
- package/dist/esm/api/objective-weights-api.js +139 -0
- package/dist/esm/api/option-api.d.ts +436 -0
- package/dist/esm/api/option-api.js +881 -0
- package/dist/esm/api/value-framework-api.d.ts +528 -21
- package/dist/esm/api/value-framework-api.js +1137 -77
- package/dist/esm/api/value-framework-costs-api.d.ts +119 -0
- package/dist/esm/api/value-framework-costs-api.js +229 -0
- package/dist/esm/api/value-framework-weights-api.d.ts +75 -0
- package/dist/esm/api/value-framework-weights-api.js +139 -0
- package/dist/esm/api.d.ts +8 -1
- package/dist/esm/api.js +8 -1
- package/dist/esm/base.d.ts +1 -25
- package/dist/esm/base.js +1 -20
- package/dist/esm/common.d.ts +6 -37
- package/dist/esm/common.js +15 -38
- package/dist/esm/configuration.d.ts +25 -18
- package/dist/esm/configuration.js +4 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/models/evolution-type.d.ts +16 -0
- package/dist/esm/models/evolution-type.js +17 -0
- package/dist/esm/models/httpvalidation-error.d.ts +2 -12
- package/dist/esm/models/httpvalidation-error.js +1 -1
- package/dist/esm/models/impact-apiresponse.d.ts +33 -0
- package/dist/esm/models/{validation-error-loc-inner.js → impact-apiresponse.js} +1 -1
- package/dist/esm/models/impact-create.d.ts +37 -0
- package/dist/esm/models/impact-create.js +14 -0
- package/dist/esm/models/impact-update.d.ts +22 -0
- package/dist/esm/models/impact-update.js +14 -0
- package/dist/esm/models/index.d.ts +11 -1
- package/dist/esm/models/index.js +11 -1
- package/dist/esm/models/investment-create.d.ts +21 -0
- package/dist/esm/models/investment-create.js +14 -0
- package/dist/esm/models/investment-response.d.ts +25 -0
- package/dist/esm/models/investment-response.js +14 -0
- package/dist/esm/models/investment-update.d.ts +18 -0
- package/dist/esm/models/investment-update.js +14 -0
- package/dist/esm/models/{validation-error-loc-inner.d.ts → location-inner.d.ts} +2 -7
- package/dist/esm/models/location-inner.js +14 -0
- package/dist/esm/models/measurement-type.d.ts +1 -6
- package/dist/esm/models/measurement-type.js +1 -6
- package/dist/esm/models/metric-costs-per-year-create.d.ts +1 -17
- package/dist/esm/models/metric-costs-per-year-create.js +1 -1
- package/dist/esm/models/metric-costs-per-year-response.d.ts +1 -18
- package/dist/esm/models/metric-costs-per-year-response.js +1 -1
- package/dist/esm/models/metric-costs-per-year-update.d.ts +1 -13
- package/dist/esm/models/metric-costs-per-year-update.js +1 -1
- package/dist/esm/models/metric-create.d.ts +3 -28
- package/dist/esm/models/metric-create.js +1 -1
- package/dist/esm/models/metric-response.d.ts +3 -50
- package/dist/esm/models/metric-response.js +1 -1
- package/dist/esm/models/metric-type.d.ts +1 -6
- package/dist/esm/models/metric-type.js +1 -6
- package/dist/esm/models/metric-update.d.ts +3 -35
- package/dist/esm/models/metric-update.js +1 -1
- package/dist/esm/models/objective-create.d.ts +1 -10
- package/dist/esm/models/objective-create.js +1 -1
- package/dist/esm/models/objective-response.d.ts +1 -30
- package/dist/esm/models/objective-response.js +1 -1
- package/dist/esm/models/objective-update.d.ts +1 -13
- package/dist/esm/models/objective-update.js +1 -1
- package/dist/esm/models/objective-weight-create.d.ts +1 -9
- package/dist/esm/models/objective-weight-create.js +1 -1
- package/dist/esm/models/objective-weight-response.d.ts +1 -14
- package/dist/esm/models/objective-weight-response.js +1 -1
- package/dist/esm/models/objective-weight-update.d.ts +1 -8
- package/dist/esm/models/objective-weight-update.js +1 -1
- package/dist/esm/models/option-create.d.ts +33 -0
- package/dist/esm/models/option-create.js +14 -0
- package/dist/esm/models/option-response.d.ts +31 -0
- package/dist/esm/models/option-response.js +14 -0
- package/dist/esm/models/option-update.d.ts +19 -0
- package/dist/esm/models/option-update.js +14 -0
- package/dist/esm/models/validation-error.d.ts +3 -33
- package/dist/esm/models/validation-error.js +1 -1
- package/dist/esm/models/value-framework-create.d.ts +1 -10
- package/dist/esm/models/value-framework-create.js +1 -1
- package/dist/esm/models/value-framework-response.d.ts +1 -30
- package/dist/esm/models/value-framework-response.js +1 -1
- package/dist/esm/models/value-framework-update.d.ts +1 -13
- package/dist/esm/models/value-framework-update.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/models/evolution-type.d.ts +16 -0
- package/dist/models/evolution-type.js +20 -0
- package/dist/models/httpvalidation-error.d.ts +2 -12
- package/dist/models/httpvalidation-error.js +1 -1
- package/dist/models/impact-apiresponse.d.ts +33 -0
- package/dist/models/{validation-error-loc-inner.js → impact-apiresponse.js} +1 -1
- package/dist/models/impact-create.d.ts +37 -0
- package/dist/models/impact-create.js +15 -0
- package/dist/models/impact-update.d.ts +22 -0
- package/dist/models/impact-update.js +15 -0
- package/dist/models/index.d.ts +11 -1
- package/dist/models/index.js +11 -1
- package/dist/models/investment-create.d.ts +21 -0
- package/dist/models/investment-create.js +15 -0
- package/dist/models/investment-response.d.ts +25 -0
- package/dist/models/investment-response.js +15 -0
- package/dist/models/investment-update.d.ts +18 -0
- package/dist/models/investment-update.js +15 -0
- package/dist/models/{validation-error-loc-inner.d.ts → location-inner.d.ts} +2 -7
- package/dist/models/location-inner.js +15 -0
- package/dist/models/measurement-type.d.ts +1 -6
- package/dist/models/measurement-type.js +1 -6
- package/dist/models/metric-costs-per-year-create.d.ts +1 -17
- package/dist/models/metric-costs-per-year-create.js +1 -1
- package/dist/models/metric-costs-per-year-response.d.ts +1 -18
- package/dist/models/metric-costs-per-year-response.js +1 -1
- package/dist/models/metric-costs-per-year-update.d.ts +1 -13
- package/dist/models/metric-costs-per-year-update.js +1 -1
- package/dist/models/metric-create.d.ts +3 -28
- package/dist/models/metric-create.js +1 -1
- package/dist/models/metric-response.d.ts +3 -50
- package/dist/models/metric-response.js +1 -1
- package/dist/models/metric-type.d.ts +1 -6
- package/dist/models/metric-type.js +1 -6
- package/dist/models/metric-update.d.ts +3 -35
- package/dist/models/metric-update.js +1 -1
- package/dist/models/objective-create.d.ts +1 -10
- package/dist/models/objective-create.js +1 -1
- package/dist/models/objective-response.d.ts +1 -30
- package/dist/models/objective-response.js +1 -1
- package/dist/models/objective-update.d.ts +1 -13
- package/dist/models/objective-update.js +1 -1
- package/dist/models/objective-weight-create.d.ts +1 -9
- package/dist/models/objective-weight-create.js +1 -1
- package/dist/models/objective-weight-response.d.ts +1 -14
- package/dist/models/objective-weight-response.js +1 -1
- package/dist/models/objective-weight-update.d.ts +1 -8
- package/dist/models/objective-weight-update.js +1 -1
- package/dist/models/option-create.d.ts +33 -0
- package/dist/models/option-create.js +15 -0
- package/dist/models/option-response.d.ts +31 -0
- package/dist/models/option-response.js +15 -0
- package/dist/models/option-update.d.ts +19 -0
- package/dist/models/option-update.js +15 -0
- package/dist/models/validation-error.d.ts +3 -33
- package/dist/models/validation-error.js +1 -1
- package/dist/models/value-framework-create.d.ts +1 -10
- package/dist/models/value-framework-create.js +1 -1
- package/dist/models/value-framework-response.d.ts +1 -30
- package/dist/models/value-framework-response.js +1 -1
- package/dist/models/value-framework-update.d.ts +1 -13
- package/dist/models/value-framework-update.js +1 -1
- package/docs/DefaultApi.md +51 -0
- package/docs/EvolutionType.md +10 -0
- package/docs/HTTPValidationError.md +20 -0
- package/docs/ImpactAPIResponse.md +39 -0
- package/docs/ImpactApi.md +312 -0
- package/docs/ImpactCreate.md +29 -0
- package/docs/ImpactUpdate.md +29 -0
- package/docs/InvestmentApi.md +875 -0
- package/docs/InvestmentCreate.md +23 -0
- package/docs/InvestmentResponse.md +31 -0
- package/docs/InvestmentUpdate.md +23 -0
- package/docs/LocationInner.md +18 -0
- package/docs/MeasurementType.md +10 -0
- package/docs/MetricApi.md +299 -0
- package/docs/MetricCostsApi.md +66 -0
- package/docs/MetricCostsPerYearApi.md +307 -0
- package/docs/MetricCostsPerYearCreate.md +27 -0
- package/docs/MetricCostsPerYearResponse.md +31 -0
- package/docs/MetricCostsPerYearUpdate.md +23 -0
- package/docs/MetricCreate.md +33 -0
- package/docs/MetricResponse.md +43 -0
- package/docs/MetricType.md +12 -0
- package/docs/MetricUpdate.md +31 -0
- package/docs/ObjectiveApi.md +633 -0
- package/docs/ObjectiveCreate.md +23 -0
- package/docs/ObjectiveResponse.md +31 -0
- package/docs/ObjectiveUpdate.md +23 -0
- package/docs/ObjectiveWeightApi.md +298 -0
- package/docs/ObjectiveWeightCreate.md +25 -0
- package/docs/ObjectiveWeightResponse.md +27 -0
- package/docs/ObjectiveWeightUpdate.md +21 -0
- package/docs/ObjectiveWeightsApi.md +66 -0
- package/docs/OptionApi.md +602 -0
- package/docs/OptionCreate.md +29 -0
- package/docs/OptionResponse.md +37 -0
- package/docs/OptionUpdate.md +25 -0
- package/docs/ValidationError.md +28 -0
- package/docs/ValueFrameworkApi.md +1053 -0
- package/docs/ValueFrameworkCostsApi.md +128 -0
- package/docs/ValueFrameworkCreate.md +23 -0
- package/docs/ValueFrameworkResponse.md +31 -0
- package/docs/ValueFrameworkUpdate.md +23 -0
- package/docs/ValueFrameworkWeightsApi.md +66 -0
- package/index.ts +1 -1
- package/models/evolution-type.ts +26 -0
- package/models/httpvalidation-error.ts +2 -12
- package/models/impact-apiresponse.ts +43 -0
- package/models/impact-create.ts +47 -0
- package/models/impact-update.ts +32 -0
- package/models/index.ts +11 -1
- package/models/investment-create.ts +27 -0
- package/models/investment-response.ts +31 -0
- package/models/investment-update.ts +24 -0
- package/models/{validation-error-loc-inner.ts → location-inner.ts} +2 -7
- package/models/measurement-type.ts +1 -6
- package/models/metric-costs-per-year-create.ts +1 -17
- package/models/metric-costs-per-year-response.ts +1 -18
- package/models/metric-costs-per-year-update.ts +1 -13
- package/models/metric-create.ts +3 -28
- package/models/metric-response.ts +3 -50
- package/models/metric-type.ts +1 -6
- package/models/metric-update.ts +3 -35
- package/models/objective-create.ts +1 -10
- package/models/objective-response.ts +1 -30
- package/models/objective-update.ts +1 -13
- package/models/objective-weight-create.ts +1 -9
- package/models/objective-weight-response.ts +1 -14
- package/models/objective-weight-update.ts +1 -8
- package/models/option-create.ts +39 -0
- package/models/option-response.ts +37 -0
- package/models/option-update.ts +25 -0
- package/models/validation-error.ts +3 -33
- package/models/value-framework-create.ts +1 -10
- package/models/value-framework-response.ts +1 -30
- package/models/value-framework-update.ts +1 -13
- package/package.json +4 -4
package/api/metric-api.ts
CHANGED
|
@@ -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-
|
|
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).
|
|
@@ -18,33 +18,35 @@ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
|
18
18
|
import globalAxios from 'axios';
|
|
19
19
|
// Some imports not used depending on template conditions
|
|
20
20
|
// @ts-ignore
|
|
21
|
-
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
|
22
22
|
// @ts-ignore
|
|
23
|
-
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
24
|
// @ts-ignore
|
|
25
|
-
import { MetricCreate } from '../models';
|
|
25
|
+
import type { MetricCreate } from '../models';
|
|
26
26
|
// @ts-ignore
|
|
27
|
-
import { MetricResponse } from '../models';
|
|
27
|
+
import type { MetricResponse } from '../models';
|
|
28
28
|
// @ts-ignore
|
|
29
|
-
import { MetricUpdate } from '../models';
|
|
29
|
+
import type { MetricUpdate } from '../models';
|
|
30
30
|
/**
|
|
31
31
|
* MetricApi - axios parameter creator
|
|
32
|
-
* @export
|
|
33
32
|
*/
|
|
34
33
|
export const MetricApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
35
34
|
return {
|
|
36
35
|
/**
|
|
37
|
-
*
|
|
38
|
-
* @summary
|
|
39
|
-
* @param {string}
|
|
36
|
+
* Create a new metric under this objective.
|
|
37
|
+
* @summary Create a metric for this objective
|
|
38
|
+
* @param {string} objectiveId UUID of the objective
|
|
39
|
+
* @param {MetricCreate} metricCreate
|
|
40
40
|
* @param {*} [options] Override http request option.
|
|
41
41
|
* @throws {RequiredError}
|
|
42
42
|
*/
|
|
43
|
-
|
|
44
|
-
// verify required parameter '
|
|
45
|
-
assertParamExists('
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
createMetricForObjective: async (objectiveId: string, metricCreate: MetricCreate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44
|
+
// verify required parameter 'objectiveId' is not null or undefined
|
|
45
|
+
assertParamExists('createMetricForObjective', 'objectiveId', objectiveId)
|
|
46
|
+
// verify required parameter 'metricCreate' is not null or undefined
|
|
47
|
+
assertParamExists('createMetricForObjective', 'metricCreate', metricCreate)
|
|
48
|
+
const localVarPath = `/objective/{objective_id}/metric/`
|
|
49
|
+
.replace(`{${"objective_id"}}`, encodeURIComponent(String(objectiveId)));
|
|
48
50
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
51
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
50
52
|
let baseOptions;
|
|
@@ -52,7 +54,7 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
52
54
|
baseOptions = configuration.baseOptions;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
const localVarRequestOptions = { method: '
|
|
57
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
56
58
|
const localVarHeaderParameter = {} as any;
|
|
57
59
|
const localVarQueryParameter = {} as any;
|
|
58
60
|
|
|
@@ -60,11 +62,13 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
60
62
|
// oauth required
|
|
61
63
|
await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
|
|
62
64
|
|
|
65
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
66
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
63
67
|
|
|
64
|
-
|
|
65
68
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
66
69
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
67
70
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
71
|
+
localVarRequestOptions.data = serializeDataIfNeeded(metricCreate, localVarRequestOptions, configuration)
|
|
68
72
|
|
|
69
73
|
return {
|
|
70
74
|
url: toPathString(localVarUrlObj),
|
|
@@ -72,17 +76,21 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
72
76
|
};
|
|
73
77
|
},
|
|
74
78
|
/**
|
|
75
|
-
*
|
|
76
|
-
* @summary
|
|
79
|
+
* Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
|
|
80
|
+
* @summary Delete a metric for this objective
|
|
77
81
|
* @param {string} metricId UUID of the metric
|
|
82
|
+
* @param {string} objectiveId UUID of the objective
|
|
78
83
|
* @param {*} [options] Override http request option.
|
|
79
84
|
* @throws {RequiredError}
|
|
80
85
|
*/
|
|
81
|
-
|
|
86
|
+
deleteMetricForObjective: async (metricId: string, objectiveId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
82
87
|
// verify required parameter 'metricId' is not null or undefined
|
|
83
|
-
assertParamExists('
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
assertParamExists('deleteMetricForObjective', 'metricId', metricId)
|
|
89
|
+
// verify required parameter 'objectiveId' is not null or undefined
|
|
90
|
+
assertParamExists('deleteMetricForObjective', 'objectiveId', objectiveId)
|
|
91
|
+
const localVarPath = `/objective/{objective_id}/metric/{metric_id}`
|
|
92
|
+
.replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)))
|
|
93
|
+
.replace(`{${"objective_id"}}`, encodeURIComponent(String(objectiveId)));
|
|
86
94
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
87
95
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
88
96
|
let baseOptions;
|
|
@@ -90,7 +98,7 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
90
98
|
baseOptions = configuration.baseOptions;
|
|
91
99
|
}
|
|
92
100
|
|
|
93
|
-
const localVarRequestOptions = { method: '
|
|
101
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
94
102
|
const localVarHeaderParameter = {} as any;
|
|
95
103
|
const localVarQueryParameter = {} as any;
|
|
96
104
|
|
|
@@ -99,7 +107,6 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
99
107
|
await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
|
|
100
108
|
|
|
101
109
|
|
|
102
|
-
|
|
103
110
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
104
111
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
105
112
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -110,15 +117,21 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
110
117
|
};
|
|
111
118
|
},
|
|
112
119
|
/**
|
|
113
|
-
* Retrieve a
|
|
114
|
-
* @summary
|
|
115
|
-
* @param {
|
|
116
|
-
* @param {
|
|
120
|
+
* Retrieve a specific metric for the objective.
|
|
121
|
+
* @summary Get a metric for this objective
|
|
122
|
+
* @param {string} metricId UUID of the metric
|
|
123
|
+
* @param {string} objectiveId UUID of the objective
|
|
117
124
|
* @param {*} [options] Override http request option.
|
|
118
125
|
* @throws {RequiredError}
|
|
119
126
|
*/
|
|
120
|
-
|
|
121
|
-
|
|
127
|
+
getMetricForObjective: async (metricId: string, objectiveId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
128
|
+
// verify required parameter 'metricId' is not null or undefined
|
|
129
|
+
assertParamExists('getMetricForObjective', 'metricId', metricId)
|
|
130
|
+
// verify required parameter 'objectiveId' is not null or undefined
|
|
131
|
+
assertParamExists('getMetricForObjective', 'objectiveId', objectiveId)
|
|
132
|
+
const localVarPath = `/objective/{objective_id}/metric/{metric_id}`
|
|
133
|
+
.replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)))
|
|
134
|
+
.replace(`{${"objective_id"}}`, encodeURIComponent(String(objectiveId)));
|
|
122
135
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
123
136
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
124
137
|
let baseOptions;
|
|
@@ -134,16 +147,8 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
134
147
|
// oauth required
|
|
135
148
|
await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
|
|
136
149
|
|
|
137
|
-
|
|
138
|
-
localVarQueryParameter['offset'] = offset;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (limit !== undefined) {
|
|
142
|
-
localVarQueryParameter['limit'] = limit;
|
|
143
|
-
}
|
|
144
|
-
|
|
150
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
145
151
|
|
|
146
|
-
|
|
147
152
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
148
153
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
149
154
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -154,20 +159,19 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
154
159
|
};
|
|
155
160
|
},
|
|
156
161
|
/**
|
|
157
|
-
*
|
|
158
|
-
* @summary
|
|
159
|
-
* @param {string}
|
|
160
|
-
* @param {
|
|
162
|
+
* Retrieve a paginated list of all metrics for a specific objective.
|
|
163
|
+
* @summary List metrics for this objective
|
|
164
|
+
* @param {string} objectiveId UUID of the objective
|
|
165
|
+
* @param {number} [offset] Number of records to skip
|
|
166
|
+
* @param {number} [limit] Max number of records to return
|
|
161
167
|
* @param {*} [options] Override http request option.
|
|
162
168
|
* @throws {RequiredError}
|
|
163
169
|
*/
|
|
164
|
-
|
|
165
|
-
// verify required parameter '
|
|
166
|
-
assertParamExists('
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
const localVarPath = `/metric/{metric_id}`
|
|
170
|
-
.replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)));
|
|
170
|
+
getMetricsForObjective: async (objectiveId: string, offset?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
171
|
+
// verify required parameter 'objectiveId' is not null or undefined
|
|
172
|
+
assertParamExists('getMetricsForObjective', 'objectiveId', objectiveId)
|
|
173
|
+
const localVarPath = `/objective/{objective_id}/metric/`
|
|
174
|
+
.replace(`{${"objective_id"}}`, encodeURIComponent(String(objectiveId)));
|
|
171
175
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
172
176
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
173
177
|
let baseOptions;
|
|
@@ -175,7 +179,7 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
175
179
|
baseOptions = configuration.baseOptions;
|
|
176
180
|
}
|
|
177
181
|
|
|
178
|
-
const localVarRequestOptions = { method: '
|
|
182
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
179
183
|
const localVarHeaderParameter = {} as any;
|
|
180
184
|
const localVarQueryParameter = {} as any;
|
|
181
185
|
|
|
@@ -183,14 +187,19 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
183
187
|
// oauth required
|
|
184
188
|
await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
|
|
185
189
|
|
|
190
|
+
if (offset !== undefined) {
|
|
191
|
+
localVarQueryParameter['offset'] = offset;
|
|
192
|
+
}
|
|
186
193
|
|
|
187
|
-
|
|
188
|
-
|
|
194
|
+
if (limit !== undefined) {
|
|
195
|
+
localVarQueryParameter['limit'] = limit;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
189
199
|
|
|
190
200
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
191
201
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
192
202
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
193
|
-
localVarRequestOptions.data = serializeDataIfNeeded(metricUpdate, localVarRequestOptions, configuration)
|
|
194
203
|
|
|
195
204
|
return {
|
|
196
205
|
url: toPathString(localVarUrlObj),
|
|
@@ -198,16 +207,24 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
198
207
|
};
|
|
199
208
|
},
|
|
200
209
|
/**
|
|
201
|
-
*
|
|
202
|
-
* @summary
|
|
203
|
-
* @param {
|
|
210
|
+
* Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
211
|
+
* @summary Partially update a metric for this objective
|
|
212
|
+
* @param {string} metricId UUID of the metric
|
|
213
|
+
* @param {string} objectiveId UUID of the objective
|
|
214
|
+
* @param {MetricUpdate} metricUpdate
|
|
204
215
|
* @param {*} [options] Override http request option.
|
|
205
216
|
* @throws {RequiredError}
|
|
206
217
|
*/
|
|
207
|
-
|
|
208
|
-
// verify required parameter '
|
|
209
|
-
assertParamExists('
|
|
210
|
-
|
|
218
|
+
patchMetricForObjective: async (metricId: string, objectiveId: string, metricUpdate: MetricUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
219
|
+
// verify required parameter 'metricId' is not null or undefined
|
|
220
|
+
assertParamExists('patchMetricForObjective', 'metricId', metricId)
|
|
221
|
+
// verify required parameter 'objectiveId' is not null or undefined
|
|
222
|
+
assertParamExists('patchMetricForObjective', 'objectiveId', objectiveId)
|
|
223
|
+
// verify required parameter 'metricUpdate' is not null or undefined
|
|
224
|
+
assertParamExists('patchMetricForObjective', 'metricUpdate', metricUpdate)
|
|
225
|
+
const localVarPath = `/objective/{objective_id}/metric/{metric_id}`
|
|
226
|
+
.replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)))
|
|
227
|
+
.replace(`{${"objective_id"}}`, encodeURIComponent(String(objectiveId)));
|
|
211
228
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
212
229
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
213
230
|
let baseOptions;
|
|
@@ -215,7 +232,7 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
215
232
|
baseOptions = configuration.baseOptions;
|
|
216
233
|
}
|
|
217
234
|
|
|
218
|
-
const localVarRequestOptions = { method: '
|
|
235
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
219
236
|
const localVarHeaderParameter = {} as any;
|
|
220
237
|
const localVarQueryParameter = {} as any;
|
|
221
238
|
|
|
@@ -223,14 +240,13 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
223
240
|
// oauth required
|
|
224
241
|
await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
|
|
225
242
|
|
|
226
|
-
|
|
227
|
-
|
|
228
243
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
244
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
229
245
|
|
|
230
246
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
231
247
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
232
248
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
233
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
249
|
+
localVarRequestOptions.data = serializeDataIfNeeded(metricUpdate, localVarRequestOptions, configuration)
|
|
234
250
|
|
|
235
251
|
return {
|
|
236
252
|
url: toPathString(localVarUrlObj),
|
|
@@ -242,210 +258,215 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
242
258
|
|
|
243
259
|
/**
|
|
244
260
|
* MetricApi - functional programming interface
|
|
245
|
-
* @export
|
|
246
261
|
*/
|
|
247
262
|
export const MetricApiFp = function(configuration?: Configuration) {
|
|
248
263
|
const localVarAxiosParamCreator = MetricApiAxiosParamCreator(configuration)
|
|
249
264
|
return {
|
|
265
|
+
/**
|
|
266
|
+
* Create a new metric under this objective.
|
|
267
|
+
* @summary Create a metric for this objective
|
|
268
|
+
* @param {string} objectiveId UUID of the objective
|
|
269
|
+
* @param {MetricCreate} metricCreate
|
|
270
|
+
* @param {*} [options] Override http request option.
|
|
271
|
+
* @throws {RequiredError}
|
|
272
|
+
*/
|
|
273
|
+
async createMetricForObjective(objectiveId: string, metricCreate: MetricCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MetricResponse>> {
|
|
274
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createMetricForObjective(objectiveId, metricCreate, options);
|
|
275
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
276
|
+
const localVarOperationServerBasePath = operationServerMap['MetricApi.createMetricForObjective']?.[localVarOperationServerIndex]?.url;
|
|
277
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
278
|
+
},
|
|
250
279
|
/**
|
|
251
280
|
* Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
|
|
252
|
-
* @summary Delete a metric
|
|
281
|
+
* @summary Delete a metric for this objective
|
|
253
282
|
* @param {string} metricId UUID of the metric
|
|
283
|
+
* @param {string} objectiveId UUID of the objective
|
|
254
284
|
* @param {*} [options] Override http request option.
|
|
255
285
|
* @throws {RequiredError}
|
|
256
286
|
*/
|
|
257
|
-
async
|
|
258
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
259
|
-
const
|
|
260
|
-
const
|
|
261
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios,
|
|
287
|
+
async deleteMetricForObjective(metricId: string, objectiveId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
288
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMetricForObjective(metricId, objectiveId, options);
|
|
289
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
290
|
+
const localVarOperationServerBasePath = operationServerMap['MetricApi.deleteMetricForObjective']?.[localVarOperationServerIndex]?.url;
|
|
291
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
262
292
|
},
|
|
263
293
|
/**
|
|
264
|
-
* Retrieve a
|
|
265
|
-
* @summary Get a metric
|
|
294
|
+
* Retrieve a specific metric for the objective.
|
|
295
|
+
* @summary Get a metric for this objective
|
|
266
296
|
* @param {string} metricId UUID of the metric
|
|
297
|
+
* @param {string} objectiveId UUID of the objective
|
|
267
298
|
* @param {*} [options] Override http request option.
|
|
268
299
|
* @throws {RequiredError}
|
|
269
300
|
*/
|
|
270
|
-
async
|
|
271
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
272
|
-
const
|
|
273
|
-
const
|
|
274
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios,
|
|
301
|
+
async getMetricForObjective(metricId: string, objectiveId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MetricResponse>> {
|
|
302
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMetricForObjective(metricId, objectiveId, options);
|
|
303
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
304
|
+
const localVarOperationServerBasePath = operationServerMap['MetricApi.getMetricForObjective']?.[localVarOperationServerIndex]?.url;
|
|
305
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
275
306
|
},
|
|
276
307
|
/**
|
|
277
|
-
* Retrieve a paginated list of all metrics.
|
|
278
|
-
* @summary List metrics
|
|
308
|
+
* Retrieve a paginated list of all metrics for a specific objective.
|
|
309
|
+
* @summary List metrics for this objective
|
|
310
|
+
* @param {string} objectiveId UUID of the objective
|
|
279
311
|
* @param {number} [offset] Number of records to skip
|
|
280
312
|
* @param {number} [limit] Max number of records to return
|
|
281
313
|
* @param {*} [options] Override http request option.
|
|
282
314
|
* @throws {RequiredError}
|
|
283
315
|
*/
|
|
284
|
-
async
|
|
285
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
286
|
-
const
|
|
287
|
-
const
|
|
288
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios,
|
|
316
|
+
async getMetricsForObjective(objectiveId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<MetricResponse>>> {
|
|
317
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMetricsForObjective(objectiveId, offset, limit, options);
|
|
318
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
319
|
+
const localVarOperationServerBasePath = operationServerMap['MetricApi.getMetricsForObjective']?.[localVarOperationServerIndex]?.url;
|
|
320
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
289
321
|
},
|
|
290
322
|
/**
|
|
291
323
|
* Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
292
|
-
* @summary Partially update a metric
|
|
324
|
+
* @summary Partially update a metric for this objective
|
|
293
325
|
* @param {string} metricId UUID of the metric
|
|
326
|
+
* @param {string} objectiveId UUID of the objective
|
|
294
327
|
* @param {MetricUpdate} metricUpdate
|
|
295
328
|
* @param {*} [options] Override http request option.
|
|
296
329
|
* @throws {RequiredError}
|
|
297
330
|
*/
|
|
298
|
-
async
|
|
299
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
300
|
-
const
|
|
301
|
-
const
|
|
302
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios,
|
|
303
|
-
},
|
|
304
|
-
/**
|
|
305
|
-
* Create a new metric linked to an objective. Requires metric_type (monetized/tracked/bounded) and measurement_type (maximization/minimization).
|
|
306
|
-
* @summary Create a metric
|
|
307
|
-
* @param {MetricCreate} metricCreate
|
|
308
|
-
* @param {*} [options] Override http request option.
|
|
309
|
-
* @throws {RequiredError}
|
|
310
|
-
*/
|
|
311
|
-
async postMetric(metricCreate: MetricCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MetricResponse>> {
|
|
312
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.postMetric(metricCreate, options);
|
|
313
|
-
const index = configuration?.serverIndex ?? 0;
|
|
314
|
-
const operationBasePath = operationServerMap['MetricApi.postMetric']?.[index]?.url;
|
|
315
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
331
|
+
async patchMetricForObjective(metricId: string, objectiveId: string, metricUpdate: MetricUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MetricResponse>> {
|
|
332
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.patchMetricForObjective(metricId, objectiveId, metricUpdate, options);
|
|
333
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
334
|
+
const localVarOperationServerBasePath = operationServerMap['MetricApi.patchMetricForObjective']?.[localVarOperationServerIndex]?.url;
|
|
335
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
316
336
|
},
|
|
317
337
|
}
|
|
318
338
|
};
|
|
319
339
|
|
|
320
340
|
/**
|
|
321
341
|
* MetricApi - factory interface
|
|
322
|
-
* @export
|
|
323
342
|
*/
|
|
324
343
|
export const MetricApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
325
344
|
const localVarFp = MetricApiFp(configuration)
|
|
326
345
|
return {
|
|
346
|
+
/**
|
|
347
|
+
* Create a new metric under this objective.
|
|
348
|
+
* @summary Create a metric for this objective
|
|
349
|
+
* @param {string} objectiveId UUID of the objective
|
|
350
|
+
* @param {MetricCreate} metricCreate
|
|
351
|
+
* @param {*} [options] Override http request option.
|
|
352
|
+
* @throws {RequiredError}
|
|
353
|
+
*/
|
|
354
|
+
createMetricForObjective(objectiveId: string, metricCreate: MetricCreate, options?: RawAxiosRequestConfig): AxiosPromise<MetricResponse> {
|
|
355
|
+
return localVarFp.createMetricForObjective(objectiveId, metricCreate, options).then((request) => request(axios, basePath));
|
|
356
|
+
},
|
|
327
357
|
/**
|
|
328
358
|
* Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
|
|
329
|
-
* @summary Delete a metric
|
|
359
|
+
* @summary Delete a metric for this objective
|
|
330
360
|
* @param {string} metricId UUID of the metric
|
|
361
|
+
* @param {string} objectiveId UUID of the objective
|
|
331
362
|
* @param {*} [options] Override http request option.
|
|
332
363
|
* @throws {RequiredError}
|
|
333
364
|
*/
|
|
334
|
-
|
|
335
|
-
return localVarFp.
|
|
365
|
+
deleteMetricForObjective(metricId: string, objectiveId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
366
|
+
return localVarFp.deleteMetricForObjective(metricId, objectiveId, options).then((request) => request(axios, basePath));
|
|
336
367
|
},
|
|
337
368
|
/**
|
|
338
|
-
* Retrieve a
|
|
339
|
-
* @summary Get a metric
|
|
369
|
+
* Retrieve a specific metric for the objective.
|
|
370
|
+
* @summary Get a metric for this objective
|
|
340
371
|
* @param {string} metricId UUID of the metric
|
|
372
|
+
* @param {string} objectiveId UUID of the objective
|
|
341
373
|
* @param {*} [options] Override http request option.
|
|
342
374
|
* @throws {RequiredError}
|
|
343
375
|
*/
|
|
344
|
-
|
|
345
|
-
return localVarFp.
|
|
376
|
+
getMetricForObjective(metricId: string, objectiveId: string, options?: RawAxiosRequestConfig): AxiosPromise<MetricResponse> {
|
|
377
|
+
return localVarFp.getMetricForObjective(metricId, objectiveId, options).then((request) => request(axios, basePath));
|
|
346
378
|
},
|
|
347
379
|
/**
|
|
348
|
-
* Retrieve a paginated list of all metrics.
|
|
349
|
-
* @summary List metrics
|
|
380
|
+
* Retrieve a paginated list of all metrics for a specific objective.
|
|
381
|
+
* @summary List metrics for this objective
|
|
382
|
+
* @param {string} objectiveId UUID of the objective
|
|
350
383
|
* @param {number} [offset] Number of records to skip
|
|
351
384
|
* @param {number} [limit] Max number of records to return
|
|
352
385
|
* @param {*} [options] Override http request option.
|
|
353
386
|
* @throws {RequiredError}
|
|
354
387
|
*/
|
|
355
|
-
|
|
356
|
-
return localVarFp.
|
|
388
|
+
getMetricsForObjective(objectiveId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<MetricResponse>> {
|
|
389
|
+
return localVarFp.getMetricsForObjective(objectiveId, offset, limit, options).then((request) => request(axios, basePath));
|
|
357
390
|
},
|
|
358
391
|
/**
|
|
359
392
|
* Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
360
|
-
* @summary Partially update a metric
|
|
393
|
+
* @summary Partially update a metric for this objective
|
|
361
394
|
* @param {string} metricId UUID of the metric
|
|
395
|
+
* @param {string} objectiveId UUID of the objective
|
|
362
396
|
* @param {MetricUpdate} metricUpdate
|
|
363
397
|
* @param {*} [options] Override http request option.
|
|
364
398
|
* @throws {RequiredError}
|
|
365
399
|
*/
|
|
366
|
-
|
|
367
|
-
return localVarFp.
|
|
368
|
-
},
|
|
369
|
-
/**
|
|
370
|
-
* Create a new metric linked to an objective. Requires metric_type (monetized/tracked/bounded) and measurement_type (maximization/minimization).
|
|
371
|
-
* @summary Create a metric
|
|
372
|
-
* @param {MetricCreate} metricCreate
|
|
373
|
-
* @param {*} [options] Override http request option.
|
|
374
|
-
* @throws {RequiredError}
|
|
375
|
-
*/
|
|
376
|
-
postMetric(metricCreate: MetricCreate, options?: any): AxiosPromise<MetricResponse> {
|
|
377
|
-
return localVarFp.postMetric(metricCreate, options).then((request) => request(axios, basePath));
|
|
400
|
+
patchMetricForObjective(metricId: string, objectiveId: string, metricUpdate: MetricUpdate, options?: RawAxiosRequestConfig): AxiosPromise<MetricResponse> {
|
|
401
|
+
return localVarFp.patchMetricForObjective(metricId, objectiveId, metricUpdate, options).then((request) => request(axios, basePath));
|
|
378
402
|
},
|
|
379
403
|
};
|
|
380
404
|
};
|
|
381
405
|
|
|
382
406
|
/**
|
|
383
407
|
* MetricApi - object-oriented interface
|
|
384
|
-
* @export
|
|
385
|
-
* @class MetricApi
|
|
386
|
-
* @extends {BaseAPI}
|
|
387
408
|
*/
|
|
388
409
|
export class MetricApi extends BaseAPI {
|
|
410
|
+
/**
|
|
411
|
+
* Create a new metric under this objective.
|
|
412
|
+
* @summary Create a metric for this objective
|
|
413
|
+
* @param {string} objectiveId UUID of the objective
|
|
414
|
+
* @param {MetricCreate} metricCreate
|
|
415
|
+
* @param {*} [options] Override http request option.
|
|
416
|
+
* @throws {RequiredError}
|
|
417
|
+
*/
|
|
418
|
+
public createMetricForObjective(objectiveId: string, metricCreate: MetricCreate, options?: RawAxiosRequestConfig) {
|
|
419
|
+
return MetricApiFp(this.configuration).createMetricForObjective(objectiveId, metricCreate, options).then((request) => request(this.axios, this.basePath));
|
|
420
|
+
}
|
|
421
|
+
|
|
389
422
|
/**
|
|
390
423
|
* Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
|
|
391
|
-
* @summary Delete a metric
|
|
424
|
+
* @summary Delete a metric for this objective
|
|
392
425
|
* @param {string} metricId UUID of the metric
|
|
426
|
+
* @param {string} objectiveId UUID of the objective
|
|
393
427
|
* @param {*} [options] Override http request option.
|
|
394
428
|
* @throws {RequiredError}
|
|
395
|
-
* @memberof MetricApi
|
|
396
429
|
*/
|
|
397
|
-
public
|
|
398
|
-
return MetricApiFp(this.configuration).
|
|
430
|
+
public deleteMetricForObjective(metricId: string, objectiveId: string, options?: RawAxiosRequestConfig) {
|
|
431
|
+
return MetricApiFp(this.configuration).deleteMetricForObjective(metricId, objectiveId, options).then((request) => request(this.axios, this.basePath));
|
|
399
432
|
}
|
|
400
433
|
|
|
401
434
|
/**
|
|
402
|
-
* Retrieve a
|
|
403
|
-
* @summary Get a metric
|
|
435
|
+
* Retrieve a specific metric for the objective.
|
|
436
|
+
* @summary Get a metric for this objective
|
|
404
437
|
* @param {string} metricId UUID of the metric
|
|
438
|
+
* @param {string} objectiveId UUID of the objective
|
|
405
439
|
* @param {*} [options] Override http request option.
|
|
406
440
|
* @throws {RequiredError}
|
|
407
|
-
* @memberof MetricApi
|
|
408
441
|
*/
|
|
409
|
-
public
|
|
410
|
-
return MetricApiFp(this.configuration).
|
|
442
|
+
public getMetricForObjective(metricId: string, objectiveId: string, options?: RawAxiosRequestConfig) {
|
|
443
|
+
return MetricApiFp(this.configuration).getMetricForObjective(metricId, objectiveId, options).then((request) => request(this.axios, this.basePath));
|
|
411
444
|
}
|
|
412
445
|
|
|
413
446
|
/**
|
|
414
|
-
* Retrieve a paginated list of all metrics.
|
|
415
|
-
* @summary List metrics
|
|
447
|
+
* Retrieve a paginated list of all metrics for a specific objective.
|
|
448
|
+
* @summary List metrics for this objective
|
|
449
|
+
* @param {string} objectiveId UUID of the objective
|
|
416
450
|
* @param {number} [offset] Number of records to skip
|
|
417
451
|
* @param {number} [limit] Max number of records to return
|
|
418
452
|
* @param {*} [options] Override http request option.
|
|
419
453
|
* @throws {RequiredError}
|
|
420
|
-
* @memberof MetricApi
|
|
421
454
|
*/
|
|
422
|
-
public
|
|
423
|
-
return MetricApiFp(this.configuration).
|
|
455
|
+
public getMetricsForObjective(objectiveId: string, offset?: number, limit?: number, options?: RawAxiosRequestConfig) {
|
|
456
|
+
return MetricApiFp(this.configuration).getMetricsForObjective(objectiveId, offset, limit, options).then((request) => request(this.axios, this.basePath));
|
|
424
457
|
}
|
|
425
458
|
|
|
426
459
|
/**
|
|
427
460
|
* Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
428
|
-
* @summary Partially update a metric
|
|
461
|
+
* @summary Partially update a metric for this objective
|
|
429
462
|
* @param {string} metricId UUID of the metric
|
|
463
|
+
* @param {string} objectiveId UUID of the objective
|
|
430
464
|
* @param {MetricUpdate} metricUpdate
|
|
431
465
|
* @param {*} [options] Override http request option.
|
|
432
466
|
* @throws {RequiredError}
|
|
433
|
-
* @memberof MetricApi
|
|
434
|
-
*/
|
|
435
|
-
public patchMetric(metricId: string, metricUpdate: MetricUpdate, options?: RawAxiosRequestConfig) {
|
|
436
|
-
return MetricApiFp(this.configuration).patchMetric(metricId, metricUpdate, options).then((request) => request(this.axios, this.basePath));
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* Create a new metric linked to an objective. Requires metric_type (monetized/tracked/bounded) and measurement_type (maximization/minimization).
|
|
441
|
-
* @summary Create a metric
|
|
442
|
-
* @param {MetricCreate} metricCreate
|
|
443
|
-
* @param {*} [options] Override http request option.
|
|
444
|
-
* @throws {RequiredError}
|
|
445
|
-
* @memberof MetricApi
|
|
446
467
|
*/
|
|
447
|
-
public
|
|
448
|
-
return MetricApiFp(this.configuration).
|
|
468
|
+
public patchMetricForObjective(metricId: string, objectiveId: string, metricUpdate: MetricUpdate, options?: RawAxiosRequestConfig) {
|
|
469
|
+
return MetricApiFp(this.configuration).patchMetricForObjective(metricId, objectiveId, metricUpdate, options).then((request) => request(this.axios, this.basePath));
|
|
449
470
|
}
|
|
450
471
|
}
|
|
451
472
|
|