@cosmotech/aip-client 0.0.1-rc1
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 +45 -0
- package/package.json +29 -0
- package/src/apis/DefaultApi.ts +53 -0
- package/src/apis/MetricApi.ts +256 -0
- package/src/apis/MetricCostsPerYearApi.ts +286 -0
- package/src/apis/ObjectiveApi.ts +256 -0
- package/src/apis/ObjectiveWeightApi.ts +271 -0
- package/src/apis/ValueFrameworkApi.ts +256 -0
- package/src/apis/index.ts +8 -0
- package/src/index.ts +5 -0
- package/src/models/HTTPValidationError.ts +72 -0
- package/src/models/MeasurementType.ts +38 -0
- package/src/models/MetricCostsPerYearCreate.ts +102 -0
- package/src/models/MetricCostsPerYearResponse.ts +110 -0
- package/src/models/MetricCostsPerYearUpdate.ts +73 -0
- package/src/models/MetricCreate.ts +139 -0
- package/src/models/MetricResponse.ts +174 -0
- package/src/models/MetricType.ts +39 -0
- package/src/models/MetricUpdate.ts +134 -0
- package/src/models/ObjectiveCreate.ts +74 -0
- package/src/models/ObjectiveResponse.ts +109 -0
- package/src/models/ObjectiveUpdate.ts +73 -0
- package/src/models/ObjectiveWeightCreate.ts +83 -0
- package/src/models/ObjectiveWeightResponse.ts +91 -0
- package/src/models/ObjectiveWeightUpdate.ts +65 -0
- package/src/models/ValidationError.ts +91 -0
- package/src/models/ValidationErrorLocInner.ts +44 -0
- package/src/models/ValueFrameworkCreate.ts +74 -0
- package/src/models/ValueFrameworkResponse.ts +109 -0
- package/src/models/ValueFrameworkUpdate.ts +73 -0
- package/src/models/index.ts +22 -0
- package/src/runtime.ts +431 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,256 @@
|
|
|
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.1.0-rc1
|
|
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 * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
ValueFrameworkCreate,
|
|
19
|
+
ValueFrameworkResponse,
|
|
20
|
+
ValueFrameworkUpdate,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
ValueFrameworkCreateFromJSON,
|
|
24
|
+
ValueFrameworkCreateToJSON,
|
|
25
|
+
ValueFrameworkResponseFromJSON,
|
|
26
|
+
ValueFrameworkResponseToJSON,
|
|
27
|
+
ValueFrameworkUpdateFromJSON,
|
|
28
|
+
ValueFrameworkUpdateToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface DeleteValueFrameworkValueFrameworkValueFrameworkIdDeleteRequest {
|
|
32
|
+
valueFrameworkId: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface GetValueFrameworkByIdValueFrameworkValueFrameworkIdGetRequest {
|
|
36
|
+
valueFrameworkId: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface GetValueFrameworksValueFrameworkGetRequest {
|
|
40
|
+
offset?: number;
|
|
41
|
+
limit?: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface PatchValueFrameworkValueFrameworkValueFrameworkIdPatchRequest {
|
|
45
|
+
valueFrameworkId: string;
|
|
46
|
+
valueFrameworkUpdate: ValueFrameworkUpdate;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface PostValueFrameworkValueFrameworkPostRequest {
|
|
50
|
+
valueFrameworkCreate: ValueFrameworkCreate;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
export class ValueFrameworkApi extends runtime.BaseAPI {
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Delete an existing value framework by its ID. Associated objective weights and metric costs per year are also deleted via cascade.
|
|
60
|
+
* Delete a value framework
|
|
61
|
+
*/
|
|
62
|
+
async deleteValueFrameworkValueFrameworkValueFrameworkIdDeleteRaw(requestParameters: DeleteValueFrameworkValueFrameworkValueFrameworkIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
63
|
+
if (requestParameters.valueFrameworkId === null || requestParameters.valueFrameworkId === undefined) {
|
|
64
|
+
throw new runtime.RequiredError('valueFrameworkId','Required parameter requestParameters.valueFrameworkId was null or undefined when calling deleteValueFrameworkValueFrameworkValueFrameworkIdDelete.');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const queryParameters: any = {};
|
|
68
|
+
|
|
69
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
70
|
+
|
|
71
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
72
|
+
// oauth required
|
|
73
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2AuthorizationCodeBearer", []);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const response = await this.request({
|
|
77
|
+
path: `/value_framework/{value_framework_id}`.replace(`{${"value_framework_id"}}`, encodeURIComponent(String(requestParameters.valueFrameworkId))),
|
|
78
|
+
method: 'DELETE',
|
|
79
|
+
headers: headerParameters,
|
|
80
|
+
query: queryParameters,
|
|
81
|
+
}, initOverrides);
|
|
82
|
+
|
|
83
|
+
return new runtime.VoidApiResponse(response);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Delete an existing value framework by its ID. Associated objective weights and metric costs per year are also deleted via cascade.
|
|
88
|
+
* Delete a value framework
|
|
89
|
+
*/
|
|
90
|
+
async deleteValueFrameworkValueFrameworkValueFrameworkIdDelete(requestParameters: DeleteValueFrameworkValueFrameworkValueFrameworkIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
91
|
+
await this.deleteValueFrameworkValueFrameworkValueFrameworkIdDeleteRaw(requestParameters, initOverrides);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Retrieve a single value framework by its ID.
|
|
96
|
+
* Get a value framework by ID
|
|
97
|
+
*/
|
|
98
|
+
async getValueFrameworkByIdValueFrameworkValueFrameworkIdGetRaw(requestParameters: GetValueFrameworkByIdValueFrameworkValueFrameworkIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ValueFrameworkResponse>> {
|
|
99
|
+
if (requestParameters.valueFrameworkId === null || requestParameters.valueFrameworkId === undefined) {
|
|
100
|
+
throw new runtime.RequiredError('valueFrameworkId','Required parameter requestParameters.valueFrameworkId was null or undefined when calling getValueFrameworkByIdValueFrameworkValueFrameworkIdGet.');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const queryParameters: any = {};
|
|
104
|
+
|
|
105
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
106
|
+
|
|
107
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
108
|
+
// oauth required
|
|
109
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2AuthorizationCodeBearer", []);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const response = await this.request({
|
|
113
|
+
path: `/value_framework/{value_framework_id}`.replace(`{${"value_framework_id"}}`, encodeURIComponent(String(requestParameters.valueFrameworkId))),
|
|
114
|
+
method: 'GET',
|
|
115
|
+
headers: headerParameters,
|
|
116
|
+
query: queryParameters,
|
|
117
|
+
}, initOverrides);
|
|
118
|
+
|
|
119
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ValueFrameworkResponseFromJSON(jsonValue));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Retrieve a single value framework by its ID.
|
|
124
|
+
* Get a value framework by ID
|
|
125
|
+
*/
|
|
126
|
+
async getValueFrameworkByIdValueFrameworkValueFrameworkIdGet(requestParameters: GetValueFrameworkByIdValueFrameworkValueFrameworkIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ValueFrameworkResponse> {
|
|
127
|
+
const response = await this.getValueFrameworkByIdValueFrameworkValueFrameworkIdGetRaw(requestParameters, initOverrides);
|
|
128
|
+
return await response.value();
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Retrieve a paginated list of all value frameworks.
|
|
133
|
+
* List value frameworks
|
|
134
|
+
*/
|
|
135
|
+
async getValueFrameworksValueFrameworkGetRaw(requestParameters: GetValueFrameworksValueFrameworkGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ValueFrameworkResponse>>> {
|
|
136
|
+
const queryParameters: any = {};
|
|
137
|
+
|
|
138
|
+
if (requestParameters.offset !== undefined) {
|
|
139
|
+
queryParameters['offset'] = requestParameters.offset;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (requestParameters.limit !== undefined) {
|
|
143
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
147
|
+
|
|
148
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
149
|
+
// oauth required
|
|
150
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2AuthorizationCodeBearer", []);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const response = await this.request({
|
|
154
|
+
path: `/value_framework/`,
|
|
155
|
+
method: 'GET',
|
|
156
|
+
headers: headerParameters,
|
|
157
|
+
query: queryParameters,
|
|
158
|
+
}, initOverrides);
|
|
159
|
+
|
|
160
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ValueFrameworkResponseFromJSON));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Retrieve a paginated list of all value frameworks.
|
|
165
|
+
* List value frameworks
|
|
166
|
+
*/
|
|
167
|
+
async getValueFrameworksValueFrameworkGet(requestParameters: GetValueFrameworksValueFrameworkGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ValueFrameworkResponse>> {
|
|
168
|
+
const response = await this.getValueFrameworksValueFrameworkGetRaw(requestParameters, initOverrides);
|
|
169
|
+
return await response.value();
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Update one or more fields of an existing value framework. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
174
|
+
* Partially update a value framework
|
|
175
|
+
*/
|
|
176
|
+
async patchValueFrameworkValueFrameworkValueFrameworkIdPatchRaw(requestParameters: PatchValueFrameworkValueFrameworkValueFrameworkIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ValueFrameworkResponse>> {
|
|
177
|
+
if (requestParameters.valueFrameworkId === null || requestParameters.valueFrameworkId === undefined) {
|
|
178
|
+
throw new runtime.RequiredError('valueFrameworkId','Required parameter requestParameters.valueFrameworkId was null or undefined when calling patchValueFrameworkValueFrameworkValueFrameworkIdPatch.');
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (requestParameters.valueFrameworkUpdate === null || requestParameters.valueFrameworkUpdate === undefined) {
|
|
182
|
+
throw new runtime.RequiredError('valueFrameworkUpdate','Required parameter requestParameters.valueFrameworkUpdate was null or undefined when calling patchValueFrameworkValueFrameworkValueFrameworkIdPatch.');
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const queryParameters: any = {};
|
|
186
|
+
|
|
187
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
188
|
+
|
|
189
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
190
|
+
|
|
191
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
192
|
+
// oauth required
|
|
193
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2AuthorizationCodeBearer", []);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const response = await this.request({
|
|
197
|
+
path: `/value_framework/{value_framework_id}`.replace(`{${"value_framework_id"}}`, encodeURIComponent(String(requestParameters.valueFrameworkId))),
|
|
198
|
+
method: 'PATCH',
|
|
199
|
+
headers: headerParameters,
|
|
200
|
+
query: queryParameters,
|
|
201
|
+
body: ValueFrameworkUpdateToJSON(requestParameters.valueFrameworkUpdate),
|
|
202
|
+
}, initOverrides);
|
|
203
|
+
|
|
204
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ValueFrameworkResponseFromJSON(jsonValue));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Update one or more fields of an existing value framework. Only the fields included in the request body will be modified; omitted fields remain unchanged.
|
|
209
|
+
* Partially update a value framework
|
|
210
|
+
*/
|
|
211
|
+
async patchValueFrameworkValueFrameworkValueFrameworkIdPatch(requestParameters: PatchValueFrameworkValueFrameworkValueFrameworkIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ValueFrameworkResponse> {
|
|
212
|
+
const response = await this.patchValueFrameworkValueFrameworkValueFrameworkIdPatchRaw(requestParameters, initOverrides);
|
|
213
|
+
return await response.value();
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Create a new value framework. Name must be unique and non-empty.
|
|
218
|
+
* Create a value framework
|
|
219
|
+
*/
|
|
220
|
+
async postValueFrameworkValueFrameworkPostRaw(requestParameters: PostValueFrameworkValueFrameworkPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ValueFrameworkResponse>> {
|
|
221
|
+
if (requestParameters.valueFrameworkCreate === null || requestParameters.valueFrameworkCreate === undefined) {
|
|
222
|
+
throw new runtime.RequiredError('valueFrameworkCreate','Required parameter requestParameters.valueFrameworkCreate was null or undefined when calling postValueFrameworkValueFrameworkPost.');
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const queryParameters: any = {};
|
|
226
|
+
|
|
227
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
228
|
+
|
|
229
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
230
|
+
|
|
231
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
232
|
+
// oauth required
|
|
233
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2AuthorizationCodeBearer", []);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const response = await this.request({
|
|
237
|
+
path: `/value_framework/`,
|
|
238
|
+
method: 'POST',
|
|
239
|
+
headers: headerParameters,
|
|
240
|
+
query: queryParameters,
|
|
241
|
+
body: ValueFrameworkCreateToJSON(requestParameters.valueFrameworkCreate),
|
|
242
|
+
}, initOverrides);
|
|
243
|
+
|
|
244
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ValueFrameworkResponseFromJSON(jsonValue));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Create a new value framework. Name must be unique and non-empty.
|
|
249
|
+
* Create a value framework
|
|
250
|
+
*/
|
|
251
|
+
async postValueFrameworkValueFrameworkPost(requestParameters: PostValueFrameworkValueFrameworkPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ValueFrameworkResponse> {
|
|
252
|
+
const response = await this.postValueFrameworkValueFrameworkPostRaw(requestParameters, initOverrides);
|
|
253
|
+
return await response.value();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
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.1.0-rc1
|
|
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
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import type { ValidationError } from './ValidationError';
|
|
17
|
+
import {
|
|
18
|
+
ValidationErrorFromJSON,
|
|
19
|
+
ValidationErrorFromJSONTyped,
|
|
20
|
+
ValidationErrorToJSON,
|
|
21
|
+
} from './ValidationError';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface HTTPValidationError
|
|
27
|
+
*/
|
|
28
|
+
export interface HTTPValidationError {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {Array<ValidationError>}
|
|
32
|
+
* @memberof HTTPValidationError
|
|
33
|
+
*/
|
|
34
|
+
detail?: Array<ValidationError>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the HTTPValidationError interface.
|
|
39
|
+
*/
|
|
40
|
+
export function instanceOfHTTPValidationError(value: object): boolean {
|
|
41
|
+
let isInstance = true;
|
|
42
|
+
|
|
43
|
+
return isInstance;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function HTTPValidationErrorFromJSON(json: any): HTTPValidationError {
|
|
47
|
+
return HTTPValidationErrorFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function HTTPValidationErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): HTTPValidationError {
|
|
51
|
+
if ((json === undefined) || (json === null)) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'detail': !exists(json, 'detail') ? undefined : ((json['detail'] as Array<any>).map(ValidationErrorFromJSON)),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function HTTPValidationErrorToJSON(value?: HTTPValidationError | null): any {
|
|
61
|
+
if (value === undefined) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
if (value === null) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'detail': value.detail === undefined ? undefined : ((value.detail as Array<any>).map(ValidationErrorToJSON)),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
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.1.0-rc1
|
|
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
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const MeasurementType = {
|
|
21
|
+
MAXIMIZATION: 'maximization',
|
|
22
|
+
MINIMIZATION: 'minimization'
|
|
23
|
+
} as const;
|
|
24
|
+
export type MeasurementType = typeof MeasurementType[keyof typeof MeasurementType];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function MeasurementTypeFromJSON(json: any): MeasurementType {
|
|
28
|
+
return MeasurementTypeFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function MeasurementTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): MeasurementType {
|
|
32
|
+
return json as MeasurementType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function MeasurementTypeToJSON(value?: MeasurementType | null): any {
|
|
36
|
+
return value as any;
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
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.1.0-rc1
|
|
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
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Schema for creating a new MetricCostsPerYear
|
|
18
|
+
* @export
|
|
19
|
+
* @interface MetricCostsPerYearCreate
|
|
20
|
+
*/
|
|
21
|
+
export interface MetricCostsPerYearCreate {
|
|
22
|
+
/**
|
|
23
|
+
* Direct cost for the year
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof MetricCostsPerYearCreate
|
|
26
|
+
*/
|
|
27
|
+
directCost: number;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the value framework
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof MetricCostsPerYearCreate
|
|
32
|
+
*/
|
|
33
|
+
frameworkId: string;
|
|
34
|
+
/**
|
|
35
|
+
* ID of the metric
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof MetricCostsPerYearCreate
|
|
38
|
+
*/
|
|
39
|
+
metricId: string;
|
|
40
|
+
/**
|
|
41
|
+
* Perceived cost for the year
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof MetricCostsPerYearCreate
|
|
44
|
+
*/
|
|
45
|
+
perceivedCost: number;
|
|
46
|
+
/**
|
|
47
|
+
* Year for the cost data
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof MetricCostsPerYearCreate
|
|
50
|
+
*/
|
|
51
|
+
year: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the MetricCostsPerYearCreate interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfMetricCostsPerYearCreate(value: object): boolean {
|
|
58
|
+
let isInstance = true;
|
|
59
|
+
isInstance = isInstance && "directCost" in value;
|
|
60
|
+
isInstance = isInstance && "frameworkId" in value;
|
|
61
|
+
isInstance = isInstance && "metricId" in value;
|
|
62
|
+
isInstance = isInstance && "perceivedCost" in value;
|
|
63
|
+
isInstance = isInstance && "year" in value;
|
|
64
|
+
|
|
65
|
+
return isInstance;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function MetricCostsPerYearCreateFromJSON(json: any): MetricCostsPerYearCreate {
|
|
69
|
+
return MetricCostsPerYearCreateFromJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function MetricCostsPerYearCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricCostsPerYearCreate {
|
|
73
|
+
if ((json === undefined) || (json === null)) {
|
|
74
|
+
return json;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'directCost': json['direct_cost'],
|
|
79
|
+
'frameworkId': json['framework_id'],
|
|
80
|
+
'metricId': json['metric_id'],
|
|
81
|
+
'perceivedCost': json['perceived_cost'],
|
|
82
|
+
'year': json['year'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function MetricCostsPerYearCreateToJSON(value?: MetricCostsPerYearCreate | null): any {
|
|
87
|
+
if (value === undefined) {
|
|
88
|
+
return undefined;
|
|
89
|
+
}
|
|
90
|
+
if (value === null) {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'direct_cost': value.directCost,
|
|
96
|
+
'framework_id': value.frameworkId,
|
|
97
|
+
'metric_id': value.metricId,
|
|
98
|
+
'perceived_cost': value.perceivedCost,
|
|
99
|
+
'year': value.year,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
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.1.0-rc1
|
|
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
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Schema for MetricCostsPerYear responses
|
|
18
|
+
* @export
|
|
19
|
+
* @interface MetricCostsPerYearResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface MetricCostsPerYearResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Direct cost for the year
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof MetricCostsPerYearResponse
|
|
26
|
+
*/
|
|
27
|
+
directCost: number;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the value framework
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof MetricCostsPerYearResponse
|
|
32
|
+
*/
|
|
33
|
+
frameworkId: string;
|
|
34
|
+
/**
|
|
35
|
+
* ID of the metric
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof MetricCostsPerYearResponse
|
|
38
|
+
*/
|
|
39
|
+
metricId: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof MetricCostsPerYearResponse
|
|
44
|
+
*/
|
|
45
|
+
ownerName?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Perceived cost for the year
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof MetricCostsPerYearResponse
|
|
50
|
+
*/
|
|
51
|
+
perceivedCost: number;
|
|
52
|
+
/**
|
|
53
|
+
* Year for the cost data
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof MetricCostsPerYearResponse
|
|
56
|
+
*/
|
|
57
|
+
year: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the MetricCostsPerYearResponse interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfMetricCostsPerYearResponse(value: object): boolean {
|
|
64
|
+
let isInstance = true;
|
|
65
|
+
isInstance = isInstance && "directCost" in value;
|
|
66
|
+
isInstance = isInstance && "frameworkId" in value;
|
|
67
|
+
isInstance = isInstance && "metricId" in value;
|
|
68
|
+
isInstance = isInstance && "perceivedCost" in value;
|
|
69
|
+
isInstance = isInstance && "year" in value;
|
|
70
|
+
|
|
71
|
+
return isInstance;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function MetricCostsPerYearResponseFromJSON(json: any): MetricCostsPerYearResponse {
|
|
75
|
+
return MetricCostsPerYearResponseFromJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function MetricCostsPerYearResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricCostsPerYearResponse {
|
|
79
|
+
if ((json === undefined) || (json === null)) {
|
|
80
|
+
return json;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'directCost': json['direct_cost'],
|
|
85
|
+
'frameworkId': json['framework_id'],
|
|
86
|
+
'metricId': json['metric_id'],
|
|
87
|
+
'ownerName': !exists(json, 'owner_name') ? undefined : json['owner_name'],
|
|
88
|
+
'perceivedCost': json['perceived_cost'],
|
|
89
|
+
'year': json['year'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function MetricCostsPerYearResponseToJSON(value?: MetricCostsPerYearResponse | null): any {
|
|
94
|
+
if (value === undefined) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
if (value === null) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
|
|
102
|
+
'direct_cost': value.directCost,
|
|
103
|
+
'framework_id': value.frameworkId,
|
|
104
|
+
'metric_id': value.metricId,
|
|
105
|
+
'owner_name': value.ownerName,
|
|
106
|
+
'perceived_cost': value.perceivedCost,
|
|
107
|
+
'year': value.year,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
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.1.0-rc1
|
|
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
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Schema for partially updating Metric Costs Per Year. Only cost fields can be updated.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface MetricCostsPerYearUpdate
|
|
20
|
+
*/
|
|
21
|
+
export interface MetricCostsPerYearUpdate {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof MetricCostsPerYearUpdate
|
|
26
|
+
*/
|
|
27
|
+
directCost?: number | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof MetricCostsPerYearUpdate
|
|
32
|
+
*/
|
|
33
|
+
perceivedCost?: number | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the MetricCostsPerYearUpdate interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfMetricCostsPerYearUpdate(value: object): boolean {
|
|
40
|
+
let isInstance = true;
|
|
41
|
+
|
|
42
|
+
return isInstance;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function MetricCostsPerYearUpdateFromJSON(json: any): MetricCostsPerYearUpdate {
|
|
46
|
+
return MetricCostsPerYearUpdateFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function MetricCostsPerYearUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricCostsPerYearUpdate {
|
|
50
|
+
if ((json === undefined) || (json === null)) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'directCost': !exists(json, 'direct_cost') ? undefined : json['direct_cost'],
|
|
56
|
+
'perceivedCost': !exists(json, 'perceived_cost') ? undefined : json['perceived_cost'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function MetricCostsPerYearUpdateToJSON(value?: MetricCostsPerYearUpdate | null): any {
|
|
61
|
+
if (value === undefined) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
if (value === null) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'direct_cost': value.directCost,
|
|
70
|
+
'perceived_cost': value.perceivedCost,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|