forked from ddrilling/asb_cloud_front
update api client
This commit is contained in:
parent
26044734ad
commit
9360724ad2
@ -51,7 +51,7 @@ companyName?: string,
|
|||||||
fileName?: string,
|
fileName?: string,
|
||||||
begin?: string,
|
begin?: string,
|
||||||
end?: string,
|
end?: string,
|
||||||
skip?: number,
|
skip: number = 0,
|
||||||
take: number = 32,
|
take: number = 32,
|
||||||
): Promise<FileInfoDtoPaginationContainer> {
|
): Promise<FileInfoDtoPaginationContainer> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
|
@ -48,7 +48,7 @@ begin?: string,
|
|||||||
end?: string,
|
end?: string,
|
||||||
minDepth: number = -1.7976931348623157e+308,
|
minDepth: number = -1.7976931348623157e+308,
|
||||||
maxDepth: number = 1.7976931348623157e+308,
|
maxDepth: number = 1.7976931348623157e+308,
|
||||||
skip?: number,
|
skip: number = 0,
|
||||||
take: number = 32,
|
take: number = 32,
|
||||||
): Promise<WellOperationDtoPaginationContainer> {
|
): Promise<WellOperationDtoPaginationContainer> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
@ -145,4 +145,60 @@ idOperation: number,
|
|||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Импортирует операции из excel (xlsx) файла
|
||||||
|
* @param idWell id скважины
|
||||||
|
* @param deleteWellOperationsBeforeImport Удалить операции перед импортом, если фал валидный
|
||||||
|
* @param requestBody
|
||||||
|
* @returns any Success
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static async import(
|
||||||
|
idWell: number,
|
||||||
|
deleteWellOperationsBeforeImport: boolean = false,
|
||||||
|
requestBody?: any,
|
||||||
|
): Promise<any> {
|
||||||
|
const result = await __request({
|
||||||
|
method: 'POST',
|
||||||
|
path: `/api/well/${idWell}/wellOperations/import`,
|
||||||
|
query: {
|
||||||
|
'deleteWellOperationsBeforeImport': deleteWellOperationsBeforeImport,
|
||||||
|
},
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user