Skip to content

Commit 59074a2

Browse files
Merge pull request #831 from EltonLobo07/doc/add-rawCheckAsync-with-schema
add `rawCheckAsync` & `RawCheckActionAsync` API refs
2 parents 2516628 + 990cfb3 commit 59074a2

File tree

12 files changed

+556
-123
lines changed

12 files changed

+556
-123
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: AddIssue
3+
description: Add issue type.
4+
contributors:
5+
- EltonLobo07
6+
---
7+
8+
import { Property } from '~/components';
9+
import { properties } from './properties';
10+
11+
# AddIssue
12+
13+
Add issue type.
14+
15+
## Generics
16+
17+
- `TInput` <Property {...properties.TInput} />
18+
19+
## Definition
20+
21+
- `AddIssue` <Property {...properties.AddIssue} />
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import type { PropertyProps } from '~/components';
2+
3+
export const properties: Record<string, PropertyProps> = {
4+
TInput: {
5+
modifier: 'extends',
6+
type: 'any',
7+
},
8+
AddIssue: {
9+
type: {
10+
type: 'function',
11+
params: [
12+
{
13+
name: 'info',
14+
optional: true,
15+
type: {
16+
type: 'custom',
17+
name: 'IssueInfo',
18+
href: '../IssueInfo/',
19+
generics: [
20+
{
21+
type: 'custom',
22+
name: 'TInput',
23+
},
24+
],
25+
},
26+
},
27+
],
28+
return: 'void',
29+
},
30+
},
31+
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Context
3+
description: Context type.
4+
contributors:
5+
- EltonLobo07
6+
---
7+
8+
import { Property } from '~/components';
9+
import { properties } from './properties';
10+
11+
# Context
12+
13+
Context type.
14+
15+
## Generics
16+
17+
- `TInput` <Property {...properties.TInput} />
18+
19+
## Definition
20+
21+
- `Context`
22+
- `dataset` <Property {...properties.dataset} />
23+
- `config` <Property {...properties.config} />
24+
- `addIssue` <Property {...properties.addIssue} />
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import type { PropertyProps } from '~/components';
2+
3+
export const properties: Record<string, PropertyProps> = {
4+
TInput: {
5+
modifier: 'extends',
6+
type: 'any',
7+
},
8+
dataset: {
9+
type: {
10+
type: 'custom',
11+
name: 'Dataset',
12+
href: '../../Dataset/',
13+
generics: [
14+
{
15+
type: 'custom',
16+
name: 'TInput',
17+
},
18+
{
19+
type: 'custom',
20+
name: 'BaseIssue',
21+
href: '../../BaseIssue/',
22+
generics: ['unknown'],
23+
},
24+
],
25+
},
26+
},
27+
config: {
28+
type: {
29+
type: 'custom',
30+
name: 'Config',
31+
href: '../../Config/',
32+
generics: [
33+
{
34+
type: 'custom',
35+
name: 'RawCheckIssue',
36+
href: '../../RawCheckIssue/',
37+
generics: [
38+
{
39+
type: 'custom',
40+
name: 'TInput',
41+
},
42+
],
43+
},
44+
],
45+
},
46+
},
47+
addIssue: {
48+
type: {
49+
type: 'custom',
50+
name: 'AddIssue',
51+
href: '../AddIssue/',
52+
generics: [
53+
{
54+
type: 'custom',
55+
name: 'TInput',
56+
},
57+
],
58+
},
59+
},
60+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: IssueInfo
3+
description: Issue info type.
4+
contributors:
5+
- EltonLobo07
6+
---
7+
8+
import { Property } from '~/components';
9+
import { properties } from './properties';
10+
11+
# IssueInfo
12+
13+
Issue info type.
14+
15+
## Generics
16+
17+
- `TInput` <Property {...properties.TInput} />
18+
19+
## Definition
20+
21+
- `IssueInfo`
22+
- `label` <Property {...properties.label} />
23+
- `input` <Property {...properties.input} />
24+
- `expected` <Property {...properties.expected} />
25+
- `received` <Property {...properties.received} />
26+
- `message` <Property {...properties.message} />
27+
- `path` <Property {...properties.path} />
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
import type { PropertyProps } from '~/components';
2+
3+
export const properties: Record<string, PropertyProps> = {
4+
TInput: {
5+
modifier: 'extends',
6+
type: 'any',
7+
},
8+
kind: {
9+
type: {
10+
type: 'string',
11+
value: 'metadata',
12+
},
13+
},
14+
label: {
15+
type: {
16+
type: 'union',
17+
options: ['string', 'undefined'],
18+
},
19+
},
20+
input: {
21+
type: {
22+
type: 'union',
23+
options: ['unknown', 'undefined'],
24+
},
25+
},
26+
expected: {
27+
type: {
28+
type: 'union',
29+
options: ['string', 'undefined'],
30+
},
31+
},
32+
received: {
33+
type: {
34+
type: 'union',
35+
options: ['string', 'undefined'],
36+
},
37+
},
38+
message: {
39+
type: {
40+
type: 'union',
41+
options: [
42+
{
43+
type: 'custom',
44+
name: 'ErrorMessage',
45+
href: '../../ErrorMessage/',
46+
generics: [
47+
{
48+
type: 'custom',
49+
name: 'RawCheckIssue',
50+
href: '../../RawCheckIssue/',
51+
generics: [
52+
{
53+
type: 'custom',
54+
name: 'TInput',
55+
},
56+
],
57+
},
58+
],
59+
},
60+
'undefined',
61+
],
62+
},
63+
},
64+
path: {
65+
type: {
66+
type: 'union',
67+
options: [
68+
{
69+
type: 'tuple',
70+
items: [
71+
{
72+
type: 'custom',
73+
name: 'IssuePathItem',
74+
href: '../../IssuePathItem/',
75+
},
76+
{
77+
type: 'array',
78+
item: {
79+
type: 'custom',
80+
name: 'IssuePathItem',
81+
href: '../../IssuePathItem/',
82+
},
83+
spread: true,
84+
},
85+
],
86+
},
87+
'undefined',
88+
],
89+
},
90+
},
91+
};

website/src/routes/api/(actions)/rawCheck/properties.ts

Lines changed: 6 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -12,129 +12,13 @@ export const properties: Record<string, PropertyProps> = {
1212
{
1313
name: 'context',
1414
type: {
15-
type: 'object',
16-
entries: [
15+
type: 'custom',
16+
name: 'Context',
17+
href: './Context/',
18+
generics: [
1719
{
18-
key: 'dataset',
19-
value: {
20-
type: 'custom',
21-
name: 'Dataset',
22-
href: '../Dataset/',
23-
generics: [
24-
{
25-
type: 'custom',
26-
name: 'TInput',
27-
},
28-
{
29-
type: 'custom',
30-
name: 'BaseIssue',
31-
generics: ['unknown'],
32-
},
33-
],
34-
},
35-
},
36-
{
37-
key: 'config',
38-
value: {
39-
type: 'custom',
40-
name: 'Config',
41-
href: '../Config/',
42-
generics: [
43-
{
44-
type: 'custom',
45-
name: 'RawCheckIssue',
46-
href: '../RawCheckIssue/',
47-
generics: [
48-
{
49-
type: 'custom',
50-
name: 'TInput',
51-
},
52-
],
53-
},
54-
],
55-
},
56-
},
57-
{
58-
key: 'addIssue',
59-
value: {
60-
type: 'function',
61-
params: [
62-
{
63-
name: 'info',
64-
type: {
65-
type: 'object',
66-
entries: [
67-
{
68-
key: 'label',
69-
optional: true,
70-
value: 'string',
71-
},
72-
{
73-
key: 'input',
74-
optional: true,
75-
value: 'unknown',
76-
},
77-
{
78-
key: 'expected',
79-
optional: true,
80-
value: 'string',
81-
},
82-
{
83-
key: 'received',
84-
optional: true,
85-
value: 'string',
86-
},
87-
{
88-
key: 'message',
89-
optional: true,
90-
value: {
91-
type: 'custom',
92-
name: 'ErrorMessage',
93-
href: '../ErrorMessage/',
94-
generics: [
95-
{
96-
type: 'custom',
97-
name: 'RawCheckIssue',
98-
href: '../RawCheckIssue/',
99-
generics: [
100-
{
101-
type: 'custom',
102-
name: 'TInput',
103-
},
104-
],
105-
},
106-
],
107-
},
108-
},
109-
{
110-
key: 'path',
111-
optional: true,
112-
value: {
113-
type: 'tuple',
114-
items: [
115-
{
116-
type: 'custom',
117-
name: 'IssuePathItem',
118-
href: '../IssuePathItem/',
119-
},
120-
{
121-
type: 'array',
122-
spread: true,
123-
item: {
124-
type: 'custom',
125-
name: 'IssuePathItem',
126-
href: '../IssuePathItem/',
127-
},
128-
},
129-
],
130-
},
131-
},
132-
],
133-
},
134-
},
135-
],
136-
return: 'void',
137-
},
20+
type: 'custom',
21+
name: 'TInput',
13822
},
13923
],
14024
},

0 commit comments

Comments
 (0)