UNPKG

keystone-seeder

Version:
46 lines (45 loc) 1.36 kB
declare class EntityContext { private gender; private firstName; private lastName; private username; private email; private avatar; private company; private jobTitle; private phoneNumber; private address; private city; private state; private zipCode; private country; private birthDate; constructor(); getFirstName(): string; getLastName(): string; getFullName(): string; getUsername(): string; getEmail(): string; getGender(): string; getAvatar(): string; getCompany(): string; getJobTitle(): string; getPhoneNumber(): string; getAddress(): string; getCity(): string; getState(): string; getZipCode(): string; getCountry(): string; getBirthDate(): Date; getAge(): number; } /** * Generate a value for a field based on its type and name */ export declare function generateFieldValue(field: { name: string; type: string; }, modelName: string, context?: EntityContext): any; export declare function handleRelationField(context: any, field: any, relationMode: 'connect-one' | 'connect-random' | 'interactive' | null): Promise<any>; export declare function buildSeedData(model: any, fieldsMeta: any, context?: any, relationMode?: 'connect-one' | 'connect-random' | 'interactive' | null): Record<string, any>; export {};