1 | import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface';
|
2 | import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util';
|
3 |
|
4 |
|
5 |
|
6 | export interface ParseUUIDPipeOptions {
|
7 | |
8 |
|
9 |
|
10 | version?: '3' | '4' | '5' | '7';
|
11 | |
12 |
|
13 |
|
14 | errorHttpStatusCode?: ErrorHttpStatusCode;
|
15 | |
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | exceptionFactory?: (errors: string) => any;
|
22 | |
23 |
|
24 |
|
25 |
|
26 | optional?: boolean;
|
27 | }
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | export declare class ParseUUIDPipe implements PipeTransform<string> {
|
36 | protected readonly options?: ParseUUIDPipeOptions | undefined;
|
37 | protected static uuidRegExps: {
|
38 | 3: RegExp;
|
39 | 4: RegExp;
|
40 | 5: RegExp;
|
41 | 7: RegExp;
|
42 | all: RegExp;
|
43 | };
|
44 | private readonly version;
|
45 | protected exceptionFactory: (errors: string) => any;
|
46 | constructor(options?: ParseUUIDPipeOptions | undefined);
|
47 | transform(value: string, metadata: ArgumentMetadata): Promise<string>;
|
48 | protected isUUID(str: unknown, version?: string): any;
|
49 | }
|