@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
package/api/option-api.ts CHANGED
@@ -28,6 +28,8 @@ import type { ImpactCreate } from '../models';
28
28
  // @ts-ignore
29
29
  import type { ImpactUpdate } from '../models';
30
30
  // @ts-ignore
31
+ import type { OptionChartKPIsYearly } from '../models';
32
+ // @ts-ignore
31
33
  import type { OptionCreate } from '../models';
32
34
  // @ts-ignore
33
35
  import type { OptionResponse } from '../models';
@@ -354,6 +356,52 @@ export const OptionApiAxiosParamCreator = function (configuration?: Configuratio
354
356
  options: localVarRequestOptions,
355
357
  };
356
358
  },
359
+ /**
360
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
361
+ * @summary Get the kpis for a given option inside a value framework
362
+ * @param {string} investmentId UUID of the investment
363
+ * @param {string} optionId UUID of the option
364
+ * @param {string} valueFrameworkId UUID of the value framework
365
+ * @param {*} [options] Override http request option.
366
+ * @throws {RequiredError}
367
+ */
368
+ getOptionKpis: async (investmentId: string, optionId: string, valueFrameworkId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
369
+ // verify required parameter 'investmentId' is not null or undefined
370
+ assertParamExists('getOptionKpis', 'investmentId', investmentId)
371
+ // verify required parameter 'optionId' is not null or undefined
372
+ assertParamExists('getOptionKpis', 'optionId', optionId)
373
+ // verify required parameter 'valueFrameworkId' is not null or undefined
374
+ assertParamExists('getOptionKpis', 'valueFrameworkId', valueFrameworkId)
375
+ const localVarPath = `/investment/{investment_id}/option/{option_id}/kpis/{value_framework_id}`
376
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)))
377
+ .replace(`{${"option_id"}}`, encodeURIComponent(String(optionId)))
378
+ .replace(`{${"value_framework_id"}}`, encodeURIComponent(String(valueFrameworkId)));
379
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
380
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
381
+ let baseOptions;
382
+ if (configuration) {
383
+ baseOptions = configuration.baseOptions;
384
+ }
385
+
386
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
387
+ const localVarHeaderParameter = {} as any;
388
+ const localVarQueryParameter = {} as any;
389
+
390
+ // authentication OAuth2AuthorizationCodeBearer required
391
+ // oauth required
392
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
393
+
394
+ localVarHeaderParameter['Accept'] = 'application/json';
395
+
396
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
397
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
398
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
399
+
400
+ return {
401
+ url: toPathString(localVarUrlObj),
402
+ options: localVarRequestOptions,
403
+ };
404
+ },
357
405
  /**
358
406
  * Retrieve a paginated list of all options for a specific investment.
359
407
  * @summary List options for this investment
@@ -612,6 +660,21 @@ export const OptionApiFp = function(configuration?: Configuration) {
612
660
  const localVarOperationServerBasePath = operationServerMap['OptionApi.getOptionForInvestment']?.[localVarOperationServerIndex]?.url;
613
661
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
614
662
  },
663
+ /**
664
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
665
+ * @summary Get the kpis for a given option inside a value framework
666
+ * @param {string} investmentId UUID of the investment
667
+ * @param {string} optionId UUID of the option
668
+ * @param {string} valueFrameworkId UUID of the value framework
669
+ * @param {*} [options] Override http request option.
670
+ * @throws {RequiredError}
671
+ */
672
+ async getOptionKpis(investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<OptionChartKPIsYearly>>> {
673
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOptionKpis(investmentId, optionId, valueFrameworkId, options);
674
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
675
+ const localVarOperationServerBasePath = operationServerMap['OptionApi.getOptionKpis']?.[localVarOperationServerIndex]?.url;
676
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
677
+ },
615
678
  /**
616
679
  * Retrieve a paginated list of all options for a specific investment.
617
680
  * @summary List options for this investment
@@ -749,6 +812,18 @@ export const OptionApiFactory = function (configuration?: Configuration, basePat
749
812
  getOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<OptionResponse> {
750
813
  return localVarFp.getOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
751
814
  },
815
+ /**
816
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
817
+ * @summary Get the kpis for a given option inside a value framework
818
+ * @param {string} investmentId UUID of the investment
819
+ * @param {string} optionId UUID of the option
820
+ * @param {string} valueFrameworkId UUID of the value framework
821
+ * @param {*} [options] Override http request option.
822
+ * @throws {RequiredError}
823
+ */
824
+ getOptionKpis(investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<OptionChartKPIsYearly>> {
825
+ return localVarFp.getOptionKpis(investmentId, optionId, valueFrameworkId, options).then((request) => request(axios, basePath));
826
+ },
752
827
  /**
753
828
  * Retrieve a paginated list of all options for a specific investment.
754
829
  * @summary List options for this investment
@@ -882,6 +957,19 @@ export class OptionApi extends BaseAPI {
882
957
  return OptionApiFp(this.configuration).getOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
883
958
  }
884
959
 
960
+ /**
961
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
962
+ * @summary Get the kpis for a given option inside a value framework
963
+ * @param {string} investmentId UUID of the investment
964
+ * @param {string} optionId UUID of the option
965
+ * @param {string} valueFrameworkId UUID of the value framework
966
+ * @param {*} [options] Override http request option.
967
+ * @throws {RequiredError}
968
+ */
969
+ public getOptionKpis(investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig) {
970
+ return OptionApiFp(this.configuration).getOptionKpis(investmentId, optionId, valueFrameworkId, options).then((request) => request(this.axios, this.basePath));
971
+ }
972
+
885
973
  /**
886
974
  * Retrieve a paginated list of all options for a specific investment.
887
975
  * @summary List options for this investment
package/api.ts CHANGED
@@ -15,6 +15,7 @@
15
15
 
16
16
 
17
17
  export * from './api/default-api';
18
+ export * from './api/favored-option-api';
18
19
  export * from './api/impact-api';
19
20
  export * from './api/investment-api';
20
21
  export * from './api/metric-api';
@@ -0,0 +1,104 @@
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
+ import type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import { type RequestArgs, BaseAPI } from '../base';
15
+ import type { FavoredOptionRequest } from '../models';
16
+ import type { FavoredOptionResponse } from '../models';
17
+ /**
18
+ * FavoredOptionApi - axios parameter creator
19
+ */
20
+ export declare const FavoredOptionApiAxiosParamCreator: (configuration?: Configuration) => {
21
+ /**
22
+ * Get the preferred option for an investment.
23
+ * @summary Get the preferred option for an investment
24
+ * @param {string} investmentId UUID of the investment
25
+ * @param {*} [options] Override http request option.
26
+ * @throws {RequiredError}
27
+ */
28
+ getFavoredOption: (investmentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
29
+ /**
30
+ * Set the preferred option for an investment.
31
+ * @summary Set the preferred option for an investment
32
+ * @param {string} investmentId UUID of the investment
33
+ * @param {FavoredOptionRequest} favoredOptionRequest
34
+ * @param {*} [options] Override http request option.
35
+ * @throws {RequiredError}
36
+ */
37
+ setFavoredOption: (investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
38
+ };
39
+ /**
40
+ * FavoredOptionApi - functional programming interface
41
+ */
42
+ export declare const FavoredOptionApiFp: (configuration?: Configuration) => {
43
+ /**
44
+ * Get the preferred option for an investment.
45
+ * @summary Get the preferred option for an investment
46
+ * @param {string} investmentId UUID of the investment
47
+ * @param {*} [options] Override http request option.
48
+ * @throws {RequiredError}
49
+ */
50
+ getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FavoredOptionResponse>>;
51
+ /**
52
+ * Set the preferred option for an investment.
53
+ * @summary Set the preferred option for an investment
54
+ * @param {string} investmentId UUID of the investment
55
+ * @param {FavoredOptionRequest} favoredOptionRequest
56
+ * @param {*} [options] Override http request option.
57
+ * @throws {RequiredError}
58
+ */
59
+ setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FavoredOptionResponse>>;
60
+ };
61
+ /**
62
+ * FavoredOptionApi - factory interface
63
+ */
64
+ export declare const FavoredOptionApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
65
+ /**
66
+ * Get the preferred option for an investment.
67
+ * @summary Get the preferred option for an investment
68
+ * @param {string} investmentId UUID of the investment
69
+ * @param {*} [options] Override http request option.
70
+ * @throws {RequiredError}
71
+ */
72
+ getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<FavoredOptionResponse>;
73
+ /**
74
+ * Set the preferred option for an investment.
75
+ * @summary Set the preferred option for an investment
76
+ * @param {string} investmentId UUID of the investment
77
+ * @param {FavoredOptionRequest} favoredOptionRequest
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ */
81
+ setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<FavoredOptionResponse>;
82
+ };
83
+ /**
84
+ * FavoredOptionApi - object-oriented interface
85
+ */
86
+ export declare class FavoredOptionApi extends BaseAPI {
87
+ /**
88
+ * Get the preferred option for an investment.
89
+ * @summary Get the preferred option for an investment
90
+ * @param {string} investmentId UUID of the investment
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FavoredOptionResponse, any, {}>>;
95
+ /**
96
+ * Set the preferred option for an investment.
97
+ * @summary Set the preferred option for an investment
98
+ * @param {string} investmentId UUID of the investment
99
+ * @param {FavoredOptionRequest} favoredOptionRequest
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FavoredOptionResponse, any, {}>>;
104
+ }
@@ -0,0 +1,209 @@
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-dev3
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.FavoredOptionApi = exports.FavoredOptionApiFactory = exports.FavoredOptionApiFp = exports.FavoredOptionApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("../common");
30
+ // @ts-ignore
31
+ const base_1 = require("../base");
32
+ /**
33
+ * FavoredOptionApi - axios parameter creator
34
+ */
35
+ const FavoredOptionApiAxiosParamCreator = function (configuration) {
36
+ return {
37
+ /**
38
+ * Get the preferred option for an investment.
39
+ * @summary Get the preferred option for an investment
40
+ * @param {string} investmentId UUID of the investment
41
+ * @param {*} [options] Override http request option.
42
+ * @throws {RequiredError}
43
+ */
44
+ getFavoredOption: (investmentId_1, ...args_1) => __awaiter(this, [investmentId_1, ...args_1], void 0, function* (investmentId, options = {}) {
45
+ // verify required parameter 'investmentId' is not null or undefined
46
+ (0, common_1.assertParamExists)('getFavoredOption', 'investmentId', investmentId);
47
+ const localVarPath = `/investment/{investment_id}/favored_option`
48
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
51
+ let baseOptions;
52
+ if (configuration) {
53
+ baseOptions = configuration.baseOptions;
54
+ }
55
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
56
+ const localVarHeaderParameter = {};
57
+ const localVarQueryParameter = {};
58
+ // authentication OAuth2AuthorizationCodeBearer required
59
+ // oauth required
60
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
61
+ localVarHeaderParameter['Accept'] = 'application/json';
62
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
63
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
64
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
65
+ return {
66
+ url: (0, common_1.toPathString)(localVarUrlObj),
67
+ options: localVarRequestOptions,
68
+ };
69
+ }),
70
+ /**
71
+ * Set the preferred option for an investment.
72
+ * @summary Set the preferred option for an investment
73
+ * @param {string} investmentId UUID of the investment
74
+ * @param {FavoredOptionRequest} favoredOptionRequest
75
+ * @param {*} [options] Override http request option.
76
+ * @throws {RequiredError}
77
+ */
78
+ setFavoredOption: (investmentId_1, favoredOptionRequest_1, ...args_1) => __awaiter(this, [investmentId_1, favoredOptionRequest_1, ...args_1], void 0, function* (investmentId, favoredOptionRequest, options = {}) {
79
+ // verify required parameter 'investmentId' is not null or undefined
80
+ (0, common_1.assertParamExists)('setFavoredOption', 'investmentId', investmentId);
81
+ // verify required parameter 'favoredOptionRequest' is not null or undefined
82
+ (0, common_1.assertParamExists)('setFavoredOption', 'favoredOptionRequest', favoredOptionRequest);
83
+ const localVarPath = `/investment/{investment_id}/favored_option`
84
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
85
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
86
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
87
+ let baseOptions;
88
+ if (configuration) {
89
+ baseOptions = configuration.baseOptions;
90
+ }
91
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
92
+ const localVarHeaderParameter = {};
93
+ const localVarQueryParameter = {};
94
+ // authentication OAuth2AuthorizationCodeBearer required
95
+ // oauth required
96
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
97
+ localVarHeaderParameter['Content-Type'] = 'application/json';
98
+ localVarHeaderParameter['Accept'] = 'application/json';
99
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
100
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
101
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
102
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(favoredOptionRequest, localVarRequestOptions, configuration);
103
+ return {
104
+ url: (0, common_1.toPathString)(localVarUrlObj),
105
+ options: localVarRequestOptions,
106
+ };
107
+ }),
108
+ };
109
+ };
110
+ exports.FavoredOptionApiAxiosParamCreator = FavoredOptionApiAxiosParamCreator;
111
+ /**
112
+ * FavoredOptionApi - functional programming interface
113
+ */
114
+ const FavoredOptionApiFp = function (configuration) {
115
+ const localVarAxiosParamCreator = (0, exports.FavoredOptionApiAxiosParamCreator)(configuration);
116
+ return {
117
+ /**
118
+ * Get the preferred option for an investment.
119
+ * @summary Get the preferred option for an investment
120
+ * @param {string} investmentId UUID of the investment
121
+ * @param {*} [options] Override http request option.
122
+ * @throws {RequiredError}
123
+ */
124
+ getFavoredOption(investmentId, options) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ var _a, _b, _c;
127
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFavoredOption(investmentId, options);
128
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
129
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FavoredOptionApi.getFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
130
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
131
+ });
132
+ },
133
+ /**
134
+ * Set the preferred option for an investment.
135
+ * @summary Set the preferred option for an investment
136
+ * @param {string} investmentId UUID of the investment
137
+ * @param {FavoredOptionRequest} favoredOptionRequest
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ var _a, _b, _c;
144
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.setFavoredOption(investmentId, favoredOptionRequest, options);
145
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
146
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FavoredOptionApi.setFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
147
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
148
+ });
149
+ },
150
+ };
151
+ };
152
+ exports.FavoredOptionApiFp = FavoredOptionApiFp;
153
+ /**
154
+ * FavoredOptionApi - factory interface
155
+ */
156
+ const FavoredOptionApiFactory = function (configuration, basePath, axios) {
157
+ const localVarFp = (0, exports.FavoredOptionApiFp)(configuration);
158
+ return {
159
+ /**
160
+ * Get the preferred option for an investment.
161
+ * @summary Get the preferred option for an investment
162
+ * @param {string} investmentId UUID of the investment
163
+ * @param {*} [options] Override http request option.
164
+ * @throws {RequiredError}
165
+ */
166
+ getFavoredOption(investmentId, options) {
167
+ return localVarFp.getFavoredOption(investmentId, options).then((request) => request(axios, basePath));
168
+ },
169
+ /**
170
+ * Set the preferred option for an investment.
171
+ * @summary Set the preferred option for an investment
172
+ * @param {string} investmentId UUID of the investment
173
+ * @param {FavoredOptionRequest} favoredOptionRequest
174
+ * @param {*} [options] Override http request option.
175
+ * @throws {RequiredError}
176
+ */
177
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
178
+ return localVarFp.setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(axios, basePath));
179
+ },
180
+ };
181
+ };
182
+ exports.FavoredOptionApiFactory = FavoredOptionApiFactory;
183
+ /**
184
+ * FavoredOptionApi - object-oriented interface
185
+ */
186
+ class FavoredOptionApi extends base_1.BaseAPI {
187
+ /**
188
+ * Get the preferred option for an investment.
189
+ * @summary Get the preferred option for an investment
190
+ * @param {string} investmentId UUID of the investment
191
+ * @param {*} [options] Override http request option.
192
+ * @throws {RequiredError}
193
+ */
194
+ getFavoredOption(investmentId, options) {
195
+ return (0, exports.FavoredOptionApiFp)(this.configuration).getFavoredOption(investmentId, options).then((request) => request(this.axios, this.basePath));
196
+ }
197
+ /**
198
+ * Set the preferred option for an investment.
199
+ * @summary Set the preferred option for an investment
200
+ * @param {string} investmentId UUID of the investment
201
+ * @param {FavoredOptionRequest} favoredOptionRequest
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
206
+ return (0, exports.FavoredOptionApiFp)(this.configuration).setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(this.axios, this.basePath));
207
+ }
208
+ }
209
+ exports.FavoredOptionApi = FavoredOptionApi;
@@ -12,12 +12,15 @@
12
12
  import type { Configuration } from '../configuration';
13
13
  import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
14
  import { type RequestArgs, BaseAPI } from '../base';
15
+ import type { FavoredOptionRequest } from '../models';
16
+ import type { FavoredOptionResponse } from '../models';
15
17
  import type { ImpactAPIResponse } from '../models';
16
18
  import type { ImpactCreate } from '../models';
17
19
  import type { ImpactUpdate } from '../models';
18
20
  import type { InvestmentCreate } from '../models';
19
21
  import type { InvestmentResponse } from '../models';
20
22
  import type { InvestmentUpdate } from '../models';
23
+ import type { OptionChartKPIsYearly } from '../models';
21
24
  import type { OptionCreate } from '../models';
22
25
  import type { OptionResponse } from '../models';
23
26
  import type { OptionUpdate } from '../models';
@@ -71,6 +74,14 @@ export declare const InvestmentApiAxiosParamCreator: (configuration?: Configurat
71
74
  * @throws {RequiredError}
72
75
  */
73
76
  deleteOptionForInvestment: (optionId: string, investmentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
77
+ /**
78
+ * Get the preferred option for an investment.
79
+ * @summary Get the preferred option for an investment
80
+ * @param {string} investmentId UUID of the investment
81
+ * @param {*} [options] Override http request option.
82
+ * @throws {RequiredError}
83
+ */
84
+ getFavoredOption: (investmentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
74
85
  /**
75
86
  * Retrieve a specific impact for the option.
76
87
  * @summary Get an impact for this option
@@ -118,6 +129,16 @@ export declare const InvestmentApiAxiosParamCreator: (configuration?: Configurat
118
129
  * @throws {RequiredError}
119
130
  */
120
131
  getOptionForInvestment: (optionId: string, investmentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
132
+ /**
133
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
134
+ * @summary Get the kpis for a given option inside a value framework
135
+ * @param {string} investmentId UUID of the investment
136
+ * @param {string} optionId UUID of the option
137
+ * @param {string} valueFrameworkId UUID of the value framework
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ getOptionKpis: (investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
121
142
  /**
122
143
  * Retrieve a paginated list of all options for a specific investment.
123
144
  * @summary List options for this investment
@@ -166,6 +187,15 @@ export declare const InvestmentApiAxiosParamCreator: (configuration?: Configurat
166
187
  * @throws {RequiredError}
167
188
  */
168
189
  postInvestment: (investmentCreate: InvestmentCreate, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
190
+ /**
191
+ * Set the preferred option for an investment.
192
+ * @summary Set the preferred option for an investment
193
+ * @param {string} investmentId UUID of the investment
194
+ * @param {FavoredOptionRequest} favoredOptionRequest
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ setFavoredOption: (investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
169
199
  };
170
200
  /**
171
201
  * InvestmentApi - functional programming interface
@@ -217,6 +247,14 @@ export declare const InvestmentApiFp: (configuration?: Configuration) => {
217
247
  * @throws {RequiredError}
218
248
  */
219
249
  deleteOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
250
+ /**
251
+ * Get the preferred option for an investment.
252
+ * @summary Get the preferred option for an investment
253
+ * @param {string} investmentId UUID of the investment
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ */
257
+ getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FavoredOptionResponse>>;
220
258
  /**
221
259
  * Retrieve a specific impact for the option.
222
260
  * @summary Get an impact for this option
@@ -264,6 +302,16 @@ export declare const InvestmentApiFp: (configuration?: Configuration) => {
264
302
  * @throws {RequiredError}
265
303
  */
266
304
  getOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OptionResponse>>;
305
+ /**
306
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
307
+ * @summary Get the kpis for a given option inside a value framework
308
+ * @param {string} investmentId UUID of the investment
309
+ * @param {string} optionId UUID of the option
310
+ * @param {string} valueFrameworkId UUID of the value framework
311
+ * @param {*} [options] Override http request option.
312
+ * @throws {RequiredError}
313
+ */
314
+ getOptionKpis(investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<OptionChartKPIsYearly>>>;
267
315
  /**
268
316
  * Retrieve a paginated list of all options for a specific investment.
269
317
  * @summary List options for this investment
@@ -312,6 +360,15 @@ export declare const InvestmentApiFp: (configuration?: Configuration) => {
312
360
  * @throws {RequiredError}
313
361
  */
314
362
  postInvestment(investmentCreate: InvestmentCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InvestmentResponse>>;
363
+ /**
364
+ * Set the preferred option for an investment.
365
+ * @summary Set the preferred option for an investment
366
+ * @param {string} investmentId UUID of the investment
367
+ * @param {FavoredOptionRequest} favoredOptionRequest
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ */
371
+ setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FavoredOptionResponse>>;
315
372
  };
316
373
  /**
317
374
  * InvestmentApi - factory interface
@@ -363,6 +420,14 @@ export declare const InvestmentApiFactory: (configuration?: Configuration, baseP
363
420
  * @throws {RequiredError}
364
421
  */
365
422
  deleteOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
423
+ /**
424
+ * Get the preferred option for an investment.
425
+ * @summary Get the preferred option for an investment
426
+ * @param {string} investmentId UUID of the investment
427
+ * @param {*} [options] Override http request option.
428
+ * @throws {RequiredError}
429
+ */
430
+ getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<FavoredOptionResponse>;
366
431
  /**
367
432
  * Retrieve a specific impact for the option.
368
433
  * @summary Get an impact for this option
@@ -410,6 +475,16 @@ export declare const InvestmentApiFactory: (configuration?: Configuration, baseP
410
475
  * @throws {RequiredError}
411
476
  */
412
477
  getOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<OptionResponse>;
478
+ /**
479
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
480
+ * @summary Get the kpis for a given option inside a value framework
481
+ * @param {string} investmentId UUID of the investment
482
+ * @param {string} optionId UUID of the option
483
+ * @param {string} valueFrameworkId UUID of the value framework
484
+ * @param {*} [options] Override http request option.
485
+ * @throws {RequiredError}
486
+ */
487
+ getOptionKpis(investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<OptionChartKPIsYearly>>;
413
488
  /**
414
489
  * Retrieve a paginated list of all options for a specific investment.
415
490
  * @summary List options for this investment
@@ -458,6 +533,15 @@ export declare const InvestmentApiFactory: (configuration?: Configuration, baseP
458
533
  * @throws {RequiredError}
459
534
  */
460
535
  postInvestment(investmentCreate: InvestmentCreate, options?: RawAxiosRequestConfig): AxiosPromise<InvestmentResponse>;
536
+ /**
537
+ * Set the preferred option for an investment.
538
+ * @summary Set the preferred option for an investment
539
+ * @param {string} investmentId UUID of the investment
540
+ * @param {FavoredOptionRequest} favoredOptionRequest
541
+ * @param {*} [options] Override http request option.
542
+ * @throws {RequiredError}
543
+ */
544
+ setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<FavoredOptionResponse>;
461
545
  };
462
546
  /**
463
547
  * InvestmentApi - object-oriented interface
@@ -509,6 +593,14 @@ export declare class InvestmentApi extends BaseAPI {
509
593
  * @throws {RequiredError}
510
594
  */
511
595
  deleteOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
596
+ /**
597
+ * Get the preferred option for an investment.
598
+ * @summary Get the preferred option for an investment
599
+ * @param {string} investmentId UUID of the investment
600
+ * @param {*} [options] Override http request option.
601
+ * @throws {RequiredError}
602
+ */
603
+ getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FavoredOptionResponse, any, {}>>;
512
604
  /**
513
605
  * Retrieve a specific impact for the option.
514
606
  * @summary Get an impact for this option
@@ -556,6 +648,16 @@ export declare class InvestmentApi extends BaseAPI {
556
648
  * @throws {RequiredError}
557
649
  */
558
650
  getOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OptionResponse, any, {}>>;
651
+ /**
652
+ * Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
653
+ * @summary Get the kpis for a given option inside a value framework
654
+ * @param {string} investmentId UUID of the investment
655
+ * @param {string} optionId UUID of the option
656
+ * @param {string} valueFrameworkId UUID of the value framework
657
+ * @param {*} [options] Override http request option.
658
+ * @throws {RequiredError}
659
+ */
660
+ getOptionKpis(investmentId: string, optionId: string, valueFrameworkId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OptionChartKPIsYearly[], any, {}>>;
559
661
  /**
560
662
  * Retrieve a paginated list of all options for a specific investment.
561
663
  * @summary List options for this investment
@@ -604,4 +706,13 @@ export declare class InvestmentApi extends BaseAPI {
604
706
  * @throws {RequiredError}
605
707
  */
606
708
  postInvestment(investmentCreate: InvestmentCreate, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<InvestmentResponse, any, {}>>;
709
+ /**
710
+ * Set the preferred option for an investment.
711
+ * @summary Set the preferred option for an investment
712
+ * @param {string} investmentId UUID of the investment
713
+ * @param {FavoredOptionRequest} favoredOptionRequest
714
+ * @param {*} [options] Override http request option.
715
+ * @throws {RequiredError}
716
+ */
717
+ setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FavoredOptionResponse, any, {}>>;
607
718
  }