forked from ddrilling/asb_cloud_front
update api client
This commit is contained in:
parent
d9969a7468
commit
43e69021d4
@ -8,4 +8,5 @@ export type FileInfoDto = {
|
||||
idCategory?: number;
|
||||
uploadDate?: string;
|
||||
authorName?: string | null;
|
||||
companyId?: number;
|
||||
}
|
@ -38,6 +38,7 @@ requestBody?: any,
|
||||
* @param idCategory id категории файла
|
||||
* @param begin дата начала
|
||||
* @param end дата окончания
|
||||
* @param companies id компаний для фильтрации возвращаемых файлов
|
||||
* @returns FileInfoDtoPaginationContainer Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
@ -48,6 +49,7 @@ take: number = 32,
|
||||
idCategory: number,
|
||||
begin?: string,
|
||||
end?: string,
|
||||
companies?: Array<number>,
|
||||
): Promise<FileInfoDtoPaginationContainer> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
@ -58,6 +60,7 @@ end?: string,
|
||||
'idCategory': idCategory,
|
||||
'begin': begin,
|
||||
'end': end,
|
||||
'companies': companies,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
@ -81,4 +84,22 @@ fileId: number,
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Удаляет файл с диска на сервере
|
||||
* @param idWell id скважины
|
||||
* @param idFile id запрашиваемого файла
|
||||
* @returns number Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async delete(
|
||||
idWell: number,
|
||||
idFile: number,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'DELETE',
|
||||
path: `/api/well/${idWell}/files/${idFile}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -44,7 +44,7 @@ sectionTypeIds?: Array<number>,
|
||||
operationCategoryIds?: Array<number>,
|
||||
begin?: string,
|
||||
end?: string,
|
||||
skip: number = 0,
|
||||
skip: number,
|
||||
take: number = 32,
|
||||
): Promise<WellOperationDtoPaginationContainer> {
|
||||
const result = await __request({
|
||||
|
Loading…
Reference in New Issue
Block a user