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 {
/**
* Принимает общую информацию по скважин<EFBFBD><EFBFBD>
* Принимает общую информацию по скважине
* @param uid Уникальный идентификатор отправителя
* @param requestBody нформация об отправителе
* @returns any Success

View File

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

View File

@ -3,7 +3,6 @@
/* eslint-disable */
import type { WellDto } from '../models/WellDto';
import type { WellOperationDto } from '../models/WellOperationDto';
import type { WellSectionDto } from '../models/WellSectionDto';
import { request as __request } from '../core/request';
export class WellService {
@ -20,21 +19,6 @@ export class WellService {
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
* @returns WellOperationDto Success