project setup with core files including configuration, package management, and basic structure. Added .gitignore, README, and various TypeScript types for CMS components. Implemented initial components and layouts for the application.
This commit is contained in:
27
middlelayer/adapters/interface.ts
Normal file
27
middlelayer/adapters/interface.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
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>;
|
||||
}
|
||||
Reference in New Issue
Block a user