File tree Expand file tree Collapse file tree 7 files changed +332
-0
lines changed Expand file tree Collapse file tree 7 files changed +332
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : base64url
3
+ description : Creates a base64url validation action.
4
+ source : /actions/base64url/base64url.ts
5
+ contributors :
6
+ - EltonLobo07
7
+ ---
8
+
9
+ import { ApiList , Property } from ' ~/components' ;
10
+ import { properties } from ' ./properties' ;
11
+
12
+ # base64url
13
+
14
+ Creates a [ base64url] ( https://datatracker.ietf.org/doc/html/rfc4648#section-5 ) validation action.
15
+
16
+ ``` ts
17
+ const Action = v .base64url <TInput , TMessage >(message );
18
+ ```
19
+
20
+ ## Generics
21
+
22
+ - ` TInput ` <Property { ... properties .TInput } />
23
+ - ` TMessage ` <Property { ... properties .TMessage } />
24
+
25
+ ## Parameters
26
+
27
+ - ` message ` <Property { ... properties .message } />
28
+
29
+ ### Explanation
30
+
31
+ With ` base64url ` you can validate the formatting of a string. If the input is not a Base64url string, you can use ` message ` to customize the error message.
32
+
33
+ ## Returns
34
+
35
+ - ` Action ` <Property { ... properties .Action } />
36
+
37
+ ## Examples
38
+
39
+ The following examples show how ` base64url ` can be used.
40
+
41
+ ### Base64url schema
42
+
43
+ Schema to validate a Base64url string.
44
+
45
+ ``` ts
46
+ const Base64urlSchema = v .pipe (
47
+ v .string (),
48
+ v .base64url (' The data is badly encoded.' )
49
+ );
50
+ ```
51
+
52
+ ## Related
53
+
54
+ The following APIs can be combined with ` base64url ` .
55
+
56
+ ### Schemas
57
+
58
+ <ApiList items = { [' any' , ' custom' , ' string' , ' unknown' ]} />
59
+
60
+ ### Methods
61
+
62
+ <ApiList items = { [' pipe' ]} />
63
+
64
+ ### Utils
65
+
66
+ <ApiList items = { [' isOfKind' , ' isOfType' ]} />
Original file line number Diff line number Diff line change
1
+ import type { PropertyProps } from '~/components' ;
2
+
3
+ export const properties : Record < string , PropertyProps > = {
4
+ TInput : {
5
+ modifier : 'extends' ,
6
+ type : 'string' ,
7
+ } ,
8
+ TMessage : {
9
+ modifier : 'extends' ,
10
+ type : {
11
+ type : 'union' ,
12
+ options : [
13
+ {
14
+ type : 'custom' ,
15
+ name : 'ErrorMessage' ,
16
+ href : '../ErrorMessage/' ,
17
+ generics : [
18
+ {
19
+ type : 'custom' ,
20
+ name : 'Base64urlIssue' ,
21
+ href : '../Base64urlIssue/' ,
22
+ generics : [
23
+ {
24
+ type : 'custom' ,
25
+ name : 'TInput' ,
26
+ } ,
27
+ ] ,
28
+ } ,
29
+ ] ,
30
+ } ,
31
+ 'undefined' ,
32
+ ] ,
33
+ } ,
34
+ } ,
35
+ message : {
36
+ type : {
37
+ type : 'custom' ,
38
+ name : 'TMessage' ,
39
+ } ,
40
+ } ,
41
+ Action : {
42
+ type : {
43
+ type : 'custom' ,
44
+ name : 'Base64urlAction' ,
45
+ href : '../Base64urlAction/' ,
46
+ generics : [
47
+ {
48
+ type : 'custom' ,
49
+ name : 'TInput' ,
50
+ } ,
51
+ {
52
+ type : 'custom' ,
53
+ name : 'TMessage' ,
54
+ } ,
55
+ ] ,
56
+ } ,
57
+ } ,
58
+ } ;
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Base64urlAction
3
+ description : Base64url action interface.
4
+ contributors :
5
+ - EltonLobo07
6
+ ---
7
+
8
+ import { Property } from ' ~/components' ;
9
+ import { properties } from ' ./properties' ;
10
+
11
+ # Base64urlAction
12
+
13
+ Base64url action interface.
14
+
15
+ ## Generics
16
+
17
+ - ` TInput ` <Property { ... properties .TInput } />
18
+ - ` TMessage ` <Property { ... properties .TMessage } />
19
+
20
+ ## Definition
21
+
22
+ - ` Base64urlAction ` <Property { ... properties .BaseValidation } />
23
+ - ` type ` <Property { ... properties .type } />
24
+ - ` reference ` <Property { ... properties .reference } />
25
+ - ` expects ` <Property { ... properties .expects } />
26
+ - ` requirement ` <Property { ... properties .requirement } />
27
+ - ` message ` <Property { ... properties .message } />
Original file line number Diff line number Diff line change
1
+ import type { PropertyProps } from '~/components' ;
2
+
3
+ export const properties : Record < string , PropertyProps > = {
4
+ TInput : {
5
+ modifier : 'extends' ,
6
+ type : 'string' ,
7
+ } ,
8
+ TMessage : {
9
+ modifier : 'extends' ,
10
+ type : {
11
+ type : 'union' ,
12
+ options : [
13
+ {
14
+ type : 'custom' ,
15
+ name : 'ErrorMessage' ,
16
+ href : '../ErrorMessage/' ,
17
+ generics : [
18
+ {
19
+ type : 'custom' ,
20
+ name : 'Base64urlIssue' ,
21
+ href : '../Base64urlIssue/' ,
22
+ generics : [
23
+ {
24
+ type : 'custom' ,
25
+ name : 'TInput' ,
26
+ } ,
27
+ ] ,
28
+ } ,
29
+ ] ,
30
+ } ,
31
+ 'undefined' ,
32
+ ] ,
33
+ } ,
34
+ } ,
35
+ BaseValidation : {
36
+ modifier : 'extends' ,
37
+ type : {
38
+ type : 'custom' ,
39
+ name : 'BaseValidation' ,
40
+ href : '../BaseValidation/' ,
41
+ generics : [
42
+ {
43
+ type : 'custom' ,
44
+ name : 'TInput' ,
45
+ } ,
46
+ {
47
+ type : 'custom' ,
48
+ name : 'TInput' ,
49
+ } ,
50
+ {
51
+ type : 'custom' ,
52
+ name : 'Base64urlIssue' ,
53
+ href : '../Base64urlIssue/' ,
54
+ generics : [
55
+ {
56
+ type : 'custom' ,
57
+ name : 'TInput' ,
58
+ } ,
59
+ ] ,
60
+ } ,
61
+ ] ,
62
+ } ,
63
+ } ,
64
+ type : {
65
+ type : {
66
+ type : 'string' ,
67
+ value : 'base64url' ,
68
+ } ,
69
+ } ,
70
+ reference : {
71
+ type : {
72
+ type : 'custom' ,
73
+ modifier : 'typeof' ,
74
+ name : 'base64url' ,
75
+ href : '../base64url/' ,
76
+ } ,
77
+ } ,
78
+ expects : {
79
+ type : 'null' ,
80
+ } ,
81
+ requirement : {
82
+ type : {
83
+ type : 'custom' ,
84
+ name : 'RegExp' ,
85
+ } ,
86
+ } ,
87
+ message : {
88
+ type : {
89
+ type : 'custom' ,
90
+ name : 'TMessage' ,
91
+ } ,
92
+ } ,
93
+ } ;
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Base64urlIssue
3
+ description : Base64url issue interface.
4
+ contributors :
5
+ - EltonLobo07
6
+ ---
7
+
8
+ import { Property } from ' ~/components' ;
9
+ import { properties } from ' ./properties' ;
10
+
11
+ # Base64urlIssue
12
+
13
+ Base64url issue interface.
14
+
15
+ ## Generics
16
+
17
+ - ` TInput ` <Property { ... properties .TInput } />
18
+
19
+ ## Definition
20
+
21
+ - ` Base64urlIssue ` <Property { ... properties .BaseIssue } />
22
+ - ` kind ` <Property { ... properties .kind } />
23
+ - ` type ` <Property { ... properties .type } />
24
+ - ` expected ` <Property { ... properties .expected } />
25
+ - ` received ` <Property { ... properties .received } />
26
+ - ` requirement ` <Property { ... properties .requirement } />
Original file line number Diff line number Diff line change
1
+ import type { PropertyProps } from '~/components' ;
2
+
3
+ export const properties : Record < string , PropertyProps > = {
4
+ TInput : {
5
+ modifier : 'extends' ,
6
+ type : 'string' ,
7
+ } ,
8
+ BaseIssue : {
9
+ modifier : 'extends' ,
10
+ type : {
11
+ type : 'custom' ,
12
+ name : 'BaseIssue' ,
13
+ href : '../BaseIssue/' ,
14
+ generics : [
15
+ {
16
+ type : 'custom' ,
17
+ name : 'TInput' ,
18
+ } ,
19
+ ] ,
20
+ } ,
21
+ } ,
22
+ kind : {
23
+ type : {
24
+ type : 'string' ,
25
+ value : 'validation' ,
26
+ } ,
27
+ } ,
28
+ type : {
29
+ type : {
30
+ type : 'string' ,
31
+ value : 'base64url' ,
32
+ } ,
33
+ } ,
34
+ expected : {
35
+ type : 'null' ,
36
+ } ,
37
+ received : {
38
+ type : {
39
+ type : 'template' ,
40
+ parts : [
41
+ {
42
+ type : 'string' ,
43
+ value : '"' ,
44
+ } ,
45
+ 'string' ,
46
+ {
47
+ type : 'string' ,
48
+ value : '"' ,
49
+ } ,
50
+ ] ,
51
+ } ,
52
+ } ,
53
+ requirement : {
54
+ type : {
55
+ type : 'custom' ,
56
+ name : 'RegExp' ,
57
+ } ,
58
+ } ,
59
+ } ;
Original file line number Diff line number Diff line change 77
77
78
78
- [ args] ( /api/args/ )
79
79
- [ base64] ( /api/base64/ )
80
+ - [ base64url] ( /api/base64url/ )
80
81
- [ bic] ( /api/bic/ )
81
82
- [ brand] ( /api/brand/ )
82
83
- [ bytes] ( /api/bytes/ )
258
259
- [ AwaitActionAsync] ( /api/AwaitActionAsync/ )
259
260
- [ Base64Action] ( /api/Base64Action/ )
260
261
- [ Base64Issue] ( /api/Base64Issue/ )
262
+ - [ Base64urlAction] ( /api/Base64urlAction/ )
263
+ - [ Base64urlIssue] ( /api/Base64urlIssue/ )
261
264
- [ BaseIssue] ( /api/BaseIssue/ )
262
265
- [ BaseMetadata] ( /api/BaseMetadata/ )
263
266
- [ BaseSchema] ( /api/BaseSchema/ )
You can’t perform that action at this time.
0 commit comments