update api client

This commit is contained in:
Фролов 2021-10-11 13:41:19 +05:00
parent 26044734ad
commit 9360724ad2
2 changed files with 58 additions and 2 deletions

View File

@ -51,7 +51,7 @@ companyName?: string,
fileName?: string,
begin?: string,
end?: string,
skip?: number,
skip: number = 0,
take: number = 32,
): Promise<FileInfoDtoPaginationContainer> {
const result = await __request({

View File

@ -48,7 +48,7 @@ begin?: string,
end?: string,
minDepth: number = -1.7976931348623157e+308,
maxDepth: number = 1.7976931348623157e+308,
skip?: number,
skip: number = 0,
take: number = 32,
): Promise<WellOperationDtoPaginationContainer> {
const result = await __request({
@ -145,4 +145,60 @@ idOperation: number,
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;
}
}