Skip to content

Commit

Permalink
update api
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKallekleiv committed Oct 22, 2023
1 parent ab35ced commit 765abbd
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/src/api/ApiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ExploreService } from './services/ExploreService';
import { GraphService } from './services/GraphService';
import { GridService } from './services/GridService';
import { InplaceVolumetricsService } from './services/InplaceVolumetricsService';
import { ObservationsService } from './services/ObservationsService';
import { ParametersService } from './services/ParametersService';
import { PvtService } from './services/PvtService';
import { SeismicService } from './services/SeismicService';
Expand All @@ -28,6 +29,7 @@ export class ApiService {
public readonly graph: GraphService;
public readonly grid: GridService;
public readonly inplaceVolumetrics: InplaceVolumetricsService;
public readonly observations: ObservationsService;
public readonly parameters: ParametersService;
public readonly pvt: PvtService;
public readonly seismic: SeismicService;
Expand Down Expand Up @@ -57,6 +59,7 @@ export class ApiService {
this.graph = new GraphService(this.request);
this.grid = new GridService(this.request);
this.inplaceVolumetrics = new InplaceVolumetricsService(this.request);
this.observations = new ObservationsService(this.request);
this.parameters = new ParametersService(this.request);
this.pvt = new PvtService(this.request);
this.seismic = new SeismicService(this.request);
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@ export type { GridSurface as GridSurface_api } from './models/GridSurface';
export type { HTTPValidationError as HTTPValidationError_api } from './models/HTTPValidationError';
export type { InplaceVolumetricsCategoricalMetaData as InplaceVolumetricsCategoricalMetaData_api } from './models/InplaceVolumetricsCategoricalMetaData';
export type { InplaceVolumetricsTableMetaData as InplaceVolumetricsTableMetaData_api } from './models/InplaceVolumetricsTableMetaData';
export type { Observations as Observations_api } from './models/Observations';
export type { PolygonData as PolygonData_api } from './models/PolygonData';
export type { PvtData as PvtData_api } from './models/PvtData';
export type { RftObservation as RftObservation_api } from './models/RftObservation';
export type { RftObservations as RftObservations_api } from './models/RftObservations';
export type { SeismicCubeMeta as SeismicCubeMeta_api } from './models/SeismicCubeMeta';
export { SensitivityType as SensitivityType_api } from './models/SensitivityType';
export { StatisticFunction as StatisticFunction_api } from './models/StatisticFunction';
export type { StatisticValueObject as StatisticValueObject_api } from './models/StatisticValueObject';
export { StratigraphicFeature as StratigraphicFeature_api } from './models/StratigraphicFeature';
export type { SummaryVectorDateObservation as SummaryVectorDateObservation_api } from './models/SummaryVectorDateObservation';
export type { SummaryVectorObservations as SummaryVectorObservations_api } from './models/SummaryVectorObservations';
export { SurfaceAttributeType as SurfaceAttributeType_api } from './models/SurfaceAttributeType';
export type { SurfaceData as SurfaceData_api } from './models/SurfaceData';
export type { SurfaceMeta as SurfaceMeta_api } from './models/SurfaceMeta';
Expand All @@ -61,6 +66,7 @@ export { ExploreService } from './services/ExploreService';
export { GraphService } from './services/GraphService';
export { GridService } from './services/GridService';
export { InplaceVolumetricsService } from './services/InplaceVolumetricsService';
export { ObservationsService } from './services/ObservationsService';
export { ParametersService } from './services/ParametersService';
export { PvtService } from './services/PvtService';
export { SeismicService } from './services/SeismicService';
Expand Down
15 changes: 15 additions & 0 deletions frontend/src/api/models/Observations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { RftObservations } from './RftObservations';
import type { SummaryVectorObservations } from './SummaryVectorObservations';

/**
* A collection of observations associated with a field/case/ensemble
*/
export type Observations = {
summary: Array<SummaryVectorObservations>;
rft: Array<RftObservations>;
};

28 changes: 28 additions & 0 deletions frontend/src/api/models/RftObservation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* A specific RFT (Repeat Formation Tester) observation.
*
* Attributes:
* value (float): The measured value of the observation.
* comment (Optional[str]): An optional comment associated with the observation.
* error (float): The measurement error associated with the observation.
* zone (str): The zone or region associated with the observation.
* md_msl (float): Measured depth from mean sea level.
* x (float): X utm coordinate of the observation.
* y (float): Y utm coordinate of the observation.
* z (float): Z utm coordinate of the observation.
*/
export type RftObservation = {
value: number;
comment: (string | null);
error: number;
zone: string;
md_msl: number;
'x': number;
'y': number;
'z': number;
};

22 changes: 22 additions & 0 deletions frontend/src/api/models/RftObservations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { RftObservation } from './RftObservation';

/**
* A collection of RFT (Repeat Formation Tester) observations for a specific well at a specific date.
*
* Attributes:
* well (str): Unique well identifier
* date (str): Observation date
* comment (Optional[str]): An optional comment associated with the collection of observations.
* observations (List[RftObservation]): A list of RFT observations associated with this collection.
*/
export type RftObservations = {
well: string;
date: string;
comment: (string | null);
observations: Array<RftObservation>;
};

15 changes: 15 additions & 0 deletions frontend/src/api/models/SummaryVectorDateObservation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* A single observation of a summary vector at a specific date.
*/
export type SummaryVectorDateObservation = {
date: string;
comment: (string | null);
value: number;
error: number;
label: string;
};

15 changes: 15 additions & 0 deletions frontend/src/api/models/SummaryVectorObservations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { SummaryVectorDateObservation } from './SummaryVectorDateObservation';

/**
* A collection of observations of a summary vector.
*/
export type SummaryVectorObservations = {
vector_name: string;
comment: (string | null);
observations: Array<SummaryVectorDateObservation>;
};

38 changes: 38 additions & 0 deletions frontend/src/api/services/ObservationsService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Observations } from '../models/Observations';

import type { CancelablePromise } from '../core/CancelablePromise';
import type { BaseHttpRequest } from '../core/BaseHttpRequest';

export class ObservationsService {

constructor(public readonly httpRequest: BaseHttpRequest) {}

/**
* Get Observations
* Retrieve all observations found in sumo case
* @param caseUuid Sumo case uuid
* @param ensembleName Ensemble name
* @returns Observations Successful Response
* @throws ApiError
*/
public getObservations(
caseUuid: string,
ensembleName: string,
): CancelablePromise<Observations> {
return this.httpRequest.request({
method: 'GET',
url: '/observations/observations/',
query: {
'case_uuid': caseUuid,
'ensemble_name': ensembleName,
},
errors: {
422: `Validation Error`,
},
});
}

}

0 comments on commit 765abbd

Please sign in to comment.