import { DrizzleAdapter } from '@nextlyhq/adapter-drizzle'; /** * Re-export the existing seeder logic from scripts * This module provides a programmatic API for the seed script */ /** * Type for adapters that support getDrizzle() method */ type AdapterWithDrizzle$2 = { getDrizzle(relations?: unknown): unknown; dialect: string; }; interface SeederResult { success: boolean; created: number; skipped: number; errors: number; total: number; errorMessages?: string[]; } /** * Seed CRUD permissions for core resources * This is the programmatic version of scripts/seed-permissions.ts * * @param adapter - Database adapter instance * @param options - Optional configuration * @returns Promise * * @example * ```typescript * const result = await seedPermissions(adapter, { silent: true }); * if (result.success) { * console.log(`Created ${result.created} permissions`); * } * ``` */ declare function seedPermissions(adapter: DrizzleAdapter | AdapterWithDrizzle$2, options?: { resources?: readonly string[]; actions?: readonly string[]; silent?: boolean; }): Promise; /** * Type for adapters that support getDrizzle() method */ type AdapterWithDrizzle$1 = { getDrizzle(relations?: unknown): unknown; dialect: string; }; declare function seedSuperAdmin(adapter: DrizzleAdapter | AdapterWithDrizzle$1, options?: { email: string; password: string; name?: string; silent?: boolean; }): Promise; /** * Type for adapters that support getDrizzle() method */ type AdapterWithDrizzle = { getDrizzle(): unknown; dialect: string; }; /** * Run the system bootstrap seeders: permissions and (optionally) the * discovers or runs a user-provided `nextly.seed.ts` — that path is * now Payload-style: the project ships its own seed function under * `src/endpoints/seed/index.ts` and an auth-gated POST route at * `src/app/admin/api/seed/route.ts` invokes it. End users trigger * the seed via the admin UI, not via boot-time magic. See * tasks/nextly-dev-tasks/24-payload-alignment-and-fixes.md phase 3. * * @param adapter - Database adapter instance * @param options - Optional configuration * @returns Combined SeederResult */ declare function seedAll(adapter: DrizzleAdapter | AdapterWithDrizzle, options?: { silent?: boolean; /** Super admin email (required unless skipSuperAdmin is true; no default) */ superAdminEmail?: string; /** Super admin password (required unless skipSuperAdmin is true; no default) */ superAdminPassword?: string; /** Super admin name (default: Super Admin) */ superAdminName?: string; /** Skip super admin seeding (default: false) */ skipSuperAdmin?: boolean; }): Promise; export { seedAll, seedPermissions, seedSuperAdmin }; export type { SeederResult };