diff --git a/.gitignore b/.gitignore index a3ec777..0cd9a52 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. +# autogenerated +/src/services/api + # dependencies /node_modules /.pnp diff --git a/src/services/api/core/ApiError.ts b/src/services/api/core/ApiError.ts deleted file mode 100644 index f03cc40..0000000 --- a/src/services/api/core/ApiError.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApiResult } from './ApiResult'; - -export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: any; - - constructor(response: ApiResult, message: string) { - super(message); - - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - } -} \ No newline at end of file diff --git a/src/services/api/core/ApiRequestOptions.ts b/src/services/api/core/ApiRequestOptions.ts deleted file mode 100644 index ee87d8f..0000000 --- a/src/services/api/core/ApiRequestOptions.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly path: string; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly responseHeader?: string; - readonly errors?: Record; -} \ No newline at end of file diff --git a/src/services/api/core/ApiResult.ts b/src/services/api/core/ApiResult.ts deleted file mode 100644 index 7363469..0000000 --- a/src/services/api/core/ApiResult.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type ApiResult = { - readonly url: string; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly body: any; -} \ No newline at end of file diff --git a/src/services/api/core/OpenAPI.ts b/src/services/api/core/OpenAPI.ts deleted file mode 100644 index 5d39060..0000000 --- a/src/services/api/core/OpenAPI.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; - -type Resolver = (options: ApiRequestOptions) => Promise; -type Headers = Record; - -type Config = { - BASE: string; - VERSION: string; - WITH_CREDENTIALS: boolean; - TOKEN?: string | Resolver; - USERNAME?: string | Resolver; - PASSWORD?: string | Resolver; - HEADERS?: Headers | Resolver; -} - -export const OpenAPI: Config = { - BASE: '', - VERSION: '1', - WITH_CREDENTIALS: false, - TOKEN: undefined, - USERNAME: undefined, - PASSWORD: undefined, - HEADERS: undefined, -}; \ No newline at end of file diff --git a/src/services/api/core/request.ts b/src/services/api/core/request.ts deleted file mode 100644 index d618f49..0000000 --- a/src/services/api/core/request.ts +++ /dev/null @@ -1,205 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import { ApiError } from './ApiError'; -import type { ApiRequestOptions } from './ApiRequestOptions'; -import type { ApiResult } from './ApiResult'; -import { OpenAPI } from './OpenAPI'; - -function isDefined(value: T | null | undefined): value is Exclude { - return value !== undefined && value !== null; -} - -function isString(value: any): value is string { - return typeof value === 'string'; -} - -function isStringWithValue(value: any): value is string { - return isString(value) && value !== ''; -} - -function isBlob(value: any): value is Blob { - return value instanceof Blob; -} - -function getQueryString(params: Record): string { - const qs: string[] = []; - Object.keys(params).forEach(key => { - const value = params[key]; - if (isDefined(value)) { - if (Array.isArray(value)) { - value.forEach(value => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }); - } else { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - } - } - }); - if (qs.length > 0) { - return `?${qs.join('&')}`; - } - return ''; -} - -function getUrl(options: ApiRequestOptions): string { - const path = options.path.replace(/[:]/g, '_'); - const url = `${OpenAPI.BASE}${path}`; - - if (options.query) { - return `${url}${getQueryString(options.query)}`; - } - return url; -} - -function getFormData(params: Record): FormData { - const formData = new FormData(); - Object.keys(params).forEach(key => { - const value = params[key]; - if (isDefined(value)) { - formData.append(key, value); - } - }); - return formData; -} - -type Resolver = (options: ApiRequestOptions) => Promise; - -async function resolve(options: ApiRequestOptions, resolver?: T | Resolver): Promise { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; -} - -async function getHeaders(options: ApiRequestOptions): Promise { - const token = await resolve(options, OpenAPI.TOKEN); - const username = await resolve(options, OpenAPI.USERNAME); - const password = await resolve(options, OpenAPI.PASSWORD); - const defaultHeaders = await resolve(options, OpenAPI.HEADERS); - - const headers = new Headers({ - Accept: 'application/json', - ...defaultHeaders, - ...options.headers, - }); - - if (isStringWithValue(token)) { - headers.append('Authorization', `Bearer ${token}`); - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = btoa(`${username}:${password}`); - headers.append('Authorization', `Basic ${credentials}`); - } - - if (options.body) { - if (isBlob(options.body)) { - headers.append('Content-Type', options.body.type || 'application/octet-stream'); - } else if (isString(options.body)) { - headers.append('Content-Type', 'text/plain'); - } else { - headers.append('Content-Type', 'application/json'); - } - } - return headers; -} - -function getRequestBody(options: ApiRequestOptions): BodyInit | undefined { - if (options.formData) { - return getFormData(options.formData); - } - if (options.body) { - if (isString(options.body) || isBlob(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } - } - return undefined; -} - -async function sendRequest(options: ApiRequestOptions, url: string): Promise { - const request: RequestInit = { - method: options.method, - headers: await getHeaders(options), - body: getRequestBody(options), - }; - if (OpenAPI.WITH_CREDENTIALS) { - request.credentials = 'include'; - } - return await fetch(url, request); -} - -function getResponseHeader(response: Response, responseHeader?: string): string | null { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } - } - return null; -} - -async function getResponseBody(response: Response): Promise { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const isJSON = contentType.toLowerCase().startsWith('application/json'); - if (isJSON) { - return await response.json(); - } else { - return await response.text(); - } - } - } catch (error) { - console.error(error); - } - return null; -} - -function catchErrors(options: ApiRequestOptions, result: ApiResult): void { - const errors: Record = { - 400: 'Bad Request', - 401: 'Unauthorized', - 403: 'Forbidden', - 404: 'Not Found', - 500: 'Internal Server Error', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - ...options.errors, - } - - const error = errors[result.status]; - if (error) { - throw new ApiError(result, error); - } - - if (!result.ok) { - throw new ApiError(result, 'Generic Error'); - } -} - -/** - * Request using fetch client - * @param options The request options from the the service - * @returns ApiResult - * @throws ApiError - */ -export async function request(options: ApiRequestOptions): Promise { - const url = getUrl(options); - const response = await sendRequest(options, url); - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader || responseBody, - }; - - catchErrors(options, result); - return result; -} \ No newline at end of file diff --git a/src/services/api/index.ts b/src/services/api/index.ts deleted file mode 100644 index 21fd12a..0000000 --- a/src/services/api/index.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export { ApiError } from './core/ApiError'; -export { OpenAPI } from './core/OpenAPI'; - -export type { AuthDto } from './models/AuthDto'; -export type { ClusterDto } from './models/ClusterDto'; -export type { ClusterRopStatDto } from './models/ClusterRopStatDto'; -export type { CompanyDto } from './models/CompanyDto'; -export type { DatesRangeDto } from './models/DatesRangeDto'; -export type { DepositDto } from './models/DepositDto'; -export type { DrillFlowChartDto } from './models/DrillFlowChartDto'; -export type { DrillParamsDto } from './models/DrillParamsDto'; -export type { EventDto } from './models/EventDto'; -export type { FileInfoDto } from './models/FileInfoDto'; -export type { FileInfoDtoPaginationContainer } from './models/FileInfoDtoPaginationContainer'; -export type { FileMarkDto } from './models/FileMarkDto'; -export type { FilePublishInfoDto } from './models/FilePublishInfoDto'; -export type { MeasureDto } from './models/MeasureDto'; -export type { MessageDto } from './models/MessageDto'; -export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer'; -export type { PermissionBaseDto } from './models/PermissionBaseDto'; -export type { PermissionDto } from './models/PermissionDto'; -export type { PermissionInfoDto } from './models/PermissionInfoDto'; -export type { SetpointInfoDto } from './models/SetpointInfoDto'; -export type { SetpointsRequestDto } from './models/SetpointsRequestDto'; -export type { StatClusterDto } from './models/StatClusterDto'; -export type { StatOperationsDto } from './models/StatOperationsDto'; -export type { StatOperationsDtoPlanFactBase } from './models/StatOperationsDtoPlanFactBase'; -export type { StatSectionDto } from './models/StatSectionDto'; -export type { StatWellDto } from './models/StatWellDto'; -export type { TelemetryDataSaubDto } from './models/TelemetryDataSaubDto'; -export type { TelemetryDataSpinDto } from './models/TelemetryDataSpinDto'; -export type { TelemetryDto } from './models/TelemetryDto'; -export type { TelemetryInfoDto } from './models/TelemetryInfoDto'; -export type { TelemetryMessageDto } from './models/TelemetryMessageDto'; -export type { TelemetryOperationDto } from './models/TelemetryOperationDto'; -export type { TelemetryOperationDtoPaginationContainer } from './models/TelemetryOperationDtoPaginationContainer'; -export type { TelemetryOperationDurationDto } from './models/TelemetryOperationDurationDto'; -export type { TelemetryTimeZoneDto } from './models/TelemetryTimeZoneDto'; -export type { TelemetryUserDto } from './models/TelemetryUserDto'; -export type { UserDto } from './models/UserDto'; -export type { UserExtendedDto } from './models/UserExtendedDto'; -export type { UserRegistrationDto } from './models/UserRegistrationDto'; -export type { UserRoleDto } from './models/UserRoleDto'; -export type { UserTokenDto } from './models/UserTokenDto'; -export type { WellCompositeDto } from './models/WellCompositeDto'; -export type { WellDepthToDayDto } from './models/WellDepthToDayDto'; -export type { WellDepthToIntervalDto } from './models/WellDepthToIntervalDto'; -export type { WellDto } from './models/WellDto'; -export type { WellOperationCategoryDto } from './models/WellOperationCategoryDto'; -export type { WellOperationDto } from './models/WellOperationDto'; -export type { WellOperationDtoPaginationContainer } from './models/WellOperationDtoPaginationContainer'; -export type { WellOperationDtoPlanFactPredictBase } from './models/WellOperationDtoPlanFactPredictBase'; -export type { WellParamsDto } from './models/WellParamsDto'; - -export { AdminClusterService } from './services/AdminClusterService'; -export { AdminCompanyService } from './services/AdminCompanyService'; -export { AdminDepositService } from './services/AdminDepositService'; -export { AdminPermissionInfoService } from './services/AdminPermissionInfoService'; -export { AdminPermissionService } from './services/AdminPermissionService'; -export { AdminTelemetryService } from './services/AdminTelemetryService'; -export { AdminUserRoleService } from './services/AdminUserRoleService'; -export { AdminUserService } from './services/AdminUserService'; -export { AdminWellService } from './services/AdminWellService'; -export { AuthService } from './services/AuthService'; -export { ClusterService } from './services/ClusterService'; -export { DepositService } from './services/DepositService'; -export { DrillFlowChartService } from './services/DrillFlowChartService'; -export { DrillingProgramService } from './services/DrillingProgramService'; -export { DrillParamsService } from './services/DrillParamsService'; -export { FileService } from './services/FileService'; -export { MeasureService } from './services/MeasureService'; -export { MessageService } from './services/MessageService'; -export { OperationStatService } from './services/OperationStatService'; -export { ReportService } from './services/ReportService'; -export { RequerstTrackerService } from './services/RequerstTrackerService'; -export { SetpointsService } from './services/SetpointsService'; -export { TelemetryAnalyticsService } from './services/TelemetryAnalyticsService'; -export { TelemetryDataSaubService } from './services/TelemetryDataSaubService'; -export { TelemetryDataSpinService } from './services/TelemetryDataSpinService'; -export { TelemetryService } from './services/TelemetryService'; -export { WellCompositeService } from './services/WellCompositeService'; -export { WellOperationService } from './services/WellOperationService'; -export { WellService } from './services/WellService'; diff --git a/src/services/api/models/AuthDto.ts b/src/services/api/models/AuthDto.ts deleted file mode 100644 index bd6f347..0000000 --- a/src/services/api/models/AuthDto.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AuthDto = { - login?: string | null; - password?: string | null; -} diff --git a/src/services/api/models/ClusterDto.ts b/src/services/api/models/ClusterDto.ts deleted file mode 100644 index b802a01..0000000 --- a/src/services/api/models/ClusterDto.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { WellDto } from './WellDto'; - -export type ClusterDto = { - id?: number; - caption?: string | null; - latitude?: number | null; - longitude?: number | null; - wells?: Array | null; -} diff --git a/src/services/api/models/ClusterRopStatDto.ts b/src/services/api/models/ClusterRopStatDto.ts deleted file mode 100644 index ed29adb..0000000 --- a/src/services/api/models/ClusterRopStatDto.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ClusterRopStatDto = { - ropMax?: number; - ropAverage?: number; -} diff --git a/src/services/api/models/CompanyDto.ts b/src/services/api/models/CompanyDto.ts deleted file mode 100644 index 85fb2ad..0000000 --- a/src/services/api/models/CompanyDto.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type CompanyDto = { - id?: number; - caption?: string | null; - companyTypeCaption?: string | null; -} diff --git a/src/services/api/models/DatesRangeDto.ts b/src/services/api/models/DatesRangeDto.ts deleted file mode 100644 index acbe4e8..0000000 --- a/src/services/api/models/DatesRangeDto.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type DatesRangeDto = { - from?: string; - to?: string; -} diff --git a/src/services/api/models/DepositDto.ts b/src/services/api/models/DepositDto.ts deleted file mode 100644 index 8b140b7..0000000 --- a/src/services/api/models/DepositDto.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ClusterDto } from './ClusterDto'; - -export type DepositDto = { - id?: number; - caption?: string | null; - latitude?: number | null; - longitude?: number | null; - clusters?: Array | null; -} diff --git a/src/services/api/models/DrillFlowChartDto.ts b/src/services/api/models/DrillFlowChartDto.ts deleted file mode 100644 index ec4a959..0000000 --- a/src/services/api/models/DrillFlowChartDto.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type DrillFlowChartDto = { - id?: number; - idWell?: number; - idWellOperationCategory?: number; - lastUpdate?: string; - depthStart?: number; - depthEnd?: number; - axialLoadMin?: number; - axialLoadMax?: number; - pressureMin?: number; - pressureMax?: number; - rotorTorqueMin?: number; - rotorTorqueMax?: number; - rotorSpeedMin?: number; - rotorSpeedMax?: number; - flowMin?: number; - flowMax?: number; -} diff --git a/src/services/api/models/DrillParamsDto.ts b/src/services/api/models/DrillParamsDto.ts deleted file mode 100644 index 406c87a..0000000 --- a/src/services/api/models/DrillParamsDto.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type DrillParamsDto = { - id?: number; - idWell?: number; - depthStart?: number; - depthEnd?: number; - idWellSectionType?: number; - axialLoadMin?: number; - axialLoadAvg?: number; - axialLoadMax?: number; - pressureMin?: number; - pressureAvg?: number; - pressureMax?: number; - rotorTorqueMin?: number; - rotorTorqueAvg?: number; - rotorTorqueMax?: number; - rotorSpeedMin?: number; - rotorSpeedAvg?: number; - rotorSpeedMax?: number; - flowMin?: number; - flowAvg?: number; - flowMax?: number; -} diff --git a/src/services/api/models/EventDto.ts b/src/services/api/models/EventDto.ts deleted file mode 100644 index e7e334b..0000000 --- a/src/services/api/models/EventDto.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type EventDto = { - id?: number; - message?: string | null; - idCategory?: number; - tag?: string | null; - eventType?: number; - idSound?: number; -} diff --git a/src/services/api/models/FileInfoDto.ts b/src/services/api/models/FileInfoDto.ts deleted file mode 100644 index 9ca4e63..0000000 --- a/src/services/api/models/FileInfoDto.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { FileMarkDto } from './FileMarkDto'; -import type { FilePublishInfoDto } from './FilePublishInfoDto'; -import type { UserDto } from './UserDto'; - -export type FileInfoDto = { - id?: number; - idWell?: number; - idCategory?: number; - idAuthor?: number; - name?: string | null; - uploadDate?: string; - size?: number; - publishInfo?: FilePublishInfoDto; - author?: UserDto; - fileMarks?: Array | null; -} diff --git a/src/services/api/models/FileInfoDtoPaginationContainer.ts b/src/services/api/models/FileInfoDtoPaginationContainer.ts deleted file mode 100644 index 7bf4f27..0000000 --- a/src/services/api/models/FileInfoDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { FileInfoDto } from './FileInfoDto'; - -export type FileInfoDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/models/FileMarkDto.ts b/src/services/api/models/FileMarkDto.ts deleted file mode 100644 index 9838d66..0000000 --- a/src/services/api/models/FileMarkDto.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { UserDto } from './UserDto'; - -export type FileMarkDto = { - id?: number; - idFile?: number; - idMarkType?: number; - dateCreated?: string; - comment?: string | null; - isDeleted?: boolean; - user?: UserDto; -} diff --git a/src/services/api/models/FilePublishInfoDto.ts b/src/services/api/models/FilePublishInfoDto.ts deleted file mode 100644 index 59099f9..0000000 --- a/src/services/api/models/FilePublishInfoDto.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type FilePublishInfoDto = { - publisherLogin?: string | null; - date?: string; - webStorageFileUrl?: string | null; -} diff --git a/src/services/api/models/MeasureDto.ts b/src/services/api/models/MeasureDto.ts deleted file mode 100644 index 5a846f9..0000000 --- a/src/services/api/models/MeasureDto.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type MeasureDto = { - id?: number; - idWell?: number; - idCategory?: number; - categoryName?: string | null; - timestamp?: string; - data?: Record | null; -} diff --git a/src/services/api/models/MessageDto.ts b/src/services/api/models/MessageDto.ts deleted file mode 100644 index 081e545..0000000 --- a/src/services/api/models/MessageDto.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type MessageDto = { - id?: number; - date?: string; - categoryId?: number; - wellDepth?: number; - user?: string | null; - message?: string | null; -} diff --git a/src/services/api/models/MessageDtoPaginationContainer.ts b/src/services/api/models/MessageDtoPaginationContainer.ts deleted file mode 100644 index e41bc14..0000000 --- a/src/services/api/models/MessageDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { MessageDto } from './MessageDto'; - -export type MessageDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/models/PermissionBaseDto.ts b/src/services/api/models/PermissionBaseDto.ts deleted file mode 100644 index f6b16de..0000000 --- a/src/services/api/models/PermissionBaseDto.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type PermissionBaseDto = { - idPermissionInfo?: number; - permissionName?: string | null; - value?: number; -} diff --git a/src/services/api/models/PermissionDto.ts b/src/services/api/models/PermissionDto.ts deleted file mode 100644 index 955fb61..0000000 --- a/src/services/api/models/PermissionDto.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type PermissionDto = { - idPermissionInfo?: number; - permissionName?: string | null; - value?: number; - idUserRole?: number; -} diff --git a/src/services/api/models/PermissionInfoDto.ts b/src/services/api/models/PermissionInfoDto.ts deleted file mode 100644 index 191d91c..0000000 --- a/src/services/api/models/PermissionInfoDto.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type PermissionInfoDto = { - id?: number; - name?: string | null; - description?: string | null; - bitDescription?: Record | null; -} diff --git a/src/services/api/models/SetpointInfoDto.ts b/src/services/api/models/SetpointInfoDto.ts deleted file mode 100644 index 35fdd0a..0000000 --- a/src/services/api/models/SetpointInfoDto.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type SetpointInfoDto = { - displayName?: string | null; - name?: string | null; - units?: string | null; - comment?: string | null; - max?: number; - min?: number; -} diff --git a/src/services/api/models/SetpointsRequestDto.ts b/src/services/api/models/SetpointsRequestDto.ts deleted file mode 100644 index 189d138..0000000 --- a/src/services/api/models/SetpointsRequestDto.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { UserDto } from './UserDto'; -import type { WellDto } from './WellDto'; - -export type SetpointsRequestDto = { - id?: number; - idWell?: number; - idAuthor?: number; - idState?: number; - uploadDate?: string; - obsolescenceSec?: number; - setpoints?: Record | null; - comment?: string | null; - well?: WellDto; - author?: UserDto; -} diff --git a/src/services/api/models/StatClusterDto.ts b/src/services/api/models/StatClusterDto.ts deleted file mode 100644 index 5bd051a..0000000 --- a/src/services/api/models/StatClusterDto.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { StatWellDto } from './StatWellDto'; - -export type StatClusterDto = { - id?: number; - caption?: string | null; - statsWells?: Array | null; -} diff --git a/src/services/api/models/StatOperationsDto.ts b/src/services/api/models/StatOperationsDto.ts deleted file mode 100644 index 40c7510..0000000 --- a/src/services/api/models/StatOperationsDto.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type StatOperationsDto = { - start?: string; - end?: string; - wellDepthStart?: number; - wellDepthEnd?: number; - routeSpeed?: number; - rop?: number; - bhaUpSpeed?: number; - bhaDownSpeed?: number; - casingDownSpeed?: number; - nonProductiveHours?: number; -} diff --git a/src/services/api/models/StatOperationsDtoPlanFactBase.ts b/src/services/api/models/StatOperationsDtoPlanFactBase.ts deleted file mode 100644 index cd15dfe..0000000 --- a/src/services/api/models/StatOperationsDtoPlanFactBase.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { StatOperationsDto } from './StatOperationsDto'; - -export type StatOperationsDtoPlanFactBase = { - plan?: StatOperationsDto; - fact?: StatOperationsDto; -} diff --git a/src/services/api/models/StatSectionDto.ts b/src/services/api/models/StatSectionDto.ts deleted file mode 100644 index 934eb6d..0000000 --- a/src/services/api/models/StatSectionDto.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { StatOperationsDto } from './StatOperationsDto'; - -export type StatSectionDto = { - plan?: StatOperationsDto; - fact?: StatOperationsDto; - id?: number; - caption?: string | null; -} diff --git a/src/services/api/models/StatWellDto.ts b/src/services/api/models/StatWellDto.ts deleted file mode 100644 index 0ef8103..0000000 --- a/src/services/api/models/StatWellDto.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { CompanyDto } from './CompanyDto'; -import type { StatOperationsDtoPlanFactBase } from './StatOperationsDtoPlanFactBase'; -import type { StatSectionDto } from './StatSectionDto'; - -export type StatWellDto = { - id?: number; - caption?: string | null; - wellType?: string | null; - idState?: number; - state?: string | null; - lastTelemetryDate?: string; - sections?: Array | null; - total?: StatOperationsDtoPlanFactBase; - companies?: Array | null; -} diff --git a/src/services/api/models/TelemetryDataSaubDto.ts b/src/services/api/models/TelemetryDataSaubDto.ts deleted file mode 100644 index 0f7df6e..0000000 --- a/src/services/api/models/TelemetryDataSaubDto.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TelemetryDataSaubDto = { - idTelemetry?: number; - date?: string; - mode?: number | null; - user?: string | null; - wellDepth?: number | null; - bitDepth?: number | null; - blockPosition?: number | null; - blockPositionMin?: number | null; - blockPositionMax?: number | null; - blockSpeed?: number | null; - blockSpeedSp?: number | null; - blockSpeedSpRotor?: number | null; - blockSpeedSpSlide?: number | null; - blockSpeedSpDevelop?: number | null; - pressure?: number | null; - pressureIdle?: number | null; - pressureSp?: number | null; - pressureSpRotor?: number | null; - pressureSpSlide?: number | null; - pressureSpDevelop?: number | null; - pressureDeltaLimitMax?: number | null; - axialLoad?: number | null; - axialLoadSp?: number | null; - axialLoadLimitMax?: number | null; - hookWeight?: number | null; - hookWeightIdle?: number | null; - hookWeightLimitMin?: number | null; - hookWeightLimitMax?: number | null; - rotorTorque?: number | null; - rotorTorqueIdle?: number | null; - rotorTorqueSp?: number | null; - rotorTorqueLimitMax?: number | null; - rotorSpeed?: number | null; - flow?: number | null; - flowIdle?: number | null; - flowDeltaLimitMax?: number | null; - idFeedRegulator?: number | null; - mseState?: number | null; -} diff --git a/src/services/api/models/TelemetryDataSpinDto.ts b/src/services/api/models/TelemetryDataSpinDto.ts deleted file mode 100644 index facd55a..0000000 --- a/src/services/api/models/TelemetryDataSpinDto.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TelemetryDataSpinDto = { - idTelemetry?: number; - date?: string; - topDriveSpeed?: number | null; - topDriveSpeedMin?: number | null; - topDriveSpeedMax?: number | null; - topDriveSpeedOffset?: number | null; - topDriveSpeedErr?: number | null; - topDriveTorque?: number | null; - topDriveTorqueMin?: number | null; - topDriveTorqueMax?: number | null; - topDriveTorqueOffset?: number | null; - topDriveTorqueErr?: number | null; - topDriveSpeedSpFrom?: number | null; - topDriveSpeedSpFromMin?: number | null; - topDriveSpeedSpFromMax?: number | null; - topDriveSpeedSpFromOffset?: number | null; - topDriveSpeedSpFromErr?: number | null; - topDriveTorqueSpFrom?: number | null; - topDriveTorqueSpFromMin?: number | null; - topDriveTorqueSpFromMax?: number | null; - topDriveTorqueSpFromOffset?: number | null; - topDriveTorqueSpFromErr?: number | null; - topDriveSpeedSpTo?: number | null; - topDriveSpeedSpToMin?: number | null; - topDriveSpeedSpToMax?: number | null; - topDriveSpeedSpToOffset?: number | null; - topDriveSpeedSpToErr?: number | null; - topDriveTorqueSpTo?: number | null; - topDriveTorqueSpToMin?: number | null; - topDriveTorqueSpToMax?: number | null; - topDriveTorqueSpToOffset?: number | null; - topDriveTorqueSpToErr?: number | null; - w2800?: number | null; - w2810?: number | null; - mode?: number | null; - w2808?: number | null; - torqueStarting?: number | null; - rotorTorqueAvg?: number | null; - encoderResolution?: number | null; - ratio?: number | null; - torqueRightLimit?: number | null; - torqueLeftLimit?: number | null; - revolsRightLimit?: number | null; - revolsLeftLimit?: number | null; - speedRightSp?: number | null; - speedLeftSp?: number | null; - revolsRightTotal?: number | null; - revolsLeftTotal?: number | null; - turnRightOnceByTorque?: number | null; - turnLeftOnceByTorque?: number | null; - turnRightOnceByAngle?: number | null; - turnLeftOnceByAngle?: number | null; - turnRightOnceByRevols?: number | null; - turnLeftOnceByRevols?: number | null; - breakAngleK?: number | null; - reverseKTorque?: number | null; - positionZero?: number | null; - positionRight?: number | null; - torqueRampTime?: number | null; - ver?: number | null; - reverseSpeedSpZeroTime?: number | null; - unlockBySectorOut?: number | null; - pidMuxTorqueLeftLimit?: number | null; - state?: number | null; - breakAngleLeft?: number | null; -} diff --git a/src/services/api/models/TelemetryDto.ts b/src/services/api/models/TelemetryDto.ts deleted file mode 100644 index b152295..0000000 --- a/src/services/api/models/TelemetryDto.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { TelemetryInfoDto } from './TelemetryInfoDto'; - -export type TelemetryDto = { - id?: number; - remoteUid?: string | null; - info?: TelemetryInfoDto; -} diff --git a/src/services/api/models/TelemetryInfoDto.ts b/src/services/api/models/TelemetryInfoDto.ts deleted file mode 100644 index 01b57bc..0000000 --- a/src/services/api/models/TelemetryInfoDto.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TelemetryInfoDto = { - drillingStartDate?: string; - timeZoneId?: string | null; - timeZoneOffsetTotalHours?: number; - well?: string | null; - cluster?: string | null; - customer?: string | null; - deposit?: string | null; - hmiVersion?: string | null; - saubPlcVersion?: string | null; - spinPlcVersion?: string | null; - comment?: string | null; -} diff --git a/src/services/api/models/TelemetryMessageDto.ts b/src/services/api/models/TelemetryMessageDto.ts deleted file mode 100644 index 492da5c..0000000 --- a/src/services/api/models/TelemetryMessageDto.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TelemetryMessageDto = { - id?: number; - date?: string; - wellDepth?: number; - idEvent?: number; - idTelemetryUser?: number | null; - arg0?: string | null; - arg1?: string | null; - arg2?: string | null; - arg3?: string | null; -} diff --git a/src/services/api/models/TelemetryOperationDto.ts b/src/services/api/models/TelemetryOperationDto.ts deleted file mode 100644 index 4b24faa..0000000 --- a/src/services/api/models/TelemetryOperationDto.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TelemetryOperationDto = { - id?: number; - name?: string | null; - beginDate?: string; - endDate?: string; - startWellDepth?: number; - endWellDepth?: number; -} diff --git a/src/services/api/models/TelemetryOperationDtoPaginationContainer.ts b/src/services/api/models/TelemetryOperationDtoPaginationContainer.ts deleted file mode 100644 index 06d02c5..0000000 --- a/src/services/api/models/TelemetryOperationDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { TelemetryOperationDto } from './TelemetryOperationDto'; - -export type TelemetryOperationDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/models/TelemetryOperationDurationDto.ts b/src/services/api/models/TelemetryOperationDurationDto.ts deleted file mode 100644 index dc090a7..0000000 --- a/src/services/api/models/TelemetryOperationDurationDto.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TelemetryOperationDurationDto = { - operationName?: string | null; - duration?: number; -} diff --git a/src/services/api/models/TelemetryTimeZoneDto.ts b/src/services/api/models/TelemetryTimeZoneDto.ts deleted file mode 100644 index 1e9056b..0000000 --- a/src/services/api/models/TelemetryTimeZoneDto.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TelemetryTimeZoneDto = { - hours?: number; - timeZoneId?: string | null; - isOverride?: boolean; -} diff --git a/src/services/api/models/TelemetryUserDto.ts b/src/services/api/models/TelemetryUserDto.ts deleted file mode 100644 index b4959fc..0000000 --- a/src/services/api/models/TelemetryUserDto.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TelemetryUserDto = { - id?: number; - name?: string | null; - surname?: string | null; - patronymic?: string | null; - level?: number; -} diff --git a/src/services/api/models/UserDto.ts b/src/services/api/models/UserDto.ts deleted file mode 100644 index 4d9e6af..0000000 --- a/src/services/api/models/UserDto.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { CompanyDto } from './CompanyDto'; - -export type UserDto = { - id?: number; - login?: string | null; - name?: string | null; - surname?: string | null; - patronymic?: string | null; - email?: string | null; - phone?: string | null; - position?: string | null; - idCompany?: number | null; - company?: CompanyDto; -} diff --git a/src/services/api/models/UserExtendedDto.ts b/src/services/api/models/UserExtendedDto.ts deleted file mode 100644 index cfd4158..0000000 --- a/src/services/api/models/UserExtendedDto.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { CompanyDto } from './CompanyDto'; - -export type UserExtendedDto = { - id?: number; - login?: string | null; - name?: string | null; - surname?: string | null; - patronymic?: string | null; - email?: string | null; - phone?: string | null; - position?: string | null; - idCompany?: number | null; - company?: CompanyDto; - roleNames?: Array | null; -} diff --git a/src/services/api/models/UserRegistrationDto.ts b/src/services/api/models/UserRegistrationDto.ts deleted file mode 100644 index cc952e4..0000000 --- a/src/services/api/models/UserRegistrationDto.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { CompanyDto } from './CompanyDto'; - -export type UserRegistrationDto = { - id?: number; - login?: string | null; - name?: string | null; - surname?: string | null; - patronymic?: string | null; - email?: string | null; - phone?: string | null; - position?: string | null; - idCompany?: number | null; - company?: CompanyDto; - password?: string | null; -} diff --git a/src/services/api/models/UserRoleDto.ts b/src/services/api/models/UserRoleDto.ts deleted file mode 100644 index 6efd298..0000000 --- a/src/services/api/models/UserRoleDto.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { PermissionBaseDto } from './PermissionBaseDto'; - -export type UserRoleDto = { - id?: number; - caption?: string | null; - idParent?: number | null; - idType?: number; - permissions?: Array | null; -} diff --git a/src/services/api/models/UserTokenDto.ts b/src/services/api/models/UserTokenDto.ts deleted file mode 100644 index ef33f2c..0000000 --- a/src/services/api/models/UserTokenDto.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { CompanyDto } from './CompanyDto'; -import type { PermissionBaseDto } from './PermissionBaseDto'; - -export type UserTokenDto = { - id?: number; - login?: string | null; - name?: string | null; - surname?: string | null; - patronymic?: string | null; - email?: string | null; - phone?: string | null; - position?: string | null; - idCompany?: number | null; - company?: CompanyDto; - roleNames?: Array | null; - permissions?: Array | null; - token?: string | null; -} diff --git a/src/services/api/models/WellCompositeDto.ts b/src/services/api/models/WellCompositeDto.ts deleted file mode 100644 index 2db927d..0000000 --- a/src/services/api/models/WellCompositeDto.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type WellCompositeDto = { - idWell?: number; - idWellSrc?: number; - idWellSectionType?: number; -} diff --git a/src/services/api/models/WellDepthToDayDto.ts b/src/services/api/models/WellDepthToDayDto.ts deleted file mode 100644 index 6db8d80..0000000 --- a/src/services/api/models/WellDepthToDayDto.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type WellDepthToDayDto = { - wellDepth?: number; - bitDepth?: number; - date?: string; -} diff --git a/src/services/api/models/WellDepthToIntervalDto.ts b/src/services/api/models/WellDepthToIntervalDto.ts deleted file mode 100644 index 72d34a2..0000000 --- a/src/services/api/models/WellDepthToIntervalDto.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type WellDepthToIntervalDto = { - intervalStartDate?: string; - intervalDepthProgress?: number; -} diff --git a/src/services/api/models/WellDto.ts b/src/services/api/models/WellDto.ts deleted file mode 100644 index a55bf12..0000000 --- a/src/services/api/models/WellDto.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { TelemetryDto } from './TelemetryDto'; - -export type WellDto = { - caption?: string | null; - cluster?: string | null; - deposit?: string | null; - id?: number; - latitude?: number | null; - longitude?: number | null; - wellType?: string | null; - idWellType?: number; - idCluster?: number | null; - idState?: number; - lastTelemetryDate?: string; - telemetry?: TelemetryDto; -} diff --git a/src/services/api/models/WellOperationCategoryDto.ts b/src/services/api/models/WellOperationCategoryDto.ts deleted file mode 100644 index b682abd..0000000 --- a/src/services/api/models/WellOperationCategoryDto.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type WellOperationCategoryDto = { - id?: number; - name?: string | null; - code?: number; -} diff --git a/src/services/api/models/WellOperationDto.ts b/src/services/api/models/WellOperationDto.ts deleted file mode 100644 index 7702acf..0000000 --- a/src/services/api/models/WellOperationDto.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type WellOperationDto = { - id?: number; - idWell?: number; - idWellSectionType?: number; - wellSectionTypeName?: string | null; - idCategory?: number; - categoryName?: string | null; - categoryInfo?: string | null; - idType?: number; - depthStart?: number; - depthEnd?: number; - dateStart?: string; - durationHours?: number; - comment?: string | null; -} diff --git a/src/services/api/models/WellOperationDtoPaginationContainer.ts b/src/services/api/models/WellOperationDtoPaginationContainer.ts deleted file mode 100644 index eaa7dc5..0000000 --- a/src/services/api/models/WellOperationDtoPaginationContainer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { WellOperationDto } from './WellOperationDto'; - -export type WellOperationDtoPaginationContainer = { - skip?: number; - take?: number; - count?: number; - items?: Array | null; -} diff --git a/src/services/api/models/WellOperationDtoPlanFactPredictBase.ts b/src/services/api/models/WellOperationDtoPlanFactPredictBase.ts deleted file mode 100644 index d753775..0000000 --- a/src/services/api/models/WellOperationDtoPlanFactPredictBase.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { WellOperationDto } from './WellOperationDto'; - -export type WellOperationDtoPlanFactPredictBase = { - plan?: WellOperationDto; - fact?: WellOperationDto; - predict?: WellOperationDto; -} diff --git a/src/services/api/models/WellParamsDto.ts b/src/services/api/models/WellParamsDto.ts deleted file mode 100644 index 4f01852..0000000 --- a/src/services/api/models/WellParamsDto.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type WellParamsDto = { - caption?: string | null; - latitude?: number | null; - longitude?: number | null; - idWellType?: number; - idState?: number; -} diff --git a/src/services/api/services/AdminClusterService.ts b/src/services/api/services/AdminClusterService.ts deleted file mode 100644 index 7bdd2c2..0000000 --- a/src/services/api/services/AdminClusterService.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ClusterDto } from '../models/ClusterDto'; -import { request as __request } from '../core/request'; - -export class AdminClusterService { - - /** - * Получить все записи - * @returns ClusterDto Success - * @throws ApiError - */ - public static async getAll(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/admin/cluster/all`, - }); - return result.body; - } - - /** - * Получить одну запись по Id - * @param id id записи - * @returns ClusterDto Success - * @throws ApiError - */ - public static async get( - id: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/admin/cluster/${id}`, - }); - return result.body; - } - - /** - * Редактировать запись по id - * @param id id записи - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async put( - id: number, - requestBody?: ClusterDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/admin/cluster/${id}`, - body: requestBody, - }); - return result.body; - } - - /** - * Удалить запись по id - * @param id id записи - * @returns number Success - * @throws ApiError - */ - public static async delete( - id: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/admin/cluster/${id}`, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: ClusterDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/cluster`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/AdminCompanyService.ts b/src/services/api/services/AdminCompanyService.ts deleted file mode 100644 index d515840..0000000 --- a/src/services/api/services/AdminCompanyService.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { CompanyDto } from '../models/CompanyDto'; -import { request as __request } from '../core/request'; - -export class AdminCompanyService { - - /** - * Получить все записи - * @returns CompanyDto Success - * @throws ApiError - */ - public static async getAll(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/admin/company/all`, - }); - return result.body; - } - - /** - * Получить одну запись по Id - * @param id id записи - * @returns CompanyDto Success - * @throws ApiError - */ - public static async get( - id: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/admin/company/${id}`, - }); - return result.body; - } - - /** - * Редактировать запись по id - * @param id id записи - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async put( - id: number, - requestBody?: CompanyDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/admin/company/${id}`, - body: requestBody, - }); - return result.body; - } - - /** - * Удалить запись по id - * @param id id записи - * @returns number Success - * @throws ApiError - */ - public static async delete( - id: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/admin/company/${id}`, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: CompanyDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/company`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/AdminDepositService.ts b/src/services/api/services/AdminDepositService.ts deleted file mode 100644 index 498be0b..0000000 --- a/src/services/api/services/AdminDepositService.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DepositDto } from '../models/DepositDto'; -import { request as __request } from '../core/request'; - -export class AdminDepositService { - - /** - * Получить все записи - * @returns DepositDto Success - * @throws ApiError - */ - public static async getAll(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/admin/deposit/all`, - }); - return result.body; - } - - /** - * Получить одну запись по Id - * @param id id записи - * @returns DepositDto Success - * @throws ApiError - */ - public static async get( - id: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/admin/deposit/${id}`, - }); - return result.body; - } - - /** - * Редактировать запись по id - * @param id id записи - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async put( - id: number, - requestBody?: DepositDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/admin/deposit/${id}`, - body: requestBody, - }); - return result.body; - } - - /** - * Удалить запись по id - * @param id id записи - * @returns number Success - * @throws ApiError - */ - public static async delete( - id: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/admin/deposit/${id}`, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: DepositDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/deposit`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/AdminPermissionInfoService.ts b/src/services/api/services/AdminPermissionInfoService.ts deleted file mode 100644 index bb4519f..0000000 --- a/src/services/api/services/AdminPermissionInfoService.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { PermissionInfoDto } from '../models/PermissionInfoDto'; -import { request as __request } from '../core/request'; - -export class AdminPermissionInfoService { - - /** - * Получить все записи - * @returns PermissionInfoDto Success - * @throws ApiError - */ - public static async getAll(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/admin/permissionInfo/all`, - }); - return result.body; - } - - /** - * Получить одну запись по Id - * @param id id записи - * @returns PermissionInfoDto Success - * @throws ApiError - */ - public static async get( - id: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/admin/permissionInfo/${id}`, - }); - return result.body; - } - - /** - * Редактировать запись по id - * @param id id записи - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async put( - id: number, - requestBody?: PermissionInfoDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/admin/permissionInfo/${id}`, - body: requestBody, - }); - return result.body; - } - - /** - * Удалить запись по id - * @param id id записи - * @returns number Success - * @throws ApiError - */ - public static async delete( - id: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/admin/permissionInfo/${id}`, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: PermissionInfoDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/permissionInfo`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/AdminPermissionService.ts b/src/services/api/services/AdminPermissionService.ts deleted file mode 100644 index 580599f..0000000 --- a/src/services/api/services/AdminPermissionService.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { PermissionDto } from '../models/PermissionDto'; -import { request as __request } from '../core/request'; - -export class AdminPermissionService { - - /** - * Получает список всех разрешений для роли - * @param idRole id роли - * @returns PermissionDto Success - * @throws ApiError - */ - public static async getByIdRole( - idRole?: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/admin/permission`, - query: { - 'idRole': idRole, - }, - }); - return result.body; - } - - /** - * Добавляет разрешения для роли - * @param requestBody Объекты новых разрешений для справочника - * @returns number Success - * @throws ApiError - */ - public static async insertRange( - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/permission`, - body: requestBody, - }); - return result.body; - } - - /** - * Обновляет разрешение для роли - * @param requestBody Объект разрешения для справочника - * @returns number Success - * @throws ApiError - */ - public static async update( - requestBody?: PermissionDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/admin/permission`, - body: requestBody, - }); - return result.body; - } - - /** - * Удаляет разрешение для роли - * @param idUserRole id роли для удаления разрешения - * @param idPermission id разрешения - * @returns number Success - * @throws ApiError - */ - public static async delete( - idUserRole: number, - idPermission: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/admin/permission/${idPermission}/${idUserRole}`, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/AdminTelemetryService.ts b/src/services/api/services/AdminTelemetryService.ts deleted file mode 100644 index 5744944..0000000 --- a/src/services/api/services/AdminTelemetryService.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { TelemetryDto } from '../models/TelemetryDto'; -import { request as __request } from '../core/request'; - -export class AdminTelemetryService { - - /** - * @returns any Success - * @throws ApiError - */ - public static async getRedundentRemoteUids(): Promise { - const result = await __request({ - method: 'GET', - path: `/reduntentUids`, - }); - return result.body; - } - - /** - * merge telemetries - * @param requestBody array of ids - * @returns any Success - * @throws ApiError - */ - public static async mergeTelemetries( - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/merge`, - body: requestBody, - }); - return result.body; - } - - /** - * Получить все записи - * @returns TelemetryDto Success - * @throws ApiError - */ - public static async getAll(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/admin/telemetry/all`, - }); - return result.body; - } - - /** - * Получить одну запись по Id - * @param id id записи - * @returns TelemetryDto Success - * @throws ApiError - */ - public static async get( - id: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/admin/telemetry/${id}`, - }); - return result.body; - } - - /** - * Редактировать запись по id - * @param id id записи - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async put( - id: number, - requestBody?: TelemetryDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/admin/telemetry/${id}`, - body: requestBody, - }); - return result.body; - } - - /** - * Удалить запись по id - * @param id id записи - * @returns number Success - * @throws ApiError - */ - public static async delete( - id: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/admin/telemetry/${id}`, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: TelemetryDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/telemetry`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/AdminUserRoleService.ts b/src/services/api/services/AdminUserRoleService.ts deleted file mode 100644 index 7dd8d44..0000000 --- a/src/services/api/services/AdminUserRoleService.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { UserRoleDto } from '../models/UserRoleDto'; -import { request as __request } from '../core/request'; - -export class AdminUserRoleService { - - /** - * Получить все записи - * @returns UserRoleDto Success - * @throws ApiError - */ - public static async getAll(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/admin/role/all`, - }); - return result.body; - } - - /** - * Получить одну запись по Id - * @param id id записи - * @returns UserRoleDto Success - * @throws ApiError - */ - public static async get( - id: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/admin/role/${id}`, - }); - return result.body; - } - - /** - * Редактировать запись по id - * @param id id записи - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async put( - id: number, - requestBody?: UserRoleDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/admin/role/${id}`, - body: requestBody, - }); - return result.body; - } - - /** - * Удалить запись по id - * @param id id записи - * @returns number Success - * @throws ApiError - */ - public static async delete( - id: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/admin/role/${id}`, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: UserRoleDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/role`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/AdminUserService.ts b/src/services/api/services/AdminUserService.ts deleted file mode 100644 index 481c330..0000000 --- a/src/services/api/services/AdminUserService.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { UserExtendedDto } from '../models/UserExtendedDto'; -import { request as __request } from '../core/request'; - -export class AdminUserService { - - /** - * Получить все записи - * @returns UserExtendedDto Success - * @throws ApiError - */ - public static async getAll(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/admin/user/all`, - }); - return result.body; - } - - /** - * Получить одну запись по Id - * @param id id записи - * @returns UserExtendedDto Success - * @throws ApiError - */ - public static async get( - id: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/admin/user/${id}`, - }); - return result.body; - } - - /** - * Редактировать запись по id - * @param id id записи - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async put( - id: number, - requestBody?: UserExtendedDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/admin/user/${id}`, - body: requestBody, - }); - return result.body; - } - - /** - * Удалить запись по id - * @param id id записи - * @returns number Success - * @throws ApiError - */ - public static async delete( - id: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/admin/user/${id}`, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: UserExtendedDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/user`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/AdminWellService.ts b/src/services/api/services/AdminWellService.ts deleted file mode 100644 index 2eca5a7..0000000 --- a/src/services/api/services/AdminWellService.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { WellDto } from '../models/WellDto'; -import { request as __request } from '../core/request'; - -export class AdminWellService { - - /** - * Получить все записи - * @returns WellDto Success - * @throws ApiError - */ - public static async getAll(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/admin/well/all`, - }); - return result.body; - } - - /** - * Получить одну запись по Id - * @param id id записи - * @returns WellDto Success - * @throws ApiError - */ - public static async get( - id: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/admin/well/${id}`, - }); - return result.body; - } - - /** - * Редактировать запись по id - * @param id id записи - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async put( - id: number, - requestBody?: WellDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/admin/well/${id}`, - body: requestBody, - }); - return result.body; - } - - /** - * Удалить запись по id - * @param id id записи - * @returns number Success - * @throws ApiError - */ - public static async delete( - id: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/admin/well/${id}`, - }); - return result.body; - } - - /** - * Добавить запись - * @param requestBody запись - * @returns number Success - * @throws ApiError - */ - public static async insert( - requestBody?: WellDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/admin/well`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/AuthService.ts b/src/services/api/services/AuthService.ts deleted file mode 100644 index bff4caf..0000000 --- a/src/services/api/services/AuthService.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { AuthDto } from '../models/AuthDto'; -import type { UserRegistrationDto } from '../models/UserRegistrationDto'; -import type { UserTokenDto } from '../models/UserTokenDto'; -import { request as __request } from '../core/request'; - -export class AuthService { - - /** - * Аутентификация пользователя - * @param requestBody - * @returns UserTokenDto новый токен - * @throws ApiError - */ - public static async login( - requestBody?: AuthDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/auth/login`, - body: requestBody, - errors: { - 400: `логин и пароль не подходят`, - }, - }); - return result.body; - } - - /** - * Продление срока действия токена - * @returns any Success - * @throws ApiError - */ - public static async refresh(): Promise { - const result = await __request({ - method: 'GET', - path: `/auth/refresh`, - }); - return result.body; - } - - /** - * Отправить заявку на регистрацию. Заявка подтверждается администратором. - * @param requestBody Информация о новом пользователе - * @returns any Success - * @throws ApiError - */ - public static async register( - requestBody?: UserRegistrationDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/auth`, - body: requestBody, - }); - return result.body; - } - - /** - * Смена пароля пользователя. Доступна пользователю и администратору - * @param idUser - * @param requestBody - * @returns any Success - * @throws ApiError - */ - public static async changePassword( - idUser: number, - requestBody?: string, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/auth/${idUser}/ChangePassword`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/ClusterService.ts b/src/services/api/services/ClusterService.ts deleted file mode 100644 index 6a2ea4b..0000000 --- a/src/services/api/services/ClusterService.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ClusterDto } from '../models/ClusterDto'; -import type { WellDto } from '../models/WellDto'; -import { request as __request } from '../core/request'; - -export class ClusterService { - - /** - * Получает список доступных пользователю кустов - * @returns ClusterDto Success - * @throws ApiError - */ - public static async getClusters(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/cluster`, - }); - return result.body; - } - - /** - * Получение доступных пользователю скважин - * @param idCluster - * @returns WellDto Success - * @throws ApiError - */ - public static async getWells( - idCluster: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/cluster/${idCluster}`, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/DepositService.ts b/src/services/api/services/DepositService.ts deleted file mode 100644 index 2bfdce1..0000000 --- a/src/services/api/services/DepositService.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ClusterDto } from '../models/ClusterDto'; -import type { DepositDto } from '../models/DepositDto'; -import { request as __request } from '../core/request'; - -export class DepositService { - - /** - * Получает список доступных пользователю месторождений - * @returns DepositDto Success - * @throws ApiError - */ - public static async getDeposits(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/deposit`, - }); - return result.body; - } - - /** - * Получает список доступных пользователю месторождений (только скважины с параметрами бурения) - * @returns DepositDto Success - * @throws ApiError - */ - public static async getDepositsDrillParams(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/deposit/drillParamsWells`, - }); - return result.body; - } - - /** - * Получает список доступных пользователю кустов месторождения - * @param depositId - * @returns ClusterDto Success - * @throws ApiError - */ - public static async getClusters( - depositId: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/deposit/${depositId}`, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/DrillFlowChartService.ts b/src/services/api/services/DrillFlowChartService.ts deleted file mode 100644 index 13da462..0000000 --- a/src/services/api/services/DrillFlowChartService.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DrillFlowChartDto } from '../models/DrillFlowChartDto'; -import { request as __request } from '../core/request'; - -export class DrillFlowChartService { - - /** - * Возвращает все значения для корридоров бурения по id скважины - * @param idWell id скважины - * @param updateFrom Дата, с которой следует искать новые параметры - * @returns DrillFlowChartDto Success - * @throws ApiError - */ - public static async get( - idWell: number, - updateFrom?: string, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/drillFlowChart`, - query: { - 'updateFrom': updateFrom, - }, - }); - return result.body; - } - - /** - * Сохраняет значения для корридоров бурения - * @param idWell id скважины - * @param requestBody Параметры корридоров бурения - * @returns number Success - * @throws ApiError - */ - public static async insert( - idWell: number, - requestBody?: DrillFlowChartDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/drillFlowChart`, - body: requestBody, - }); - return result.body; - } - - /** - * Изменяет значения выбранного корридора бурения - * @param idWell id скважины - * @param requestBody Параметры корридоров бурения - * @returns number Success - * @throws ApiError - */ - public static async edit( - idWell: number, - requestBody?: DrillFlowChartDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/well/${idWell}/drillFlowChart`, - body: requestBody, - }); - return result.body; - } - - /** - * Удаляет значения выбранного корридора бурения - * @param idWell id скважины - * @param drillFlowChartParamsId Id объекта корридоров бурения - * @returns number Success - * @throws ApiError - */ - public static async delete( - idWell: number, - drillFlowChartParamsId?: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/well/${idWell}/drillFlowChart`, - query: { - 'drillFlowChartParamsId': drillFlowChartParamsId, - }, - }); - return result.body; - } - - /** - * Возвращает все значения для корридоров бурения по uid панели - * @param uid uid панели - * @param updateFrom Дата, с которой следует искать новые параметры - * @returns DrillFlowChartDto Success - * @throws ApiError - */ - public static async getByTelemetry( - uid: string, - updateFrom?: string, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/telemetry/${uid}/drillFlowChart`, - query: { - 'updateFrom': updateFrom, - }, - }); - return result.body; - } - - /** - * Добавляет массив объектов корридоров бурения - * @param idWell id скважины - * @param requestBody Массив объектов параметров корридоров бурения - * @returns number Success - * @throws ApiError - */ - public static async insertRange( - idWell: number, - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/drillFlowChart/range`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/DrillParamsService.ts b/src/services/api/services/DrillParamsService.ts deleted file mode 100644 index 483dfd3..0000000 --- a/src/services/api/services/DrillParamsService.ts +++ /dev/null @@ -1,167 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DrillParamsDto } from '../models/DrillParamsDto'; -import { request as __request } from '../core/request'; - -export class DrillParamsService { - - /** - * Возвращает автоматически расчитанные значения для режимов бурения - * @param idWell id скважины - * @param startDepth Стартовая глубина - * @param endDepth Конечная глубина - * @returns DrillParamsDto Success - * @throws ApiError - */ - public static async getDefault( - idWell: number, - startDepth?: number, - endDepth?: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/drillParams/autoParams`, - query: { - 'startDepth': startDepth, - 'endDepth': endDepth, - }, - }); - return result.body; - } - - /** - * Возвращает все значения для режимов бурения на скважине - * @param idWell id скважины - * @returns DrillParamsDto Success - * @throws ApiError - */ - public static async getAll( - idWell: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/drillParams`, - }); - return result.body; - } - - /** - * Сохраняет значения для режимов бурения по секции на скважине - * @param idWell id скважины - * @param requestBody Параметры режимов бурений для секции - * @returns number Success - * @throws ApiError - */ - public static async insert( - idWell: number, - requestBody?: DrillParamsDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/drillParams`, - body: requestBody, - }); - return result.body; - } - - /** - * Изменяет значения выбранного режима бурения - * @param idWell id скважины - * @param dtoId id dto для изменения - * @param requestBody Параметры режимов бурений для секции - * @returns number Success - * @throws ApiError - */ - public static async update( - idWell: number, - dtoId?: number, - requestBody?: DrillParamsDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/well/${idWell}/drillParams`, - query: { - 'dtoId': dtoId, - }, - body: requestBody, - }); - return result.body; - } - - /** - * Удаляет объект значений выбранного режима бурения - * @param idWell id скважины - * @param drillParamsId Id объекта параметров режима бурений для секции - * @returns number Success - * @throws ApiError - */ - public static async delete( - idWell: number, - drillParamsId?: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/well/${idWell}/drillParams`, - query: { - 'drillParamsId': drillParamsId, - }, - }); - return result.body; - } - - /** - * Добавляет массив объектов режимов бурений - * @param idWell id скважины - * @param requestBody Массив объектов параметров режима бурений для секции - * @returns number Success - * @throws ApiError - */ - public static async insertRange( - idWell: number, - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/drillParams/range`, - body: requestBody, - }); - return result.body; - } - - /** - * Удаляет старые режимы бурения по скважине и добавляет новые - * @param idWell Id скважины для добавления - * @param requestBody Новые режимы бурения - * @returns number Success - * @throws ApiError - */ - public static async save( - idWell: number, - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/drillParams/save`, - body: requestBody, - }); - return result.body; - } - - /** - * Возвращает значения для режимов бурения на композитной скважине - * @param idWell id скважины - * @returns DrillParamsDto Success - * @throws ApiError - */ - public static async getCompositeAll( - idWell: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/drillParams/composite`, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/DrillingProgramService.ts b/src/services/api/services/DrillingProgramService.ts deleted file mode 100644 index ae7110b..0000000 --- a/src/services/api/services/DrillingProgramService.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { FileMarkDto } from '../models/FileMarkDto'; -import { request as __request } from '../core/request'; - -export class DrillingProgramService { - - /** - * Создает программу бурения - * @param idWell id скважины - * @returns string Success - * @throws ApiError - */ - public static async get( - idWell: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/drillingProgram`, - }); - return result.body; - } - - /** - * Создает программу бурения - * @param idWell id скважины - * @returns string Success - * @throws ApiError - */ - public static async getOrCreateSharedUrl( - idWell: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/drillingProgram/webUrl`, - }); - return result.body; - } - - /** - * Создает метку для файла входящего в проргамму бурения - * @param idWell id скважины - * @param requestBody метка файла - * @returns any Success - * @throws ApiError - */ - public static async createFileMark( - idWell: number, - requestBody?: FileMarkDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/drillingProgram/fileMark`, - body: requestBody, - }); - return result.body; - } - - /** - * Помечает метку у файла входящего, в проргамму бурения, как удаленную - * @param idWell id скважины - * @param idMark id метки - * @returns number Success - * @throws ApiError - */ - public static async deleteFileMark( - idWell: number, - idMark?: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/well/${idWell}/drillingProgram/fileMark`, - query: { - 'idMark': idMark, - }, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/FileService.ts b/src/services/api/services/FileService.ts deleted file mode 100644 index ddd7981..0000000 --- a/src/services/api/services/FileService.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { FileInfoDtoPaginationContainer } from '../models/FileInfoDtoPaginationContainer'; -import type { FileMarkDto } from '../models/FileMarkDto'; -import { request as __request } from '../core/request'; - -export class FileService { - - /** - * Сохраняет переданные файлы и информацию о них - * @param idWell id скважины - * @param idCategory id категории файла - * @param requestBody - * @returns number Success - * @throws ApiError - */ - public static async saveFiles( - idWell: number, - idCategory?: number, - requestBody?: any, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/files`, - query: { - 'idCategory': idCategory, - }, - body: requestBody, - }); - return result.body; - } - - /** - * Возвращает информацию о файлах для скважины в выбраной категории - * @param idWell id скважины - * @param idCategory id категории файла - * @param companyName id компаний для фильтрации возвращаемых файлов - * @param fileName часть имени файла для поиска - * @param begin дата начала - * @param end дата окончания - * @param skip для пагинации кол-во записей пропустить - * @param take для пагинации кол-во записей взять - * @returns FileInfoDtoPaginationContainer Success - * @throws ApiError - */ - public static async getFilesInfo( - idWell: number, - idCategory: number, - companyName?: string, - fileName?: string, - begin?: string, - end?: string, - skip: number = 0, - take: number = 32, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/files`, - query: { - 'idCategory': idCategory, - 'companyName': companyName, - 'fileName': fileName, - 'begin': begin, - 'end': end, - 'skip': skip, - 'take': take, - }, - }); - return result.body; - } - - /** - * Возвращает файл с диска на сервере - * @param idWell id скважины - * @param fileId id запрашиваемого файла - * @returns string Success - * @throws ApiError - */ - public static async getFile( - idWell: number, - fileId: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/files/${fileId}`, - }); - return result.body; - } - - /** - * Помечает файл как удаленный - * @param idWell id скважины - * @param idFile id запрашиваемого файла - * @returns number Success - * @throws ApiError - */ - public static async delete( - idWell: number, - idFile: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/well/${idWell}/files/${idFile}`, - }); - return result.body; - } - - /** - * Создает метку для файла - * @param idWell id скважины - * @param requestBody метка файла - * @returns any Success - * @throws ApiError - */ - public static async createFileMark( - idWell: number, - requestBody?: FileMarkDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/files/fileMark`, - body: requestBody, - }); - return result.body; - } - - /** - * Помечает метку у файла как удаленную - * @param idWell id скважины - * @param idMark id метки - * @returns number Success - * @throws ApiError - */ - public static async deleteFileMark( - idWell: number, - idMark?: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/well/${idWell}/files/fileMark`, - query: { - 'idMark': idMark, - }, - }); - 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 deleted file mode 100644 index 6f59d4a..0000000 --- a/src/services/api/services/MeasureService.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* 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 - * @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`, - }); - 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/history/${idData}`, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/MessageService.ts b/src/services/api/services/MessageService.ts deleted file mode 100644 index 1da86dd..0000000 --- a/src/services/api/services/MessageService.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DatesRangeDto } from '../models/DatesRangeDto'; -import type { MessageDtoPaginationContainer } from '../models/MessageDtoPaginationContainer'; -import { request as __request } from '../core/request'; - -export class MessageService { - - /** - * Выдает список сообщений по скважине - * @param idWell id скважины - * @param skip для пагинации кол-во записей пропустить - * @param take для пагинации кол-во записей - * @param categoryids список категорий - * @param begin дата начала - * @param end окончание - * @param searchString Строка поиска - * @param isUtc Даты в формате UTC или часового пояса скважины - * @returns MessageDtoPaginationContainer Success - * @throws ApiError - */ - public static async getMessages( - idWell: number, - skip: number, - take: number = 32, - categoryids?: Array, - begin?: string, - end?: string, - searchString?: string, - isUtc: boolean = true, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/message`, - query: { - 'skip': skip, - 'take': take, - 'categoryids': categoryids, - 'begin': begin, - 'end': end, - 'searchString': searchString, - 'isUtc': isUtc, - }, - }); - return result.body; - } - - /** - * Выдает список сообщений по скважине - * @param idWell id скважины - * @param isUtc Смена дат с UTC формата на часовой пояс скважины - * @returns DatesRangeDto Success - * @throws ApiError - */ - public static async getMessagesDateRange( - idWell: number, - isUtc: boolean = true, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/message/datesRange`, - query: { - 'isUtc': isUtc, - }, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/OperationStatService.ts b/src/services/api/services/OperationStatService.ts deleted file mode 100644 index 81867f1..0000000 --- a/src/services/api/services/OperationStatService.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ClusterRopStatDto } from '../models/ClusterRopStatDto'; -import type { StatClusterDto } from '../models/StatClusterDto'; -import type { StatWellDto } from '../models/StatWellDto'; -import type { WellOperationDtoPlanFactPredictBase } from '../models/WellOperationDtoPlanFactPredictBase'; -import { request as __request } from '../core/request'; - -export class OperationStatService { - - /** - * Формирует данные по среднему и максимальному МСП на кусту по id скважины - * @param idWell id скважины с данного куста (через нее будут полуены данные) - * @returns ClusterRopStatDto Success - * @throws ApiError - */ - public static async getClusterRopStatByIdWell( - idWell: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/ropStat`, - }); - return result.body; - } - - /** - * Формирует данные по среднему и максимальному МСП на кусту по uid панели - * @param uid id передающей данные панели - * @returns ClusterRopStatDto Success - * @throws ApiError - */ - public static async getClusterRopStatByUid( - uid: string, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/telemetry/${uid}/ropStat`, - }); - return result.body; - } - - /** - * Получает статстику по скважинам куста - * @param idCluster id куста - * @returns StatClusterDto Success - * @throws ApiError - */ - public static async getStatCluster( - idCluster: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/cluster/${idCluster}/stat`, - }); - return result.body; - } - - /** - * Получает статстику по списку скважин - * @param idWells список скважин - * @returns StatWellDto Success - * @throws ApiError - */ - public static async getWellsStat( - idWells?: Array, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/wellsStats`, - query: { - 'idWells': idWells, - }, - }); - return result.body; - } - - /** - * Получает статистику по скважине - * @param idWell id скважины - * @returns StatWellDto Success - * @throws ApiError - */ - public static async getStatWell( - idWell: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/stat`, - }); - return result.body; - } - - /** - * Получает данные для графика глубина-днь - * @param idWell - * @returns WellOperationDtoPlanFactPredictBase Success - * @throws ApiError - */ - public static async getTvd( - idWell: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/tvd`, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/ReportService.ts b/src/services/api/services/ReportService.ts deleted file mode 100644 index 8c91b0d..0000000 --- a/src/services/api/services/ReportService.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DatesRangeDto } from '../models/DatesRangeDto'; -import { request as __request } from '../core/request'; - -export class ReportService { - - /** - * Создает отчет по скважине с указанными параметрами - * @param idWell id скважины - * @param stepSeconds шаг интервала - * @param format формат отчета (0-PDF, 1-LAS) - * @param begin дата начала интервала - * @param end дата окончания интервала - * @returns number Success - * @throws ApiError - */ - public static async createReport( - idWell: number, - stepSeconds?: number, - format?: number, - begin?: string, - end?: string, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/report`, - query: { - 'stepSeconds': stepSeconds, - 'format': format, - 'begin': begin, - 'end': end, - }, - }); - return result.body; - } - - /** - * Возвращает имена всех отчетов по скважине - * @param idWell id скважины - * @returns string Success - * @throws ApiError - */ - public static async getAllReportsNamesByWell( - idWell: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/report`, - }); - return result.body; - } - - /** - * Возвращает прогнозируемое количество страниц будущего отчета - * @param idWell id скважины - * @param stepSeconds шаг интервала - * @param format формат отчета (0-PDF, 1-LAS) - * @param begin дата начала интервала - * @param end дата окончания интервала - * @returns string Success - * @throws ApiError - */ - public static async getReportSize( - idWell: number, - stepSeconds?: number, - format?: number, - begin?: string, - end?: string, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/report/reportSize`, - query: { - 'stepSeconds': stepSeconds, - 'format': format, - 'begin': begin, - 'end': end, - }, - }); - return result.body; - } - - /** - * Возвращает даты самого старого и самого свежего отчетов в БД - * @param idWell id скважины - * @param isUtc Смена дат с UTC формата на часовой пояс скважины - * @returns DatesRangeDto Success - * @throws ApiError - */ - public static async getReportsDateRange( - idWell: number, - isUtc: boolean = true, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/report/datesRange`, - query: { - 'isUtc': isUtc, - }, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/RequerstTrackerService.ts b/src/services/api/services/RequerstTrackerService.ts deleted file mode 100644 index 2cb94f8..0000000 --- a/src/services/api/services/RequerstTrackerService.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import { request as __request } from '../core/request'; - -export class RequerstTrackerService { - - /** - * Получить последние `take` запросов к серверу - * @param take от 1 до 1000 - * @returns any Success - * @throws ApiError - */ - public static async getAll( - take: number = 512, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/RequerstTracker`, - query: { - 'take': take, - }, - }); - return result.body; - } - - /** - * Получить последние `take` быстрых запросов к серверу - * @param take от 1 до 1000 - * @returns any Success - * @throws ApiError - */ - public static async getFast( - take: number = 512, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/RequerstTracker/fast`, - query: { - 'take': take, - }, - }); - return result.body; - } - - /** - * Получить последние `take` медленных запросов к серверу - * @param take от 1 до 1000 - * @returns any Success - * @throws ApiError - */ - public static async getSlow( - take: number = 512, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/RequerstTracker/slow`, - query: { - 'take': take, - }, - }); - return result.body; - } - - /** - * Получить последние `take` ошибок при выполнении запросов - * @param take от 1 до 1000 - * @returns any Success - * @throws ApiError - */ - public static async getError( - take: number = 512, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/RequerstTracker/error`, - query: { - 'take': take, - }, - }); - return result.body; - } - - /** - * Получить последних пользователей обращавшихся к серверу. Уникальность пользователя проверяется по логину и Ip. - * @param take от 1 до 1000 - * @returns any Success - * @throws ApiError - */ - public static async getUsersStat( - take: number = 512, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/RequerstTracker/users`, - query: { - 'take': take, - }, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/SetpointsService.ts b/src/services/api/services/SetpointsService.ts deleted file mode 100644 index bdbf786..0000000 --- a/src/services/api/services/SetpointsService.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { SetpointInfoDto } from '../models/SetpointInfoDto'; -import type { SetpointsRequestDto } from '../models/SetpointsRequestDto'; -import { request as __request } from '../core/request'; - -export class SetpointsService { - - /** - * Получает список запросов на изменение уставок. - * @param idWell - * @returns SetpointInfoDto Success - * @throws ApiError - */ - public static async getSetpointsNamesByIdWell( - idWell: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/setpointsNames`, - }); - return result.body; - } - - /** - * Добавляет запрос на изменение заданий панели оператора. - * @param idWell - * @param requestBody - * @returns number Success - * @throws ApiError - */ - public static async insert( - idWell: number, - requestBody?: SetpointsRequestDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/setpoints`, - body: requestBody, - }); - return result.body; - } - - /** - * Получает список запросов на изменение уставок. - * @param idWell - * @returns SetpointsRequestDto Success - * @throws ApiError - */ - public static async getByIdWell( - idWell: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/setpoints`, - }); - return result.body; - } - - /** - * Отчет о принятии, или отклонении уставок оператором. - * После уставка будет не изменяемой. - * @param uid - * @param id - * @param requestBody можно передать только новый state eg.: {state:3} - принято - * @returns SetpointsRequestDto Success - * @throws ApiError - */ - public static async updateByTelemetryUid( - uid: string, - id: number, - requestBody?: SetpointsRequestDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/telemetry/${uid}/setpoints/${id}`, - body: requestBody, - }); - return result.body; - } - - /** - * Получает запросы на изменение уставок панели. - * !!SIDE EFFECT: изменяет состояние запросов уставок на отправлено, это не позволит удалить эти уставки после отправки на панель. - * @param uid - * @returns SetpointsRequestDto Success - * @throws ApiError - */ - public static async getByTelemetryUid( - uid: string, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/telemetry/${uid}/setpoints`, - }); - return result.body; - } - - /** - * Пробует удалить запрос на изменение уставок. Это будет выполнено, если запрос еще не был отправлен на панель. - * @param idWell - * @param id - * @returns any Success - * @throws ApiError - */ - public static async tryDeleteByIdWell( - idWell: number, - id: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/well/${idWell}/setpoints/${id}`, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/TelemetryAnalyticsService.ts b/src/services/api/services/TelemetryAnalyticsService.ts deleted file mode 100644 index bd412d8..0000000 --- a/src/services/api/services/TelemetryAnalyticsService.ts +++ /dev/null @@ -1,155 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DatesRangeDto } from '../models/DatesRangeDto'; -import type { TelemetryOperationDtoPaginationContainer } from '../models/TelemetryOperationDtoPaginationContainer'; -import type { TelemetryOperationDurationDto } from '../models/TelemetryOperationDurationDto'; -import type { WellDepthToDayDto } from '../models/WellDepthToDayDto'; -import type { WellDepthToIntervalDto } from '../models/WellDepthToIntervalDto'; -import { request as __request } from '../core/request'; - -export class TelemetryAnalyticsService { - - /** - * Возвращает список операций на скважине за все время - * @param idWell id скважины - * @param skip для пагинации кол-во записей пропустить - * @param take для пагинации кол-во записей - * @param categoryIds список категорий - * @param begin дата начала - * @param end окончание - * @returns TelemetryOperationDtoPaginationContainer Success - * @throws ApiError - */ - public static async getOperationsByWell( - idWell: number, - skip: number, - take: number = 32, - categoryIds?: Array, - begin?: string, - end?: string, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/telemetryAnalytics/operationsByWell`, - query: { - 'skip': skip, - 'take': take, - 'categoryIds': categoryIds, - 'begin': begin, - 'end': end, - }, - }); - return result.body; - } - - /** - * Возвращает данные по скважине "глубина-день" - * @param idWell id скважины - * @returns WellDepthToDayDto Success - * @throws ApiError - */ - public static async getWellDepthToDay( - idWell: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/telemetryAnalytics/wellDepthToDay`, - }); - return result.body; - } - - /** - * Возвращает данные по глубине скважины за период - * @param idWell id скважины - * @param intervalSeconds количество секунд в необходимом интервале времени - * @param workBeginSeconds количество секунд в времени начала смены - * @returns WellDepthToIntervalDto Success - * @throws ApiError - */ - public static async getWellDepthToInterval( - idWell: number, - intervalSeconds?: number, - workBeginSeconds?: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/telemetryAnalytics/wellDepthToInterval`, - query: { - 'intervalSeconds': intervalSeconds, - 'workBeginSeconds': workBeginSeconds, - }, - }); - return result.body; - } - - /** - * Возвращает данные по операциям на скважине "операции-время" - * @param idWell id скважины - * @param begin дата начала интервала - * @param end дата окончания интервала - * @returns TelemetryOperationDurationDto Success - * @throws ApiError - */ - public static async getOperationsSummary( - idWell: number, - begin?: string, - end?: string, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/telemetryAnalytics/operationsSummary`, - query: { - 'begin': begin, - 'end': end, - }, - }); - return result.body; - } - - /** - * Возвращает детальные данные по операциям на скважине за период - * @param idWell id скважины - * @param intervalSeconds количество секунд в необходимом интервале времени - * @param workBeginSeconds количество секунд в времени начала смены - * @returns TelemetryOperationDurationDto Success - * @throws ApiError - */ - public static async getOperationsToInterval( - idWell: number, - intervalSeconds?: number, - workBeginSeconds?: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/telemetryAnalytics/operationsToInterval`, - query: { - 'intervalSeconds': intervalSeconds, - 'workBeginSeconds': workBeginSeconds, - }, - }); - return result.body; - } - - /** - * Возвращает даты первой и последней операций на скважине - * @param idWell id скважины - * @param isUtc Смена дат с UTC формата на часовой пояс скважины - * @returns DatesRangeDto Success - * @throws ApiError - */ - public static async getOperationsDateRange( - idWell: number, - isUtc: boolean = true, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/telemetryAnalytics/datesRange`, - query: { - 'isUtc': isUtc, - }, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/TelemetryDataSaubService.ts b/src/services/api/services/TelemetryDataSaubService.ts deleted file mode 100644 index ee6adc1..0000000 --- a/src/services/api/services/TelemetryDataSaubService.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DatesRangeDto } from '../models/DatesRangeDto'; -import type { TelemetryDataSaubDto } from '../models/TelemetryDataSaubDto'; -import { request as __request } from '../core/request'; - -export class TelemetryDataSaubService { - - /** - * Принимает данные от разных систем по скважине - * @param uid Уникальный идентификатор отправителя - * @param requestBody Данные - * @returns any Success - * @throws ApiError - */ - public static async postData( - uid: string, - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/TelemetryDataSaub/${uid}`, - body: requestBody, - }); - return result.body; - } - - /** - * Возвращает данные САУБ по скважине. - * По умолчанию за последние 10 минут. - * @param idWell id скважины - * @param begin дата начала выборки. По умолчанию: текущее время - intervalSec - * @param intervalSec интервал времени даты начала выборки, секунды - * @param approxPointsCount желаемое количество точек. Если в выборке точек будет больше, то выборка будет прорежена. - * @param isUtc Даты в формате UTC или часового пояса скважины - * @returns TelemetryDataSaubDto Success - * @throws ApiError - */ - public static async getData( - idWell: number, - begin?: string, - intervalSec: number = 600, - approxPointsCount: number = 1024, - isUtc: boolean = false, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/TelemetryDataSaub/${idWell}`, - query: { - 'begin': begin, - 'intervalSec': intervalSec, - 'approxPointsCount': approxPointsCount, - 'isUtc': isUtc, - }, - }); - return result.body; - } - - /** - * Возвращает диапазон дат сохраненных данных. - * @param idWell id скважины - * @param isUtc Смена дат с UTC формата на часовой пояс скважины - * @returns DatesRangeDto Success - * @throws ApiError - */ - public static async getDataDatesRange( - idWell: number, - isUtc: boolean = false, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/TelemetryDataSaub/${idWell}/datesRange`, - query: { - 'isUtc': isUtc, - }, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/TelemetryDataSpinService.ts b/src/services/api/services/TelemetryDataSpinService.ts deleted file mode 100644 index 7a0fd7a..0000000 --- a/src/services/api/services/TelemetryDataSpinService.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DatesRangeDto } from '../models/DatesRangeDto'; -import type { TelemetryDataSpinDto } from '../models/TelemetryDataSpinDto'; -import { request as __request } from '../core/request'; - -export class TelemetryDataSpinService { - - /** - * Принимает данные от разных систем по скважине - * @param uid Уникальный идентификатор отправителя - * @param requestBody Данные - * @returns any Success - * @throws ApiError - */ - public static async postData( - uid: string, - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/TelemetryDataSpin/${uid}`, - body: requestBody, - }); - return result.body; - } - - /** - * Возвращает данные САУБ по скважине. - * По умолчанию за последние 10 минут. - * @param idWell id скважины - * @param begin дата начала выборки. По умолчанию: текущее время - intervalSec - * @param intervalSec интервал времени даты начала выборки, секунды - * @param approxPointsCount желаемое количество точек. Если в выборке точек будет больше, то выборка будет прорежена. - * @param isUtc Даты в формате UTC или часового пояса скважины - * @returns TelemetryDataSpinDto Success - * @throws ApiError - */ - public static async getData( - idWell: number, - begin?: string, - intervalSec: number = 600, - approxPointsCount: number = 1024, - isUtc: boolean = false, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/TelemetryDataSpin/${idWell}`, - query: { - 'begin': begin, - 'intervalSec': intervalSec, - 'approxPointsCount': approxPointsCount, - 'isUtc': isUtc, - }, - }); - return result.body; - } - - /** - * Возвращает диапазон дат сохраненных данных. - * @param idWell id скважины - * @param isUtc Смена дат с UTC формата на часовой пояс скважины - * @returns DatesRangeDto Success - * @throws ApiError - */ - public static async getDataDatesRange( - idWell: number, - isUtc: boolean = false, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/TelemetryDataSpin/${idWell}/datesRange`, - query: { - 'isUtc': isUtc, - }, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/TelemetryService.ts b/src/services/api/services/TelemetryService.ts deleted file mode 100644 index 405dd97..0000000 --- a/src/services/api/services/TelemetryService.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { EventDto } from '../models/EventDto'; -import type { TelemetryInfoDto } from '../models/TelemetryInfoDto'; -import type { TelemetryMessageDto } from '../models/TelemetryMessageDto'; -import type { TelemetryTimeZoneDto } from '../models/TelemetryTimeZoneDto'; -import type { TelemetryUserDto } from '../models/TelemetryUserDto'; -import { request as __request } from '../core/request'; - -export class TelemetryService { - - /** - * Принимает общую информацию по скважине - * @param uid Уникальный идентификатор отправителя - * @param requestBody Информация об отправителе - * @returns any Success - * @throws ApiError - */ - public static async postInfo( - uid: string, - requestBody?: TelemetryInfoDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/telemetry/${uid}/info`, - body: requestBody, - }); - return result.body; - } - - /** - * Обновляет часовой пояс скважины - * @param uid Уникальный идентификатор отправителя - * @param requestBody Информация о часовом поясе - * @returns any Success - * @throws ApiError - */ - public static async updateTimeZone( - uid: string, - requestBody?: TelemetryTimeZoneDto, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/telemetry/${uid}/timeZone`, - body: requestBody, - }); - return result.body; - } - - /** - * Принимает список новых сообщений от телеметрии - * @param uid Уникальный идентификатор отправителя - * @param requestBody сообщения - * @returns any Success - * @throws ApiError - */ - public static async postMessages( - uid: string, - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/telemetry/${uid}/message`, - body: requestBody, - }); - return result.body; - } - - /** - * Принимает справочник событий - * @param uid Уникальный идентификатор отправителя - * @param requestBody справочник событий - * @returns any Success - * @throws ApiError - */ - public static async postEvents( - uid: string, - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/telemetry/${uid}/event`, - body: requestBody, - }); - return result.body; - } - - /** - * Принимает справочник пользователей телеметрии - * @param uid Уникальный идентификатор отправителя - * @param requestBody справочник пользователей телеметрии - * @returns any Success - * @throws ApiError - */ - public static async postUsers( - uid: string, - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/telemetry/${uid}/user`, - body: requestBody, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/WellCompositeService.ts b/src/services/api/services/WellCompositeService.ts deleted file mode 100644 index 05eb0ae..0000000 --- a/src/services/api/services/WellCompositeService.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { WellCompositeDto } from '../models/WellCompositeDto'; -import { request as __request } from '../core/request'; - -export class WellCompositeService { - - /** - * Получает композитную скважину для скважины - * @param idWell id скважины для которой собрана композитная скважина - * @returns WellCompositeDto Success - * @throws ApiError - */ - public static async get( - idWell: number, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/composite`, - }); - return result.body; - } - - /** - * Создает или заменяет композитную скважину для скважины с idWell - * @param idWell id скважины для которой собрана композитная скважина - * @param requestBody Секции композитной скважины - * @returns any Success - * @throws ApiError - */ - public static async save( - idWell: number, - requestBody?: Array, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/composite`, - 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 deleted file mode 100644 index d30efa7..0000000 --- a/src/services/api/services/WellOperationService.ts +++ /dev/null @@ -1,201 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { WellOperationCategoryDto } from '../models/WellOperationCategoryDto'; -import type { WellOperationDto } from '../models/WellOperationDto'; -import type { WellOperationDtoPaginationContainer } from '../models/WellOperationDtoPaginationContainer'; -import { request as __request } from '../core/request'; - -export class WellOperationService { - - /** - * Возвращает список имен типов операций на скважине - * @param idWell - * @returns WellOperationCategoryDto Success - * @throws ApiError - */ - public static async getCategories( - idWell: string, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/wellOperations/categories`, - }); - return result.body; - } - - /** - * Отфильтрованный список операций на скважине. Если не применять фильтр, то вернется весь список. Сортированный по глубине затем по дате - * @param idWell id скважины - * @param opertaionType фильтр по план = 0, факт = 1 - * @param sectionTypeIds фильтр по списку id конструкций секции - * @param operationCategoryIds фильтр по списку id категорий операции - * @param begin фильтр по началу операции - * @param end фильтр по окончанию операции - * @param minDepth фильтр по минимальной глубине скважины - * @param maxDepth фильтр по максимальной глубине скважины - * @param skip - * @param take - * @returns WellOperationDtoPaginationContainer Success - * @throws ApiError - */ - public static async getOperations( - idWell: number, - opertaionType?: number, - sectionTypeIds?: Array, - operationCategoryIds?: Array, - begin?: string, - end?: string, - minDepth: number = -1.7976931348623157e+308, - maxDepth: number = 1.7976931348623157e+308, - skip: number = 0, - take: number = 32, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/wellOperations`, - query: { - 'opertaionType': opertaionType, - 'sectionTypeIds': sectionTypeIds, - 'operationCategoryIds': operationCategoryIds, - 'begin': begin, - 'end': end, - 'minDepth': minDepth, - 'maxDepth': maxDepth, - 'skip': skip, - 'take': take, - }, - }); - return result.body; - } - - /** - * Добавляет новые операции на скважине - * @param idWell id скважины - * @param requestBody Данные о добавляемых операциях - * @returns WellOperationDto Success - * @throws ApiError - */ - public static async insertRange( - idWell: number, - requestBody?: Array, - ): Promise> { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/wellOperations`, - body: requestBody, - }); - return result.body; - } - - /** - * Возвращает нужную операцию на скважине - * @param idWell id скважины - * @param idOperation id нужной операции - * @returns WellOperationDto Success - * @throws ApiError - */ - public static async get( - idWell: number, - idOperation: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/wellOperations/${idOperation}`, - }); - return result.body; - } - - /** - * Обновляет выбранную операцию на скважине - * @param idWell id скважины - * @param idOperation id выбраной операции - * @param requestBody Новые данные для выбраной операции - * @returns WellOperationDto Success - * @throws ApiError - */ - public static async update( - idWell: number, - idOperation: number, - requestBody?: WellOperationDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/well/${idWell}/wellOperations/${idOperation}`, - body: requestBody, - }); - return result.body; - } - - /** - * Удаляет выбраную операцию на скважине - * @param idWell id скважины - * @param idOperation id выбраной операции - * @returns number Success - * @throws ApiError - */ - public static async delete( - idWell: number, - idOperation: number, - ): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/well/${idWell}/wellOperations/${idOperation}`, - }); - return result.body; - } - - /** - * Импортирует операции из excel (xlsx) файла - * @param idWell id скважины - * @param options Удалить операции перед импортом = 1, если фал валидный - * @param requestBody - * @returns any Success - * @throws ApiError - */ - public static async import( - idWell: number, - options: number, - requestBody?: any, - ): Promise { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/wellOperations/import/${options}`, - body: requestBody, - }); - return result.body; - } - - /** - * Создает excel файл с операциями по скважине - * @param idWell id скважины - * @returns string Success - * @throws ApiError - */ - public static async export( - idWell: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/wellOperations/export`, - }); - return result.body; - } - - /** - * Возвращает шаблон файла импорта - * @param idWell - * @returns string Success - * @throws ApiError - */ - public static async getTamplate( - idWell: string, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/wellOperations/tamplate`, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/WellService.ts b/src/services/api/services/WellService.ts deleted file mode 100644 index d71b14c..0000000 --- a/src/services/api/services/WellService.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { WellDto } from '../models/WellDto'; -import type { WellParamsDto } from '../models/WellParamsDto'; -import { request as __request } from '../core/request'; - -export class WellService { - - /** - * Возвращает список доступных скважин - * @returns WellDto Success - * @throws ApiError - */ - public static async getWells(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well`, - }); - return result.body; - } - - /** - * Редактирует указанные поля скважины - * @param idWell Id скважины - * @param requestBody Объект параметров скважины. - * IdWellType: 1 - Наклонно-направленная, 2 - Горизонтальная. - * State: 0 - Неизвестно, 1 - В работе, 2 - Завершена. - * @returns number Success - * @throws ApiError - */ - public static async updateWell( - idWell?: number, - requestBody?: WellParamsDto, - ): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/well`, - query: { - 'idWell': idWell, - }, - body: requestBody, - }); - return result.body; - } - - /** - * Возвращает информацию о требуемой скважине - * @param idWell Id требуемой скважины - * @returns WellDto Success - * @throws ApiError - */ - public static async get( - idWell?: number, - ): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/getWell`, - query: { - 'idWell': idWell, - }, - }); - return result.body; - } - - /** - * Возвращает список скважин, передающих телеметрию в данный момент - * @returns WellDto Success - * @throws ApiError - */ - public static async getTransmittingWells(): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/transmittingWells`, - }); - return result.body; - } - -} \ No newline at end of file