@cosmotech/aip-client 0.2.0-dev3 → 0.2.0-dev5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +12 -2
  2. package/api/favored-option-api.ts +210 -0
  3. package/api/investment-api.ts +244 -0
  4. package/api/option-api.ts +88 -0
  5. package/api.ts +1 -0
  6. package/dist/api/favored-option-api.d.ts +104 -0
  7. package/dist/api/favored-option-api.js +209 -0
  8. package/dist/api/investment-api.d.ts +111 -0
  9. package/dist/api/investment-api.js +229 -0
  10. package/dist/api/option-api.d.ts +41 -0
  11. package/dist/api/option-api.js +83 -0
  12. package/dist/api.d.ts +1 -0
  13. package/dist/api.js +1 -0
  14. package/dist/esm/api/favored-option-api.d.ts +104 -0
  15. package/dist/esm/api/favored-option-api.js +202 -0
  16. package/dist/esm/api/investment-api.d.ts +111 -0
  17. package/dist/esm/api/investment-api.js +229 -0
  18. package/dist/esm/api/option-api.d.ts +41 -0
  19. package/dist/esm/api/option-api.js +83 -0
  20. package/dist/esm/api.d.ts +1 -0
  21. package/dist/esm/api.js +1 -0
  22. package/dist/esm/models/favored-option-request.d.ts +20 -0
  23. package/dist/esm/models/favored-option-request.js +14 -0
  24. package/dist/esm/models/favored-option-response.d.ts +20 -0
  25. package/dist/esm/models/favored-option-response.js +14 -0
  26. package/dist/esm/models/index.d.ts +4 -0
  27. package/dist/esm/models/index.js +4 -0
  28. package/dist/esm/models/investment-response.d.ts +1 -0
  29. package/dist/esm/models/option-chart-kpi.d.ts +29 -0
  30. package/dist/esm/models/option-chart-kpi.js +14 -0
  31. package/dist/esm/models/option-chart-kpis-yearly.d.ts +29 -0
  32. package/dist/esm/models/option-chart-kpis-yearly.js +14 -0
  33. package/dist/esm/models/option-create.d.ts +1 -1
  34. package/dist/esm/models/option-response.d.ts +2 -1
  35. package/dist/esm/models/option-update.d.ts +2 -0
  36. package/dist/models/favored-option-request.d.ts +20 -0
  37. package/dist/models/favored-option-request.js +15 -0
  38. package/dist/models/favored-option-response.d.ts +20 -0
  39. package/dist/models/favored-option-response.js +15 -0
  40. package/dist/models/index.d.ts +4 -0
  41. package/dist/models/index.js +4 -0
  42. package/dist/models/investment-response.d.ts +1 -0
  43. package/dist/models/option-chart-kpi.d.ts +29 -0
  44. package/dist/models/option-chart-kpi.js +15 -0
  45. package/dist/models/option-chart-kpis-yearly.d.ts +29 -0
  46. package/dist/models/option-chart-kpis-yearly.js +15 -0
  47. package/dist/models/option-create.d.ts +1 -1
  48. package/dist/models/option-response.d.ts +2 -1
  49. package/dist/models/option-update.d.ts +2 -0
  50. package/docs/FavoredOptionApi.md +119 -0
  51. package/docs/FavoredOptionRequest.md +21 -0
  52. package/docs/FavoredOptionResponse.md +21 -0
  53. package/docs/InvestmentApi.md +171 -0
  54. package/docs/InvestmentResponse.md +2 -0
  55. package/docs/OptionApi.md +59 -0
  56. package/docs/OptionChartKPI.md +27 -0
  57. package/docs/OptionChartKPIsYearly.md +25 -0
  58. package/docs/OptionCreate.md +1 -1
  59. package/docs/OptionResponse.md +4 -2
  60. package/docs/OptionUpdate.md +4 -0
  61. package/models/favored-option-request.ts +26 -0
  62. package/models/favored-option-response.ts +26 -0
  63. package/models/index.ts +4 -0
  64. package/models/investment-response.ts +1 -0
  65. package/models/option-chart-kpi.ts +35 -0
  66. package/models/option-chart-kpis-yearly.ts +37 -0
  67. package/models/option-create.ts +1 -1
  68. package/models/option-response.ts +2 -1
  69. package/models/option-update.ts +2 -0
  70. package/package.json +1 -1
@@ -219,6 +219,39 @@ export const InvestmentApiAxiosParamCreator = function (configuration) {
219
219
  options: localVarRequestOptions,
220
220
  };
221
221
  }),
222
+ /**
223
+ * Get the preferred option for an investment.
224
+ * @summary Get the preferred option for an investment
225
+ * @param {string} investmentId UUID of the investment
226
+ * @param {*} [options] Override http request option.
227
+ * @throws {RequiredError}
228
+ */
229
+ getFavoredOption: (investmentId_1, ...args_1) => __awaiter(this, [investmentId_1, ...args_1], void 0, function* (investmentId, options = {}) {
230
+ // verify required parameter 'investmentId' is not null or undefined
231
+ assertParamExists('getFavoredOption', 'investmentId', investmentId);
232
+ const localVarPath = `/investment/{investment_id}/favored_option`
233
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
234
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
235
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
236
+ let baseOptions;
237
+ if (configuration) {
238
+ baseOptions = configuration.baseOptions;
239
+ }
240
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
241
+ const localVarHeaderParameter = {};
242
+ const localVarQueryParameter = {};
243
+ // authentication OAuth2AuthorizationCodeBearer required
244
+ // oauth required
245
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
246
+ localVarHeaderParameter['Accept'] = 'application/json';
247
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
248
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
249
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
250
+ return {
251
+ url: toPathString(localVarUrlObj),
252
+ options: localVarRequestOptions,
253
+ };
254
+ }),
222
255
  /**
223
256
  * Retrieve a specific impact for the option.
224
257
  * @summary Get an impact for this option
@@ -412,6 +445,47 @@ export const InvestmentApiAxiosParamCreator = function (configuration) {
412
445
  options: localVarRequestOptions,
413
446
  };
414
447
  }),
448
+ /**
449
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
450
+ * @summary Get the kpis for a given option inside a value framework
451
+ * @param {string} investmentId UUID of the investment
452
+ * @param {string} optionId UUID of the option
453
+ * @param {string} valueFrameworkId UUID of the value framework
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ */
457
+ getOptionKpis: (investmentId_1, optionId_1, valueFrameworkId_1, ...args_1) => __awaiter(this, [investmentId_1, optionId_1, valueFrameworkId_1, ...args_1], void 0, function* (investmentId, optionId, valueFrameworkId, options = {}) {
458
+ // verify required parameter 'investmentId' is not null or undefined
459
+ assertParamExists('getOptionKpis', 'investmentId', investmentId);
460
+ // verify required parameter 'optionId' is not null or undefined
461
+ assertParamExists('getOptionKpis', 'optionId', optionId);
462
+ // verify required parameter 'valueFrameworkId' is not null or undefined
463
+ assertParamExists('getOptionKpis', 'valueFrameworkId', valueFrameworkId);
464
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/kpis/{value_framework_id}`
465
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)))
466
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
467
+ .replace(`{${"value_framework_id"}}`, encodeURIComponent(String(valueFrameworkId)));
468
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
469
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
470
+ let baseOptions;
471
+ if (configuration) {
472
+ baseOptions = configuration.baseOptions;
473
+ }
474
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
475
+ const localVarHeaderParameter = {};
476
+ const localVarQueryParameter = {};
477
+ // authentication OAuth2AuthorizationCodeBearer required
478
+ // oauth required
479
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
480
+ localVarHeaderParameter['Accept'] = 'application/json';
481
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
482
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
483
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
484
+ return {
485
+ url: toPathString(localVarUrlObj),
486
+ options: localVarRequestOptions,
487
+ };
488
+ }),
415
489
  /**
416
490
  * Retrieve a paginated list of all options for a specific investment.
417
491
  * @summary List options for this investment
@@ -613,6 +687,44 @@ export const InvestmentApiAxiosParamCreator = function (configuration) {
613
687
  options: localVarRequestOptions,
614
688
  };
615
689
  }),
690
+ /**
691
+ * Set the preferred option for an investment.
692
+ * @summary Set the preferred option for an investment
693
+ * @param {string} investmentId UUID of the investment
694
+ * @param {FavoredOptionRequest} favoredOptionRequest
695
+ * @param {*} [options] Override http request option.
696
+ * @throws {RequiredError}
697
+ */
698
+ setFavoredOption: (investmentId_1, favoredOptionRequest_1, ...args_1) => __awaiter(this, [investmentId_1, favoredOptionRequest_1, ...args_1], void 0, function* (investmentId, favoredOptionRequest, options = {}) {
699
+ // verify required parameter 'investmentId' is not null or undefined
700
+ assertParamExists('setFavoredOption', 'investmentId', investmentId);
701
+ // verify required parameter 'favoredOptionRequest' is not null or undefined
702
+ assertParamExists('setFavoredOption', 'favoredOptionRequest', favoredOptionRequest);
703
+ const localVarPath = `/investment/{investment_id}/favored_option`
704
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
705
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
706
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
707
+ let baseOptions;
708
+ if (configuration) {
709
+ baseOptions = configuration.baseOptions;
710
+ }
711
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
712
+ const localVarHeaderParameter = {};
713
+ const localVarQueryParameter = {};
714
+ // authentication OAuth2AuthorizationCodeBearer required
715
+ // oauth required
716
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
717
+ localVarHeaderParameter['Content-Type'] = 'application/json';
718
+ localVarHeaderParameter['Accept'] = 'application/json';
719
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
720
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
721
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
722
+ localVarRequestOptions.data = serializeDataIfNeeded(favoredOptionRequest, localVarRequestOptions, configuration);
723
+ return {
724
+ url: toPathString(localVarUrlObj),
725
+ options: localVarRequestOptions,
726
+ };
727
+ }),
616
728
  };
617
729
  };
618
730
  /**
@@ -707,6 +819,22 @@ export const InvestmentApiFp = function (configuration) {
707
819
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
708
820
  });
709
821
  },
822
+ /**
823
+ * Get the preferred option for an investment.
824
+ * @summary Get the preferred option for an investment
825
+ * @param {string} investmentId UUID of the investment
826
+ * @param {*} [options] Override http request option.
827
+ * @throws {RequiredError}
828
+ */
829
+ getFavoredOption(investmentId, options) {
830
+ return __awaiter(this, void 0, void 0, function* () {
831
+ var _a, _b, _c;
832
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFavoredOption(investmentId, options);
833
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
834
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvestmentApi.getFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
835
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
836
+ });
837
+ },
710
838
  /**
711
839
  * Retrieve a specific impact for the option.
712
840
  * @summary Get an impact for this option
@@ -794,6 +922,24 @@ export const InvestmentApiFp = function (configuration) {
794
922
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
795
923
  });
796
924
  },
925
+ /**
926
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
927
+ * @summary Get the kpis for a given option inside a value framework
928
+ * @param {string} investmentId UUID of the investment
929
+ * @param {string} optionId UUID of the option
930
+ * @param {string} valueFrameworkId UUID of the value framework
931
+ * @param {*} [options] Override http request option.
932
+ * @throws {RequiredError}
933
+ */
934
+ getOptionKpis(investmentId, optionId, valueFrameworkId, options) {
935
+ return __awaiter(this, void 0, void 0, function* () {
936
+ var _a, _b, _c;
937
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOptionKpis(investmentId, optionId, valueFrameworkId, options);
938
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
939
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvestmentApi.getOptionKpis']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
940
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
941
+ });
942
+ },
797
943
  /**
798
944
  * Retrieve a paginated list of all options for a specific investment.
799
945
  * @summary List options for this investment
@@ -882,6 +1028,23 @@ export const InvestmentApiFp = function (configuration) {
882
1028
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
883
1029
  });
884
1030
  },
1031
+ /**
1032
+ * Set the preferred option for an investment.
1033
+ * @summary Set the preferred option for an investment
1034
+ * @param {string} investmentId UUID of the investment
1035
+ * @param {FavoredOptionRequest} favoredOptionRequest
1036
+ * @param {*} [options] Override http request option.
1037
+ * @throws {RequiredError}
1038
+ */
1039
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
1040
+ return __awaiter(this, void 0, void 0, function* () {
1041
+ var _a, _b, _c;
1042
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.setFavoredOption(investmentId, favoredOptionRequest, options);
1043
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1044
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvestmentApi.setFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1045
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1046
+ });
1047
+ },
885
1048
  };
886
1049
  };
887
1050
  /**
@@ -946,6 +1109,16 @@ export const InvestmentApiFactory = function (configuration, basePath, axios) {
946
1109
  deleteOptionForInvestment(optionId, investmentId, options) {
947
1110
  return localVarFp.deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
948
1111
  },
1112
+ /**
1113
+ * Get the preferred option for an investment.
1114
+ * @summary Get the preferred option for an investment
1115
+ * @param {string} investmentId UUID of the investment
1116
+ * @param {*} [options] Override http request option.
1117
+ * @throws {RequiredError}
1118
+ */
1119
+ getFavoredOption(investmentId, options) {
1120
+ return localVarFp.getFavoredOption(investmentId, options).then((request) => request(axios, basePath));
1121
+ },
949
1122
  /**
950
1123
  * Retrieve a specific impact for the option.
951
1124
  * @summary Get an impact for this option
@@ -1003,6 +1176,18 @@ export const InvestmentApiFactory = function (configuration, basePath, axios) {
1003
1176
  getOptionForInvestment(optionId, investmentId, options) {
1004
1177
  return localVarFp.getOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
1005
1178
  },
1179
+ /**
1180
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
1181
+ * @summary Get the kpis for a given option inside a value framework
1182
+ * @param {string} investmentId UUID of the investment
1183
+ * @param {string} optionId UUID of the option
1184
+ * @param {string} valueFrameworkId UUID of the value framework
1185
+ * @param {*} [options] Override http request option.
1186
+ * @throws {RequiredError}
1187
+ */
1188
+ getOptionKpis(investmentId, optionId, valueFrameworkId, options) {
1189
+ return localVarFp.getOptionKpis(investmentId, optionId, valueFrameworkId, options).then((request) => request(axios, basePath));
1190
+ },
1006
1191
  /**
1007
1192
  * Retrieve a paginated list of all options for a specific investment.
1008
1193
  * @summary List options for this investment
@@ -1061,6 +1246,17 @@ export const InvestmentApiFactory = function (configuration, basePath, axios) {
1061
1246
  postInvestment(investmentCreate, options) {
1062
1247
  return localVarFp.postInvestment(investmentCreate, options).then((request) => request(axios, basePath));
1063
1248
  },
1249
+ /**
1250
+ * Set the preferred option for an investment.
1251
+ * @summary Set the preferred option for an investment
1252
+ * @param {string} investmentId UUID of the investment
1253
+ * @param {FavoredOptionRequest} favoredOptionRequest
1254
+ * @param {*} [options] Override http request option.
1255
+ * @throws {RequiredError}
1256
+ */
1257
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
1258
+ return localVarFp.setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(axios, basePath));
1259
+ },
1064
1260
  };
1065
1261
  };
1066
1262
  /**
@@ -1123,6 +1319,16 @@ export class InvestmentApi extends BaseAPI {
1123
1319
  deleteOptionForInvestment(optionId, investmentId, options) {
1124
1320
  return InvestmentApiFp(this.configuration).deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
1125
1321
  }
1322
+ /**
1323
+ * Get the preferred option for an investment.
1324
+ * @summary Get the preferred option for an investment
1325
+ * @param {string} investmentId UUID of the investment
1326
+ * @param {*} [options] Override http request option.
1327
+ * @throws {RequiredError}
1328
+ */
1329
+ getFavoredOption(investmentId, options) {
1330
+ return InvestmentApiFp(this.configuration).getFavoredOption(investmentId, options).then((request) => request(this.axios, this.basePath));
1331
+ }
1126
1332
  /**
1127
1333
  * Retrieve a specific impact for the option.
1128
1334
  * @summary Get an impact for this option
@@ -1180,6 +1386,18 @@ export class InvestmentApi extends BaseAPI {
1180
1386
  getOptionForInvestment(optionId, investmentId, options) {
1181
1387
  return InvestmentApiFp(this.configuration).getOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
1182
1388
  }
1389
+ /**
1390
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
1391
+ * @summary Get the kpis for a given option inside a value framework
1392
+ * @param {string} investmentId UUID of the investment
1393
+ * @param {string} optionId UUID of the option
1394
+ * @param {string} valueFrameworkId UUID of the value framework
1395
+ * @param {*} [options] Override http request option.
1396
+ * @throws {RequiredError}
1397
+ */
1398
+ getOptionKpis(investmentId, optionId, valueFrameworkId, options) {
1399
+ return InvestmentApiFp(this.configuration).getOptionKpis(investmentId, optionId, valueFrameworkId, options).then((request) => request(this.axios, this.basePath));
1400
+ }
1183
1401
  /**
1184
1402
  * Retrieve a paginated list of all options for a specific investment.
1185
1403
  * @summary List options for this investment
@@ -1238,4 +1456,15 @@ export class InvestmentApi extends BaseAPI {
1238
1456
  postInvestment(investmentCreate, options) {
1239
1457
  return InvestmentApiFp(this.configuration).postInvestment(investmentCreate, options).then((request) => request(this.axios, this.basePath));
1240
1458
  }
1459
+ /**
1460
+ * Set the preferred option for an investment.
1461
+ * @summary Set the preferred option for an investment
1462
+ * @param {string} investmentId UUID of the investment
1463
+ * @param {FavoredOptionRequest} favoredOptionRequest
1464
+ * @param {*} [options] Override http request option.
1465
+ * @throws {RequiredError}
1466
+ */
1467
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
1468
+ return InvestmentApiFp(this.configuration).setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(this.axios, this.basePath));
1469
+ }
1241
1470
  }
@@ -15,6 +15,7 @@ import { type RequestArgs, BaseAPI } from '../base';
15
15
  import type { ImpactAPIResponse } from '../models';
16
16
  import type { ImpactCreate } from '../models';
17
17
  import type { ImpactUpdate } from '../models';
18
+ import type { OptionChartKPIsYearly } from '../models';
18
19
  import type { OptionCreate } from '../models';
19
20
  import type { OptionResponse } from '../models';
20
21
  import type { OptionUpdate } from '../models';
@@ -90,6 +91,16 @@ export declare const OptionApiAxiosParamCreator: (configuration?: Configuration)
90
91
  * @throws {RequiredError}
91
92
  */
92
93
  getOptionForInvestment: (optionId: string, investmentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
94
+ /**
95
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
96
+ * @summary Get the kpis for a given option inside a value framework
97
+ * @param {string} investmentId UUID of the investment
98
+ * @param {string} optionId UUID of the option
99
+ * @param {string} valueFrameworkId UUID of the value framework
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ getOptionKpis: (investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
93
104
  /**
94
105
  * Retrieve a paginated list of all options for a specific investment.
95
106
  * @summary List options for this investment
@@ -194,6 +205,16 @@ export declare const OptionApiFp: (configuration?: Configuration) => {
194
205
  * @throws {RequiredError}
195
206
  */
196
207
  getOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OptionResponse>>;
208
+ /**
209
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
210
+ * @summary Get the kpis for a given option inside a value framework
211
+ * @param {string} investmentId UUID of the investment
212
+ * @param {string} optionId UUID of the option
213
+ * @param {string} valueFrameworkId UUID of the value framework
214
+ * @param {*} [options] Override http request option.
215
+ * @throws {RequiredError}
216
+ */
217
+ getOptionKpis(investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<OptionChartKPIsYearly>>>;
197
218
  /**
198
219
  * Retrieve a paginated list of all options for a specific investment.
199
220
  * @summary List options for this investment
@@ -298,6 +319,16 @@ export declare const OptionApiFactory: (configuration?: Configuration, basePath?
298
319
  * @throws {RequiredError}
299
320
  */
300
321
  getOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<OptionResponse>;
322
+ /**
323
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
324
+ * @summary Get the kpis for a given option inside a value framework
325
+ * @param {string} investmentId UUID of the investment
326
+ * @param {string} optionId UUID of the option
327
+ * @param {string} valueFrameworkId UUID of the value framework
328
+ * @param {*} [options] Override http request option.
329
+ * @throws {RequiredError}
330
+ */
331
+ getOptionKpis(investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<OptionChartKPIsYearly>>;
301
332
  /**
302
333
  * Retrieve a paginated list of all options for a specific investment.
303
334
  * @summary List options for this investment
@@ -402,6 +433,16 @@ export declare class OptionApi extends BaseAPI {
402
433
  * @throws {RequiredError}
403
434
  */
404
435
  getOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OptionResponse, any, {}>>;
436
+ /**
437
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
438
+ * @summary Get the kpis for a given option inside a value framework
439
+ * @param {string} investmentId UUID of the investment
440
+ * @param {string} optionId UUID of the option
441
+ * @param {string} valueFrameworkId UUID of the value framework
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ getOptionKpis(investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OptionChartKPIsYearly[], any, {}>>;
405
446
  /**
406
447
  * Retrieve a paginated list of all options for a specific investment.
407
448
  * @summary List options for this investment
@@ -310,6 +310,47 @@ export const OptionApiAxiosParamCreator = function (configuration) {
310
310
  options: localVarRequestOptions,
311
311
  };
312
312
  }),
313
+ /**
314
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
315
+ * @summary Get the kpis for a given option inside a value framework
316
+ * @param {string} investmentId UUID of the investment
317
+ * @param {string} optionId UUID of the option
318
+ * @param {string} valueFrameworkId UUID of the value framework
319
+ * @param {*} [options] Override http request option.
320
+ * @throws {RequiredError}
321
+ */
322
+ getOptionKpis: (investmentId_1, optionId_1, valueFrameworkId_1, ...args_1) => __awaiter(this, [investmentId_1, optionId_1, valueFrameworkId_1, ...args_1], void 0, function* (investmentId, optionId, valueFrameworkId, options = {}) {
323
+ // verify required parameter 'investmentId' is not null or undefined
324
+ assertParamExists('getOptionKpis', 'investmentId', investmentId);
325
+ // verify required parameter 'optionId' is not null or undefined
326
+ assertParamExists('getOptionKpis', 'optionId', optionId);
327
+ // verify required parameter 'valueFrameworkId' is not null or undefined
328
+ assertParamExists('getOptionKpis', 'valueFrameworkId', valueFrameworkId);
329
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/kpis/{value_framework_id}`
330
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)))
331
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
332
+ .replace(`{${"value_framework_id"}}`, encodeURIComponent(String(valueFrameworkId)));
333
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
334
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
335
+ let baseOptions;
336
+ if (configuration) {
337
+ baseOptions = configuration.baseOptions;
338
+ }
339
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
340
+ const localVarHeaderParameter = {};
341
+ const localVarQueryParameter = {};
342
+ // authentication OAuth2AuthorizationCodeBearer required
343
+ // oauth required
344
+ yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
345
+ localVarHeaderParameter['Accept'] = 'application/json';
346
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
347
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
348
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
349
+ return {
350
+ url: toPathString(localVarUrlObj),
351
+ options: localVarRequestOptions,
352
+ };
353
+ }),
313
354
  /**
314
355
  * Retrieve a paginated list of all options for a specific investment.
315
356
  * @summary List options for this investment
@@ -571,6 +612,24 @@ export const OptionApiFp = function (configuration) {
571
612
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
572
613
  });
573
614
  },
615
+ /**
616
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
617
+ * @summary Get the kpis for a given option inside a value framework
618
+ * @param {string} investmentId UUID of the investment
619
+ * @param {string} optionId UUID of the option
620
+ * @param {string} valueFrameworkId UUID of the value framework
621
+ * @param {*} [options] Override http request option.
622
+ * @throws {RequiredError}
623
+ */
624
+ getOptionKpis(investmentId, optionId, valueFrameworkId, options) {
625
+ return __awaiter(this, void 0, void 0, function* () {
626
+ var _a, _b, _c;
627
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOptionKpis(investmentId, optionId, valueFrameworkId, options);
628
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
629
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OptionApi.getOptionKpis']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
630
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
631
+ });
632
+ },
574
633
  /**
575
634
  * Retrieve a paginated list of all options for a specific investment.
576
635
  * @summary List options for this investment
@@ -716,6 +775,18 @@ export const OptionApiFactory = function (configuration, basePath, axios) {
716
775
  getOptionForInvestment(optionId, investmentId, options) {
717
776
  return localVarFp.getOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
718
777
  },
778
+ /**
779
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
780
+ * @summary Get the kpis for a given option inside a value framework
781
+ * @param {string} investmentId UUID of the investment
782
+ * @param {string} optionId UUID of the option
783
+ * @param {string} valueFrameworkId UUID of the value framework
784
+ * @param {*} [options] Override http request option.
785
+ * @throws {RequiredError}
786
+ */
787
+ getOptionKpis(investmentId, optionId, valueFrameworkId, options) {
788
+ return localVarFp.getOptionKpis(investmentId, optionId, valueFrameworkId, options).then((request) => request(axios, basePath));
789
+ },
719
790
  /**
720
791
  * Retrieve a paginated list of all options for a specific investment.
721
792
  * @summary List options for this investment
@@ -841,6 +912,18 @@ export class OptionApi extends BaseAPI {
841
912
  getOptionForInvestment(optionId, investmentId, options) {
842
913
  return OptionApiFp(this.configuration).getOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
843
914
  }
915
+ /**
916
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
917
+ * @summary Get the kpis for a given option inside a value framework
918
+ * @param {string} investmentId UUID of the investment
919
+ * @param {string} optionId UUID of the option
920
+ * @param {string} valueFrameworkId UUID of the value framework
921
+ * @param {*} [options] Override http request option.
922
+ * @throws {RequiredError}
923
+ */
924
+ getOptionKpis(investmentId, optionId, valueFrameworkId, options) {
925
+ return OptionApiFp(this.configuration).getOptionKpis(investmentId, optionId, valueFrameworkId, options).then((request) => request(this.axios, this.basePath));
926
+ }
844
927
  /**
845
928
  * Retrieve a paginated list of all options for a specific investment.
846
929
  * @summary List options for this investment
package/dist/esm/api.d.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  export * from './api/default-api';
13
+ export * from './api/favored-option-api';
13
14
  export * from './api/impact-api';
14
15
  export * from './api/investment-api';
15
16
  export * from './api/metric-api';
package/dist/esm/api.js CHANGED
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  export * from './api/default-api';
15
+ export * from './api/favored-option-api';
15
16
  export * from './api/impact-api';
16
17
  export * from './api/investment-api';
17
18
  export * from './api/metric-api';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Asset Investment Planning
3
+ * API for Asset Investment Planning
4
+ *
5
+ * The version of the OpenAPI document: 0.2.0-dev3
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
+ * Request body for setting the preferred option.
14
+ */
15
+ export interface FavoredOptionRequest {
16
+ /**
17
+ * ID of the option to set as preferred
18
+ */
19
+ 'option_id': string;
20
+ }
@@ -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-dev3
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,20 @@
1
+ /**
2
+ * Asset Investment Planning
3
+ * API for Asset Investment Planning
4
+ *
5
+ * The version of the OpenAPI document: 0.2.0-dev3
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
+ * Response for favored option endpoints.
14
+ */
15
+ export interface FavoredOptionResponse {
16
+ /**
17
+ * ID of the preferred option
18
+ */
19
+ 'option_id': string;
20
+ }
@@ -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-dev3
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 {};
@@ -1,4 +1,6 @@
1
1
  export * from './evolution-type';
2
+ export * from './favored-option-request';
3
+ export * from './favored-option-response';
2
4
  export * from './httpvalidation-error';
3
5
  export * from './impact-apiresponse';
4
6
  export * from './impact-create';
@@ -21,6 +23,8 @@ export * from './objective-update';
21
23
  export * from './objective-weight-create';
22
24
  export * from './objective-weight-response';
23
25
  export * from './objective-weight-update';
26
+ export * from './option-chart-kpi';
27
+ export * from './option-chart-kpis-yearly';
24
28
  export * from './option-create';
25
29
  export * from './option-response';
26
30
  export * from './option-update';
@@ -1,4 +1,6 @@
1
1
  export * from './evolution-type';
2
+ export * from './favored-option-request';
3
+ export * from './favored-option-response';
2
4
  export * from './httpvalidation-error';
3
5
  export * from './impact-apiresponse';
4
6
  export * from './impact-create';
@@ -21,6 +23,8 @@ export * from './objective-update';
21
23
  export * from './objective-weight-create';
22
24
  export * from './objective-weight-response';
23
25
  export * from './objective-weight-update';
26
+ export * from './option-chart-kpi';
27
+ export * from './option-chart-kpis-yearly';
24
28
  export * from './option-create';
25
29
  export * from './option-response';
26
30
  export * from './option-update';
@@ -21,5 +21,6 @@ export interface InvestmentResponse {
21
21
  */
22
22
  'name': string;
23
23
  'owner_name'?: string | null;
24
+ 'preferred_option_id'?: string | null;
24
25
  'updated_at': string;
25
26
  }
@@ -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-dev3
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 of a KPI value for a given time step, contain both the monetary and objective value
14
+ */
15
+ export interface OptionChartKPI {
16
+ /**
17
+ * Metric value of the KPI
18
+ */
19
+ 'metric_value'?: number;
20
+ /**
21
+ * Monetary value of the KPI
22
+ */
23
+ 'monetary_value'?: number;
24
+ 'name'?: string | null;
25
+ /**
26
+ * Symbol of the KPI
27
+ */
28
+ 'symbol'?: string;
29
+ }