forked from ddrilling/asb_cloud_front
Автогенерируемые сервисы удалены
This commit is contained in:
parent
a149aaffe3
commit
33ae4293cb
3
.gitignore
vendored
3
.gitignore
vendored
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -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<string, any>;
|
||||
readonly headers?: Record<string, any>;
|
||||
readonly query?: Record<string, any>;
|
||||
readonly formData?: Record<string, any>;
|
||||
readonly body?: any;
|
||||
readonly responseHeader?: string;
|
||||
readonly errors?: Record<number, string>;
|
||||
}
|
@ -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;
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||
|
||||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||
type Headers = Record<string, string>;
|
||||
|
||||
type Config = {
|
||||
BASE: string;
|
||||
VERSION: string;
|
||||
WITH_CREDENTIALS: boolean;
|
||||
TOKEN?: string | Resolver<string>;
|
||||
USERNAME?: string | Resolver<string>;
|
||||
PASSWORD?: string | Resolver<string>;
|
||||
HEADERS?: Headers | Resolver<Headers>;
|
||||
}
|
||||
|
||||
export const OpenAPI: Config = {
|
||||
BASE: '',
|
||||
VERSION: '1',
|
||||
WITH_CREDENTIALS: false,
|
||||
TOKEN: undefined,
|
||||
USERNAME: undefined,
|
||||
PASSWORD: undefined,
|
||||
HEADERS: undefined,
|
||||
};
|
@ -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<T>(value: T | null | undefined): value is Exclude<T, null | undefined> {
|
||||
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, any>): 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<string, any>): 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<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||
|
||||
async function resolve<T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> {
|
||||
if (typeof resolver === 'function') {
|
||||
return (resolver as Resolver<T>)(options);
|
||||
}
|
||||
return resolver;
|
||||
}
|
||||
|
||||
async function getHeaders(options: ApiRequestOptions): Promise<Headers> {
|
||||
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<Response> {
|
||||
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<any> {
|
||||
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<number, string> = {
|
||||
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<ApiResult> {
|
||||
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;
|
||||
}
|
@ -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';
|
@ -1,8 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type AuthDto = {
|
||||
login?: string | null;
|
||||
password?: string | 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<WellDto> | null;
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type ClusterRopStatDto = {
|
||||
ropMax?: number;
|
||||
ropAverage?: number;
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type CompanyDto = {
|
||||
id?: number;
|
||||
caption?: string | null;
|
||||
companyTypeCaption?: string | null;
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type DatesRangeDto = {
|
||||
from?: string;
|
||||
to?: string;
|
||||
}
|
@ -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<ClusterDto> | 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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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<FileMarkDto> | 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<FileInfoDto> | 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;
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type FilePublishInfoDto = {
|
||||
publisherLogin?: string | null;
|
||||
date?: string;
|
||||
webStorageFileUrl?: string | 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<string, any> | 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;
|
||||
}
|
@ -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<MessageDto> | null;
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type PermissionBaseDto = {
|
||||
idPermissionInfo?: number;
|
||||
permissionName?: string | null;
|
||||
value?: number;
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type PermissionDto = {
|
||||
idPermissionInfo?: number;
|
||||
permissionName?: string | null;
|
||||
value?: number;
|
||||
idUserRole?: number;
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type PermissionInfoDto = {
|
||||
id?: number;
|
||||
name?: string | null;
|
||||
description?: string | null;
|
||||
bitDescription?: Record<string, string> | 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;
|
||||
}
|
@ -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<string, number> | null;
|
||||
comment?: string | null;
|
||||
well?: WellDto;
|
||||
author?: UserDto;
|
||||
}
|
@ -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<StatWellDto> | 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;
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { StatOperationsDto } from './StatOperationsDto';
|
||||
|
||||
export type StatOperationsDtoPlanFactBase = {
|
||||
plan?: StatOperationsDto;
|
||||
fact?: StatOperationsDto;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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<StatSectionDto> | null;
|
||||
total?: StatOperationsDtoPlanFactBase;
|
||||
companies?: Array<CompanyDto> | 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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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<TelemetryOperationDto> | null;
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type TelemetryOperationDurationDto = {
|
||||
operationName?: string | null;
|
||||
duration?: number;
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type TelemetryTimeZoneDto = {
|
||||
hours?: number;
|
||||
timeZoneId?: string | null;
|
||||
isOverride?: boolean;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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<string> | 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;
|
||||
}
|
@ -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<PermissionBaseDto> | 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<string> | null;
|
||||
permissions?: Array<PermissionBaseDto> | null;
|
||||
token?: string | null;
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type WellCompositeDto = {
|
||||
idWell?: number;
|
||||
idWellSrc?: number;
|
||||
idWellSectionType?: number;
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type WellDepthToDayDto = {
|
||||
wellDepth?: number;
|
||||
bitDepth?: number;
|
||||
date?: string;
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type WellDepthToIntervalDto = {
|
||||
intervalStartDate?: string;
|
||||
intervalDepthProgress?: number;
|
||||
}
|
@ -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;
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type WellOperationCategoryDto = {
|
||||
id?: number;
|
||||
name?: string | null;
|
||||
code?: number;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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<WellOperationDto> | 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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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<Array<ClusterDto>> {
|
||||
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<ClusterDto> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/admin/cluster`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<CompanyDto>> {
|
||||
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<CompanyDto> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/admin/company`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<DepositDto>> {
|
||||
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<DepositDto> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/admin/deposit`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<PermissionInfoDto>> {
|
||||
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<PermissionInfoDto> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/admin/permissionInfo`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<PermissionDto>> {
|
||||
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<PermissionDto>,
|
||||
): Promise<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'DELETE',
|
||||
path: `/api/admin/permission/${idPermission}/${idUserRole}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<any> {
|
||||
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<number>,
|
||||
): Promise<any> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/merge`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить все записи
|
||||
* @returns TelemetryDto Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async getAll(): Promise<Array<TelemetryDto>> {
|
||||
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<TelemetryDto> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/admin/telemetry`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<UserRoleDto>> {
|
||||
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<UserRoleDto> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/admin/role`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<UserExtendedDto>> {
|
||||
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<UserExtendedDto> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/admin/user`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<WellDto>> {
|
||||
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<WellDto> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/admin/well`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<UserTokenDto> {
|
||||
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<any> {
|
||||
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<any> {
|
||||
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<any> {
|
||||
const result = await __request({
|
||||
method: 'PUT',
|
||||
path: `/auth/${idUser}/ChangePassword`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<ClusterDto>> {
|
||||
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<Array<WellDto>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/cluster/${idCluster}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<DepositDto>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/deposit`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Получает список доступных пользователю месторождений (только скважины с параметрами бурения)
|
||||
* @returns DepositDto Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async getDepositsDrillParams(): Promise<Array<DepositDto>> {
|
||||
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<Array<ClusterDto>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/deposit/${depositId}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<DrillFlowChartDto>> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<Array<DrillFlowChartDto>> {
|
||||
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<DrillFlowChartDto>,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/well/${idWell}/drillFlowChart/range`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<DrillParamsDto> {
|
||||
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<Array<DrillParamsDto>> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<number> {
|
||||
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<DrillParamsDto>,
|
||||
): Promise<number> {
|
||||
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<DrillParamsDto>,
|
||||
): Promise<number> {
|
||||
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<Array<DrillParamsDto>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/well/${idWell}/drillParams/composite`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<string> {
|
||||
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<string> {
|
||||
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<any> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'DELETE',
|
||||
path: `/api/well/${idWell}/drillingProgram/fileMark`,
|
||||
query: {
|
||||
'idMark': idMark,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<number> {
|
||||
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<FileInfoDtoPaginationContainer> {
|
||||
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<string> {
|
||||
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<number> {
|
||||
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<any> {
|
||||
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<number> {
|
||||
const result = await __request({
|
||||
method: 'DELETE',
|
||||
path: `/api/well/${idWell}/files/fileMark`,
|
||||
query: {
|
||||
'idMark': idMark,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<any> {
|
||||
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<any> {
|
||||
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<any> {
|
||||
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<any> {
|
||||
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<any> {
|
||||
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<any> {
|
||||
const result = await __request({
|
||||
method: 'DELETE',
|
||||
path: `/api/well/${idWell}/measure/history/${idData}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<number>,
|
||||
begin?: string,
|
||||
end?: string,
|
||||
searchString?: string,
|
||||
isUtc: boolean = true,
|
||||
): Promise<MessageDtoPaginationContainer> {
|
||||
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<DatesRangeDto> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/well/${idWell}/message/datesRange`,
|
||||
query: {
|
||||
'isUtc': isUtc,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<ClusterRopStatDto> {
|
||||
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<ClusterRopStatDto> {
|
||||
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<StatClusterDto> {
|
||||
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<number>,
|
||||
): Promise<Array<StatWellDto>> {
|
||||
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<StatWellDto> {
|
||||
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<Array<WellOperationDtoPlanFactPredictBase>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/well/${idWell}/tvd`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<number> {
|
||||
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<Array<string>> {
|
||||
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<string> {
|
||||
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<DatesRangeDto> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/well/${idWell}/report/datesRange`,
|
||||
query: {
|
||||
'isUtc': isUtc,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<any> {
|
||||
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<any> {
|
||||
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<any> {
|
||||
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<any> {
|
||||
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<any> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/RequerstTracker/users`,
|
||||
query: {
|
||||
'take': take,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<SetpointInfoDto>> {
|
||||
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<number> {
|
||||
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<Array<SetpointsRequestDto>> {
|
||||
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<SetpointsRequestDto> {
|
||||
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<Array<SetpointsRequestDto>> {
|
||||
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<any> {
|
||||
const result = await __request({
|
||||
method: 'DELETE',
|
||||
path: `/api/well/${idWell}/setpoints/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<number>,
|
||||
begin?: string,
|
||||
end?: string,
|
||||
): Promise<TelemetryOperationDtoPaginationContainer> {
|
||||
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<Array<WellDepthToDayDto>> {
|
||||
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<Array<WellDepthToIntervalDto>> {
|
||||
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<Array<TelemetryOperationDurationDto>> {
|
||||
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<Array<TelemetryOperationDurationDto>> {
|
||||
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<DatesRangeDto> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/well/${idWell}/telemetryAnalytics/datesRange`,
|
||||
query: {
|
||||
'isUtc': isUtc,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<TelemetryDataSaubDto>,
|
||||
): Promise<any> {
|
||||
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<TelemetryDataSaubDto> {
|
||||
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<DatesRangeDto> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/TelemetryDataSaub/${idWell}/datesRange`,
|
||||
query: {
|
||||
'isUtc': isUtc,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<TelemetryDataSpinDto>,
|
||||
): Promise<any> {
|
||||
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<TelemetryDataSpinDto> {
|
||||
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<DatesRangeDto> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/TelemetryDataSpin/${idWell}/datesRange`,
|
||||
query: {
|
||||
'isUtc': isUtc,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<any> {
|
||||
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<any> {
|
||||
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<TelemetryMessageDto>,
|
||||
): Promise<any> {
|
||||
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<EventDto>,
|
||||
): Promise<any> {
|
||||
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<TelemetryUserDto>,
|
||||
): Promise<any> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/telemetry/${uid}/user`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<WellCompositeDto>> {
|
||||
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<WellCompositeDto>,
|
||||
): Promise<any> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/well/${idWell}/composite`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<WellOperationCategoryDto>> {
|
||||
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<number>,
|
||||
operationCategoryIds?: Array<number>,
|
||||
begin?: string,
|
||||
end?: string,
|
||||
minDepth: number = -1.7976931348623157e+308,
|
||||
maxDepth: number = 1.7976931348623157e+308,
|
||||
skip: number = 0,
|
||||
take: number = 32,
|
||||
): Promise<WellOperationDtoPaginationContainer> {
|
||||
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<WellOperationDto>,
|
||||
): Promise<Array<WellOperationDto>> {
|
||||
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<WellOperationDto> {
|
||||
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<WellOperationDto> {
|
||||
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<number> {
|
||||
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<any> {
|
||||
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<string> {
|
||||
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<string> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/well/${idWell}/wellOperations/tamplate`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -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<Array<WellDto>> {
|
||||
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<number> {
|
||||
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<WellDto> {
|
||||
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<Array<WellDto>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/well/transmittingWells`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user