import { BufferError, InvalidInputError, ParseError, UniqueIdError } from "../errors.mjs"; //#region src/uuid/v4.d.ts type UuidV4Options = { /** * 16 bytes of random data to use for UUID generation. * Note: Bytes at index 6 and 8 will be modified in-place to set version/variant bits. */ random?: Uint8Array; }; type UuidV4 = { (): string; (options: UuidV4Options | undefined, buf: TBuf, offset?: number): TBuf; (options?: UuidV4Options, buf?: undefined, offset?: number): string; toBytes(id: string): Uint8Array; fromBytes(bytes: Uint8Array): string; isValid(id: unknown): id is string; /** The nil UUID (all zeros) */ NIL: string; /** The max UUID (all ones) */ MAX: string; }; /** * Generate a UUID v4 string or write the bytes into a buffer. * * UUID v4 is a purely random UUID with 122 bits of entropy. It's the most * widely compatible UUID format, supported by virtually all databases and systems. * Use when you need maximum compatibility and don't require time-ordering. * * @example * ```ts * import { uuidv4 } from 'uniku/uuid/v4' * * const id = uuidv4() * // => "550e8400-e29b-41d4-a716-446655440000" * * // Validate * uuidv4.isValid(id) // true * * // Convert to/from bytes (16 bytes) * const bytes = uuidv4.toBytes(id) * const restored = uuidv4.fromBytes(bytes) * ``` */ declare const uuidv4: UuidV4; //#endregion export { BufferError, InvalidInputError, ParseError, UniqueIdError, UuidV4, UuidV4Options, uuidv4 }; //# sourceMappingURL=v4.d.mts.map