@cosmotech/aip-client 0.1.0-rc1 → 0.2.0-dev
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 +2 -2
- package/api/default-api.ts +9 -9
- package/api/metric-api.ts +60 -140
- package/api/metric-costs-per-year-api.ts +78 -188
- package/api/objective-api.ts +60 -140
- package/api/objective-weight-api.ts +69 -164
- package/api/value-framework-api.ts +60 -140
- package/api.ts +1 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/index.ts +1 -1
- package/models/httpvalidation-error.ts +1 -1
- package/models/measurement-type.ts +1 -1
- package/models/metric-costs-per-year-create.ts +1 -1
- package/models/metric-costs-per-year-response.ts +1 -1
- package/models/metric-costs-per-year-update.ts +1 -1
- package/models/metric-create.ts +12 -12
- package/models/metric-response.ts +11 -11
- package/models/metric-type.ts +1 -1
- package/models/metric-update.ts +1 -13
- package/models/objective-create.ts +1 -1
- package/models/objective-response.ts +1 -1
- package/models/objective-update.ts +1 -1
- package/models/objective-weight-create.ts +1 -1
- package/models/objective-weight-response.ts +1 -1
- package/models/objective-weight-update.ts +1 -1
- package/models/validation-error-loc-inner.ts +1 -1
- package/models/validation-error.ts +13 -1
- package/models/value-framework-create.ts +1 -1
- package/models/value-framework-response.ts +1 -1
- package/models/value-framework-update.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @cosmotech/aip-client@0.
|
|
1
|
+
## @cosmotech/aip-client@0.2.0-dev
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @cosmotech/aip-client@0.
|
|
39
|
+
npm install @cosmotech/aip-client@0.2.0-dev --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/api/default-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.
|
|
7
|
+
* The version of the OpenAPI document: 0.2.0-dev
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -33,7 +33,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
33
33
|
* @param {*} [options] Override http request option.
|
|
34
34
|
* @throws {RequiredError}
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
root: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
37
37
|
const localVarPath = `/about`;
|
|
38
38
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
39
39
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -73,10 +73,10 @@ export const DefaultApiFp = function(configuration?: Configuration) {
|
|
|
73
73
|
* @param {*} [options] Override http request option.
|
|
74
74
|
* @throws {RequiredError}
|
|
75
75
|
*/
|
|
76
|
-
async
|
|
77
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
76
|
+
async root(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
|
|
77
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.root(options);
|
|
78
78
|
const index = configuration?.serverIndex ?? 0;
|
|
79
|
-
const operationBasePath = operationServerMap['DefaultApi.
|
|
79
|
+
const operationBasePath = operationServerMap['DefaultApi.root']?.[index]?.url;
|
|
80
80
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
81
81
|
},
|
|
82
82
|
}
|
|
@@ -95,8 +95,8 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
|
|
|
95
95
|
* @param {*} [options] Override http request option.
|
|
96
96
|
* @throws {RequiredError}
|
|
97
97
|
*/
|
|
98
|
-
|
|
99
|
-
return localVarFp.
|
|
98
|
+
root(options?: any): AxiosPromise<any> {
|
|
99
|
+
return localVarFp.root(options).then((request) => request(axios, basePath));
|
|
100
100
|
},
|
|
101
101
|
};
|
|
102
102
|
};
|
|
@@ -115,8 +115,8 @@ export class DefaultApi extends BaseAPI {
|
|
|
115
115
|
* @throws {RequiredError}
|
|
116
116
|
* @memberof DefaultApi
|
|
117
117
|
*/
|
|
118
|
-
public
|
|
119
|
-
return DefaultApiFp(this.configuration).
|
|
118
|
+
public root(options?: RawAxiosRequestConfig) {
|
|
119
|
+
return DefaultApiFp(this.configuration).root(options).then((request) => request(this.axios, this.basePath));
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
|
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.
|
|
7
|
+
* The version of the OpenAPI document: 0.2.0-dev
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -40,9 +40,9 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
40
40
|
* @param {*} [options] Override http request option.
|
|
41
41
|
* @throws {RequiredError}
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
deleteMetric: async (metricId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44
44
|
// verify required parameter 'metricId' is not null or undefined
|
|
45
|
-
assertParamExists('
|
|
45
|
+
assertParamExists('deleteMetric', 'metricId', metricId)
|
|
46
46
|
const localVarPath = `/metric/{metric_id}`
|
|
47
47
|
.replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)));
|
|
48
48
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -78,9 +78,9 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
78
78
|
* @param {*} [options] Override http request option.
|
|
79
79
|
* @throws {RequiredError}
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
getMetricById: async (metricId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
82
82
|
// verify required parameter 'metricId' is not null or undefined
|
|
83
|
-
assertParamExists('
|
|
83
|
+
assertParamExists('getMetricById', 'metricId', metricId)
|
|
84
84
|
const localVarPath = `/metric/{metric_id}`
|
|
85
85
|
.replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)));
|
|
86
86
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -117,7 +117,7 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
117
117
|
* @param {*} [options] Override http request option.
|
|
118
118
|
* @throws {RequiredError}
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
getMetrics: async (offset?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
121
121
|
const localVarPath = `/metric/`;
|
|
122
122
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
123
123
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -161,11 +161,11 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
161
161
|
* @param {*} [options] Override http request option.
|
|
162
162
|
* @throws {RequiredError}
|
|
163
163
|
*/
|
|
164
|
-
|
|
164
|
+
patchMetric: async (metricId: string, metricUpdate: MetricUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
165
165
|
// verify required parameter 'metricId' is not null or undefined
|
|
166
|
-
assertParamExists('
|
|
166
|
+
assertParamExists('patchMetric', 'metricId', metricId)
|
|
167
167
|
// verify required parameter 'metricUpdate' is not null or undefined
|
|
168
|
-
assertParamExists('
|
|
168
|
+
assertParamExists('patchMetric', 'metricUpdate', metricUpdate)
|
|
169
169
|
const localVarPath = `/metric/{metric_id}`
|
|
170
170
|
.replace(`{${"metric_id"}}`, encodeURIComponent(String(metricId)));
|
|
171
171
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -204,9 +204,9 @@ export const MetricApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
204
204
|
* @param {*} [options] Override http request option.
|
|
205
205
|
* @throws {RequiredError}
|
|
206
206
|
*/
|
|
207
|
-
|
|
207
|
+
postMetric: async (metricCreate: MetricCreate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
208
208
|
// verify required parameter 'metricCreate' is not null or undefined
|
|
209
|
-
assertParamExists('
|
|
209
|
+
assertParamExists('postMetric', 'metricCreate', metricCreate)
|
|
210
210
|
const localVarPath = `/metric/`;
|
|
211
211
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
212
212
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -254,10 +254,10 @@ export const MetricApiFp = function(configuration?: Configuration) {
|
|
|
254
254
|
* @param {*} [options] Override http request option.
|
|
255
255
|
* @throws {RequiredError}
|
|
256
256
|
*/
|
|
257
|
-
async
|
|
258
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
257
|
+
async deleteMetric(metricId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
258
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteMetric(metricId, options);
|
|
259
259
|
const index = configuration?.serverIndex ?? 0;
|
|
260
|
-
const operationBasePath = operationServerMap['MetricApi.
|
|
260
|
+
const operationBasePath = operationServerMap['MetricApi.deleteMetric']?.[index]?.url;
|
|
261
261
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
262
262
|
},
|
|
263
263
|
/**
|
|
@@ -267,10 +267,10 @@ export const MetricApiFp = function(configuration?: Configuration) {
|
|
|
267
267
|
* @param {*} [options] Override http request option.
|
|
268
268
|
* @throws {RequiredError}
|
|
269
269
|
*/
|
|
270
|
-
async
|
|
271
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
270
|
+
async getMetricById(metricId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MetricResponse>> {
|
|
271
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMetricById(metricId, options);
|
|
272
272
|
const index = configuration?.serverIndex ?? 0;
|
|
273
|
-
const operationBasePath = operationServerMap['MetricApi.
|
|
273
|
+
const operationBasePath = operationServerMap['MetricApi.getMetricById']?.[index]?.url;
|
|
274
274
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
275
275
|
},
|
|
276
276
|
/**
|
|
@@ -281,10 +281,10 @@ export const MetricApiFp = function(configuration?: Configuration) {
|
|
|
281
281
|
* @param {*} [options] Override http request option.
|
|
282
282
|
* @throws {RequiredError}
|
|
283
283
|
*/
|
|
284
|
-
async
|
|
285
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
284
|
+
async getMetrics(offset?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<MetricResponse>>> {
|
|
285
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMetrics(offset, limit, options);
|
|
286
286
|
const index = configuration?.serverIndex ?? 0;
|
|
287
|
-
const operationBasePath = operationServerMap['MetricApi.
|
|
287
|
+
const operationBasePath = operationServerMap['MetricApi.getMetrics']?.[index]?.url;
|
|
288
288
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
289
289
|
},
|
|
290
290
|
/**
|
|
@@ -295,10 +295,10 @@ export const MetricApiFp = function(configuration?: Configuration) {
|
|
|
295
295
|
* @param {*} [options] Override http request option.
|
|
296
296
|
* @throws {RequiredError}
|
|
297
297
|
*/
|
|
298
|
-
async
|
|
299
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
298
|
+
async patchMetric(metricId: string, metricUpdate: MetricUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MetricResponse>> {
|
|
299
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.patchMetric(metricId, metricUpdate, options);
|
|
300
300
|
const index = configuration?.serverIndex ?? 0;
|
|
301
|
-
const operationBasePath = operationServerMap['MetricApi.
|
|
301
|
+
const operationBasePath = operationServerMap['MetricApi.patchMetric']?.[index]?.url;
|
|
302
302
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
303
303
|
},
|
|
304
304
|
/**
|
|
@@ -308,10 +308,10 @@ export const MetricApiFp = function(configuration?: Configuration) {
|
|
|
308
308
|
* @param {*} [options] Override http request option.
|
|
309
309
|
* @throws {RequiredError}
|
|
310
310
|
*/
|
|
311
|
-
async
|
|
312
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
311
|
+
async postMetric(metricCreate: MetricCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MetricResponse>> {
|
|
312
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.postMetric(metricCreate, options);
|
|
313
313
|
const index = configuration?.serverIndex ?? 0;
|
|
314
|
-
const operationBasePath = operationServerMap['MetricApi.
|
|
314
|
+
const operationBasePath = operationServerMap['MetricApi.postMetric']?.[index]?.url;
|
|
315
315
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
|
316
316
|
},
|
|
317
317
|
}
|
|
@@ -327,140 +327,58 @@ export const MetricApiFactory = function (configuration?: Configuration, basePat
|
|
|
327
327
|
/**
|
|
328
328
|
* Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
|
|
329
329
|
* @summary Delete a metric
|
|
330
|
-
* @param {
|
|
330
|
+
* @param {string} metricId UUID of the metric
|
|
331
331
|
* @param {*} [options] Override http request option.
|
|
332
332
|
* @throws {RequiredError}
|
|
333
333
|
*/
|
|
334
|
-
|
|
335
|
-
return localVarFp.
|
|
334
|
+
deleteMetric(metricId: string, options?: any): AxiosPromise<void> {
|
|
335
|
+
return localVarFp.deleteMetric(metricId, options).then((request) => request(axios, basePath));
|
|
336
336
|
},
|
|
337
337
|
/**
|
|
338
338
|
* Retrieve a single metric by its ID.
|
|
339
339
|
* @summary Get a metric by ID
|
|
340
|
-
* @param {
|
|
340
|
+
* @param {string} metricId UUID of the metric
|
|
341
341
|
* @param {*} [options] Override http request option.
|
|
342
342
|
* @throws {RequiredError}
|
|
343
343
|
*/
|
|
344
|
-
|
|
345
|
-
return localVarFp.
|
|
344
|
+
getMetricById(metricId: string, options?: any): AxiosPromise<MetricResponse> {
|
|
345
|
+
return localVarFp.getMetricById(metricId, options).then((request) => request(axios, basePath));
|
|
346
346
|
},
|
|
347
347
|
/**
|
|
348
348
|
* Retrieve a paginated list of all metrics.
|
|
349
349
|
* @summary List metrics
|
|
350
|
-
* @param {
|
|
350
|
+
* @param {number} [offset] Number of records to skip
|
|
351
|
+
* @param {number} [limit] Max number of records to return
|
|
351
352
|
* @param {*} [options] Override http request option.
|
|
352
353
|
* @throws {RequiredError}
|
|
353
354
|
*/
|
|
354
|
-
|
|
355
|
-
return localVarFp.
|
|
355
|
+
getMetrics(offset?: number, limit?: number, options?: any): AxiosPromise<Array<MetricResponse>> {
|
|
356
|
+
return localVarFp.getMetrics(offset, limit, options).then((request) => request(axios, basePath));
|
|
356
357
|
},
|
|
357
358
|
/**
|
|
358
359
|
* Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
359
360
|
* @summary Partially update a metric
|
|
360
|
-
* @param {
|
|
361
|
+
* @param {string} metricId UUID of the metric
|
|
362
|
+
* @param {MetricUpdate} metricUpdate
|
|
361
363
|
* @param {*} [options] Override http request option.
|
|
362
364
|
* @throws {RequiredError}
|
|
363
365
|
*/
|
|
364
|
-
|
|
365
|
-
return localVarFp.
|
|
366
|
+
patchMetric(metricId: string, metricUpdate: MetricUpdate, options?: any): AxiosPromise<MetricResponse> {
|
|
367
|
+
return localVarFp.patchMetric(metricId, metricUpdate, options).then((request) => request(axios, basePath));
|
|
366
368
|
},
|
|
367
369
|
/**
|
|
368
370
|
* Create a new metric linked to an objective. Requires metric_type (monetized/tracked/bounded) and measurement_type (maximization/minimization).
|
|
369
371
|
* @summary Create a metric
|
|
370
|
-
* @param {
|
|
372
|
+
* @param {MetricCreate} metricCreate
|
|
371
373
|
* @param {*} [options] Override http request option.
|
|
372
374
|
* @throws {RequiredError}
|
|
373
375
|
*/
|
|
374
|
-
|
|
375
|
-
return localVarFp.
|
|
376
|
+
postMetric(metricCreate: MetricCreate, options?: any): AxiosPromise<MetricResponse> {
|
|
377
|
+
return localVarFp.postMetric(metricCreate, options).then((request) => request(axios, basePath));
|
|
376
378
|
},
|
|
377
379
|
};
|
|
378
380
|
};
|
|
379
381
|
|
|
380
|
-
/**
|
|
381
|
-
* Request parameters for deleteMetricMetricMetricIdDelete operation in MetricApi.
|
|
382
|
-
* @export
|
|
383
|
-
* @interface MetricApiDeleteMetricMetricMetricIdDeleteRequest
|
|
384
|
-
*/
|
|
385
|
-
export interface MetricApiDeleteMetricMetricMetricIdDeleteRequest {
|
|
386
|
-
/**
|
|
387
|
-
* UUID of the metric
|
|
388
|
-
* @type {string}
|
|
389
|
-
* @memberof MetricApiDeleteMetricMetricMetricIdDelete
|
|
390
|
-
*/
|
|
391
|
-
readonly metricId: string
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* Request parameters for getMetricByIdMetricMetricIdGet operation in MetricApi.
|
|
396
|
-
* @export
|
|
397
|
-
* @interface MetricApiGetMetricByIdMetricMetricIdGetRequest
|
|
398
|
-
*/
|
|
399
|
-
export interface MetricApiGetMetricByIdMetricMetricIdGetRequest {
|
|
400
|
-
/**
|
|
401
|
-
* UUID of the metric
|
|
402
|
-
* @type {string}
|
|
403
|
-
* @memberof MetricApiGetMetricByIdMetricMetricIdGet
|
|
404
|
-
*/
|
|
405
|
-
readonly metricId: string
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* Request parameters for getMetricsMetricGet operation in MetricApi.
|
|
410
|
-
* @export
|
|
411
|
-
* @interface MetricApiGetMetricsMetricGetRequest
|
|
412
|
-
*/
|
|
413
|
-
export interface MetricApiGetMetricsMetricGetRequest {
|
|
414
|
-
/**
|
|
415
|
-
* Number of records to skip
|
|
416
|
-
* @type {number}
|
|
417
|
-
* @memberof MetricApiGetMetricsMetricGet
|
|
418
|
-
*/
|
|
419
|
-
readonly offset?: number
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Max number of records to return
|
|
423
|
-
* @type {number}
|
|
424
|
-
* @memberof MetricApiGetMetricsMetricGet
|
|
425
|
-
*/
|
|
426
|
-
readonly limit?: number
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Request parameters for patchMetricMetricMetricIdPatch operation in MetricApi.
|
|
431
|
-
* @export
|
|
432
|
-
* @interface MetricApiPatchMetricMetricMetricIdPatchRequest
|
|
433
|
-
*/
|
|
434
|
-
export interface MetricApiPatchMetricMetricMetricIdPatchRequest {
|
|
435
|
-
/**
|
|
436
|
-
* UUID of the metric
|
|
437
|
-
* @type {string}
|
|
438
|
-
* @memberof MetricApiPatchMetricMetricMetricIdPatch
|
|
439
|
-
*/
|
|
440
|
-
readonly metricId: string
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
*
|
|
444
|
-
* @type {MetricUpdate}
|
|
445
|
-
* @memberof MetricApiPatchMetricMetricMetricIdPatch
|
|
446
|
-
*/
|
|
447
|
-
readonly metricUpdate: MetricUpdate
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* Request parameters for postMetricMetricPost operation in MetricApi.
|
|
452
|
-
* @export
|
|
453
|
-
* @interface MetricApiPostMetricMetricPostRequest
|
|
454
|
-
*/
|
|
455
|
-
export interface MetricApiPostMetricMetricPostRequest {
|
|
456
|
-
/**
|
|
457
|
-
*
|
|
458
|
-
* @type {MetricCreate}
|
|
459
|
-
* @memberof MetricApiPostMetricMetricPost
|
|
460
|
-
*/
|
|
461
|
-
readonly metricCreate: MetricCreate
|
|
462
|
-
}
|
|
463
|
-
|
|
464
382
|
/**
|
|
465
383
|
* MetricApi - object-oriented interface
|
|
466
384
|
* @export
|
|
@@ -471,61 +389,63 @@ export class MetricApi extends BaseAPI {
|
|
|
471
389
|
/**
|
|
472
390
|
* Delete an existing metric by its ID. Associated metric costs per year are also deleted via cascade.
|
|
473
391
|
* @summary Delete a metric
|
|
474
|
-
* @param {
|
|
392
|
+
* @param {string} metricId UUID of the metric
|
|
475
393
|
* @param {*} [options] Override http request option.
|
|
476
394
|
* @throws {RequiredError}
|
|
477
395
|
* @memberof MetricApi
|
|
478
396
|
*/
|
|
479
|
-
public
|
|
480
|
-
return MetricApiFp(this.configuration).
|
|
397
|
+
public deleteMetric(metricId: string, options?: RawAxiosRequestConfig) {
|
|
398
|
+
return MetricApiFp(this.configuration).deleteMetric(metricId, options).then((request) => request(this.axios, this.basePath));
|
|
481
399
|
}
|
|
482
400
|
|
|
483
401
|
/**
|
|
484
402
|
* Retrieve a single metric by its ID.
|
|
485
403
|
* @summary Get a metric by ID
|
|
486
|
-
* @param {
|
|
404
|
+
* @param {string} metricId UUID of the metric
|
|
487
405
|
* @param {*} [options] Override http request option.
|
|
488
406
|
* @throws {RequiredError}
|
|
489
407
|
* @memberof MetricApi
|
|
490
408
|
*/
|
|
491
|
-
public
|
|
492
|
-
return MetricApiFp(this.configuration).
|
|
409
|
+
public getMetricById(metricId: string, options?: RawAxiosRequestConfig) {
|
|
410
|
+
return MetricApiFp(this.configuration).getMetricById(metricId, options).then((request) => request(this.axios, this.basePath));
|
|
493
411
|
}
|
|
494
412
|
|
|
495
413
|
/**
|
|
496
414
|
* Retrieve a paginated list of all metrics.
|
|
497
415
|
* @summary List metrics
|
|
498
|
-
* @param {
|
|
416
|
+
* @param {number} [offset] Number of records to skip
|
|
417
|
+
* @param {number} [limit] Max number of records to return
|
|
499
418
|
* @param {*} [options] Override http request option.
|
|
500
419
|
* @throws {RequiredError}
|
|
501
420
|
* @memberof MetricApi
|
|
502
421
|
*/
|
|
503
|
-
public
|
|
504
|
-
return MetricApiFp(this.configuration).
|
|
422
|
+
public getMetrics(offset?: number, limit?: number, options?: RawAxiosRequestConfig) {
|
|
423
|
+
return MetricApiFp(this.configuration).getMetrics(offset, limit, options).then((request) => request(this.axios, this.basePath));
|
|
505
424
|
}
|
|
506
425
|
|
|
507
426
|
/**
|
|
508
427
|
* Update one or more fields of an existing metric. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
509
428
|
* @summary Partially update a metric
|
|
510
|
-
* @param {
|
|
429
|
+
* @param {string} metricId UUID of the metric
|
|
430
|
+
* @param {MetricUpdate} metricUpdate
|
|
511
431
|
* @param {*} [options] Override http request option.
|
|
512
432
|
* @throws {RequiredError}
|
|
513
433
|
* @memberof MetricApi
|
|
514
434
|
*/
|
|
515
|
-
public
|
|
516
|
-
return MetricApiFp(this.configuration).
|
|
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));
|
|
517
437
|
}
|
|
518
438
|
|
|
519
439
|
/**
|
|
520
440
|
* Create a new metric linked to an objective. Requires metric_type (monetized/tracked/bounded) and measurement_type (maximization/minimization).
|
|
521
441
|
* @summary Create a metric
|
|
522
|
-
* @param {
|
|
442
|
+
* @param {MetricCreate} metricCreate
|
|
523
443
|
* @param {*} [options] Override http request option.
|
|
524
444
|
* @throws {RequiredError}
|
|
525
445
|
* @memberof MetricApi
|
|
526
446
|
*/
|
|
527
|
-
public
|
|
528
|
-
return MetricApiFp(this.configuration).
|
|
447
|
+
public postMetric(metricCreate: MetricCreate, options?: RawAxiosRequestConfig) {
|
|
448
|
+
return MetricApiFp(this.configuration).postMetric(metricCreate, options).then((request) => request(this.axios, this.basePath));
|
|
529
449
|
}
|
|
530
450
|
}
|
|
531
451
|
|