type UUIDv7withURNWrapper = string | undefined; /** * @function uuidv7withURNWrapper * @description Wraps a valid UUIDv7 string or Buffer in a URN (Uniform Resource Name) as per RFC 4122. * * Validates the input as a UUID, checks that it is version 7, and then * returns the UUID wrapped in a URN string (`urn:uuid:`). If the input * is not a valid UUIDv7, returns `undefined`. * * @param {string | Buffer} uuid - The UUIDv7 to wrap, as a string or Buffer. * @returns {string | undefined} The URN-wrapped UUIDv7 string if valid, otherwise `undefined`. * * @example * // Valid UUIDv7 string * uuidv7withURNWrapper('01890b27-ccf7-7def-b6c2-3b8e6e3c8e5f'); * // 'urn:uuid:01890b27-ccf7-7def-b6c2-3b8e6e3c8e5f' * * @example * // Invalid UUID version * uuidv7withURNWrapper('01890b27-ccf7-4def-b6c2-3b8e6e3c8e5f'); * // undefined * * @example * // Buffer input * const buf = Buffer.from('01890b27ccf77defb6c23b8e6e3c8e5f', 'hex'); * uuidv7withURNWrapper(buf); * // 'urn:uuid:01890b27-ccf7-7def-b6c2-3b8e6e3c8e5f' */ declare const uuidv7withURNWrapper: (uuid: string | Buffer) => UUIDv7withURNWrapper; export { type UUIDv7withURNWrapper, uuidv7withURNWrapper };