@cosmotech/aip-client 0.2.0-dev6 → 0.2.0-dev7

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/docs/OptionApi.md CHANGED
@@ -13,6 +13,7 @@ All URIs are relative to *http://localhost*
13
13
  |[**getOptionForInvestment**](#getoptionforinvestment) | **GET** /investment/{investment_id}/option/{option_id} | Get an option for this investment|
14
14
  |[**getOptionKpis**](#getoptionkpis) | **GET** /investment/{investment_id}/option/{option_id}/kpis/{value_framework_id} | Get the kpis for a given option inside a value framework|
15
15
  |[**getOptionsForInvestment**](#getoptionsforinvestment) | **GET** /investment/{investment_id}/option/ | List options for this investment|
16
+ |[**getOptionsOverview**](#getoptionsoverview) | **GET** /investment/{investment_id}/option/overview | Option overview table for this investment|
16
17
  |[**patchImpactForOption**](#patchimpactforoption) | **PATCH** /investment/{investment_id}/option/{option_id}/impact/{impact_id} | Partially update an impact for this option|
17
18
  |[**patchOptionForInvestment**](#patchoptionforinvestment) | **PATCH** /investment/{investment_id}/option/{option_id} | Partially update an option for this investment|
18
19
 
@@ -423,7 +424,7 @@ const { status, data } = await apiInstance.getOptionForInvestment(
423
424
  # **getOptionKpis**
424
425
  > Array<OptionChartKPIsYearly> getOptionKpis()
425
426
 
426
- Return a KPI object containing all the data necessary to display graphs about the option inside a value framework
427
+ Return a KPI object containing all the data necessary to display graphs about the option inside a value framework. Data is sourced from the v_option_yearly_kpis database view.
427
428
 
428
429
  ### Example
429
430
 
@@ -474,7 +475,7 @@ const { status, data } = await apiInstance.getOptionKpis(
474
475
  | Status code | Description | Response headers |
475
476
  |-------------|-------------|------------------|
476
477
  |**200** | The requested KPIs | - |
477
- |**404** | Investment, option or value framework not found | - |
478
+ |**404** | Investment, option, value framework, or phase not found | - |
478
479
 
479
480
  [[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)
480
481
 
@@ -536,6 +537,61 @@ const { status, data } = await apiInstance.getOptionsForInvestment(
536
537
 
537
538
  [[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)
538
539
 
540
+ # **getOptionsOverview**
541
+ > Array<OptionOverviewResponse> getOptionsOverview()
542
+
543
+ Return a flat overview of all options for a specific investment. Each row includes the option\'s start date, cost, duration and NPV computed by the v_option_npv database view for the given value framework.
544
+
545
+ ### Example
546
+
547
+ ```typescript
548
+ import {
549
+ OptionApi,
550
+ Configuration
551
+ } from '@cosmotech/aip-client';
552
+
553
+ const configuration = new Configuration();
554
+ const apiInstance = new OptionApi(configuration);
555
+
556
+ let investmentId: string; //UUID of the investment (default to undefined)
557
+ let valueFrameworkId: string; //UUID of the value framework (default to undefined)
558
+
559
+ const { status, data } = await apiInstance.getOptionsOverview(
560
+ investmentId,
561
+ valueFrameworkId
562
+ );
563
+ ```
564
+
565
+ ### Parameters
566
+
567
+ |Name | Type | Description | Notes|
568
+ |------------- | ------------- | ------------- | -------------|
569
+ | **investmentId** | [**string**] | UUID of the investment | defaults to undefined|
570
+ | **valueFrameworkId** | [**string**] | UUID of the value framework | defaults to undefined|
571
+
572
+
573
+ ### Return type
574
+
575
+ **Array<OptionOverviewResponse>**
576
+
577
+ ### Authorization
578
+
579
+ [OAuth2AuthorizationCodeBearer](../README.md#OAuth2AuthorizationCodeBearer)
580
+
581
+ ### HTTP request headers
582
+
583
+ - **Content-Type**: Not defined
584
+ - **Accept**: application/json
585
+
586
+
587
+ ### HTTP response details
588
+ | Status code | Description | Response headers |
589
+ |-------------|-------------|------------------|
590
+ |**200** | Overview list of all options for the investment | - |
591
+ |**404** | Investment or value framework not found | - |
592
+
593
+ [[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)
594
+
539
595
  # **patchImpactForOption**
540
596
  > ImpactAPIResponse patchImpactForOption(impactUpdate)
541
597
 
@@ -0,0 +1,31 @@
1
+ # OptionOverviewResponse
2
+
3
+ Schema for the option overview table — one row per option within an investment.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **cost** | **number** | Cost of the option | [default to undefined]
10
+ **duration** | **number** | Duration of the option in weeks | [default to undefined]
11
+ **npv** | **number** | | [optional] [default to undefined]
12
+ **optionId** | **string** | ID of the option | [default to undefined]
13
+ **optionName** | **string** | Name of the option | [default to undefined]
14
+ **startDate** | **string** | Expected start date of the option (ISO 8601) | [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { OptionOverviewResponse } from '@cosmotech/aip-client';
20
+
21
+ const instance: OptionOverviewResponse = {
22
+ cost,
23
+ duration,
24
+ npv,
25
+ optionId,
26
+ optionName,
27
+ startDate,
28
+ };
29
+ ```
30
+
31
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/models/index.ts CHANGED
@@ -4,6 +4,7 @@ export * from './impact-apiresponse';
4
4
  export * from './impact-create';
5
5
  export * from './impact-update';
6
6
  export * from './investment-create';
7
+ export * from './investment-overview-response';
7
8
  export * from './investment-response';
8
9
  export * from './investment-update';
9
10
  export * from './location-inner';
@@ -24,6 +25,7 @@ export * from './objective-weight-update';
24
25
  export * from './option-chart-kpi';
25
26
  export * from './option-chart-kpis-yearly';
26
27
  export * from './option-create';
28
+ export * from './option-overview-response';
27
29
  export * from './option-response';
28
30
  export * from './option-update';
29
31
  export * from './preferred-option-request';
@@ -0,0 +1,35 @@
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-dev6
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
+ * Schema for the investment overview table — one row per investment.
19
+ */
20
+ export interface InvestmentOverviewResponse {
21
+ /**
22
+ * ID of the investment
23
+ */
24
+ 'investment_id': string;
25
+ /**
26
+ * Name of the investment
27
+ */
28
+ 'investment_name': string;
29
+ 'preferred_option_cost'?: number | null;
30
+ 'preferred_option_duration'?: number | null;
31
+ 'preferred_option_name'?: string | null;
32
+ 'preferred_option_npv'?: number | null;
33
+ 'preferred_option_start_date'?: string | null;
34
+ }
35
+
@@ -0,0 +1,43 @@
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-dev6
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
+ * Schema for the option overview table — one row per option within an investment.
19
+ */
20
+ export interface OptionOverviewResponse {
21
+ /**
22
+ * Cost of the option
23
+ */
24
+ 'cost': number;
25
+ /**
26
+ * Duration of the option in weeks
27
+ */
28
+ 'duration': number;
29
+ 'npv'?: number | null;
30
+ /**
31
+ * ID of the option
32
+ */
33
+ 'option_id': string;
34
+ /**
35
+ * Name of the option
36
+ */
37
+ 'option_name': string;
38
+ /**
39
+ * Expected start date of the option (ISO 8601)
40
+ */
41
+ 'start_date': string;
42
+ }
43
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmotech/aip-client",
3
- "version": "0.2.0-dev6",
3
+ "version": "0.2.0-dev7",
4
4
  "description": "OpenAPI client for @cosmotech/aip-client",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {