TryGhost/Ghost

View on GitHub
ghost/recommendations/src/RecommendationRepository.ts

Summary

Maintainability
A
0 mins
Test Coverage
import {AllOptions} from '@tryghost/bookshelf-repository';
import {Recommendation} from './Recommendation';

export interface RecommendationRepository {
    save(entity: Recommendation): Promise<void>;
    getById(id: string): Promise<Recommendation | null>;
    getByUrl(url: URL): Promise<Recommendation|null>;
    getAll(options: Omit<AllOptions<Recommendation>, 'page'|'limit'>): Promise<Recommendation[]>;
    getPage(options: AllOptions<Recommendation> & Required<Pick<AllOptions<Recommendation>, 'page'|'limit'>>): Promise<Recommendation[]>;
    getCount(options: {
        filter?: string;
    }): Promise<number>;
};