Skip to content

Commit

Permalink
fix: script update (#295)
Browse files Browse the repository at this point in the history
* fix: updated generated API models and tweaked the code to work with the changes

* fix: updated naming
  • Loading branch information
Sinrefvol authored Jun 18, 2024
1 parent 1d1988d commit 3182786
Show file tree
Hide file tree
Showing 28 changed files with 141 additions and 96 deletions.
20 changes: 11 additions & 9 deletions src/api/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ export type { AnalogueList } from './models/AnalogueList';
export type { AnalogueModelDetail } from './models/AnalogueModelDetail';
export type { AnalogueModelList } from './models/AnalogueModelList';
export { AnalogueModelSourceType } from './models/AnalogueModelSourceType';
export type { ChannelEstimationResultDto } from './models/ChannelEstimationResultDto';
export type { ChannelHeightDto } from './models/ChannelHeightDto';
export type { ComputeCaseComputeMethodDto } from './models/ComputeCaseComputeMethodDto';
export type { ComputeCaseDto } from './models/ComputeCaseDto';
export type { ComputeCaseInputSettingsDto } from './models/ComputeCaseInputSettingsDto';
Expand All @@ -53,8 +51,10 @@ export type { CreateComputeCaseCommandResponse } from './models/CreateComputeCas
export type { CreateComputeCaseInputSettingsForm } from './models/CreateComputeCaseInputSettingsForm';
export type { CreateMetadataCommandForm } from './models/CreateMetadataCommandForm';
export type { CreateParameterCommand } from './models/CreateParameterCommand';
export type { DeleteGeologicalGroupCommandResponse } from './models/DeleteGeologicalGroupCommandResponse';
export type { DeleteStratigraphicGroupCommandResponse } from './models/DeleteStratigraphicGroupCommandResponse';
export type { ErrorResponse } from './models/ErrorResponse';
export type { EstimateChannelCommand } from './models/EstimateChannelCommand';
export type { EstimateObjectCommand } from './models/EstimateObjectCommand';
export type { EstimateVariogramCommand } from './models/EstimateVariogramCommand';
export type { FieldDto } from './models/FieldDto';
export type { File } from './models/File';
Expand All @@ -63,14 +63,14 @@ export type { GeologicalStandardDto } from './models/GeologicalStandardDto';
export type { GetAnalogueListQueryResponse } from './models/GetAnalogueListQueryResponse';
export type { GetAnalogueModelListQueryResponse } from './models/GetAnalogueModelListQueryResponse';
export type { GetAnalogueModelQueryResponse } from './models/GetAnalogueModelQueryResponse';
export type { GetChanelResultsByModelIdQueryResponse } from './models/GetChanelResultsByModelIdQueryResponse';
export type { GetChannelResultsDto } from './models/GetChannelResultsDto';
export type { GetChannelResultsFileDto } from './models/GetChannelResultsFileDto';
export type { GetCurrentJobStatusCommandResponse } from './models/GetCurrentJobStatusCommandResponse';
export type { GetCurrentJobStatusDto } from './models/GetCurrentJobStatusDto';
export type { GetCurrentJobStatusListCommand } from './models/GetCurrentJobStatusListCommand';
export type { GetJobDetailQueryResponse } from './models/GetJobDetailQueryResponse';
export type { GetJobListQueryResponse } from './models/GetJobListQueryResponse';
export type { GetObjectResultsByModelIdQueryResponse } from './models/GetObjectResultsByModelIdQueryResponse';
export type { GetObjectResultsDto } from './models/GetObjectResultsDto';
export type { GetObjectResultsFileDto } from './models/GetObjectResultsFileDto';
export type { GetParameterDetailQueryResponse } from './models/GetParameterDetailQueryResponse';
export type { GetParameterListQueryResponse } from './models/GetParameterListQueryResponse';
export type { GetUploadDetailQueryResponse } from './models/GetUploadDetailQueryResponse';
Expand Down Expand Up @@ -103,6 +103,8 @@ export type { MetadataDto } from './models/MetadataDto';
export type { MetadataTypeDto } from './models/MetadataTypeDto';
export type { ModelAreaDto } from './models/ModelAreaDto';
export type { ModelAreaTypeDto } from './models/ModelAreaTypeDto';
export type { ObjectEstimationResultDto } from './models/ObjectEstimationResultDto';
export type { ObjectHeightDto } from './models/ObjectHeightDto';
export type { Operation } from './models/Operation';
export { OperationType } from './models/OperationType';
export type { ParameterDetail } from './models/ParameterDetail';
Expand All @@ -121,14 +123,14 @@ export type { UpdateAnalogueModelAreaCommandForm } from './models/UpdateAnalogue
export type { UpdateAnalogueModelCommandBody } from './models/UpdateAnalogueModelCommandBody';
export type { UpdateAnalogueModelCommandResponse } from './models/UpdateAnalogueModelCommandResponse';
export type { UpdateAnalogueModelDto } from './models/UpdateAnalogueModelDto';
export type { UpdateChannelEstimationStatusCommand } from './models/UpdateChannelEstimationStatusCommand';
export type { UpdateChannelEstimationStatusCommandResponse } from './models/UpdateChannelEstimationStatusCommandResponse';
export type { UpdateChannelEstimationStatusDto } from './models/UpdateChannelEstimationStatusDto';
export type { UpdateComputeCaseCommandForm } from './models/UpdateComputeCaseCommandForm';
export type { UpdateComputeCaseInputSettingsForm } from './models/UpdateComputeCaseInputSettingsForm';
export type { UpdateJobStatusCommand } from './models/UpdateJobStatusCommand';
export type { UpdateJobStatusCommandResponse } from './models/UpdateJobStatusCommandResponse';
export type { UpdateJobStatusDto } from './models/UpdateJobStatusDto';
export type { UpdateObjectEstimationStatusCommand } from './models/UpdateObjectEstimationStatusCommand';
export type { UpdateObjectEstimationStatusCommandResponse } from './models/UpdateObjectEstimationStatusCommandResponse';
export type { UpdateObjectEstimationStatusDto } from './models/UpdateObjectEstimationStatusDto';
export type { UpdateParameterCommandBody } from './models/UpdateParameterCommandBody';
export type { UpdateParameterCommandResponse } from './models/UpdateParameterCommandResponse';
export type { UpdateParameterDto } from './models/UpdateParameterDto';
Expand Down
1 change: 1 addition & 0 deletions src/api/generated/models/ComputeType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
export enum ComputeType {
VARIOGRAM = 'Variogram',
CHANNEL = 'Channel',
MOUTHBAR = 'Mouthbar',
}
13 changes: 13 additions & 0 deletions src/api/generated/models/DeleteGeologicalGroupCommandResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

export type DeleteGeologicalGroupCommandResponse = {
success?: boolean;
count?: number | null;
message?: string | null;
validationErrors?: Array<string> | null;
data: string;
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

export type DeleteStratigraphicGroupCommandResponse = {
success?: boolean;
count?: number | null;
message?: string | null;
validationErrors?: Array<string> | null;
data: string;
};

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* tslint:disable */
/* eslint-disable */

export type EstimateChannelCommand = {
export type EstimateObjectCommand = {
modelId: string;
computeCaseId: string;
};
Expand Down
23 changes: 0 additions & 23 deletions src/api/generated/models/GetChannelResultsDto.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
/* tslint:disable */
/* eslint-disable */

import type { GetChannelResultsDto } from './GetChannelResultsDto';
import type { GetObjectResultsDto } from './GetObjectResultsDto';

export type GetChanelResultsByModelIdQueryResponse = {
export type GetObjectResultsByModelIdQueryResponse = {
success?: boolean;
count?: number | null;
message?: string | null;
validationErrors?: Array<string> | null;
data: Array<GetChannelResultsDto>;
data: Array<GetObjectResultsDto>;
};

23 changes: 23 additions & 0 deletions src/api/generated/models/GetObjectResultsDto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { ComputeType } from './ComputeType';
import type { CoordinateDto } from './CoordinateDto';
import type { GetObjectResultsFileDto } from './GetObjectResultsFileDto';
import type { ObjectEstimationResultDto } from './ObjectEstimationResultDto';
import type { ObjectHeightDto } from './ObjectHeightDto';

export type GetObjectResultsDto = {
objectResultId: string;
computeCaseId: string;
type: ComputeType;
objectResultFiles: Array<GetObjectResultsFileDto>;
segmentWidth: ObjectEstimationResultDto;
width: ObjectEstimationResultDto;
segmentHeight: ObjectEstimationResultDto;
height: ObjectHeightDto;
box: Array<CoordinateDto>;
};

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/* tslint:disable */
/* eslint-disable */

export type GetChannelResultsFileDto = {
export type GetObjectResultsFileDto = {
fileName: string;
channelResultFileId: string;
objectResultFileId: string;
};

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* tslint:disable */
/* eslint-disable */

export type ChannelEstimationResultDto = {
export type ObjectEstimationResultDto = {
mean: number;
sd: number;
count: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* tslint:disable */
/* eslint-disable */

export type ChannelHeightDto = {
export type ObjectHeightDto = {
mean: number;
sd: number;
count: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

export type UpdateChannelEstimationStatusCommand = {
export type UpdateObjectEstimationStatusCommand = {
name: string;
started?: string | null;
ended?: string | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
/* tslint:disable */
/* eslint-disable */

import type { UpdateChannelEstimationStatusDto } from './UpdateChannelEstimationStatusDto';
import type { UpdateObjectEstimationStatusDto } from './UpdateObjectEstimationStatusDto';

export type UpdateChannelEstimationStatusCommandResponse = {
export type UpdateObjectEstimationStatusCommandResponse = {
success?: boolean;
count?: number | null;
message?: string | null;
validationErrors?: Array<string> | null;
data: Array<UpdateChannelEstimationStatusDto>;
data: Array<UpdateObjectEstimationStatusDto>;
};

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import type { JobStatus } from './JobStatus';
import type { JobType } from './JobType';

export type UpdateChannelEstimationStatusDto = {
export type UpdateObjectEstimationStatusDto = {
jobId: string;
name: string;
jobStatus: JobStatus;
Expand Down
10 changes: 6 additions & 4 deletions src/api/generated/services/AnalogueModelsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import type { AddStatigraphicGroupForm } from '../models/AddStatigraphicGroupFor
import type { AddStratigraphicGroupCommandResponse } from '../models/AddStratigraphicGroupCommandResponse';
import type { CreateAnalogueModelCommand } from '../models/CreateAnalogueModelCommand';
import type { CreateAnalogueModelCommandResponse } from '../models/CreateAnalogueModelCommandResponse';
import type { DeleteGeologicalGroupCommandResponse } from '../models/DeleteGeologicalGroupCommandResponse';
import type { DeleteStratigraphicGroupCommandResponse } from '../models/DeleteStratigraphicGroupCommandResponse';
import type { GetAnalogueModelListQueryResponse } from '../models/GetAnalogueModelListQueryResponse';
import type { GetAnalogueModelQueryResponse } from '../models/GetAnalogueModelQueryResponse';
import type { Operation } from '../models/Operation';
Expand Down Expand Up @@ -289,13 +291,13 @@ export class AnalogueModelsService {
* Deletes a geological group
* @param analogueModelId
* @param geologicalGroupId
* @returns void
* @returns DeleteGeologicalGroupCommandResponse Success
* @throws ApiError
*/
public static deleteApiAnalogueModelsGeologicalGroups(
analogueModelId: string,
geologicalGroupId: string,
): CancelablePromise<void> {
): CancelablePromise<DeleteGeologicalGroupCommandResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/analogue-models/{analogueModelId}/geological-groups/{geologicalGroupId}',
Expand All @@ -314,13 +316,13 @@ export class AnalogueModelsService {
* Deletes a stratigraphic group
* @param analogueModelId
* @param stratigraphicGroupId
* @returns void
* @returns DeleteStratigraphicGroupCommandResponse Success
* @throws ApiError
*/
public static deleteApiAnalogueModelsStratigraphicGroups(
analogueModelId: string,
stratigraphicGroupId: string,
): CancelablePromise<void> {
): CancelablePromise<DeleteStratigraphicGroupCommandResponse> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/analogue-models/{analogueModelId}/stratigraphic-groups/{stratigraphicGroupId}',
Expand Down
8 changes: 4 additions & 4 deletions src/api/generated/services/JobsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* tslint:disable */
/* eslint-disable */
import type { ConvertAnalogueModelCommand } from '../models/ConvertAnalogueModelCommand';
import type { EstimateChannelCommand } from '../models/EstimateChannelCommand';
import type { EstimateObjectCommand } from '../models/EstimateObjectCommand';
import type { EstimateVariogramCommand } from '../models/EstimateVariogramCommand';
import type { GetCurrentJobStatusCommandResponse } from '../models/GetCurrentJobStatusCommandResponse';
import type { GetCurrentJobStatusListCommand } from '../models/GetCurrentJobStatusListCommand';
Expand Down Expand Up @@ -97,12 +97,12 @@ export class JobsService {
* @returns any Accepted
* @throws ApiError
*/
public static postApiJobsComputeChannelEstimations(
requestBody?: EstimateChannelCommand,
public static postApiJobsComputeObjectEstimations(
requestBody?: EstimateObjectCommand,
): CancelablePromise<any> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/jobs/compute/channel-estimations',
url: '/api/jobs/compute/object-estimations',
body: requestBody,
mediaType: 'application/json-patch+json',
});
Expand Down
10 changes: 5 additions & 5 deletions src/api/generated/services/ResultsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { GetChanelResultsByModelIdQueryResponse } from '../models/GetChanelResultsByModelIdQueryResponse';
import type { GetObjectResultsByModelIdQueryResponse } from '../models/GetObjectResultsByModelIdQueryResponse';
import type { GetVariogramResultsByModelIdQueryResponse } from '../models/GetVariogramResultsByModelIdQueryResponse';

import type { CancelablePromise } from '../core/CancelablePromise';
Expand All @@ -14,15 +14,15 @@ export class ResultsService {
/**
* Returns channel estimation results
* @param id
* @returns GetChanelResultsByModelIdQueryResponse Success
* @returns GetObjectResultsByModelIdQueryResponse Success
* @throws ApiError
*/
public static getApiAnalogueModelsResultsChannel(
public static getApiAnalogueModelsResultsObject(
id: string,
): CancelablePromise<GetChanelResultsByModelIdQueryResponse> {
): CancelablePromise<GetObjectResultsByModelIdQueryResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/analogue-models/{id}/results/channel',
url: '/api/analogue-models/{id}/results/object',
path: {
'id': id,
},
Expand Down
14 changes: 7 additions & 7 deletions src/api/generated/services/WebhooksService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { UpdateChannelEstimationStatusCommand } from '../models/UpdateChannelEstimationStatusCommand';
import type { UpdateChannelEstimationStatusCommandResponse } from '../models/UpdateChannelEstimationStatusCommandResponse';
import type { UpdateJobStatusCommand } from '../models/UpdateJobStatusCommand';
import type { UpdateJobStatusCommandResponse } from '../models/UpdateJobStatusCommandResponse';
import type { UpdateObjectEstimationStatusCommand } from '../models/UpdateObjectEstimationStatusCommand';
import type { UpdateObjectEstimationStatusCommandResponse } from '../models/UpdateObjectEstimationStatusCommandResponse';
import type { UpdateVariogramEstimationStatusCommand } from '../models/UpdateVariogramEstimationStatusCommand';

import type { CancelablePromise } from '../core/CancelablePromise';
Expand Down Expand Up @@ -33,12 +33,12 @@ export class WebhooksService {

/**
* @param requestBody
* @returns UpdateChannelEstimationStatusCommandResponse Success
* @returns UpdateObjectEstimationStatusCommandResponse Success
* @throws ApiError
*/
public static postApiWebhooksChannestStatus(
requestBody?: UpdateChannelEstimationStatusCommand,
): CancelablePromise<UpdateChannelEstimationStatusCommandResponse> {
requestBody?: UpdateObjectEstimationStatusCommand,
): CancelablePromise<UpdateObjectEstimationStatusCommandResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/webhooks/channest/status',
Expand All @@ -49,12 +49,12 @@ export class WebhooksService {

/**
* @param requestBody
* @returns UpdateChannelEstimationStatusCommandResponse Success
* @returns UpdateObjectEstimationStatusCommandResponse Success
* @throws ApiError
*/
public static postApiWebhooksVargrestStatus(
requestBody?: UpdateVariogramEstimationStatusCommand,
): CancelablePromise<UpdateChannelEstimationStatusCommandResponse> {
): CancelablePromise<UpdateObjectEstimationStatusCommandResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/api/webhooks/vargrest/status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
AddGeologicalGroupForm,
AnalogueModelDetail,
AnalogueModelsService,
DeleteGeologicalGroupCommandResponse,
GeologicalGroupDto,
GeologicalStandardDto,
} from '../../../api/generated';
Expand Down Expand Up @@ -41,7 +42,9 @@ export const GrossDepositionEnviromentGroup = ({
modelIdParent?: string;
defaultMetadata: AnalogueModelDetail;
gdeGroups: GeologicalGroupDto[];
deleteGdeRow: (geologicalGroupId: string) => Promise<void>;
deleteGdeRow: (
geologicalGroupId: string,
) => Promise<DeleteGeologicalGroupCommandResponse | undefined>;
}) => {
const [showGdeDialog, setShowGdeDialog] = useState<boolean>(false);
const [gdeObject, setGdeObject] = useState<GdeType>(defaultGdeData);
Expand Down
Loading

0 comments on commit 3182786

Please sign in to comment.