import type { AppliedDataSemantic } from '../Semantics.js';
import { SemanticType } from '../Semantics.js';
/**
 * Supported SKU validation modes.
 */
export type SKUValidationMode = 'strict' | 'lenient' | 'custom';
/**
 * Supported SKU case transformation modes.
 */
export type SKUCaseMode = 'uppercase' | 'lowercase' | 'preserve';
/**
 * Configuration options for the SKU semantic.
 * Controls SKU validation, formatting, uniqueness enforcement, and pattern matching.
 */
export interface SKUConfig {
    /**
     * The validation mode for SKU format.
     *
     * - 'strict': Enforces alphanumeric characters with optional hyphens/underscores
     * - 'lenient': Allows more special characters but still validates basic format
     * - 'custom': Uses custom regex pattern defined in `customPattern`
     */
    validationMode?: SKUValidationMode;
    /**
     * Custom regex pattern for SKU validation when using 'custom' validation mode.
     * Only used when validationMode is 'custom'.
     */
    customPattern?: string;
    /**
     * Case transformation to apply to SKUs.
     * - 'uppercase': Convert to uppercase (recommended for consistency)
     * - 'lowercase': Convert to lowercase
     * - 'preserve': Keep original case
     */
    caseMode?: SKUCaseMode;
    /**
     * Prefix to automatically add to SKUs if not present.
     * Useful for organizing SKUs by category (e.g., 'PROD-', 'SKU-').
     */
    prefix?: string;
    /**
     * Whether to enforce global uniqueness across all entities.
     * When true, creates unique database constraints.
     * Default: true
     */
    enforceUniqueness?: boolean;
    /**
     * Whether to auto-generate SKUs when not provided.
     * When true, generates SKUs based on other fields or random values.
     * Default: false
     */
    autoGenerate?: boolean;
    /**
     * Field key to use as source for auto-generation.
     * Only used when autoGenerate is true.
     * If not specified, uses random generation.
     *
     * The kay can be any field that provides a meaningful value for the SKU. It can also be a key of
     * a property in one of the parent entities.
     */
    autoGenerateSource?: string;
    /**
     * Whether to validate that SKU doesn't conflict with reserved words or patterns.
     * Default: true
     */
    validateReservedWords?: boolean;
    /**
     * List of reserved SKU values that cannot be used.
     * Common examples: 'ADMIN', 'TEST', 'NULL', 'DEFAULT'
     */
    reservedValues?: string[];
    /**
     * Custom metadata for the SKU field.
     */
    metadata?: Record<string, unknown>;
    /**
     * Index signature to allow additional properties.
     */
    [key: string]: unknown;
}
/**
 * Type-safe configuration for SKU semantic.
 */
export interface AppliedSKUSemantic extends AppliedDataSemantic {
    id: SemanticType.SKU;
    config?: SKUConfig;
}
/**
 * Type guard to check if a semantic is a SKU semantic.
 */
export declare const isSKUSemantic: (semantic: AppliedDataSemantic) => semantic is AppliedSKUSemantic;
/**
 * Helper function to create a SKU semantic with configuration.
 */
export declare const createSKUSemantic: (config?: SKUConfig) => AppliedSKUSemantic;
/**
 * Default configuration for SKU semantic.
 * Optimized for common product catalog use cases.
 */
export declare const DEFAULT_SKU_CONFIG: SKUConfig;
/**
 * Predefined configurations for common use cases.
 */
export declare const SKU_PRESETS: {
    /**
     * Standard product SKU with strict validation and uppercase formatting.
     */
    readonly PRODUCT_STANDARD: AppliedSKUSemantic;
    /**
     * Simple SKU configuration for basic catalogs.
     */
    readonly SIMPLE: AppliedSKUSemantic;
    /**
     * Auto-generating SKU from product name.
     */
    readonly AUTO_GENERATE: AppliedSKUSemantic;
    /**
     * Flexible SKU for variable product types.
     */
    readonly FLEXIBLE: AppliedSKUSemantic;
};
/**
 * Helper function to validate a SKU configuration.
 */
export declare const validateSKUConfig: (config: SKUConfig) => string[];
/**
 * Helper function to validate SKU value against configuration.
 */
export declare const validateSKUValue: (value: string, config?: SKUConfig) => string[];
//# sourceMappingURL=SKU.d.ts.map