UNPKG

855 BTypeScriptView Raw
1import type { Arbitrary } from '../check/arbitrary/definition/Arbitrary.js';
2/**
3 * Constraints to be applied on {@link uuid}
4 * @remarks Since 3.21.0
5 * @public
6 */
7export interface UuidConstraints {
8 /**
9 * Define accepted versions in the [1-15] according to {@link https://datatracker.ietf.org/doc/html/rfc9562#name-version-field | RFC 9562}
10 * @defaultValue [1,2,3,4,5]
11 * @remarks Since 3.21.0
12 */
13 version?: (1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15) | (1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15)[];
14}
15/**
16 * For UUID from v1 to v5
17 *
18 * According to {@link https://tools.ietf.org/html/rfc4122 | RFC 4122}
19 *
20 * No mixed case, only lower case digits (0-9a-f)
21 *
22 * @remarks Since 1.17.0
23 * @public
24 */
25export declare function uuid(constraints?: UuidConstraints): Arbitrary<string>;