@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.
- package/README.md +8 -2
- package/api/favored-option-api.ts +210 -0
- package/api/investment-api.ts +156 -0
- package/api.ts +1 -0
- package/dist/api/favored-option-api.d.ts +104 -0
- package/dist/api/favored-option-api.js +209 -0
- package/dist/api/investment-api.d.ts +70 -0
- package/dist/api/investment-api.js +146 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/esm/api/favored-option-api.d.ts +104 -0
- package/dist/esm/api/favored-option-api.js +202 -0
- package/dist/esm/api/investment-api.d.ts +70 -0
- package/dist/esm/api/investment-api.js +146 -0
- package/dist/esm/api.d.ts +1 -0
- package/dist/esm/api.js +1 -0
- package/dist/esm/models/favored-option-request.d.ts +20 -0
- package/dist/esm/models/favored-option-request.js +14 -0
- package/dist/esm/models/favored-option-response.d.ts +20 -0
- package/dist/esm/models/favored-option-response.js +14 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/investment-response.d.ts +1 -0
- package/dist/esm/models/option-response.d.ts +2 -1
- package/dist/esm/models/option-update.d.ts +2 -0
- package/dist/models/favored-option-request.d.ts +20 -0
- package/dist/models/favored-option-request.js +15 -0
- package/dist/models/favored-option-response.d.ts +20 -0
- package/dist/models/favored-option-response.js +15 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/investment-response.d.ts +1 -0
- package/dist/models/option-response.d.ts +2 -1
- package/dist/models/option-update.d.ts +2 -0
- package/docs/FavoredOptionApi.md +119 -0
- package/docs/FavoredOptionRequest.md +21 -0
- package/docs/FavoredOptionResponse.md +21 -0
- package/docs/InvestmentApi.md +112 -0
- package/docs/InvestmentResponse.md +2 -0
- package/docs/OptionResponse.md +4 -2
- package/docs/OptionUpdate.md +4 -0
- package/models/favored-option-request.ts +26 -0
- package/models/favored-option-response.ts +26 -0
- package/models/index.ts +2 -0
- package/models/investment-response.ts +1 -0
- package/models/option-response.ts +2 -1
- package/models/option-update.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import globalAxios from 'axios';
|
|
24
|
+
// Some imports not used depending on template conditions
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { DUMMY_BASE_URL, assertParamExists, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
|
|
29
|
+
/**
|
|
30
|
+
* FavoredOptionApi - axios parameter creator
|
|
31
|
+
*/
|
|
32
|
+
export const FavoredOptionApiAxiosParamCreator = function (configuration) {
|
|
33
|
+
return {
|
|
34
|
+
/**
|
|
35
|
+
* Get the preferred option for an investment.
|
|
36
|
+
* @summary Get the preferred option for an investment
|
|
37
|
+
* @param {string} investmentId UUID of the investment
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
*/
|
|
41
|
+
getFavoredOption: (investmentId_1, ...args_1) => __awaiter(this, [investmentId_1, ...args_1], void 0, function* (investmentId, options = {}) {
|
|
42
|
+
// verify required parameter 'investmentId' is not null or undefined
|
|
43
|
+
assertParamExists('getFavoredOption', 'investmentId', investmentId);
|
|
44
|
+
const localVarPath = `/investment/{investment_id}/favored_option`
|
|
45
|
+
.replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
|
|
46
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
48
|
+
let baseOptions;
|
|
49
|
+
if (configuration) {
|
|
50
|
+
baseOptions = configuration.baseOptions;
|
|
51
|
+
}
|
|
52
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
53
|
+
const localVarHeaderParameter = {};
|
|
54
|
+
const localVarQueryParameter = {};
|
|
55
|
+
// authentication OAuth2AuthorizationCodeBearer required
|
|
56
|
+
// oauth required
|
|
57
|
+
yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
|
|
58
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
59
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
60
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
61
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
62
|
+
return {
|
|
63
|
+
url: toPathString(localVarUrlObj),
|
|
64
|
+
options: localVarRequestOptions,
|
|
65
|
+
};
|
|
66
|
+
}),
|
|
67
|
+
/**
|
|
68
|
+
* Set the preferred option for an investment.
|
|
69
|
+
* @summary Set the preferred option for an investment
|
|
70
|
+
* @param {string} investmentId UUID of the investment
|
|
71
|
+
* @param {FavoredOptionRequest} favoredOptionRequest
|
|
72
|
+
* @param {*} [options] Override http request option.
|
|
73
|
+
* @throws {RequiredError}
|
|
74
|
+
*/
|
|
75
|
+
setFavoredOption: (investmentId_1, favoredOptionRequest_1, ...args_1) => __awaiter(this, [investmentId_1, favoredOptionRequest_1, ...args_1], void 0, function* (investmentId, favoredOptionRequest, options = {}) {
|
|
76
|
+
// verify required parameter 'investmentId' is not null or undefined
|
|
77
|
+
assertParamExists('setFavoredOption', 'investmentId', investmentId);
|
|
78
|
+
// verify required parameter 'favoredOptionRequest' is not null or undefined
|
|
79
|
+
assertParamExists('setFavoredOption', 'favoredOptionRequest', favoredOptionRequest);
|
|
80
|
+
const localVarPath = `/investment/{investment_id}/favored_option`
|
|
81
|
+
.replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
|
|
82
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
83
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
84
|
+
let baseOptions;
|
|
85
|
+
if (configuration) {
|
|
86
|
+
baseOptions = configuration.baseOptions;
|
|
87
|
+
}
|
|
88
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
89
|
+
const localVarHeaderParameter = {};
|
|
90
|
+
const localVarQueryParameter = {};
|
|
91
|
+
// authentication OAuth2AuthorizationCodeBearer required
|
|
92
|
+
// oauth required
|
|
93
|
+
yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
|
|
94
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
95
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
96
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
97
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
98
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
99
|
+
localVarRequestOptions.data = serializeDataIfNeeded(favoredOptionRequest, localVarRequestOptions, configuration);
|
|
100
|
+
return {
|
|
101
|
+
url: toPathString(localVarUrlObj),
|
|
102
|
+
options: localVarRequestOptions,
|
|
103
|
+
};
|
|
104
|
+
}),
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* FavoredOptionApi - functional programming interface
|
|
109
|
+
*/
|
|
110
|
+
export const FavoredOptionApiFp = function (configuration) {
|
|
111
|
+
const localVarAxiosParamCreator = FavoredOptionApiAxiosParamCreator(configuration);
|
|
112
|
+
return {
|
|
113
|
+
/**
|
|
114
|
+
* Get the preferred option for an investment.
|
|
115
|
+
* @summary Get the preferred option for an investment
|
|
116
|
+
* @param {string} investmentId UUID of the investment
|
|
117
|
+
* @param {*} [options] Override http request option.
|
|
118
|
+
* @throws {RequiredError}
|
|
119
|
+
*/
|
|
120
|
+
getFavoredOption(investmentId, options) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
var _a, _b, _c;
|
|
123
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getFavoredOption(investmentId, options);
|
|
124
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
125
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['FavoredOptionApi.getFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
126
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
/**
|
|
130
|
+
* Set the preferred option for an investment.
|
|
131
|
+
* @summary Set the preferred option for an investment
|
|
132
|
+
* @param {string} investmentId UUID of the investment
|
|
133
|
+
* @param {FavoredOptionRequest} favoredOptionRequest
|
|
134
|
+
* @param {*} [options] Override http request option.
|
|
135
|
+
* @throws {RequiredError}
|
|
136
|
+
*/
|
|
137
|
+
setFavoredOption(investmentId, favoredOptionRequest, options) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
var _a, _b, _c;
|
|
140
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.setFavoredOption(investmentId, favoredOptionRequest, options);
|
|
141
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
142
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['FavoredOptionApi.setFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
143
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* FavoredOptionApi - factory interface
|
|
150
|
+
*/
|
|
151
|
+
export const FavoredOptionApiFactory = function (configuration, basePath, axios) {
|
|
152
|
+
const localVarFp = FavoredOptionApiFp(configuration);
|
|
153
|
+
return {
|
|
154
|
+
/**
|
|
155
|
+
* Get the preferred option for an investment.
|
|
156
|
+
* @summary Get the preferred option for an investment
|
|
157
|
+
* @param {string} investmentId UUID of the investment
|
|
158
|
+
* @param {*} [options] Override http request option.
|
|
159
|
+
* @throws {RequiredError}
|
|
160
|
+
*/
|
|
161
|
+
getFavoredOption(investmentId, options) {
|
|
162
|
+
return localVarFp.getFavoredOption(investmentId, options).then((request) => request(axios, basePath));
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* Set the preferred option for an investment.
|
|
166
|
+
* @summary Set the preferred option for an investment
|
|
167
|
+
* @param {string} investmentId UUID of the investment
|
|
168
|
+
* @param {FavoredOptionRequest} favoredOptionRequest
|
|
169
|
+
* @param {*} [options] Override http request option.
|
|
170
|
+
* @throws {RequiredError}
|
|
171
|
+
*/
|
|
172
|
+
setFavoredOption(investmentId, favoredOptionRequest, options) {
|
|
173
|
+
return localVarFp.setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(axios, basePath));
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* FavoredOptionApi - object-oriented interface
|
|
179
|
+
*/
|
|
180
|
+
export class FavoredOptionApi extends BaseAPI {
|
|
181
|
+
/**
|
|
182
|
+
* Get the preferred option for an investment.
|
|
183
|
+
* @summary Get the preferred option for an investment
|
|
184
|
+
* @param {string} investmentId UUID of the investment
|
|
185
|
+
* @param {*} [options] Override http request option.
|
|
186
|
+
* @throws {RequiredError}
|
|
187
|
+
*/
|
|
188
|
+
getFavoredOption(investmentId, options) {
|
|
189
|
+
return FavoredOptionApiFp(this.configuration).getFavoredOption(investmentId, options).then((request) => request(this.axios, this.basePath));
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Set the preferred option for an investment.
|
|
193
|
+
* @summary Set the preferred option for an investment
|
|
194
|
+
* @param {string} investmentId UUID of the investment
|
|
195
|
+
* @param {FavoredOptionRequest} favoredOptionRequest
|
|
196
|
+
* @param {*} [options] Override http request option.
|
|
197
|
+
* @throws {RequiredError}
|
|
198
|
+
*/
|
|
199
|
+
setFavoredOption(investmentId, favoredOptionRequest, options) {
|
|
200
|
+
return FavoredOptionApiFp(this.configuration).setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -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
|
}
|
|
@@ -219,6 +219,39 @@ export const InvestmentApiAxiosParamCreator = function (configuration) {
|
|
|
219
219
|
options: localVarRequestOptions,
|
|
220
220
|
};
|
|
221
221
|
}),
|
|
222
|
+
/**
|
|
223
|
+
* Get the preferred option for an investment.
|
|
224
|
+
* @summary Get the preferred option for an investment
|
|
225
|
+
* @param {string} investmentId UUID of the investment
|
|
226
|
+
* @param {*} [options] Override http request option.
|
|
227
|
+
* @throws {RequiredError}
|
|
228
|
+
*/
|
|
229
|
+
getFavoredOption: (investmentId_1, ...args_1) => __awaiter(this, [investmentId_1, ...args_1], void 0, function* (investmentId, options = {}) {
|
|
230
|
+
// verify required parameter 'investmentId' is not null or undefined
|
|
231
|
+
assertParamExists('getFavoredOption', 'investmentId', investmentId);
|
|
232
|
+
const localVarPath = `/investment/{investment_id}/favored_option`
|
|
233
|
+
.replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
|
|
234
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
235
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
236
|
+
let baseOptions;
|
|
237
|
+
if (configuration) {
|
|
238
|
+
baseOptions = configuration.baseOptions;
|
|
239
|
+
}
|
|
240
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
241
|
+
const localVarHeaderParameter = {};
|
|
242
|
+
const localVarQueryParameter = {};
|
|
243
|
+
// authentication OAuth2AuthorizationCodeBearer required
|
|
244
|
+
// oauth required
|
|
245
|
+
yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
|
|
246
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
247
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
248
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
249
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
250
|
+
return {
|
|
251
|
+
url: toPathString(localVarUrlObj),
|
|
252
|
+
options: localVarRequestOptions,
|
|
253
|
+
};
|
|
254
|
+
}),
|
|
222
255
|
/**
|
|
223
256
|
* Retrieve a specific impact for the option.
|
|
224
257
|
* @summary Get an impact for this option
|
|
@@ -613,6 +646,44 @@ export const InvestmentApiAxiosParamCreator = function (configuration) {
|
|
|
613
646
|
options: localVarRequestOptions,
|
|
614
647
|
};
|
|
615
648
|
}),
|
|
649
|
+
/**
|
|
650
|
+
* Set the preferred option for an investment.
|
|
651
|
+
* @summary Set the preferred option for an investment
|
|
652
|
+
* @param {string} investmentId UUID of the investment
|
|
653
|
+
* @param {FavoredOptionRequest} favoredOptionRequest
|
|
654
|
+
* @param {*} [options] Override http request option.
|
|
655
|
+
* @throws {RequiredError}
|
|
656
|
+
*/
|
|
657
|
+
setFavoredOption: (investmentId_1, favoredOptionRequest_1, ...args_1) => __awaiter(this, [investmentId_1, favoredOptionRequest_1, ...args_1], void 0, function* (investmentId, favoredOptionRequest, options = {}) {
|
|
658
|
+
// verify required parameter 'investmentId' is not null or undefined
|
|
659
|
+
assertParamExists('setFavoredOption', 'investmentId', investmentId);
|
|
660
|
+
// verify required parameter 'favoredOptionRequest' is not null or undefined
|
|
661
|
+
assertParamExists('setFavoredOption', 'favoredOptionRequest', favoredOptionRequest);
|
|
662
|
+
const localVarPath = `/investment/{investment_id}/favored_option`
|
|
663
|
+
.replace(`{${"investment_id"}}`, encodeURIComponent(String(investmentId)));
|
|
664
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
665
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
666
|
+
let baseOptions;
|
|
667
|
+
if (configuration) {
|
|
668
|
+
baseOptions = configuration.baseOptions;
|
|
669
|
+
}
|
|
670
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
671
|
+
const localVarHeaderParameter = {};
|
|
672
|
+
const localVarQueryParameter = {};
|
|
673
|
+
// authentication OAuth2AuthorizationCodeBearer required
|
|
674
|
+
// oauth required
|
|
675
|
+
yield setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
|
|
676
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
677
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
678
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
679
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
680
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
681
|
+
localVarRequestOptions.data = serializeDataIfNeeded(favoredOptionRequest, localVarRequestOptions, configuration);
|
|
682
|
+
return {
|
|
683
|
+
url: toPathString(localVarUrlObj),
|
|
684
|
+
options: localVarRequestOptions,
|
|
685
|
+
};
|
|
686
|
+
}),
|
|
616
687
|
};
|
|
617
688
|
};
|
|
618
689
|
/**
|
|
@@ -707,6 +778,22 @@ export const InvestmentApiFp = function (configuration) {
|
|
|
707
778
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
708
779
|
});
|
|
709
780
|
},
|
|
781
|
+
/**
|
|
782
|
+
* Get the preferred option for an investment.
|
|
783
|
+
* @summary Get the preferred option for an investment
|
|
784
|
+
* @param {string} investmentId UUID of the investment
|
|
785
|
+
* @param {*} [options] Override http request option.
|
|
786
|
+
* @throws {RequiredError}
|
|
787
|
+
*/
|
|
788
|
+
getFavoredOption(investmentId, options) {
|
|
789
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
790
|
+
var _a, _b, _c;
|
|
791
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getFavoredOption(investmentId, options);
|
|
792
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
793
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvestmentApi.getFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
794
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
795
|
+
});
|
|
796
|
+
},
|
|
710
797
|
/**
|
|
711
798
|
* Retrieve a specific impact for the option.
|
|
712
799
|
* @summary Get an impact for this option
|
|
@@ -882,6 +969,23 @@ export const InvestmentApiFp = function (configuration) {
|
|
|
882
969
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
883
970
|
});
|
|
884
971
|
},
|
|
972
|
+
/**
|
|
973
|
+
* Set the preferred option for an investment.
|
|
974
|
+
* @summary Set the preferred option for an investment
|
|
975
|
+
* @param {string} investmentId UUID of the investment
|
|
976
|
+
* @param {FavoredOptionRequest} favoredOptionRequest
|
|
977
|
+
* @param {*} [options] Override http request option.
|
|
978
|
+
* @throws {RequiredError}
|
|
979
|
+
*/
|
|
980
|
+
setFavoredOption(investmentId, favoredOptionRequest, options) {
|
|
981
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
982
|
+
var _a, _b, _c;
|
|
983
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.setFavoredOption(investmentId, favoredOptionRequest, options);
|
|
984
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
985
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvestmentApi.setFavoredOption']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
986
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
987
|
+
});
|
|
988
|
+
},
|
|
885
989
|
};
|
|
886
990
|
};
|
|
887
991
|
/**
|
|
@@ -946,6 +1050,16 @@ export const InvestmentApiFactory = function (configuration, basePath, axios) {
|
|
|
946
1050
|
deleteOptionForInvestment(optionId, investmentId, options) {
|
|
947
1051
|
return localVarFp.deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(axios, basePath));
|
|
948
1052
|
},
|
|
1053
|
+
/**
|
|
1054
|
+
* Get the preferred option for an investment.
|
|
1055
|
+
* @summary Get the preferred option for an investment
|
|
1056
|
+
* @param {string} investmentId UUID of the investment
|
|
1057
|
+
* @param {*} [options] Override http request option.
|
|
1058
|
+
* @throws {RequiredError}
|
|
1059
|
+
*/
|
|
1060
|
+
getFavoredOption(investmentId, options) {
|
|
1061
|
+
return localVarFp.getFavoredOption(investmentId, options).then((request) => request(axios, basePath));
|
|
1062
|
+
},
|
|
949
1063
|
/**
|
|
950
1064
|
* Retrieve a specific impact for the option.
|
|
951
1065
|
* @summary Get an impact for this option
|
|
@@ -1061,6 +1175,17 @@ export const InvestmentApiFactory = function (configuration, basePath, axios) {
|
|
|
1061
1175
|
postInvestment(investmentCreate, options) {
|
|
1062
1176
|
return localVarFp.postInvestment(investmentCreate, options).then((request) => request(axios, basePath));
|
|
1063
1177
|
},
|
|
1178
|
+
/**
|
|
1179
|
+
* Set the preferred option for an investment.
|
|
1180
|
+
* @summary Set the preferred option for an investment
|
|
1181
|
+
* @param {string} investmentId UUID of the investment
|
|
1182
|
+
* @param {FavoredOptionRequest} favoredOptionRequest
|
|
1183
|
+
* @param {*} [options] Override http request option.
|
|
1184
|
+
* @throws {RequiredError}
|
|
1185
|
+
*/
|
|
1186
|
+
setFavoredOption(investmentId, favoredOptionRequest, options) {
|
|
1187
|
+
return localVarFp.setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(axios, basePath));
|
|
1188
|
+
},
|
|
1064
1189
|
};
|
|
1065
1190
|
};
|
|
1066
1191
|
/**
|
|
@@ -1123,6 +1248,16 @@ export class InvestmentApi extends BaseAPI {
|
|
|
1123
1248
|
deleteOptionForInvestment(optionId, investmentId, options) {
|
|
1124
1249
|
return InvestmentApiFp(this.configuration).deleteOptionForInvestment(optionId, investmentId, options).then((request) => request(this.axios, this.basePath));
|
|
1125
1250
|
}
|
|
1251
|
+
/**
|
|
1252
|
+
* Get the preferred option for an investment.
|
|
1253
|
+
* @summary Get the preferred option for an investment
|
|
1254
|
+
* @param {string} investmentId UUID of the investment
|
|
1255
|
+
* @param {*} [options] Override http request option.
|
|
1256
|
+
* @throws {RequiredError}
|
|
1257
|
+
*/
|
|
1258
|
+
getFavoredOption(investmentId, options) {
|
|
1259
|
+
return InvestmentApiFp(this.configuration).getFavoredOption(investmentId, options).then((request) => request(this.axios, this.basePath));
|
|
1260
|
+
}
|
|
1126
1261
|
/**
|
|
1127
1262
|
* Retrieve a specific impact for the option.
|
|
1128
1263
|
* @summary Get an impact for this option
|
|
@@ -1238,4 +1373,15 @@ export class InvestmentApi extends BaseAPI {
|
|
|
1238
1373
|
postInvestment(investmentCreate, options) {
|
|
1239
1374
|
return InvestmentApiFp(this.configuration).postInvestment(investmentCreate, options).then((request) => request(this.axios, this.basePath));
|
|
1240
1375
|
}
|
|
1376
|
+
/**
|
|
1377
|
+
* Set the preferred option for an investment.
|
|
1378
|
+
* @summary Set the preferred option for an investment
|
|
1379
|
+
* @param {string} investmentId UUID of the investment
|
|
1380
|
+
* @param {FavoredOptionRequest} favoredOptionRequest
|
|
1381
|
+
* @param {*} [options] Override http request option.
|
|
1382
|
+
* @throws {RequiredError}
|
|
1383
|
+
*/
|
|
1384
|
+
setFavoredOption(investmentId, favoredOptionRequest, options) {
|
|
1385
|
+
return InvestmentApiFp(this.configuration).setFavoredOption(investmentId, favoredOptionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1386
|
+
}
|
|
1241
1387
|
}
|
package/dist/esm/api.d.ts
CHANGED
package/dist/esm/api.js
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset Investment Planning
|
|
3
|
+
* API for Asset Investment Planning
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.2.0-dev3
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Request body for setting the preferred option.
|
|
14
|
+
*/
|
|
15
|
+
export interface FavoredOptionRequest {
|
|
16
|
+
/**
|
|
17
|
+
* ID of the option to set as preferred
|
|
18
|
+
*/
|
|
19
|
+
'option_id': string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Asset Investment Planning
|
|
5
|
+
* API for Asset Investment Planning
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.2.0-dev3
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset Investment Planning
|
|
3
|
+
* API for Asset Investment Planning
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.2.0-dev3
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Response for favored option endpoints.
|
|
14
|
+
*/
|
|
15
|
+
export interface FavoredOptionResponse {
|
|
16
|
+
/**
|
|
17
|
+
* ID of the preferred option
|
|
18
|
+
*/
|
|
19
|
+
'option_id': string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Asset Investment Planning
|
|
5
|
+
* API for Asset Investment Planning
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.2.0-dev3
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
package/dist/esm/models/index.js
CHANGED
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
* Schema for Option responses (includes all fields)
|
|
14
14
|
*/
|
|
15
15
|
export interface OptionResponse {
|
|
16
|
+
'cost': number;
|
|
16
17
|
'created_at': string;
|
|
17
18
|
'description'?: string | null;
|
|
19
|
+
'duration': number;
|
|
18
20
|
'expected_start_date': string;
|
|
19
21
|
'id': string;
|
|
20
22
|
/**
|
|
@@ -26,6 +28,5 @@ export interface OptionResponse {
|
|
|
26
28
|
*/
|
|
27
29
|
'name': string;
|
|
28
30
|
'owner_name'?: string | null;
|
|
29
|
-
'preferred': boolean;
|
|
30
31
|
'updated_at': string;
|
|
31
32
|
}
|