update api client

This commit is contained in:
Фролов 2021-08-11 11:22:52 +05:00
parent ac278edbf3
commit 056642f705
3 changed files with 22 additions and 30 deletions

View File

@ -11,7 +11,7 @@ import { request as __request } from '../core/request';
export class TelemetryService { export class TelemetryService {
/** /**
* Принимает общую информацию по скважин<EFBFBD><EFBFBD> * Принимает общую информацию по скважине
* @param uid Уникальный идентификатор отправителя * @param uid Уникальный идентификатор отправителя
* @param requestBody нформация об отправителе * @param requestBody нформация об отправителе
* @returns any Success * @returns any Success

View File

@ -8,15 +8,23 @@ export class WellSectionService {
/** /**
* @param idWell * @param idWell
* @param skip
* @param take
* @returns any Success * @returns any Success
* @throws ApiError * @throws ApiError
*/ */
public static async getAll( public static async getAll(
idWell: string, idWell: number,
skip: number,
take: number = 32,
): Promise<any> { ): Promise<any> {
const result = await __request({ const result = await __request({
method: 'GET', method: 'GET',
path: `/api/well/${idWell}`, path: `/api/well/${idWell}/sections`,
query: {
'skip': skip,
'take': take,
},
}); });
return result.body; return result.body;
} }
@ -28,30 +36,30 @@ idWell: string,
* @throws ApiError * @throws ApiError
*/ */
public static async insert( public static async insert(
idWell: string, idWell: number,
requestBody?: WellSectionDto, requestBody?: Array<WellSectionDto>,
): Promise<any> { ): Promise<any> {
const result = await __request({ const result = await __request({
method: 'POST', method: 'POST',
path: `/api/well/${idWell}`, path: `/api/well/${idWell}/sections`,
body: requestBody, body: requestBody,
}); });
return result.body; return result.body;
} }
/** /**
* @param id * @param idSection
* @param idWell * @param idWell
* @returns any Success * @returns any Success
* @throws ApiError * @throws ApiError
*/ */
public static async get( public static async get(
id: number, idSection: number,
idWell: string, idWell: number,
): Promise<any> { ): Promise<any> {
const result = await __request({ const result = await __request({
method: 'GET', method: 'GET',
path: `/api/well/${idWell}/${id}`, path: `/api/well/${idWell}/sections/${idSection}`,
}); });
return result.body; return result.body;
} }
@ -65,12 +73,12 @@ idWell: string,
*/ */
public static async put( public static async put(
id: number, id: number,
idWell: string, idWell: number,
requestBody?: WellSectionDto, requestBody?: WellSectionDto,
): Promise<any> { ): Promise<any> {
const result = await __request({ const result = await __request({
method: 'PUT', method: 'PUT',
path: `/api/well/${idWell}/${id}`, path: `/api/well/${idWell}/sections/${id}`,
body: requestBody, body: requestBody,
}); });
return result.body; return result.body;
@ -84,11 +92,11 @@ requestBody?: WellSectionDto,
*/ */
public static async delete( public static async delete(
id: number, id: number,
idWell: string, idWell: number,
): Promise<any> { ): Promise<any> {
const result = await __request({ const result = await __request({
method: 'DELETE', method: 'DELETE',
path: `/api/well/${idWell}/${id}`, path: `/api/well/${idWell}/sections/${id}`,
}); });
return result.body; return result.body;
} }

View File

@ -3,7 +3,6 @@
/* eslint-disable */ /* eslint-disable */
import type { WellDto } from '../models/WellDto'; import type { WellDto } from '../models/WellDto';
import type { WellOperationDto } from '../models/WellOperationDto'; import type { WellOperationDto } from '../models/WellOperationDto';
import type { WellSectionDto } from '../models/WellSectionDto';
import { request as __request } from '../core/request'; import { request as __request } from '../core/request';
export class WellService { export class WellService {
@ -20,21 +19,6 @@ export class WellService {
return result.body; return result.body;
} }
/**
* @param idWell
* @returns WellSectionDto Success
* @throws ApiError
*/
public static async getSections(
idWell: number,
): Promise<Array<WellSectionDto>> {
const result = await __request({
method: 'GET',
path: `/api/well/${idWell}/sections`,
});
return result.body;
}
/** /**
* @param idWell * @param idWell
* @returns WellOperationDto Success * @returns WellOperationDto Success