@cosmotech/aip-client 0.2.0-dev6 → 0.2.0-dev7
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 +7 -2
- package/api/investment-api.ts +165 -4
- package/api/option-api.ts +88 -4
- package/dist/api/investment-api.d.ts +74 -4
- package/dist/api/investment-api.js +153 -4
- package/dist/api/option-api.d.ts +41 -4
- package/dist/api/option-api.js +82 -4
- package/dist/esm/api/investment-api.d.ts +74 -4
- package/dist/esm/api/investment-api.js +153 -4
- package/dist/esm/api/option-api.d.ts +41 -4
- package/dist/esm/api/option-api.js +82 -4
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/investment-overview-response.d.ts +29 -0
- package/dist/esm/models/investment-overview-response.js +14 -0
- package/dist/esm/models/option-overview-response.d.ts +37 -0
- package/dist/esm/models/option-overview-response.js +14 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/investment-overview-response.d.ts +29 -0
- package/dist/models/investment-overview-response.js +15 -0
- package/dist/models/option-overview-response.d.ts +37 -0
- package/dist/models/option-overview-response.js +15 -0
- package/docs/InvestmentApi.md +111 -2
- package/docs/InvestmentOverviewResponse.md +33 -0
- package/docs/OptionApi.md +58 -2
- package/docs/OptionOverviewResponse.md +31 -0
- package/models/index.ts +2 -0
- package/models/investment-overview-response.ts +35 -0
- package/models/option-overview-response.ts +43 -0
- package/package.json +1 -1
|
@@ -311,7 +311,7 @@ export const OptionApiAxiosParamCreator = function (configuration) {
|
|
|
311
311
|
};
|
|
312
312
|
}),
|
|
313
313
|
/**
|
|
314
|
-
* Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
|
|
314
|
+
* Return a KPI object containing all the data necessary to display graphs about the option inside a value framework. Data is sourced from the v_option_yearly_kpis database view.
|
|
315
315
|
* @summary Get the kpis for a given option inside a value framework
|
|
316
316
|
* @param {string} investmentId UUID of the investment
|
|
317
317
|
* @param {string} optionId UUID of the option
|
|
@@ -392,6 +392,45 @@ export const OptionApiAxiosParamCreator = function (configuration) {
|
|
|
392
392
|
options: localVarRequestOptions,
|
|
393
393
|
};
|
|
394
394
|
}),
|
|
395
|
+
/**
|
|
396
|
+
* Return a flat overview of all options for a specific investment. Each row includes the option\'s start date, cost, duration and NPV computed by the v_option_npv database view for the given value framework.
|
|
397
|
+
* @summary Option overview table for this investment
|
|
398
|
+
* @param {string} investmentId UUID of the investment
|
|
399
|
+
* @param {string} valueFrameworkId UUID of the value framework
|
|
400
|
+
* @param {*} [options] Override http request option.
|
|
401
|
+
* @throws {RequiredError}
|
|
402
|
+
*/
|
|
403
|
+
getOptionsOverview: (investmentId_1, valueFrameworkId_1, ...args_1) => __awaiter(this, [investmentId_1, valueFrameworkId_1, ...args_1], void 0, function* (investmentId, valueFrameworkId, options = {}) {
|
|
404
|
+
// verify required parameter 'investmentId' is not null or undefined
|
|
405
|
+
assertParamExists('getOptionsOverview', 'investmentId', investmentId);
|
|
406
|
+
// verify required parameter 'valueFrameworkId' is not null or undefined
|
|
407
|
+
assertParamExists('getOptionsOverview', 'valueFrameworkId', valueFrameworkId);
|
|
408
|
+
const localVarPath = `/investment/{investment_id}/option/overview`
|
|
409
|
+
.replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
|
|
410
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
411
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
412
|
+
let baseOptions;
|
|
413
|
+
if (configuration) {
|
|
414
|
+
baseOptions = configuration.baseOptions;
|
|
415
|
+
}
|
|
416
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
417
|
+
const localVarHeaderParameter = {};
|
|
418
|
+
const localVarQueryParameter = {};
|
|
419
|
+
// authentication OAuth2AuthorizationCodeBearer required
|
|
420
|
+
// oauth required
|
|
421
|
+
yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
|
|
422
|
+
if (valueFrameworkId !== undefined) {
|
|
423
|
+
localVarQueryParameter['value_framework_id'] = valueFrameworkId;
|
|
424
|
+
}
|
|
425
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
426
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
427
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
428
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
429
|
+
return {
|
|
430
|
+
url: toPathString(localVarUrlObj),
|
|
431
|
+
options: localVarRequestOptions,
|
|
432
|
+
};
|
|
433
|
+
}),
|
|
395
434
|
/**
|
|
396
435
|
* Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
397
436
|
* @summary Partially update an impact for this option
|
|
@@ -613,7 +652,7 @@ export const OptionApiFp = function (configuration) {
|
|
|
613
652
|
});
|
|
614
653
|
},
|
|
615
654
|
/**
|
|
616
|
-
* Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
|
|
655
|
+
* Return a KPI object containing all the data necessary to display graphs about the option inside a value framework. Data is sourced from the v_option_yearly_kpis database view.
|
|
617
656
|
* @summary Get the kpis for a given option inside a value framework
|
|
618
657
|
* @param {string} investmentId UUID of the investment
|
|
619
658
|
* @param {string} optionId UUID of the option
|
|
@@ -648,6 +687,23 @@ export const OptionApiFp = function (configuration) {
|
|
|
648
687
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
649
688
|
});
|
|
650
689
|
},
|
|
690
|
+
/**
|
|
691
|
+
* Return a flat overview of all options for a specific investment. Each row includes the option\'s start date, cost, duration and NPV computed by the v_option_npv database view for the given value framework.
|
|
692
|
+
* @summary Option overview table for this investment
|
|
693
|
+
* @param {string} investmentId UUID of the investment
|
|
694
|
+
* @param {string} valueFrameworkId UUID of the value framework
|
|
695
|
+
* @param {*} [options] Override http request option.
|
|
696
|
+
* @throws {RequiredError}
|
|
697
|
+
*/
|
|
698
|
+
getOptionsOverview(investmentId, valueFrameworkId, options) {
|
|
699
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
700
|
+
var _a, _b, _c;
|
|
701
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOptionsOverview(investmentId, valueFrameworkId, options);
|
|
702
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
703
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.getOptionsOverview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
704
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
705
|
+
});
|
|
706
|
+
},
|
|
651
707
|
/**
|
|
652
708
|
* Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
653
709
|
* @summary Partially update an impact for this option
|
|
@@ -776,7 +832,7 @@ export const OptionApiFactory = function (configuration, basePath, axios) {
|
|
|
776
832
|
return localVarFp.getOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
|
|
777
833
|
},
|
|
778
834
|
/**
|
|
779
|
-
* Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
|
|
835
|
+
* Return a KPI object containing all the data necessary to display graphs about the option inside a value framework. Data is sourced from the v_option_yearly_kpis database view.
|
|
780
836
|
* @summary Get the kpis for a given option inside a value framework
|
|
781
837
|
* @param {string} investmentId UUID of the investment
|
|
782
838
|
* @param {string} optionId UUID of the option
|
|
@@ -799,6 +855,17 @@ export const OptionApiFactory = function (configuration, basePath, axios) {
|
|
|
799
855
|
getOptionsForInvestment(investmentId, offset, limit, options) {
|
|
800
856
|
return localVarFp.getOptionsForInvestment(investmentId, offset, limit, options).then((request) => request(axios, basePath));
|
|
801
857
|
},
|
|
858
|
+
/**
|
|
859
|
+
* Return a flat overview of all options for a specific investment. Each row includes the option\'s start date, cost, duration and NPV computed by the v_option_npv database view for the given value framework.
|
|
860
|
+
* @summary Option overview table for this investment
|
|
861
|
+
* @param {string} investmentId UUID of the investment
|
|
862
|
+
* @param {string} valueFrameworkId UUID of the value framework
|
|
863
|
+
* @param {*} [options] Override http request option.
|
|
864
|
+
* @throws {RequiredError}
|
|
865
|
+
*/
|
|
866
|
+
getOptionsOverview(investmentId, valueFrameworkId, options) {
|
|
867
|
+
return localVarFp.getOptionsOverview(investmentId, valueFrameworkId, options).then((request) => request(axios, basePath));
|
|
868
|
+
},
|
|
802
869
|
/**
|
|
803
870
|
* Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
804
871
|
* @summary Partially update an impact for this option
|
|
@@ -913,7 +980,7 @@ export class OptionApi extends BaseAPI {
|
|
|
913
980
|
return OptionApiFp(this.configuration).getOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
|
|
914
981
|
}
|
|
915
982
|
/**
|
|
916
|
-
* Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
|
|
983
|
+
* Return a KPI object containing all the data necessary to display graphs about the option inside a value framework. Data is sourced from the v_option_yearly_kpis database view.
|
|
917
984
|
* @summary Get the kpis for a given option inside a value framework
|
|
918
985
|
* @param {string} investmentId UUID of the investment
|
|
919
986
|
* @param {string} optionId UUID of the option
|
|
@@ -936,6 +1003,17 @@ export class OptionApi extends BaseAPI {
|
|
|
936
1003
|
getOptionsForInvestment(investmentId, offset, limit, options) {
|
|
937
1004
|
return OptionApiFp(this.configuration).getOptionsForInvestment(investmentId, offset, limit, options).then((request) => request(this.axios, this.basePath));
|
|
938
1005
|
}
|
|
1006
|
+
/**
|
|
1007
|
+
* Return a flat overview of all options for a specific investment. Each row includes the option\'s start date, cost, duration and NPV computed by the v_option_npv database view for the given value framework.
|
|
1008
|
+
* @summary Option overview table for this investment
|
|
1009
|
+
* @param {string} investmentId UUID of the investment
|
|
1010
|
+
* @param {string} valueFrameworkId UUID of the value framework
|
|
1011
|
+
* @param {*} [options] Override http request option.
|
|
1012
|
+
* @throws {RequiredError}
|
|
1013
|
+
*/
|
|
1014
|
+
getOptionsOverview(investmentId, valueFrameworkId, options) {
|
|
1015
|
+
return OptionApiFp(this.configuration).getOptionsOverview(investmentId, valueFrameworkId, options).then((request) => request(this.axios, this.basePath));
|
|
1016
|
+
}
|
|
939
1017
|
/**
|
|
940
1018
|
* Update one or more fields of an existing impact. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
941
1019
|
* @summary Partially update an impact for this option
|
|
@@ -4,6 +4,7 @@ export * from './impact-apiresponse';
|
|
|
4
4
|
export * from './impact-create';
|
|
5
5
|
export * from './impact-update';
|
|
6
6
|
export * from './investment-create';
|
|
7
|
+
export * from './investment-overview-response';
|
|
7
8
|
export * from './investment-response';
|
|
8
9
|
export * from './investment-update';
|
|
9
10
|
export * from './location-inner';
|
|
@@ -24,6 +25,7 @@ export * from './objective-weight-update';
|
|
|
24
25
|
export * from './option-chart-kpi';
|
|
25
26
|
export * from './option-chart-kpis-yearly';
|
|
26
27
|
export * from './option-create';
|
|
28
|
+
export * from './option-overview-response';
|
|
27
29
|
export * from './option-response';
|
|
28
30
|
export * from './option-update';
|
|
29
31
|
export * from './preferred-option-request';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from './impact-apiresponse';
|
|
|
4
4
|
export * from './impact-create';
|
|
5
5
|
export * from './impact-update';
|
|
6
6
|
export * from './investment-create';
|
|
7
|
+
export * from './investment-overview-response';
|
|
7
8
|
export * from './investment-response';
|
|
8
9
|
export * from './investment-update';
|
|
9
10
|
export * from './location-inner';
|
|
@@ -24,6 +25,7 @@ export * from './objective-weight-update';
|
|
|
24
25
|
export * from './option-chart-kpi';
|
|
25
26
|
export * from './option-chart-kpis-yearly';
|
|
26
27
|
export * from './option-create';
|
|
28
|
+
export * from './option-overview-response';
|
|
27
29
|
export * from './option-response';
|
|
28
30
|
export * from './option-update';
|
|
29
31
|
export * from './preferred-option-request';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset Investment Planning
|
|
3
|
+
* API for Asset Investment Planning
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.2.0-dev6
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Schema for the investment overview table — one row per investment.
|
|
14
|
+
*/
|
|
15
|
+
export interface InvestmentOverviewResponse {
|
|
16
|
+
/**
|
|
17
|
+
* ID of the investment
|
|
18
|
+
*/
|
|
19
|
+
'investment_id': string;
|
|
20
|
+
/**
|
|
21
|
+
* Name of the investment
|
|
22
|
+
*/
|
|
23
|
+
'investment_name': string;
|
|
24
|
+
'preferred_option_cost'?: number | null;
|
|
25
|
+
'preferred_option_duration'?: number | null;
|
|
26
|
+
'preferred_option_name'?: string | null;
|
|
27
|
+
'preferred_option_npv'?: number | null;
|
|
28
|
+
'preferred_option_start_date'?: string | null;
|
|
29
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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-dev6
|
|
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
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset Investment Planning
|
|
3
|
+
* API for Asset Investment Planning
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.2.0-dev6
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Schema for the option overview table — one row per option within an investment.
|
|
14
|
+
*/
|
|
15
|
+
export interface OptionOverviewResponse {
|
|
16
|
+
/**
|
|
17
|
+
* Cost of the option
|
|
18
|
+
*/
|
|
19
|
+
'cost': number;
|
|
20
|
+
/**
|
|
21
|
+
* Duration of the option in weeks
|
|
22
|
+
*/
|
|
23
|
+
'duration': number;
|
|
24
|
+
'npv'?: number | null;
|
|
25
|
+
/**
|
|
26
|
+
* ID of the option
|
|
27
|
+
*/
|
|
28
|
+
'option_id': string;
|
|
29
|
+
/**
|
|
30
|
+
* Name of the option
|
|
31
|
+
*/
|
|
32
|
+
'option_name': string;
|
|
33
|
+
/**
|
|
34
|
+
* Expected start date of the option (ISO 8601)
|
|
35
|
+
*/
|
|
36
|
+
'start_date': string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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-dev6
|
|
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
|
+
export {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './impact-apiresponse';
|
|
|
4
4
|
export * from './impact-create';
|
|
5
5
|
export * from './impact-update';
|
|
6
6
|
export * from './investment-create';
|
|
7
|
+
export * from './investment-overview-response';
|
|
7
8
|
export * from './investment-response';
|
|
8
9
|
export * from './investment-update';
|
|
9
10
|
export * from './location-inner';
|
|
@@ -24,6 +25,7 @@ export * from './objective-weight-update';
|
|
|
24
25
|
export * from './option-chart-kpi';
|
|
25
26
|
export * from './option-chart-kpis-yearly';
|
|
26
27
|
export * from './option-create';
|
|
28
|
+
export * from './option-overview-response';
|
|
27
29
|
export * from './option-response';
|
|
28
30
|
export * from './option-update';
|
|
29
31
|
export * from './preferred-option-request';
|
package/dist/models/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./impact-apiresponse"), exports);
|
|
|
20
20
|
__exportStar(require("./impact-create"), exports);
|
|
21
21
|
__exportStar(require("./impact-update"), exports);
|
|
22
22
|
__exportStar(require("./investment-create"), exports);
|
|
23
|
+
__exportStar(require("./investment-overview-response"), exports);
|
|
23
24
|
__exportStar(require("./investment-response"), exports);
|
|
24
25
|
__exportStar(require("./investment-update"), exports);
|
|
25
26
|
__exportStar(require("./location-inner"), exports);
|
|
@@ -40,6 +41,7 @@ __exportStar(require("./objective-weight-update"), exports);
|
|
|
40
41
|
__exportStar(require("./option-chart-kpi"), exports);
|
|
41
42
|
__exportStar(require("./option-chart-kpis-yearly"), exports);
|
|
42
43
|
__exportStar(require("./option-create"), exports);
|
|
44
|
+
__exportStar(require("./option-overview-response"), exports);
|
|
43
45
|
__exportStar(require("./option-response"), exports);
|
|
44
46
|
__exportStar(require("./option-update"), exports);
|
|
45
47
|
__exportStar(require("./preferred-option-request"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset Investment Planning
|
|
3
|
+
* API for Asset Investment Planning
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.2.0-dev6
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Schema for the investment overview table — one row per investment.
|
|
14
|
+
*/
|
|
15
|
+
export interface InvestmentOverviewResponse {
|
|
16
|
+
/**
|
|
17
|
+
* ID of the investment
|
|
18
|
+
*/
|
|
19
|
+
'investment_id': string;
|
|
20
|
+
/**
|
|
21
|
+
* Name of the investment
|
|
22
|
+
*/
|
|
23
|
+
'investment_name': string;
|
|
24
|
+
'preferred_option_cost'?: number | null;
|
|
25
|
+
'preferred_option_duration'?: number | null;
|
|
26
|
+
'preferred_option_name'?: string | null;
|
|
27
|
+
'preferred_option_npv'?: number | null;
|
|
28
|
+
'preferred_option_start_date'?: string | null;
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Asset Investment Planning
|
|
6
|
+
* API for Asset Investment Planning
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.2.0-dev6
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset Investment Planning
|
|
3
|
+
* API for Asset Investment Planning
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.2.0-dev6
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Schema for the option overview table — one row per option within an investment.
|
|
14
|
+
*/
|
|
15
|
+
export interface OptionOverviewResponse {
|
|
16
|
+
/**
|
|
17
|
+
* Cost of the option
|
|
18
|
+
*/
|
|
19
|
+
'cost': number;
|
|
20
|
+
/**
|
|
21
|
+
* Duration of the option in weeks
|
|
22
|
+
*/
|
|
23
|
+
'duration': number;
|
|
24
|
+
'npv'?: number | null;
|
|
25
|
+
/**
|
|
26
|
+
* ID of the option
|
|
27
|
+
*/
|
|
28
|
+
'option_id': string;
|
|
29
|
+
/**
|
|
30
|
+
* Name of the option
|
|
31
|
+
*/
|
|
32
|
+
'option_name': string;
|
|
33
|
+
/**
|
|
34
|
+
* Expected start date of the option (ISO 8601)
|
|
35
|
+
*/
|
|
36
|
+
'start_date': string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Asset Investment Planning
|
|
6
|
+
* API for Asset Investment Planning
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.2.0-dev6
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/docs/InvestmentApi.md
CHANGED
|
@@ -13,9 +13,11 @@ All URIs are relative to *http://localhost*
|
|
|
13
13
|
|[**getImpactsForOption**](#getimpactsforoption) | **GET** /investment/{investment_id}/option/{option_id}/impact/ | List impacts for this option|
|
|
14
14
|
|[**getInvestmentById**](#getinvestmentbyid) | **GET** /investment/{investment_id} | Get an investment by ID|
|
|
15
15
|
|[**getInvestments**](#getinvestments) | **GET** /investment/ | List investments|
|
|
16
|
+
|[**getInvestmentsOverview**](#getinvestmentsoverview) | **GET** /investment/overview | Investment overview table|
|
|
16
17
|
|[**getOptionForInvestment**](#getoptionforinvestment) | **GET** /investment/{investment_id}/option/{option_id} | Get an option for this investment|
|
|
17
18
|
|[**getOptionKpis**](#getoptionkpis) | **GET** /investment/{investment_id}/option/{option_id}/kpis/{value_framework_id} | Get the kpis for a given option inside a value framework|
|
|
18
19
|
|[**getOptionsForInvestment**](#getoptionsforinvestment) | **GET** /investment/{investment_id}/option/ | List options for this investment|
|
|
20
|
+
|[**getOptionsOverview**](#getoptionsoverview) | **GET** /investment/{investment_id}/option/overview | Option overview table for this investment|
|
|
19
21
|
|[**getPreferredOption**](#getpreferredoption) | **GET** /investment/{investment_id}/preferred_option | Get the preferred option for an investment|
|
|
20
22
|
|[**patchImpactForOption**](#patchimpactforoption) | **PATCH** /investment/{investment_id}/option/{option_id}/impact/{impact_id} | Partially update an impact for this option|
|
|
21
23
|
|[**patchInvestment**](#patchinvestment) | **PATCH** /investment/{investment_id} | Partially update an investment|
|
|
@@ -530,6 +532,58 @@ const { status, data } = await apiInstance.getInvestments(
|
|
|
530
532
|
|
|
531
533
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
532
534
|
|
|
535
|
+
# **getInvestmentsOverview**
|
|
536
|
+
> Array<InvestmentOverviewResponse> getInvestmentsOverview()
|
|
537
|
+
|
|
538
|
+
Return a flat overview of all investments. For each investment the preferred option\'s name, start date, cost, duration and NPV (computed by the v_option_npv database view for the given value framework) are included. Investments without a preferred option have null values for those fields.
|
|
539
|
+
|
|
540
|
+
### Example
|
|
541
|
+
|
|
542
|
+
```typescript
|
|
543
|
+
import {
|
|
544
|
+
InvestmentApi,
|
|
545
|
+
Configuration
|
|
546
|
+
} from '@cosmotech/aip-client';
|
|
547
|
+
|
|
548
|
+
const configuration = new Configuration();
|
|
549
|
+
const apiInstance = new InvestmentApi(configuration);
|
|
550
|
+
|
|
551
|
+
let valueFrameworkId: string; //UUID of the value framework (default to undefined)
|
|
552
|
+
|
|
553
|
+
const { status, data } = await apiInstance.getInvestmentsOverview(
|
|
554
|
+
valueFrameworkId
|
|
555
|
+
);
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Parameters
|
|
559
|
+
|
|
560
|
+
|Name | Type | Description | Notes|
|
|
561
|
+
|------------- | ------------- | ------------- | -------------|
|
|
562
|
+
| **valueFrameworkId** | [**string**] | UUID of the value framework | defaults to undefined|
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
### Return type
|
|
566
|
+
|
|
567
|
+
**Array<InvestmentOverviewResponse>**
|
|
568
|
+
|
|
569
|
+
### Authorization
|
|
570
|
+
|
|
571
|
+
[OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
|
|
572
|
+
|
|
573
|
+
### HTTP request headers
|
|
574
|
+
|
|
575
|
+
- **Content-Type**: Not defined
|
|
576
|
+
- **Accept**: application/json
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
### HTTP response details
|
|
580
|
+
| Status code | Description | Response headers |
|
|
581
|
+
|-------------|-------------|------------------|
|
|
582
|
+
|**200** | Overview list of all investments | - |
|
|
583
|
+
|**404** | Value framework not found | - |
|
|
584
|
+
|
|
585
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
586
|
+
|
|
533
587
|
# **getOptionForInvestment**
|
|
534
588
|
> OptionResponse getOptionForInvestment()
|
|
535
589
|
|
|
@@ -588,7 +642,7 @@ const { status, data } = await apiInstance.getOptionForInvestment(
|
|
|
588
642
|
# **getOptionKpis**
|
|
589
643
|
> Array<OptionChartKPIsYearly> getOptionKpis()
|
|
590
644
|
|
|
591
|
-
Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
|
|
645
|
+
Return a KPI object containing all the data necessary to display graphs about the option inside a value framework. Data is sourced from the v_option_yearly_kpis database view.
|
|
592
646
|
|
|
593
647
|
### Example
|
|
594
648
|
|
|
@@ -639,7 +693,7 @@ const { status, data } = await apiInstance.getOptionKpis(
|
|
|
639
693
|
| Status code | Description | Response headers |
|
|
640
694
|
|-------------|-------------|------------------|
|
|
641
695
|
|**200** | The requested KPIs | - |
|
|
642
|
-
|**404** | Investment, option
|
|
696
|
+
|**404** | Investment, option, value framework, or phase not found | - |
|
|
643
697
|
|
|
644
698
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
645
699
|
|
|
@@ -701,6 +755,61 @@ const { status, data } = await apiInstance.getOptionsForInvestment(
|
|
|
701
755
|
|
|
702
756
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
703
757
|
|
|
758
|
+
# **getOptionsOverview**
|
|
759
|
+
> Array<OptionOverviewResponse> getOptionsOverview()
|
|
760
|
+
|
|
761
|
+
Return a flat overview of all options for a specific investment. Each row includes the option\'s start date, cost, duration and NPV computed by the v_option_npv database view for the given value framework.
|
|
762
|
+
|
|
763
|
+
### Example
|
|
764
|
+
|
|
765
|
+
```typescript
|
|
766
|
+
import {
|
|
767
|
+
InvestmentApi,
|
|
768
|
+
Configuration
|
|
769
|
+
} from '@cosmotech/aip-client';
|
|
770
|
+
|
|
771
|
+
const configuration = new Configuration();
|
|
772
|
+
const apiInstance = new InvestmentApi(configuration);
|
|
773
|
+
|
|
774
|
+
let investmentId: string; //UUID of the investment (default to undefined)
|
|
775
|
+
let valueFrameworkId: string; //UUID of the value framework (default to undefined)
|
|
776
|
+
|
|
777
|
+
const { status, data } = await apiInstance.getOptionsOverview(
|
|
778
|
+
investmentId,
|
|
779
|
+
valueFrameworkId
|
|
780
|
+
);
|
|
781
|
+
```
|
|
782
|
+
|
|
783
|
+
### Parameters
|
|
784
|
+
|
|
785
|
+
|Name | Type | Description | Notes|
|
|
786
|
+
|------------- | ------------- | ------------- | -------------|
|
|
787
|
+
| **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
|
|
788
|
+
| **valueFrameworkId** | [**string**] | UUID of the value framework | defaults to undefined|
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
### Return type
|
|
792
|
+
|
|
793
|
+
**Array<OptionOverviewResponse>**
|
|
794
|
+
|
|
795
|
+
### Authorization
|
|
796
|
+
|
|
797
|
+
[OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
|
|
798
|
+
|
|
799
|
+
### HTTP request headers
|
|
800
|
+
|
|
801
|
+
- **Content-Type**: Not defined
|
|
802
|
+
- **Accept**: application/json
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
### HTTP response details
|
|
806
|
+
| Status code | Description | Response headers |
|
|
807
|
+
|-------------|-------------|------------------|
|
|
808
|
+
|**200** | Overview list of all options for the investment | - |
|
|
809
|
+
|**404** | Investment or value framework not found | - |
|
|
810
|
+
|
|
811
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
812
|
+
|
|
704
813
|
# **getPreferredOption**
|
|
705
814
|
> PreferredOptionResponse getPreferredOption()
|
|
706
815
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# InvestmentOverviewResponse
|
|
2
|
+
|
|
3
|
+
Schema for the investment overview table — one row per investment.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**investmentId** | **string** | ID of the investment | [default to undefined]
|
|
10
|
+
**investmentName** | **string** | Name of the investment | [default to undefined]
|
|
11
|
+
**preferredOptionCost** | **number** | | [optional] [default to undefined]
|
|
12
|
+
**preferredOptionDuration** | **number** | | [optional] [default to undefined]
|
|
13
|
+
**preferredOptionName** | **string** | | [optional] [default to undefined]
|
|
14
|
+
**preferredOptionNpv** | **number** | | [optional] [default to undefined]
|
|
15
|
+
**preferredOptionStartDate** | **string** | | [optional] [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { InvestmentOverviewResponse } from '@cosmotech/aip-client';
|
|
21
|
+
|
|
22
|
+
const instance: InvestmentOverviewResponse = {
|
|
23
|
+
investmentId,
|
|
24
|
+
investmentName,
|
|
25
|
+
preferredOptionCost,
|
|
26
|
+
preferredOptionDuration,
|
|
27
|
+
preferredOptionName,
|
|
28
|
+
preferredOptionNpv,
|
|
29
|
+
preferredOptionStartDate,
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|