interface ValidationOptions { /** Expected exact length of the ID portion (excluding prefix and separator). */ length?: number; /** Expected prefix. The separator `_` is assumed. */ prefix?: string; /** Alphabet the ID characters must belong to. Defaults to DEFAULT_ALPHABET. */ alphabet?: string; } /** * Returns `true` if `value` is a valid ID, `false` otherwise. * * By default, validates that the value is a non-empty string of characters * from the default URL-safe alphabet. Options can constrain length, prefix, * and alphabet. * * @example * import { isValidId } from "sigilid/validate"; * isValidId("K7gkJ_q3vR2nL8xH5eM0w"); // true * isValidId("usr_K7gkJ_q3vR2nL8xH5eM0w", { prefix: "usr" }); // true * isValidId("", {}); // false */ declare function isValidId(value: string, options?: ValidationOptions): boolean; /** * Throws a `TypeError` if `value` is not a valid ID. * * Useful for asserting IDs at API boundaries. * * @example * import { assertValidId } from "sigilid/validate"; * assertValidId(req.params.id); // throws if invalid */ declare function assertValidId(value: string, options?: ValidationOptions): void; /** * Parses and returns the ID if valid, otherwise throws. * * A convenience wrapper over `assertValidId` for use in pipelines where * you want the validated value back from the same call. * * @example * import { parseId } from "sigilid/validate"; * const id = parseId(rawInput); // throws if invalid, returns the same string if valid */ declare function parseId(value: string, options?: ValidationOptions): string; export { type ValidationOptions, assertValidId, isValidId, parseId };