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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +12 -2
  2. package/api/favored-option-api.ts +210 -0
  3. package/api/investment-api.ts +244 -0
  4. package/api/option-api.ts +88 -0
  5. package/api.ts +1 -0
  6. package/dist/api/favored-option-api.d.ts +104 -0
  7. package/dist/api/favored-option-api.js +209 -0
  8. package/dist/api/investment-api.d.ts +111 -0
  9. package/dist/api/investment-api.js +229 -0
  10. package/dist/api/option-api.d.ts +41 -0
  11. package/dist/api/option-api.js +83 -0
  12. package/dist/api.d.ts +1 -0
  13. package/dist/api.js +1 -0
  14. package/dist/esm/api/favored-option-api.d.ts +104 -0
  15. package/dist/esm/api/favored-option-api.js +202 -0
  16. package/dist/esm/api/investment-api.d.ts +111 -0
  17. package/dist/esm/api/investment-api.js +229 -0
  18. package/dist/esm/api/option-api.d.ts +41 -0
  19. package/dist/esm/api/option-api.js +83 -0
  20. package/dist/esm/api.d.ts +1 -0
  21. package/dist/esm/api.js +1 -0
  22. package/dist/esm/models/favored-option-request.d.ts +20 -0
  23. package/dist/esm/models/favored-option-request.js +14 -0
  24. package/dist/esm/models/favored-option-response.d.ts +20 -0
  25. package/dist/esm/models/favored-option-response.js +14 -0
  26. package/dist/esm/models/index.d.ts +4 -0
  27. package/dist/esm/models/index.js +4 -0
  28. package/dist/esm/models/investment-response.d.ts +1 -0
  29. package/dist/esm/models/option-chart-kpi.d.ts +29 -0
  30. package/dist/esm/models/option-chart-kpi.js +14 -0
  31. package/dist/esm/models/option-chart-kpis-yearly.d.ts +29 -0
  32. package/dist/esm/models/option-chart-kpis-yearly.js +14 -0
  33. package/dist/esm/models/option-create.d.ts +1 -1
  34. package/dist/esm/models/option-response.d.ts +2 -1
  35. package/dist/esm/models/option-update.d.ts +2 -0
  36. package/dist/models/favored-option-request.d.ts +20 -0
  37. package/dist/models/favored-option-request.js +15 -0
  38. package/dist/models/favored-option-response.d.ts +20 -0
  39. package/dist/models/favored-option-response.js +15 -0
  40. package/dist/models/index.d.ts +4 -0
  41. package/dist/models/index.js +4 -0
  42. package/dist/models/investment-response.d.ts +1 -0
  43. package/dist/models/option-chart-kpi.d.ts +29 -0
  44. package/dist/models/option-chart-kpi.js +15 -0
  45. package/dist/models/option-chart-kpis-yearly.d.ts +29 -0
  46. package/dist/models/option-chart-kpis-yearly.js +15 -0
  47. package/dist/models/option-create.d.ts +1 -1
  48. package/dist/models/option-response.d.ts +2 -1
  49. package/dist/models/option-update.d.ts +2 -0
  50. package/docs/FavoredOptionApi.md +119 -0
  51. package/docs/FavoredOptionRequest.md +21 -0
  52. package/docs/FavoredOptionResponse.md +21 -0
  53. package/docs/InvestmentApi.md +171 -0
  54. package/docs/InvestmentResponse.md +2 -0
  55. package/docs/OptionApi.md +59 -0
  56. package/docs/OptionChartKPI.md +27 -0
  57. package/docs/OptionChartKPIsYearly.md +25 -0
  58. package/docs/OptionCreate.md +1 -1
  59. package/docs/OptionResponse.md +4 -2
  60. package/docs/OptionUpdate.md +4 -0
  61. package/models/favored-option-request.ts +26 -0
  62. package/models/favored-option-response.ts +26 -0
  63. package/models/index.ts +4 -0
  64. package/models/investment-response.ts +1 -0
  65. package/models/option-chart-kpi.ts +35 -0
  66. package/models/option-chart-kpis-yearly.ts +37 -0
  67. package/models/option-create.ts +1 -1
  68. package/models/option-response.ts +2 -1
  69. package/models/option-update.ts +2 -0
  70. package/package.json +1 -1
@@ -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,29 @@
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 { OptionChartKPI } from './option-chart-kpi';
13
+ /**
14
+ * Schema of a combined list of KPI values for a given time step, contain both the monetary and objective value
15
+ */
16
+ export interface OptionChartKPIsYearly {
17
+ /**
18
+ * List of KPI values for this time step
19
+ */
20
+ 'kpis'?: Array<OptionChartKPI>;
21
+ /**
22
+ * Net perceived value for the KPI
23
+ */
24
+ 'net_perceived_value'?: number;
25
+ /**
26
+ * Year used for the KPIs
27
+ */
28
+ 'year'?: number;
29
+ }
@@ -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 {};
@@ -19,7 +19,7 @@ export interface OptionCreate {
19
19
  'cost'?: number;
20
20
  'description'?: string | null;
21
21
  /**
22
- * Duration of the option in years
22
+ * Duration of the option in weeks
23
23
  */
24
24
  'duration'?: number;
25
25
  /**
@@ -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
  }
@@ -13,7 +13,9 @@
13
13
  * Schema for partially updating an Option. Only provided fields will be updated.
14
14
  */
15
15
  export interface OptionUpdate {
16
+ 'cost'?: number | null;
16
17
  'description'?: string | null;
18
+ 'duration'?: number | null;
17
19
  'expected_start_date'?: string | null;
18
20
  'name'?: string | null;
19
21
  }
@@ -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,15 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,15 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,6 @@
1
1
  export * from './evolution-type';
2
+ export * from './favored-option-request';
3
+ export * from './favored-option-response';
2
4
  export * from './httpvalidation-error';
3
5
  export * from './impact-apiresponse';
4
6
  export * from './impact-create';
@@ -21,6 +23,8 @@ export * from './objective-update';
21
23
  export * from './objective-weight-create';
22
24
  export * from './objective-weight-response';
23
25
  export * from './objective-weight-update';
26
+ export * from './option-chart-kpi';
27
+ export * from './option-chart-kpis-yearly';
24
28
  export * from './option-create';
25
29
  export * from './option-response';
26
30
  export * from './option-update';
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./evolution-type"), exports);
18
+ __exportStar(require("./favored-option-request"), exports);
19
+ __exportStar(require("./favored-option-response"), exports);
18
20
  __exportStar(require("./httpvalidation-error"), exports);
19
21
  __exportStar(require("./impact-apiresponse"), exports);
20
22
  __exportStar(require("./impact-create"), exports);
@@ -37,6 +39,8 @@ __exportStar(require("./objective-update"), exports);
37
39
  __exportStar(require("./objective-weight-create"), exports);
38
40
  __exportStar(require("./objective-weight-response"), exports);
39
41
  __exportStar(require("./objective-weight-update"), exports);
42
+ __exportStar(require("./option-chart-kpi"), exports);
43
+ __exportStar(require("./option-chart-kpis-yearly"), exports);
40
44
  __exportStar(require("./option-create"), exports);
41
45
  __exportStar(require("./option-response"), exports);
42
46
  __exportStar(require("./option-update"), exports);
@@ -21,5 +21,6 @@ export interface InvestmentResponse {
21
21
  */
22
22
  'name': string;
23
23
  'owner_name'?: string | null;
24
+ 'preferred_option_id'?: string | null;
24
25
  'updated_at': string;
25
26
  }
@@ -0,0 +1,29 @@
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
+ * Schema of a KPI value for a given time step, contain both the monetary and objective value
14
+ */
15
+ export interface OptionChartKPI {
16
+ /**
17
+ * Metric value of the KPI
18
+ */
19
+ 'metric_value'?: number;
20
+ /**
21
+ * Monetary value of the KPI
22
+ */
23
+ 'monetary_value'?: number;
24
+ 'name'?: string | null;
25
+ /**
26
+ * Symbol of the KPI
27
+ */
28
+ 'symbol'?: string;
29
+ }
@@ -0,0 +1,15 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
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 { OptionChartKPI } from './option-chart-kpi';
13
+ /**
14
+ * Schema of a combined list of KPI values for a given time step, contain both the monetary and objective value
15
+ */
16
+ export interface OptionChartKPIsYearly {
17
+ /**
18
+ * List of KPI values for this time step
19
+ */
20
+ 'kpis'?: Array<OptionChartKPI>;
21
+ /**
22
+ * Net perceived value for the KPI
23
+ */
24
+ 'net_perceived_value'?: number;
25
+ /**
26
+ * Year used for the KPIs
27
+ */
28
+ 'year'?: number;
29
+ }
@@ -0,0 +1,15 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -19,7 +19,7 @@ export interface OptionCreate {
19
19
  'cost'?: number;
20
20
  'description'?: string | null;
21
21
  /**
22
- * Duration of the option in years
22
+ * Duration of the option in weeks
23
23
  */
24
24
  'duration'?: number;
25
25
  /**
@@ -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
  }
@@ -13,7 +13,9 @@
13
13
  * Schema for partially updating an Option. Only provided fields will be updated.
14
14
  */
15
15
  export interface OptionUpdate {
16
+ 'cost'?: number | null;
16
17
  'description'?: string | null;
18
+ 'duration'?: number | null;
17
19
  'expected_start_date'?: string | null;
18
20
  'name'?: string | null;
19
21
  }
@@ -0,0 +1,119 @@
1
+ # FavoredOptionApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**getFavoredOption**](#getfavoredoption) | **GET** /investment/{investment_id}/favored_option | Get the preferred option for an investment|
8
+ |[**setFavoredOption**](#setfavoredoption) | **POST** /investment/{investment_id}/favored_option | Set the preferred option for an investment|
9
+
10
+ # **getFavoredOption**
11
+ > FavoredOptionResponse getFavoredOption()
12
+
13
+ Get the preferred option for an investment.
14
+
15
+ ### Example
16
+
17
+ ```typescript
18
+ import {
19
+ FavoredOptionApi,
20
+ Configuration
21
+ } from '@cosmotech/aip-client';
22
+
23
+ const configuration = new Configuration();
24
+ const apiInstance = new FavoredOptionApi(configuration);
25
+
26
+ let investmentId: string; //UUID of the investment (default to undefined)
27
+
28
+ const { status, data } = await apiInstance.getFavoredOption(
29
+ investmentId
30
+ );
31
+ ```
32
+
33
+ ### Parameters
34
+
35
+ |Name | Type | Description | Notes|
36
+ |------------- | ------------- | ------------- | -------------|
37
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
38
+
39
+
40
+ ### Return type
41
+
42
+ **FavoredOptionResponse**
43
+
44
+ ### Authorization
45
+
46
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
47
+
48
+ ### HTTP request headers
49
+
50
+ - **Content-Type**: Not defined
51
+ - **Accept**: application/json
52
+
53
+
54
+ ### HTTP response details
55
+ | Status code | Description | Response headers |
56
+ |-------------|-------------|------------------|
57
+ |**200** | Preferred option exists | - |
58
+ |**204** | Investment exists but no options are associated | - |
59
+ |**404** | Investment not found | - |
60
+
61
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
62
+
63
+ # **setFavoredOption**
64
+ > FavoredOptionResponse setFavoredOption(favoredOptionRequest)
65
+
66
+ Set the preferred option for an investment.
67
+
68
+ ### Example
69
+
70
+ ```typescript
71
+ import {
72
+ FavoredOptionApi,
73
+ Configuration,
74
+ FavoredOptionRequest
75
+ } from '@cosmotech/aip-client';
76
+
77
+ const configuration = new Configuration();
78
+ const apiInstance = new FavoredOptionApi(configuration);
79
+
80
+ let investmentId: string; //UUID of the investment (default to undefined)
81
+ let favoredOptionRequest: FavoredOptionRequest; //
82
+
83
+ const { status, data } = await apiInstance.setFavoredOption(
84
+ investmentId,
85
+ favoredOptionRequest
86
+ );
87
+ ```
88
+
89
+ ### Parameters
90
+
91
+ |Name | Type | Description | Notes|
92
+ |------------- | ------------- | ------------- | -------------|
93
+ | **favoredOptionRequest** | **FavoredOptionRequest**| | |
94
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
95
+
96
+
97
+ ### Return type
98
+
99
+ **FavoredOptionResponse**
100
+
101
+ ### Authorization
102
+
103
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
104
+
105
+ ### HTTP request headers
106
+
107
+ - **Content-Type**: application/json
108
+ - **Accept**: application/json
109
+
110
+
111
+ ### HTTP response details
112
+ | Status code | Description | Response headers |
113
+ |-------------|-------------|------------------|
114
+ |**200** | Preferred option updated successfully | - |
115
+ |**400** | Option does not belong to this investment | - |
116
+ |**404** | Investment or option not found | - |
117
+
118
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
119
+
@@ -0,0 +1,21 @@
1
+ # FavoredOptionRequest
2
+
3
+ Request body for setting the preferred option.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **optionId** | **string** | ID of the option to set as preferred | [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { FavoredOptionRequest } from '@cosmotech/aip-client';
15
+
16
+ const instance: FavoredOptionRequest = {
17
+ optionId,
18
+ };
19
+ ```
20
+
21
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,21 @@
1
+ # FavoredOptionResponse
2
+
3
+ Response for favored option endpoints.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **optionId** | **string** | ID of the preferred option | [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { FavoredOptionResponse } from '@cosmotech/aip-client';
15
+
16
+ const instance: FavoredOptionResponse = {
17
+ optionId,
18
+ };
19
+ ```
20
+
21
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)