asb_cloud_front/src/services/api/services/WellService.ts
2021-11-15 14:01:17 +05:00

79 lines
2.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* 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;
}
}