import { FieldConfig, CollectionConfig } from '@webhouse/cms'; /** * F136 Phase 1 — Products collection schema. * * Imported into a site's cms.config.ts: * * import { productsCollection } from '@webhouse/cms-shop/collections'; * export default defineConfig({ * collections: [productsCollection({ locales: ['da', 'en'] })], * // … * }); * * Pass options to override defaults (locales, currency, extra fields). */ interface ProductsCollectionOptions { /** Override the default name "products" if you need multiple product collections (e.g. per brand). */ name?: string; label?: string; /** Locales the product fields can be translated into. */ locales?: string[]; /** Source locale for translations. Defaults to the first entry in `locales`. */ sourceLocale?: string; /** Extra fields to merge into the schema (e.g. site-specific metadata). */ extraFields?: FieldConfig[]; } declare function productsCollection(opts?: ProductsCollectionOptions): CollectionConfig; /** * F136 Phase 1 — Categories collection schema. * * Hierarchical categories (via `parent` relation) so editors can build * trees like Clothing > Tops > T-shirts. */ interface CategoriesCollectionOptions { name?: string; label?: string; locales?: string[]; sourceLocale?: string; extraFields?: FieldConfig[]; } declare function categoriesCollection(opts?: CategoriesCollectionOptions): CollectionConfig; /** * F136 Phase 1 — Orders collection schema. * * Orders are written by the checkout webhook handler — admins typically * READ + UPDATE (status, tracking, notes), not create. Set kind='form' * so AI agents don't try to generate orders. */ interface OrdersCollectionOptions { name?: string; label?: string; extraFields?: FieldConfig[]; } declare function ordersCollection(opts?: OrdersCollectionOptions): CollectionConfig; /** * F136 Phase 1 — Customers collection schema. * * Customers are written by the checkout webhook (auto-created on first * order from a new email). Editors manage marketing consent, addresses, * notes. Lifetime value is recomputed by an order-paid hook. */ interface CustomersCollectionOptions { name?: string; label?: string; extraFields?: FieldConfig[]; } declare function customersCollection(opts?: CustomersCollectionOptions): CollectionConfig; export { type CategoriesCollectionOptions, type CustomersCollectionOptions, type OrdersCollectionOptions, type ProductsCollectionOptions, categoriesCollection, customersCollection, ordersCollection, productsCollection };