Download src/interfaces/repository/Base/IBaseRepository.ts from lynfera/api: direct link, hf CLI and curl.
- Browser
- Download file 563 Bytes
-
https://huggingface.co/spaces/lynfera/api/resolve/main/src/interfaces/repository/Base/IBaseRepository.ts
- Command line
-
hf download hf://spaces/lynfera/api/src/interfaces/repository/Base/IBaseRepository.ts
-
curl -L -o IBaseRepository.ts https://huggingface.co/spaces/lynfera/api/resolve/main/src/interfaces/repository/Base/IBaseRepository.ts
563 Bytes
| export interface IBaseRepository<T> { | |
| create(data: Partial<T>): Promise<T>; | |
| findAll(): Promise<T[]>; | |
| findById(id: string): Promise<T | null>; | |
| update(id: string, updateData: Partial<T>): Promise<T | null>; | |
| delete(id: string): Promise<boolean>; | |
| findOne(filter: Partial<Record<keyof T, any>>): Promise<T | null>; | |
| findMany(filter: Partial<Record<keyof T, any>>): Promise<T[]>; | |
| findOneAndUpdate(filter: Partial<Record<keyof T, any>>, updateData: Partial<T>): Promise<T | null>; | |
| findOneAndDelete(filter: Partial<Record<keyof T, any>>): Promise<T | null>; | |
| } | |