diff --git a/src/services/api/models/FileInfoDto.ts b/src/services/api/models/FileInfoDto.ts index 42d0df3..8f5309d 100644 --- a/src/services/api/models/FileInfoDto.ts +++ b/src/services/api/models/FileInfoDto.ts @@ -8,4 +8,5 @@ export type FileInfoDto = { idCategory?: number; uploadDate?: string; authorName?: string | null; + companyId?: number; } \ No newline at end of file diff --git a/src/services/api/services/FileService.ts b/src/services/api/services/FileService.ts index f532889..755d9c7 100644 --- a/src/services/api/services/FileService.ts +++ b/src/services/api/services/FileService.ts @@ -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, ): Promise { 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 { + const result = await __request({ + method: 'DELETE', + path: `/api/well/${idWell}/files/${idFile}`, + }); + return result.body; + } + } \ No newline at end of file diff --git a/src/services/api/services/WellOperationService.ts b/src/services/api/services/WellOperationService.ts index 09d7004..cf209d2 100644 --- a/src/services/api/services/WellOperationService.ts +++ b/src/services/api/services/WellOperationService.ts @@ -44,7 +44,7 @@ sectionTypeIds?: Array, operationCategoryIds?: Array, begin?: string, end?: string, -skip: number = 0, +skip: number, take: number = 32, ): Promise { const result = await __request({