28 lines
809 B
TypeScript
28 lines
809 B
TypeScript
import type { PageSeo, Page, Navigation, Product } from "../types/index";
|
|
import type {
|
|
TranslationsData,
|
|
} from "./Mock/_i18n/mockTranslations";
|
|
|
|
/**
|
|
* Adapter Interface für Datenquellen
|
|
* Jeder Adapter muss diese Schnittstelle implementieren
|
|
*/
|
|
export interface DataAdapter {
|
|
// Product Operations
|
|
getProducts(limit?: number): Promise<Product[]>;
|
|
getProduct(id: string): Promise<Product | null>;
|
|
|
|
// Page Operations
|
|
getPage(slug: string, locale?: string): Promise<Page | null>;
|
|
getPages(locale?: string): Promise<Page[]>;
|
|
|
|
// SEO Operations
|
|
getPageSeo(locale?: string): Promise<PageSeo>;
|
|
|
|
// Navigation Operations
|
|
getNavigation(locale?: string): Promise<Navigation>;
|
|
|
|
// Translation Operations
|
|
getTranslations(locale?: string, namespace?: string): Promise<TranslationsData>;
|
|
}
|