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

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 (48) hide show
  1. package/README.md +8 -2
  2. package/api/favored-option-api.ts +210 -0
  3. package/api/investment-api.ts +156 -0
  4. package/api.ts +1 -0
  5. package/dist/api/favored-option-api.d.ts +104 -0
  6. package/dist/api/favored-option-api.js +209 -0
  7. package/dist/api/investment-api.d.ts +70 -0
  8. package/dist/api/investment-api.js +146 -0
  9. package/dist/api.d.ts +1 -0
  10. package/dist/api.js +1 -0
  11. package/dist/esm/api/favored-option-api.d.ts +104 -0
  12. package/dist/esm/api/favored-option-api.js +202 -0
  13. package/dist/esm/api/investment-api.d.ts +70 -0
  14. package/dist/esm/api/investment-api.js +146 -0
  15. package/dist/esm/api.d.ts +1 -0
  16. package/dist/esm/api.js +1 -0
  17. package/dist/esm/models/favored-option-request.d.ts +20 -0
  18. package/dist/esm/models/favored-option-request.js +14 -0
  19. package/dist/esm/models/favored-option-response.d.ts +20 -0
  20. package/dist/esm/models/favored-option-response.js +14 -0
  21. package/dist/esm/models/index.d.ts +2 -0
  22. package/dist/esm/models/index.js +2 -0
  23. package/dist/esm/models/investment-response.d.ts +1 -0
  24. package/dist/esm/models/option-response.d.ts +2 -1
  25. package/dist/esm/models/option-update.d.ts +2 -0
  26. package/dist/models/favored-option-request.d.ts +20 -0
  27. package/dist/models/favored-option-request.js +15 -0
  28. package/dist/models/favored-option-response.d.ts +20 -0
  29. package/dist/models/favored-option-response.js +15 -0
  30. package/dist/models/index.d.ts +2 -0
  31. package/dist/models/index.js +2 -0
  32. package/dist/models/investment-response.d.ts +1 -0
  33. package/dist/models/option-response.d.ts +2 -1
  34. package/dist/models/option-update.d.ts +2 -0
  35. package/docs/FavoredOptionApi.md +119 -0
  36. package/docs/FavoredOptionRequest.md +21 -0
  37. package/docs/FavoredOptionResponse.md +21 -0
  38. package/docs/InvestmentApi.md +112 -0
  39. package/docs/InvestmentResponse.md +2 -0
  40. package/docs/OptionResponse.md +4 -2
  41. package/docs/OptionUpdate.md +4 -0
  42. package/models/favored-option-request.ts +26 -0
  43. package/models/favored-option-response.ts +26 -0
  44. package/models/index.ts +2 -0
  45. package/models/investment-response.ts +1 -0
  46. package/models/option-response.ts +2 -1
  47. package/models/option-update.ts +2 -0
  48. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @cosmotech/aip-client@0.2.0-dev3
1
+ ## @cosmotech/aip-client@0.2.0-dev4
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @cosmotech/aip-client@0.2.0-dev3 --save
39
+ npm install @cosmotech/aip-client@0.2.0-dev4 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -52,6 +52,8 @@ All URIs are relative to *http://localhost*
52
52
  Class | Method | HTTP request | Description
53
53
  ------------ | ------------- | ------------- | -------------
54
54
  *DefaultApi* | [**root**](docs/DefaultApi.md#root) | **GET** /about | Root
55
+ *FavoredOptionApi* | [**getFavoredOption**](docs/FavoredOptionApi.md#getfavoredoption) | **GET** /investment/{investment_id}/favored_option | Get the preferred option for an investment
56
+ *FavoredOptionApi* | [**setFavoredOption**](docs/FavoredOptionApi.md#setfavoredoption) | **POST** /investment/{investment_id}/favored_option | Set the preferred option for an investment
55
57
  *ImpactApi* | [**createImpactForOption**](docs/ImpactApi.md#createimpactforoption) | **POST** /investment/{investment_id}/option/{option_id}/impact/ | Create an impact for this option
56
58
  *ImpactApi* | [**deleteImpactForOption**](docs/ImpactApi.md#deleteimpactforoption) | **DELETE** /investment/{investment_id}/option/{option_id}/impact/{impact_id} | Delete an impact for this option
57
59
  *ImpactApi* | [**getImpactForOption**](docs/ImpactApi.md#getimpactforoption) | **GET** /investment/{investment_id}/option/{option_id}/impact/{impact_id} | Get an impact for this option
@@ -62,6 +64,7 @@ Class | Method | HTTP request | Description
62
64
  *InvestmentApi* | [**deleteImpactForOption**](docs/InvestmentApi.md#deleteimpactforoption) | **DELETE** /investment/{investment_id}/option/{option_id}/impact/{impact_id} | Delete an impact for this option
63
65
  *InvestmentApi* | [**deleteInvestment**](docs/InvestmentApi.md#deleteinvestment) | **DELETE** /investment/{investment_id} | Delete an investment
64
66
  *InvestmentApi* | [**deleteOptionForInvestment**](docs/InvestmentApi.md#deleteoptionforinvestment) | **DELETE** /investment/{investment_id}/option/{option_id} | Delete an option for this investment
67
+ *InvestmentApi* | [**getFavoredOption**](docs/InvestmentApi.md#getfavoredoption) | **GET** /investment/{investment_id}/favored_option | Get the preferred option for an investment
65
68
  *InvestmentApi* | [**getImpactForOption**](docs/InvestmentApi.md#getimpactforoption) | **GET** /investment/{investment_id}/option/{option_id}/impact/{impact_id} | Get an impact for this option
66
69
  *InvestmentApi* | [**getImpactsForOption**](docs/InvestmentApi.md#getimpactsforoption) | **GET** /investment/{investment_id}/option/{option_id}/impact/ | List impacts for this option
67
70
  *InvestmentApi* | [**getInvestmentById**](docs/InvestmentApi.md#getinvestmentbyid) | **GET** /investment/{investment_id} | Get an investment by ID
@@ -72,6 +75,7 @@ Class | Method | HTTP request | Description
72
75
  *InvestmentApi* | [**patchInvestment**](docs/InvestmentApi.md#patchinvestment) | **PATCH** /investment/{investment_id} | Partially update an investment
73
76
  *InvestmentApi* | [**patchOptionForInvestment**](docs/InvestmentApi.md#patchoptionforinvestment) | **PATCH** /investment/{investment_id}/option/{option_id} | Partially update an option for this investment
74
77
  *InvestmentApi* | [**postInvestment**](docs/InvestmentApi.md#postinvestment) | **POST** /investment/ | Create an investment
78
+ *InvestmentApi* | [**setFavoredOption**](docs/InvestmentApi.md#setfavoredoption) | **POST** /investment/{investment_id}/favored_option | Set the preferred option for an investment
75
79
  *MetricApi* | [**createMetricForObjective**](docs/MetricApi.md#createmetricforobjective) | **POST** /objective/{objective_id}/metric/ | Create a metric for this objective
76
80
  *MetricApi* | [**deleteMetricForObjective**](docs/MetricApi.md#deletemetricforobjective) | **DELETE** /objective/{objective_id}/metric/{metric_id} | Delete a metric for this objective
77
81
  *MetricApi* | [**getMetricForObjective**](docs/MetricApi.md#getmetricforobjective) | **GET** /objective/{objective_id}/metric/{metric_id} | Get a metric for this objective
@@ -136,6 +140,8 @@ Class | Method | HTTP request | Description
136
140
  ### Documentation For Models
137
141
 
138
142
  - [EvolutionType](docs/EvolutionType.md)
143
+ - [FavoredOptionRequest](docs/FavoredOptionRequest.md)
144
+ - [FavoredOptionResponse](docs/FavoredOptionResponse.md)
139
145
  - [HTTPValidationError](docs/HTTPValidationError.md)
140
146
  - [ImpactAPIResponse](docs/ImpactAPIResponse.md)
141
147
  - [ImpactCreate](docs/ImpactCreate.md)
@@ -0,0 +1,210 @@
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
+
15
+
16
+ import type { Configuration } from '../configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import type { FavoredOptionRequest } from '../models';
26
+ // @ts-ignore
27
+ import type { FavoredOptionResponse } from '../models';
28
+ /**
29
+ * FavoredOptionApi - axios parameter creator
30
+ */
31
+ export const FavoredOptionApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ * Get the preferred option for an investment.
35
+ * @summary Get the preferred option for an investment
36
+ * @param {string} investmentId UUID of the investment
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ getFavoredOption: async (investmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
41
+ // verify required parameter 'investmentId' is not null or undefined
42
+ assertParamExists('getFavoredOption', 'investmentId', investmentId)
43
+ const localVarPath = `/investment/{investment_id}/favored_option`
44
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
45
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
46
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
47
+ let baseOptions;
48
+ if (configuration) {
49
+ baseOptions = configuration.baseOptions;
50
+ }
51
+
52
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
53
+ const localVarHeaderParameter = {} as any;
54
+ const localVarQueryParameter = {} as any;
55
+
56
+ // authentication OAuth2AuthorizationCodeBearer required
57
+ // oauth required
58
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
59
+
60
+ localVarHeaderParameter['Accept'] = 'application/json';
61
+
62
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
63
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
64
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
65
+
66
+ return {
67
+ url: toPathString(localVarUrlObj),
68
+ options: localVarRequestOptions,
69
+ };
70
+ },
71
+ /**
72
+ * Set the preferred option for an investment.
73
+ * @summary Set the preferred option for an investment
74
+ * @param {string} investmentId UUID of the investment
75
+ * @param {FavoredOptionRequest} favoredOptionRequest
76
+ * @param {*} [options] Override http request option.
77
+ * @throws {RequiredError}
78
+ */
79
+ setFavoredOption: async (investmentId: string, favoredOptionRequest: FavoredOptionRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
80
+ // verify required parameter 'investmentId' is not null or undefined
81
+ assertParamExists('setFavoredOption', 'investmentId', investmentId)
82
+ // verify required parameter 'favoredOptionRequest' is not null or undefined
83
+ assertParamExists('setFavoredOption', 'favoredOptionRequest', favoredOptionRequest)
84
+ const localVarPath = `/investment/{investment_id}/favored_option`
85
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
86
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
87
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
88
+ let baseOptions;
89
+ if (configuration) {
90
+ baseOptions = configuration.baseOptions;
91
+ }
92
+
93
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
94
+ const localVarHeaderParameter = {} as any;
95
+ const localVarQueryParameter = {} as any;
96
+
97
+ // authentication OAuth2AuthorizationCodeBearer required
98
+ // oauth required
99
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
100
+
101
+ localVarHeaderParameter['Content-Type'] = 'application/json';
102
+ localVarHeaderParameter['Accept'] = 'application/json';
103
+
104
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
105
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
106
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
107
+ localVarRequestOptions.data = serializeDataIfNeeded(favoredOptionRequest, localVarRequestOptions, configuration)
108
+
109
+ return {
110
+ url: toPathString(localVarUrlObj),
111
+ options: localVarRequestOptions,
112
+ };
113
+ },
114
+ }
115
+ };
116
+
117
+ /**
118
+ * FavoredOptionApi - functional programming interface
119
+ */
120
+ export const FavoredOptionApiFp = function(configuration?: Configuration) {
121
+ const localVarAxiosParamCreator = FavoredOptionApiAxiosParamCreator(configuration)
122
+ return {
123
+ /**
124
+ * Get the preferred option for an investment.
125
+ * @summary Get the preferred option for an investment
126
+ * @param {string} investmentId UUID of the investment
127
+ * @param {*} [options] Override http request option.
128
+ * @throws {RequiredError}
129
+ */
130
+ async getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FavoredOptionResponse>> {
131
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFavoredOption(investmentId, options);
132
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
133
+ const localVarOperationServerBasePath = operationServerMap['FavoredOptionApi.getFavoredOption']?.[localVarOperationServerIndex]?.url;
134
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
135
+ },
136
+ /**
137
+ * Set the preferred option for an investment.
138
+ * @summary Set the preferred option for an investment
139
+ * @param {string} investmentId UUID of the investment
140
+ * @param {FavoredOptionRequest} favoredOptionRequest
141
+ * @param {*} [options] Override http request option.
142
+ * @throws {RequiredError}
143
+ */
144
+ async setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FavoredOptionResponse>> {
145
+ const localVarAxiosArgs = await localVarAxiosParamCreator.setFavoredOption(investmentId, favoredOptionRequest, options);
146
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
147
+ const localVarOperationServerBasePath = operationServerMap['FavoredOptionApi.setFavoredOption']?.[localVarOperationServerIndex]?.url;
148
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
149
+ },
150
+ }
151
+ };
152
+
153
+ /**
154
+ * FavoredOptionApi - factory interface
155
+ */
156
+ export const FavoredOptionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
157
+ const localVarFp = 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: string, options?: RawAxiosRequestConfig): AxiosPromise<FavoredOptionResponse> {
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: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<FavoredOptionResponse> {
178
+ return localVarFp.setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(axios, basePath));
179
+ },
180
+ };
181
+ };
182
+
183
+ /**
184
+ * FavoredOptionApi - object-oriented interface
185
+ */
186
+ export class FavoredOptionApi extends 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
+ public getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig) {
195
+ return FavoredOptionApiFp(this.configuration).getFavoredOption(investmentId, options).then((request) => request(this.axios, this.basePath));
196
+ }
197
+
198
+ /**
199
+ * Set the preferred option for an investment.
200
+ * @summary Set the preferred option for an investment
201
+ * @param {string} investmentId UUID of the investment
202
+ * @param {FavoredOptionRequest} favoredOptionRequest
203
+ * @param {*} [options] Override http request option.
204
+ * @throws {RequiredError}
205
+ */
206
+ public setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig) {
207
+ return FavoredOptionApiFp(this.configuration).setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(this.axios, this.basePath));
208
+ }
209
+ }
210
+
@@ -22,6 +22,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
22
22
  // @ts-ignore
23
23
  import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
24
  // @ts-ignore
25
+ import type { FavoredOptionRequest } from '../models';
26
+ // @ts-ignore
27
+ import type { FavoredOptionResponse } from '../models';
28
+ // @ts-ignore
25
29
  import type { ImpactAPIResponse } from '../models';
26
30
  // @ts-ignore
27
31
  import type { ImpactCreate } from '../models';
@@ -248,6 +252,44 @@ export const InvestmentApiAxiosParamCreator = function (configuration?: Configur
248
252
  await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
249
253
 
250
254
 
255
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
256
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
257
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
258
+
259
+ return {
260
+ url: toPathString(localVarUrlObj),
261
+ options: localVarRequestOptions,
262
+ };
263
+ },
264
+ /**
265
+ * Get the preferred option for an investment.
266
+ * @summary Get the preferred option for an investment
267
+ * @param {string} investmentId UUID of the investment
268
+ * @param {*} [options] Override http request option.
269
+ * @throws {RequiredError}
270
+ */
271
+ getFavoredOption: async (investmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
272
+ // verify required parameter 'investmentId' is not null or undefined
273
+ assertParamExists('getFavoredOption', 'investmentId', investmentId)
274
+ const localVarPath = `/investment/{investment_id}/favored_option`
275
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
276
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
277
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
278
+ let baseOptions;
279
+ if (configuration) {
280
+ baseOptions = configuration.baseOptions;
281
+ }
282
+
283
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
284
+ const localVarHeaderParameter = {} as any;
285
+ const localVarQueryParameter = {} as any;
286
+
287
+ // authentication OAuth2AuthorizationCodeBearer required
288
+ // oauth required
289
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
290
+
291
+ localVarHeaderParameter['Accept'] = 'application/json';
292
+
251
293
  setSearchParams(localVarUrlObj, localVarQueryParameter);
252
294
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
253
295
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -702,6 +744,49 @@ export const InvestmentApiAxiosParamCreator = function (configuration?: Configur
702
744
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
703
745
  localVarRequestOptions.data = serializeDataIfNeeded(investmentCreate, localVarRequestOptions, configuration)
704
746
 
747
+ return {
748
+ url: toPathString(localVarUrlObj),
749
+ options: localVarRequestOptions,
750
+ };
751
+ },
752
+ /**
753
+ * Set the preferred option for an investment.
754
+ * @summary Set the preferred option for an investment
755
+ * @param {string} investmentId UUID of the investment
756
+ * @param {FavoredOptionRequest} favoredOptionRequest
757
+ * @param {*} [options] Override http request option.
758
+ * @throws {RequiredError}
759
+ */
760
+ setFavoredOption: async (investmentId: string, favoredOptionRequest: FavoredOptionRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
761
+ // verify required parameter 'investmentId' is not null or undefined
762
+ assertParamExists('setFavoredOption', 'investmentId', investmentId)
763
+ // verify required parameter 'favoredOptionRequest' is not null or undefined
764
+ assertParamExists('setFavoredOption', 'favoredOptionRequest', favoredOptionRequest)
765
+ const localVarPath = `/investment/{investment_id}/favored_option`
766
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
767
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
768
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
769
+ let baseOptions;
770
+ if (configuration) {
771
+ baseOptions = configuration.baseOptions;
772
+ }
773
+
774
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
775
+ const localVarHeaderParameter = {} as any;
776
+ const localVarQueryParameter = {} as any;
777
+
778
+ // authentication OAuth2AuthorizationCodeBearer required
779
+ // oauth required
780
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration)
781
+
782
+ localVarHeaderParameter['Content-Type'] = 'application/json';
783
+ localVarHeaderParameter['Accept'] = 'application/json';
784
+
785
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
786
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
787
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
788
+ localVarRequestOptions.data = serializeDataIfNeeded(favoredOptionRequest, localVarRequestOptions, configuration)
789
+
705
790
  return {
706
791
  url: toPathString(localVarUrlObj),
707
792
  options: localVarRequestOptions,
@@ -787,6 +872,19 @@ export const InvestmentApiFp = function(configuration?: Configuration) {
787
872
  const localVarOperationServerBasePath = operationServerMap['InvestmentApi.deleteOptionForInvestment']?.[localVarOperationServerIndex]?.url;
788
873
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
789
874
  },
875
+ /**
876
+ * Get the preferred option for an investment.
877
+ * @summary Get the preferred option for an investment
878
+ * @param {string} investmentId UUID of the investment
879
+ * @param {*} [options] Override http request option.
880
+ * @throws {RequiredError}
881
+ */
882
+ async getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FavoredOptionResponse>> {
883
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFavoredOption(investmentId, options);
884
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
885
+ const localVarOperationServerBasePath = operationServerMap['InvestmentApi.getFavoredOption']?.[localVarOperationServerIndex]?.url;
886
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
887
+ },
790
888
  /**
791
889
  * Retrieve a specific impact for the option.
792
890
  * @summary Get an impact for this option
@@ -932,6 +1030,20 @@ export const InvestmentApiFp = function(configuration?: Configuration) {
932
1030
  const localVarOperationServerBasePath = operationServerMap['InvestmentApi.postInvestment']?.[localVarOperationServerIndex]?.url;
933
1031
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
934
1032
  },
1033
+ /**
1034
+ * Set the preferred option for an investment.
1035
+ * @summary Set the preferred option for an investment
1036
+ * @param {string} investmentId UUID of the investment
1037
+ * @param {FavoredOptionRequest} favoredOptionRequest
1038
+ * @param {*} [options] Override http request option.
1039
+ * @throws {RequiredError}
1040
+ */
1041
+ async setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FavoredOptionResponse>> {
1042
+ const localVarAxiosArgs = await localVarAxiosParamCreator.setFavoredOption(investmentId, favoredOptionRequest, options);
1043
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1044
+ const localVarOperationServerBasePath = operationServerMap['InvestmentApi.setFavoredOption']?.[localVarOperationServerIndex]?.url;
1045
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1046
+ },
935
1047
  }
936
1048
  };
937
1049
 
@@ -997,6 +1109,16 @@ export const InvestmentApiFactory = function (configuration?: Configuration, bas
997
1109
  deleteOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
998
1110
  return localVarFp.deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
999
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: string, options?: RawAxiosRequestConfig): AxiosPromise<FavoredOptionResponse> {
1120
+ return localVarFp.getFavoredOption(investmentId, options).then((request) => request(axios, basePath));
1121
+ },
1000
1122
  /**
1001
1123
  * Retrieve a specific impact for the option.
1002
1124
  * @summary Get an impact for this option
@@ -1112,6 +1234,17 @@ export const InvestmentApiFactory = function (configuration?: Configuration, bas
1112
1234
  postInvestment(investmentCreate: InvestmentCreate, options?: RawAxiosRequestConfig): AxiosPromise<InvestmentResponse> {
1113
1235
  return localVarFp.postInvestment(investmentCreate, options).then((request) => request(axios, basePath));
1114
1236
  },
1237
+ /**
1238
+ * Set the preferred option for an investment.
1239
+ * @summary Set the preferred option for an investment
1240
+ * @param {string} investmentId UUID of the investment
1241
+ * @param {FavoredOptionRequest} favoredOptionRequest
1242
+ * @param {*} [options] Override http request option.
1243
+ * @throws {RequiredError}
1244
+ */
1245
+ setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<FavoredOptionResponse> {
1246
+ return localVarFp.setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(axios, basePath));
1247
+ },
1115
1248
  };
1116
1249
  };
1117
1250
 
@@ -1180,6 +1313,17 @@ export class InvestmentApi extends BaseAPI {
1180
1313
  return InvestmentApiFp(this.configuration).deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
1181
1314
  }
1182
1315
 
1316
+ /**
1317
+ * Get the preferred option for an investment.
1318
+ * @summary Get the preferred option for an investment
1319
+ * @param {string} investmentId UUID of the investment
1320
+ * @param {*} [options] Override http request option.
1321
+ * @throws {RequiredError}
1322
+ */
1323
+ public getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig) {
1324
+ return InvestmentApiFp(this.configuration).getFavoredOption(investmentId, options).then((request) => request(this.axios, this.basePath));
1325
+ }
1326
+
1183
1327
  /**
1184
1328
  * Retrieve a specific impact for the option.
1185
1329
  * @summary Get an impact for this option
@@ -1304,5 +1448,17 @@ export class InvestmentApi extends BaseAPI {
1304
1448
  public postInvestment(investmentCreate: InvestmentCreate, options?: RawAxiosRequestConfig) {
1305
1449
  return InvestmentApiFp(this.configuration).postInvestment(investmentCreate, options).then((request) => request(this.axios, this.basePath));
1306
1450
  }
1451
+
1452
+ /**
1453
+ * Set the preferred option for an investment.
1454
+ * @summary Set the preferred option for an investment
1455
+ * @param {string} investmentId UUID of the investment
1456
+ * @param {FavoredOptionRequest} favoredOptionRequest
1457
+ * @param {*} [options] Override http request option.
1458
+ * @throws {RequiredError}
1459
+ */
1460
+ public setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig) {
1461
+ return InvestmentApiFp(this.configuration).setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(this.axios, this.basePath));
1462
+ }
1307
1463
  }
1308
1464
 
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
+ }