/**
 * Factory and data generation types
 */
import type { ApiError } from '@dbs-portal/core-shared';
/**
 * Mock data factory function type
 */
export type MockDataFactory<T = any> = (overrides?: Partial<T>) => T;
/**
 * Mock list factory function type
 */
export type MockListFactory<T = any> = (count?: number, overrides?: Partial<T>) => T[];
/**
 * Data generator options
 */
export interface DataGeneratorOptions {
    /** Seed for reproducible random generation */
    seed?: number;
    /** Locale for localized data */
    locale?: string;
    /** Custom patterns */
    patterns?: Record<string, string | RegExp>;
}
/**
 * Pagination response structure
 */
export interface PaginatedResponse<T = any> {
    data: T[];
    meta: {
        page: number;
        pageSize: number;
        total: number;
        totalPages: number;
        hasNextPage: boolean;
        hasPreviousPage: boolean;
    };
}
/**
 * Paginated mock options
 */
export interface PaginatedMockOptions<T = any> {
    /** Items to paginate */
    items: T[];
    /** Current page (1-based) */
    page: number;
    /** Page size */
    pageSize: number;
    /** Total items (optional, defaults to items.length) */
    total?: number;
}
/**
 * Response builder options
 */
export interface ResponseBuilderOptions<T = any> {
    /** Response data */
    data?: T;
    /** Success status */
    success?: boolean;
    /** HTTP status code */
    status?: number;
    /** Response headers */
    headers?: Record<string, string>;
    /** Response delay */
    delay?: number | [number, number];
    /** Error information */
    error?: ApiError;
    /** Additional metadata */
    meta?: Record<string, any>;
}
/**
 * Validation result
 */
export interface ValidationResult {
    /** Whether validation passed */
    valid: boolean;
    /** Validation errors */
    errors: string[];
    /** Field-specific errors */
    fieldErrors?: Record<string, string[]>;
}
/**
 * Validation rule
 */
export interface ValidationRule<T = any> {
    /** Rule name */
    name: string;
    /** Validation function */
    validate: (value: any, data: T) => boolean | string;
    /** Error message */
    message?: string;
}
/**
 * Field validation configuration
 */
export interface FieldValidation<T = any> {
    /** Field name */
    field: keyof T;
    /** Validation rules */
    rules: ValidationRule<T>[];
    /** Whether field is required */
    required?: boolean;
    /** Custom error message for required validation */
    requiredMessage?: string;
}
/**
 * Schema validation configuration
 */
export interface SchemaValidation<T = any> {
    /** Field validations */
    fields: FieldValidation<T>[];
    /** Custom validation function */
    customValidation?: (data: T) => string[] | null;
}
/**
 * File mock options
 */
export interface FileMockOptions {
    /** File name */
    name: string;
    /** File size in bytes */
    size: number;
    /** MIME type */
    type: string;
    /** File content (for small files) */
    content?: string | ArrayBuffer;
    /** Last modified date */
    lastModified?: Date;
}
/**
 * Image mock options
 */
export interface ImageMockOptions extends FileMockOptions {
    /** Image width */
    width?: number;
    /** Image height */
    height?: number;
    /** Image format */
    format?: 'jpeg' | 'png' | 'gif' | 'webp';
}
/**
 * Address mock options
 */
export interface AddressMockOptions {
    /** Country code */
    country?: string;
    /** State/province */
    state?: string;
    /** City */
    city?: string;
    /** Include coordinates */
    includeCoordinates?: boolean;
}
/**
 * Person mock options
 */
export interface PersonMockOptions {
    /** Gender */
    gender?: 'male' | 'female' | 'other';
    /** Age range */
    ageRange?: [number, number];
    /** Nationality */
    nationality?: string;
    /** Include avatar */
    includeAvatar?: boolean;
}
/**
 * Company mock options
 */
export interface CompanyMockOptions {
    /** Industry */
    industry?: string;
    /** Company size */
    size?: 'startup' | 'small' | 'medium' | 'large' | 'enterprise';
    /** Include logo */
    includeLogo?: boolean;
}
/**
 * Date range options
 */
export interface DateRangeOptions {
    /** Start date */
    start: Date | string;
    /** End date */
    end: Date | string;
    /** Date format */
    format?: 'iso' | 'timestamp' | 'date';
}
/**
 * Number range options
 */
export interface NumberRangeOptions {
    /** Minimum value */
    min: number;
    /** Maximum value */
    max: number;
    /** Number of decimal places */
    decimals?: number;
}
/**
 * String generation options
 */
export interface StringGenerationOptions {
    /** Minimum length */
    minLength: number;
    /** Maximum length */
    maxLength: number;
    /** Character set */
    charset?: 'alphanumeric' | 'alpha' | 'numeric' | 'ascii' | 'custom';
    /** Custom characters (when charset is 'custom') */
    customChars?: string;
    /** Include spaces */
    includeSpaces?: boolean;
}
/**
 * Array generation options
 */
export interface ArrayGenerationOptions<T = any> {
    /** Minimum array length */
    minLength: number;
    /** Maximum array length */
    maxLength: number;
    /** Item generator function */
    itemGenerator: () => T;
    /** Ensure unique items */
    unique?: boolean;
}
/**
 * Mock response metadata
 */
export interface MockResponseMetadata {
    /** Generation timestamp */
    generatedAt: string;
    /** Generator version */
    version?: string;
    /** Seed used for generation */
    seed?: number;
    /** Generation time in milliseconds */
    generationTime?: number;
}
/**
 * Mock response builder interface
 */
export interface MockResponseBuilder<T = any> {
    /** Set response data */
    data(data: T): MockResponseBuilder<T>;
    /** Set status code */
    status(code: number): MockResponseBuilder<T>;
    /** Set headers */
    headers(headers: Record<string, string>): MockResponseBuilder<T>;
    /** Set delay */
    delay(ms: number | [number, number]): MockResponseBuilder<T>;
    /** Add error */
    error(error: any): MockResponseBuilder<T>;
    /** Set metadata */
    meta(metadata: Partial<MockResponseMetadata>): MockResponseBuilder<T>;
    /** Build the response */
    build(): Response;
    /** Build with async delay */
    buildAsync(): Promise<Response>;
}
//# sourceMappingURL=types.d.ts.map