update rest client

This commit is contained in:
Фролов 2021-07-19 16:18:34 +05:00
parent e4d4d044d6
commit 03c8f8d3fc
11 changed files with 245 additions and 0 deletions

View File

@ -5,19 +5,28 @@ export { ApiError } from './core/ApiError';
export { OpenAPI } from './core/OpenAPI';
export type { AuthDto } from './models/AuthDto';
export type { ClusterAnalysisDto } from './models/ClusterAnalysisDto';
export type { ClusterDto } from './models/ClusterDto';
export type { DataSaubBaseDto } from './models/DataSaubBaseDto';
export type { DatesRangeDto } from './models/DatesRangeDto';
export type { DepositDto } from './models/DepositDto';
export type { EventDto } from './models/EventDto';
export type { MessageDto } from './models/MessageDto';
export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer';
export type { OperationDurationDto } from './models/OperationDurationDto';
export type { TelemetryInfoDto } from './models/TelemetryInfoDto';
export type { TelemetryMessageDto } from './models/TelemetryMessageDto';
export type { TelemetryUserDto } from './models/TelemetryUserDto';
export type { UserTokenDto } from './models/UserTokenDto';
export type { WellDepthToDayDto } from './models/WellDepthToDayDto';
export type { WellDepthToIntervalDto } from './models/WellDepthToIntervalDto';
export type { WellDto } from './models/WellDto';
export { AnalyticsService } from './services/AnalyticsService';
export { AuthService } from './services/AuthService';
export { ClusterService } from './services/ClusterService';
export { DataService } from './services/DataService';
export { DepositService } from './services/DepositService';
export { MessageService } from './services/MessageService';
export { ReportService } from './services/ReportService';
export { TelemetryService } from './services/TelemetryService';

View File

@ -0,0 +1,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ClusterAnalysisDto = {
id?: number;
}

View File

@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ClusterDto = {
id?: number;
name?: string | null;
description?: string | null;
latitude?: number;
longitude?: number;
}

View File

@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type DepositDto = {
id?: number;
name?: string | null;
description?: string | null;
latitude?: number;
longitude?: number;
}

View File

@ -0,0 +1,8 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type OperationDurationDto = {
processName?: string | null;
duration?: number;
}

View File

@ -0,0 +1,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type WellDepthToDayDto = {
wellDepth?: number;
bitDepth?: number;
date?: string;
}

View File

@ -0,0 +1,8 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type WellDepthToIntervalDto = {
intervalStartDate?: string;
intervalDepthProgress?: number;
}

View File

@ -8,4 +8,6 @@ export type WellDto = {
deposit?: string | null;
id?: number;
lastData?: any;
latitude?: number;
longitude?: number;
}

View File

@ -0,0 +1,99 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { OperationDurationDto } from '../models/OperationDurationDto';
import type { WellDepthToDayDto } from '../models/WellDepthToDayDto';
import type { WellDepthToIntervalDto } from '../models/WellDepthToIntervalDto';
import { request as __request } from '../core/request';
export class AnalyticsService {
/**
* Возвращает данные по скважине "глубина-день"
* @param wellId id скважины
* @returns WellDepthToDayDto Success
* @throws ApiError
*/
public static async getWellDepthToDay(
wellId: number,
): Promise<Array<WellDepthToDayDto>> {
const result = await __request({
method: 'GET',
path: `/api/analytics/${wellId}/wellDepthToDay`,
});
return result.body;
}
/**
* Возвращает данные по глубине скважины за период
* @param wellId id скважины
* @param intervalHoursTimestamp количество секунд в необходимом интервале времени
* @param workBeginTimestamp количество секунд в времени начала смены
* @returns WellDepthToIntervalDto Success
* @throws ApiError
*/
public static async getWellDepthToInterval(
wellId: number,
intervalHoursTimestamp?: number,
workBeginTimestamp?: number,
): Promise<Array<WellDepthToIntervalDto>> {
const result = await __request({
method: 'GET',
path: `/api/analytics/${wellId}/wellDepthToInterval`,
query: {
'intervalHoursTimestamp': intervalHoursTimestamp,
'workBeginTimestamp': workBeginTimestamp,
},
});
return result.body;
}
/**
* Возвращает данные по операциям на скважине "операции-время"
* @param wellId id скважины
* @param begin дата начала интервала
* @param end дата окончания интервала
* @returns OperationDurationDto Success
* @throws ApiError
*/
public static async getOperationsSummary(
wellId: number,
begin?: string,
end?: string,
): Promise<Array<OperationDurationDto>> {
const result = await __request({
method: 'GET',
path: `/api/analytics/${wellId}/operationsSummary`,
query: {
'begin': begin,
'end': end,
},
});
return result.body;
}
/**
* Возвращает детальные данные по операциям на скважине за период
* @param wellId id скважины
* @param intervalHoursTimestamp количество секунд в необходимом интервале времени
* @param workBeginTimestamp количество секунд в времени начала смены
* @returns OperationDurationDto Success
* @throws ApiError
*/
public static async getOperationsToInterval(
wellId: number,
intervalHoursTimestamp?: number,
workBeginTimestamp?: number,
): Promise<Array<OperationDurationDto>> {
const result = await __request({
method: 'GET',
path: `/api/analytics/${wellId}/operationsToInterval`,
query: {
'intervalHoursTimestamp': intervalHoursTimestamp,
'workBeginTimestamp': workBeginTimestamp,
},
});
return result.body;
}
}

View File

@ -0,0 +1,42 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ClusterAnalysisDto } from '../models/ClusterAnalysisDto';
import type { WellDto } from '../models/WellDto';
import { request as __request } from '../core/request';
export class ClusterService {
/**
* Получение доступных пользователю скважин
* @param clusterId
* @returns WellDto Success
* @throws ApiError
*/
public static async getWells(
clusterId: number,
): Promise<Array<WellDto>> {
const result = await __request({
method: 'GET',
path: `/api/Cluster/${clusterId}`,
});
return result.body;
}
/**
* Получение обопщенной аналитики по кусту (лучшая/худшая скважина)
* @param clusterId
* @returns ClusterAnalysisDto Success
* @throws ApiError
*/
public static async getAnalysis(
clusterId: number,
): Promise<Array<ClusterAnalysisDto>> {
const result = await __request({
method: 'GET',
path: `/api/Cluster/${clusterId}/Analysis`,
});
return result.body;
}
}

View File

@ -0,0 +1,39 @@
/* 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;
}
/**
* Получает список доступных пользователю кустов месторождения
* @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;
}
}