Files
mercadodevida/project/src/modules/cms/domain/ports.ts
2026-08-17 22:23:10 +02:00

11 lines
462 B
TypeScript

import type { CreatePageInput, Page, UpdatePageInput } from './page.js';
export interface CmsRepository {
create(input: CreatePageInput): Promise<Page | undefined>;
update(id: string, patch: UpdatePageInput): Promise<Page | undefined>;
setStatus(id: string, status: 'draft' | 'published'): Promise<Page | undefined>;
findBySlug(slug: string): Promise<Page | undefined>;
findById(id: string): Promise<Page | undefined>;
listAll(): Promise<Page[]>;
}