@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
@@ -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,6 +12,8 @@
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';
@@ -71,6 +73,14 @@ export declare const InvestmentApiAxiosParamCreator: (configuration?: Configurat
71
73
  * @throws {RequiredError}
72
74
  */
73
75
  deleteOptionForInvestment: (optionId: string, investmentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
76
+ /**
77
+ * Get the preferred option for an investment.
78
+ * @summary Get the preferred option for an investment
79
+ * @param {string} investmentId UUID of the investment
80
+ * @param {*} [options] Override http request option.
81
+ * @throws {RequiredError}
82
+ */
83
+ getFavoredOption: (investmentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
74
84
  /**
75
85
  * Retrieve a specific impact for the option.
76
86
  * @summary Get an impact for this option
@@ -166,6 +176,15 @@ export declare const InvestmentApiAxiosParamCreator: (configuration?: Configurat
166
176
  * @throws {RequiredError}
167
177
  */
168
178
  postInvestment: (investmentCreate: InvestmentCreate, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
179
+ /**
180
+ * Set the preferred option for an investment.
181
+ * @summary Set the preferred option for an investment
182
+ * @param {string} investmentId UUID of the investment
183
+ * @param {FavoredOptionRequest} favoredOptionRequest
184
+ * @param {*} [options] Override http request option.
185
+ * @throws {RequiredError}
186
+ */
187
+ setFavoredOption: (investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
169
188
  };
170
189
  /**
171
190
  * InvestmentApi - functional programming interface
@@ -217,6 +236,14 @@ export declare const InvestmentApiFp: (configuration?: Configuration) => {
217
236
  * @throws {RequiredError}
218
237
  */
219
238
  deleteOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
239
+ /**
240
+ * Get the preferred option for an investment.
241
+ * @summary Get the preferred option for an investment
242
+ * @param {string} investmentId UUID of the investment
243
+ * @param {*} [options] Override http request option.
244
+ * @throws {RequiredError}
245
+ */
246
+ getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FavoredOptionResponse>>;
220
247
  /**
221
248
  * Retrieve a specific impact for the option.
222
249
  * @summary Get an impact for this option
@@ -312,6 +339,15 @@ export declare const InvestmentApiFp: (configuration?: Configuration) => {
312
339
  * @throws {RequiredError}
313
340
  */
314
341
  postInvestment(investmentCreate: InvestmentCreate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InvestmentResponse>>;
342
+ /**
343
+ * Set the preferred option for an investment.
344
+ * @summary Set the preferred option for an investment
345
+ * @param {string} investmentId UUID of the investment
346
+ * @param {FavoredOptionRequest} favoredOptionRequest
347
+ * @param {*} [options] Override http request option.
348
+ * @throws {RequiredError}
349
+ */
350
+ setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FavoredOptionResponse>>;
315
351
  };
316
352
  /**
317
353
  * InvestmentApi - factory interface
@@ -363,6 +399,14 @@ export declare const InvestmentApiFactory: (configuration?: Configuration, baseP
363
399
  * @throws {RequiredError}
364
400
  */
365
401
  deleteOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
402
+ /**
403
+ * Get the preferred option for an investment.
404
+ * @summary Get the preferred option for an investment
405
+ * @param {string} investmentId UUID of the investment
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ */
409
+ getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): AxiosPromise<FavoredOptionResponse>;
366
410
  /**
367
411
  * Retrieve a specific impact for the option.
368
412
  * @summary Get an impact for this option
@@ -458,6 +502,15 @@ export declare const InvestmentApiFactory: (configuration?: Configuration, baseP
458
502
  * @throws {RequiredError}
459
503
  */
460
504
  postInvestment(investmentCreate: InvestmentCreate, options?: RawAxiosRequestConfig): AxiosPromise<InvestmentResponse>;
505
+ /**
506
+ * Set the preferred option for an investment.
507
+ * @summary Set the preferred option for an investment
508
+ * @param {string} investmentId UUID of the investment
509
+ * @param {FavoredOptionRequest} favoredOptionRequest
510
+ * @param {*} [options] Override http request option.
511
+ * @throws {RequiredError}
512
+ */
513
+ setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): AxiosPromise<FavoredOptionResponse>;
461
514
  };
462
515
  /**
463
516
  * InvestmentApi - object-oriented interface
@@ -509,6 +562,14 @@ export declare class InvestmentApi extends BaseAPI {
509
562
  * @throws {RequiredError}
510
563
  */
511
564
  deleteOptionForInvestment(optionId: string, investmentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
565
+ /**
566
+ * Get the preferred option for an investment.
567
+ * @summary Get the preferred option for an investment
568
+ * @param {string} investmentId UUID of the investment
569
+ * @param {*} [options] Override http request option.
570
+ * @throws {RequiredError}
571
+ */
572
+ getFavoredOption(investmentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FavoredOptionResponse, any, {}>>;
512
573
  /**
513
574
  * Retrieve a specific impact for the option.
514
575
  * @summary Get an impact for this option
@@ -604,4 +665,13 @@ export declare class InvestmentApi extends BaseAPI {
604
665
  * @throws {RequiredError}
605
666
  */
606
667
  postInvestment(investmentCreate: InvestmentCreate, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<InvestmentResponse, any, {}>>;
668
+ /**
669
+ * Set the preferred option for an investment.
670
+ * @summary Set the preferred option for an investment
671
+ * @param {string} investmentId UUID of the investment
672
+ * @param {FavoredOptionRequest} favoredOptionRequest
673
+ * @param {*} [options] Override http request option.
674
+ * @throws {RequiredError}
675
+ */
676
+ setFavoredOption(investmentId: string, favoredOptionRequest: FavoredOptionRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FavoredOptionResponse, any, {}>>;
607
677
  }
@@ -222,6 +222,39 @@ const InvestmentApiAxiosParamCreator = function (configuration) {
222
222
  options: localVarRequestOptions,
223
223
  };
224
224
  }),
225
+ /**
226
+ * Get the preferred option for an investment.
227
+ * @summary Get the preferred option for an investment
228
+ * @param {string} investmentId UUID of the investment
229
+ * @param {*} [options] Override http request option.
230
+ * @throws {RequiredError}
231
+ */
232
+ getFavoredOption: (investmentId_1, ...args_1) => __awaiter(this, [investmentId_1, ...args_1], void 0, function* (investmentId, options = {}) {
233
+ // verify required parameter 'investmentId' is not null or undefined
234
+ (0, common_1.assertParamExists)('getFavoredOption', 'investmentId', investmentId);
235
+ const localVarPath = `/investment/{investment_id}/favored_option`
236
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
237
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
238
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
239
+ let baseOptions;
240
+ if (configuration) {
241
+ baseOptions = configuration.baseOptions;
242
+ }
243
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
244
+ const localVarHeaderParameter = {};
245
+ const localVarQueryParameter = {};
246
+ // authentication OAuth2AuthorizationCodeBearer required
247
+ // oauth required
248
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
249
+ localVarHeaderParameter['Accept'] = 'application/json';
250
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
251
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
252
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
253
+ return {
254
+ url: (0, common_1.toPathString)(localVarUrlObj),
255
+ options: localVarRequestOptions,
256
+ };
257
+ }),
225
258
  /**
226
259
  * Retrieve a specific impact for the option.
227
260
  * @summary Get an impact for this option
@@ -616,6 +649,44 @@ const InvestmentApiAxiosParamCreator = function (configuration) {
616
649
  options: localVarRequestOptions,
617
650
  };
618
651
  }),
652
+ /**
653
+ * Set the preferred option for an investment.
654
+ * @summary Set the preferred option for an investment
655
+ * @param {string} investmentId UUID of the investment
656
+ * @param {FavoredOptionRequest} favoredOptionRequest
657
+ * @param {*} [options] Override http request option.
658
+ * @throws {RequiredError}
659
+ */
660
+ setFavoredOption: (investmentId_1, favoredOptionRequest_1, ...args_1) => __awaiter(this, [investmentId_1, favoredOptionRequest_1, ...args_1], void 0, function* (investmentId, favoredOptionRequest, options = {}) {
661
+ // verify required parameter 'investmentId' is not null or undefined
662
+ (0, common_1.assertParamExists)('setFavoredOption', 'investmentId', investmentId);
663
+ // verify required parameter 'favoredOptionRequest' is not null or undefined
664
+ (0, common_1.assertParamExists)('setFavoredOption', 'favoredOptionRequest', favoredOptionRequest);
665
+ const localVarPath = `/investment/{investment_id}/favored_option`
666
+ .replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
667
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
668
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
669
+ let baseOptions;
670
+ if (configuration) {
671
+ baseOptions = configuration.baseOptions;
672
+ }
673
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
674
+ const localVarHeaderParameter = {};
675
+ const localVarQueryParameter = {};
676
+ // authentication OAuth2AuthorizationCodeBearer required
677
+ // oauth required
678
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
679
+ localVarHeaderParameter['Content-Type'] = 'application/json';
680
+ localVarHeaderParameter['Accept'] = 'application/json';
681
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
682
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
683
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
684
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(favoredOptionRequest, localVarRequestOptions, configuration);
685
+ return {
686
+ url: (0, common_1.toPathString)(localVarUrlObj),
687
+ options: localVarRequestOptions,
688
+ };
689
+ }),
619
690
  };
620
691
  };
621
692
  exports.InvestmentApiAxiosParamCreator = InvestmentApiAxiosParamCreator;
@@ -711,6 +782,22 @@ const InvestmentApiFp = function (configuration) {
711
782
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
712
783
  });
713
784
  },
785
+ /**
786
+ * Get the preferred option for an investment.
787
+ * @summary Get the preferred option for an investment
788
+ * @param {string} investmentId UUID of the investment
789
+ * @param {*} [options] Override http request option.
790
+ * @throws {RequiredError}
791
+ */
792
+ getFavoredOption(investmentId, options) {
793
+ return __awaiter(this, void 0, void 0, function* () {
794
+ var _a, _b, _c;
795
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFavoredOption(investmentId, options);
796
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
797
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.getFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
798
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
799
+ });
800
+ },
714
801
  /**
715
802
  * Retrieve a specific impact for the option.
716
803
  * @summary Get an impact for this option
@@ -886,6 +973,23 @@ const InvestmentApiFp = function (configuration) {
886
973
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
887
974
  });
888
975
  },
976
+ /**
977
+ * Set the preferred option for an investment.
978
+ * @summary Set the preferred option for an investment
979
+ * @param {string} investmentId UUID of the investment
980
+ * @param {FavoredOptionRequest} favoredOptionRequest
981
+ * @param {*} [options] Override http request option.
982
+ * @throws {RequiredError}
983
+ */
984
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
985
+ return __awaiter(this, void 0, void 0, function* () {
986
+ var _a, _b, _c;
987
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.setFavoredOption(investmentId, favoredOptionRequest, options);
988
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
989
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvestmentApi.setFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
990
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
991
+ });
992
+ },
889
993
  };
890
994
  };
891
995
  exports.InvestmentApiFp = InvestmentApiFp;
@@ -951,6 +1055,16 @@ const InvestmentApiFactory = function (configuration, basePath, axios) {
951
1055
  deleteOptionForInvestment(optionId, investmentId, options) {
952
1056
  return localVarFp.deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
953
1057
  },
1058
+ /**
1059
+ * Get the preferred option for an investment.
1060
+ * @summary Get the preferred option for an investment
1061
+ * @param {string} investmentId UUID of the investment
1062
+ * @param {*} [options] Override http request option.
1063
+ * @throws {RequiredError}
1064
+ */
1065
+ getFavoredOption(investmentId, options) {
1066
+ return localVarFp.getFavoredOption(investmentId, options).then((request) => request(axios, basePath));
1067
+ },
954
1068
  /**
955
1069
  * Retrieve a specific impact for the option.
956
1070
  * @summary Get an impact for this option
@@ -1066,6 +1180,17 @@ const InvestmentApiFactory = function (configuration, basePath, axios) {
1066
1180
  postInvestment(investmentCreate, options) {
1067
1181
  return localVarFp.postInvestment(investmentCreate, options).then((request) => request(axios, basePath));
1068
1182
  },
1183
+ /**
1184
+ * Set the preferred option for an investment.
1185
+ * @summary Set the preferred option for an investment
1186
+ * @param {string} investmentId UUID of the investment
1187
+ * @param {FavoredOptionRequest} favoredOptionRequest
1188
+ * @param {*} [options] Override http request option.
1189
+ * @throws {RequiredError}
1190
+ */
1191
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
1192
+ return localVarFp.setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(axios, basePath));
1193
+ },
1069
1194
  };
1070
1195
  };
1071
1196
  exports.InvestmentApiFactory = InvestmentApiFactory;
@@ -1129,6 +1254,16 @@ class InvestmentApi extends base_1.BaseAPI {
1129
1254
  deleteOptionForInvestment(optionId, investmentId, options) {
1130
1255
  return (0, exports.InvestmentApiFp)(this.configuration).deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
1131
1256
  }
1257
+ /**
1258
+ * Get the preferred option for an investment.
1259
+ * @summary Get the preferred option for an investment
1260
+ * @param {string} investmentId UUID of the investment
1261
+ * @param {*} [options] Override http request option.
1262
+ * @throws {RequiredError}
1263
+ */
1264
+ getFavoredOption(investmentId, options) {
1265
+ return (0, exports.InvestmentApiFp)(this.configuration).getFavoredOption(investmentId, options).then((request) => request(this.axios, this.basePath));
1266
+ }
1132
1267
  /**
1133
1268
  * Retrieve a specific impact for the option.
1134
1269
  * @summary Get an impact for this option
@@ -1244,5 +1379,16 @@ class InvestmentApi extends base_1.BaseAPI {
1244
1379
  postInvestment(investmentCreate, options) {
1245
1380
  return (0, exports.InvestmentApiFp)(this.configuration).postInvestment(investmentCreate, options).then((request) => request(this.axios, this.basePath));
1246
1381
  }
1382
+ /**
1383
+ * Set the preferred option for an investment.
1384
+ * @summary Set the preferred option for an investment
1385
+ * @param {string} investmentId UUID of the investment
1386
+ * @param {FavoredOptionRequest} favoredOptionRequest
1387
+ * @param {*} [options] Override http request option.
1388
+ * @throws {RequiredError}
1389
+ */
1390
+ setFavoredOption(investmentId, favoredOptionRequest, options) {
1391
+ return (0, exports.InvestmentApiFp)(this.configuration).setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(this.axios, this.basePath));
1392
+ }
1247
1393
  }
1248
1394
  exports.InvestmentApi = InvestmentApi;
package/dist/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/api.js CHANGED
@@ -28,6 +28,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  __exportStar(require("./api/default-api"), exports);
31
+ __exportStar(require("./api/favored-option-api"), exports);
31
32
  __exportStar(require("./api/impact-api"), exports);
32
33
  __exportStar(require("./api/investment-api"), exports);
33
34
  __exportStar(require("./api/metric-api"), exports);
@@ -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
+ }