From a164cac9d0c3e94422ce5392e8a8bccc93c26691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D1=80=D0=BE=D0=BB=D0=BE=D0=B2?= Date: Sat, 28 Aug 2021 22:31:05 +0500 Subject: [PATCH] update api client --- src/services/api/index.ts | 8 +- src/services/api/models/FluidDataDto.ts | 36 ----- src/services/api/models/MeasureDto.ts | 12 ++ src/services/api/models/MudDiagramDataDto.ts | 30 ----- src/services/api/models/NnbDataDto.ts | 26 ---- src/services/api/services/FluidService.ts | 52 -------- src/services/api/services/MeasureService.ts | 126 ++++++++++++++++++ .../api/services/MudDiagramService.ts | 52 -------- src/services/api/services/NnbDataService.ts | 52 -------- .../api/services/WellOperationService.ts | 2 +- 10 files changed, 141 insertions(+), 255 deletions(-) delete mode 100644 src/services/api/models/FluidDataDto.ts create mode 100644 src/services/api/models/MeasureDto.ts delete mode 100644 src/services/api/models/MudDiagramDataDto.ts delete mode 100644 src/services/api/models/NnbDataDto.ts delete mode 100644 src/services/api/services/FluidService.ts create mode 100644 src/services/api/services/MeasureService.ts delete mode 100644 src/services/api/services/MudDiagramService.ts delete mode 100644 src/services/api/services/NnbDataService.ts diff --git a/src/services/api/index.ts b/src/services/api/index.ts index b76205a..42cbf9f 100644 --- a/src/services/api/index.ts +++ b/src/services/api/index.ts @@ -13,11 +13,9 @@ export type { DepositDto } from './models/DepositDto'; export type { EventDto } from './models/EventDto'; export type { FileInfoDto } from './models/FileInfoDto'; export type { FileInfoDtoPaginationContainer } from './models/FileInfoDtoPaginationContainer'; -export type { FluidDataDto } from './models/FluidDataDto'; +export type { MeasureDto } from './models/MeasureDto'; export type { MessageDto } from './models/MessageDto'; export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer'; -export type { MudDiagramDataDto } from './models/MudDiagramDataDto'; -export type { NnbDataDto } from './models/NnbDataDto'; export type { StatClusterDto } from './models/StatClusterDto'; export type { StatOperationsDto } from './models/StatOperationsDto'; export type { StatOperationsDtoPlanFactBase } from './models/StatOperationsDtoPlanFactBase'; @@ -43,10 +41,8 @@ export { ClusterService } from './services/ClusterService'; export { DataService } from './services/DataService'; export { DepositService } from './services/DepositService'; export { FileService } from './services/FileService'; -export { FluidService } from './services/FluidService'; +export { MeasureService } from './services/MeasureService'; export { MessageService } from './services/MessageService'; -export { MudDiagramService } from './services/MudDiagramService'; -export { NnbDataService } from './services/NnbDataService'; export { ReportService } from './services/ReportService'; export { TelemetryAnalyticsService } from './services/TelemetryAnalyticsService'; export { TelemetryService } from './services/TelemetryService'; diff --git a/src/services/api/models/FluidDataDto.ts b/src/services/api/models/FluidDataDto.ts deleted file mode 100644 index c99a629..0000000 --- a/src/services/api/models/FluidDataDto.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type FluidDataDto = { - key?: number; - lastUpdate?: string; - name?: string | null; - temperature?: number; - density?: number; - conditionalViscosity?: number; - r300?: number; - r600?: number; - r3r6?: number; - dnsDpa?: number; - plasticViscocity?: number; - snsDpa?: number; - 'r3r649ะก'?: number; - dns49Cdpa?: number; - plasticViscocity49c?: number; - sns49Cdpa?: number; - mbt?: number; - sand?: number; - filtering?: number; - crust?: number; - ktk?: number; - ph?: number; - hardness?: number; - chlorides?: number; - pf?: number; - mf?: number; - pm?: number; - fluidSolidPhase?: number; - grease?: number; - calciumCarbonate?: number; -} \ No newline at end of file diff --git a/src/services/api/models/MeasureDto.ts b/src/services/api/models/MeasureDto.ts new file mode 100644 index 0000000..dea91c6 --- /dev/null +++ b/src/services/api/models/MeasureDto.ts @@ -0,0 +1,12 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type MeasureDto = { + id?: number; + idWell?: number; + idCategory?: number; + categoryName?: string | null; + timestamp?: string; + data?: Record | null; +} \ No newline at end of file diff --git a/src/services/api/models/MudDiagramDataDto.ts b/src/services/api/models/MudDiagramDataDto.ts deleted file mode 100644 index 5b0cba5..0000000 --- a/src/services/api/models/MudDiagramDataDto.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type MudDiagramDataDto = { - key?: number; - lastUpdate?: string; - probeNumber?: number; - probeExtractionDepth?: number; - sandstone?: number; - siltstone?: number; - argillit?: number; - brokenArgillit?: number; - coal?: number; - sand?: number; - clay?: number; - camstone?: number; - cement?: number; - summary?: string | null; - drillingMud?: number; - sludge?: number; - maxSum?: number; - methane?: number; - ethane?: number; - propane?: number; - butane?: number; - pentane?: number; - mechanicalSpeed?: number; - preliminaryConclusion?: string | null; -} \ No newline at end of file diff --git a/src/services/api/models/NnbDataDto.ts b/src/services/api/models/NnbDataDto.ts deleted file mode 100644 index 57c76c7..0000000 --- a/src/services/api/models/NnbDataDto.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type NnbDataDto = { - key?: number; - lastUpdate?: string; - depth?: number; - zenithAngle?: number; - magneticAzimuth?: number; - trueAzimuth?: number; - conditionalViscosity?: number; - directAzimuth?: number; - verticalDepth?: number; - absoluteMark?: number; - localNorthOffset?: number; - localEastOffset?: number; - outFallOffset?: number; - offsetAzimuth?: number; - areaIntensity?: number; - offsetStopAngle?: number; - zenithIntensity?: number; - comment?: number; - depthPlanFactDifference?: number; - distancePlanFactDifference?: number; -} \ No newline at end of file diff --git a/src/services/api/services/FluidService.ts b/src/services/api/services/FluidService.ts deleted file mode 100644 index fe1e065..0000000 --- a/src/services/api/services/FluidService.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { FluidDataDto } from '../models/FluidDataDto'; -import { request as __request } from '../core/request'; - -export class FluidService { - - /** - * @param idWell - * @param idCategory - * @returns any Success - * @throws ApiError - */ - public static async get( -idWell: number, -idCategory?: number, -): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/fluidLastData`, - query: { - 'idCategory': idCategory, - }, - }); - return result.body; - } - - /** - * @param idWell - * @param idCategory - * @param requestBody - * @returns any Success - * @throws ApiError - */ - public static async put( -idWell: number, -idCategory?: number, -requestBody?: FluidDataDto, -): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/fluidLastData`, - query: { - 'idCategory': idCategory, - }, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/MeasureService.ts b/src/services/api/services/MeasureService.ts new file mode 100644 index 0000000..2547a53 --- /dev/null +++ b/src/services/api/services/MeasureService.ts @@ -0,0 +1,126 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { MeasureDto } from '../models/MeasureDto'; +import { request as __request } from '../core/request'; + +export class MeasureService { + + /** + * @param idWell + * @returns any Success + * @throws ApiError + */ + public static async getCategories( +idWell: number, +): Promise { + const result = await __request({ + method: 'GET', + path: `/api/well/${idWell}/measure/categories`, + }); + return result.body; + } + + /** + * @param idWell + * @returns any Success + * @throws ApiError + */ + public static async getAllLast( +idWell: number, +): Promise { + const result = await __request({ + method: 'GET', + path: `/api/well/${idWell}/measure/lastAll`, + }); + return result.body; + } + + /** + * @param idWell + * @param idCategory + * @returns any Success + * @throws ApiError + */ + public static async getLast( +idWell: number, +idCategory: number, +): Promise { + const result = await __request({ + method: 'GET', + path: `/api/well/${idWell}/measure/last/${idCategory}`, + }); + return result.body; + } + + /** + * @param idWell + * @param idCategory + * @returns any Success + * @throws ApiError + */ + public static async getHisory( +idWell: number, +idCategory: number, +): Promise { + const result = await __request({ + method: 'GET', + path: `/api/well/${idWell}/measure/history/${idCategory}`, + }); + return result.body; + } + + /** + * @param idWell + * @param requestBody + * @returns any Success + * @throws ApiError + */ + public static async insert( +idWell: number, +requestBody?: MeasureDto, +): Promise { + const result = await __request({ + method: 'POST', + path: `/api/well/${idWell}/measure`, + body: requestBody, + }); + return result.body; + } + + /** + * @param idWell + * @param requestBody + * @returns any Success + * @throws ApiError + */ + public static async update( +idWell: number, +requestBody?: MeasureDto, +): Promise { + const result = await __request({ + method: 'PUT', + path: `/api/well/${idWell}/measure`, + body: requestBody, + }); + return result.body; + } + + /** + * @param idWell + * @param idData + * @returns any Success + * @throws ApiError + */ + public static async markAsDelete( +idWell: number, +idData: number, +): Promise { + const result = await __request({ + method: 'DELETE', + path: `/api/well/${idWell}/measure`, + }); + return result.body; + } + +} \ No newline at end of file diff --git a/src/services/api/services/MudDiagramService.ts b/src/services/api/services/MudDiagramService.ts deleted file mode 100644 index f450da2..0000000 --- a/src/services/api/services/MudDiagramService.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { MudDiagramDataDto } from '../models/MudDiagramDataDto'; -import { request as __request } from '../core/request'; - -export class MudDiagramService { - - /** - * @param idWell - * @param idCategory - * @returns any Success - * @throws ApiError - */ - public static async get( -idWell: number, -idCategory?: number, -): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/mudLastData`, - query: { - 'idCategory': idCategory, - }, - }); - return result.body; - } - - /** - * @param idWell - * @param idCategory - * @param requestBody - * @returns any Success - * @throws ApiError - */ - public static async put( -idWell: number, -idCategory?: number, -requestBody?: MudDiagramDataDto, -): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/mudLastData`, - query: { - 'idCategory': idCategory, - }, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/NnbDataService.ts b/src/services/api/services/NnbDataService.ts deleted file mode 100644 index 13a514f..0000000 --- a/src/services/api/services/NnbDataService.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { NnbDataDto } from '../models/NnbDataDto'; -import { request as __request } from '../core/request'; - -export class NnbDataService { - - /** - * @param idWell - * @param idCategory - * @returns any Success - * @throws ApiError - */ - public static async get( -idWell: number, -idCategory?: number, -): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/nnbLastData`, - query: { - 'idCategory': idCategory, - }, - }); - return result.body; - } - - /** - * @param idWell - * @param idCategory - * @param requestBody - * @returns any Success - * @throws ApiError - */ - public static async put( -idWell: number, -idCategory?: number, -requestBody?: NnbDataDto, -): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/nnbLastData`, - query: { - 'idCategory': idCategory, - }, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/WellOperationService.ts b/src/services/api/services/WellOperationService.ts index 0fdbd49..3215e56 100644 --- a/src/services/api/services/WellOperationService.ts +++ b/src/services/api/services/WellOperationService.ts @@ -48,7 +48,7 @@ begin?: string, end?: string, minDepth: number = -1.7976931348623157e+308, maxDepth: number = 1.7976931348623157e+308, -skip?: number, +skip: number = 0, take: number = 32, ): Promise { const result = await __request({