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 | version?: '3' | '4' | '5' | '7';
|
8 | errorHttpStatusCode?: ErrorHttpStatusCode;
|
9 | exceptionFactory?: (errors: string) => any;
|
10 | optional?: boolean;
|
11 | }
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export declare class ParseUUIDPipe implements PipeTransform<string> {
|
20 | protected readonly options?: ParseUUIDPipeOptions;
|
21 | protected static uuidRegExps: {
|
22 | 3: RegExp;
|
23 | 4: RegExp;
|
24 | 5: RegExp;
|
25 | 7: RegExp;
|
26 | all: RegExp;
|
27 | };
|
28 | private readonly version;
|
29 | protected exceptionFactory: (errors: string) => any;
|
30 | constructor(options?: ParseUUIDPipeOptions);
|
31 | transform(value: string, metadata: ArgumentMetadata): Promise<string>;
|
32 | protected isUUID(str: unknown, version?: string): any;
|
33 | }
|