Skip to content

Commit

Permalink
add API refs of rawCheck action's internal types
Browse files Browse the repository at this point in the history
  • Loading branch information
EltonLobo07 committed Sep 18, 2024
1 parent 6796b1a commit 8802fa6
Show file tree
Hide file tree
Showing 8 changed files with 266 additions and 246 deletions.
21 changes: 21 additions & 0 deletions website/src/routes/api/(actions)/rawCheck/AddIssue/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: AddIssue
description: Add issue type.
contributors:
- EltonLobo07
---

import { Property } from '~/components';
import { properties } from './properties';

# AddIssue

Add issue type.

## Generics

- `TInput` <Property {...properties.TInput} />

## Definition

- `AddIssue` <Property {...properties.AddIssue} />
31 changes: 31 additions & 0 deletions website/src/routes/api/(actions)/rawCheck/AddIssue/properties.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { PropertyProps } from '~/components';

export const properties: Record<string, PropertyProps> = {
TInput: {
modifier: 'extends',
type: 'any',
},
AddIssue: {
type: {
type: 'function',
params: [
{
name: 'info',
optional: true,
type: {
type: 'custom',
name: 'IssueInfo',
href: '../IssueInfo/',
generics: [
{
type: 'custom',
name: 'TInput',
},
],
},
},
],
return: 'void',
},
},
};
24 changes: 24 additions & 0 deletions website/src/routes/api/(actions)/rawCheck/Context/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Context
description: Context type.
contributors:
- EltonLobo07
---

import { Property } from '~/components';
import { properties } from './properties';

# Context

Context type.

## Generics

- `TInput` <Property {...properties.TInput} />

## Definition

- `Context`
- `dataset` <Property {...properties.dataset} />
- `config` <Property {...properties.config} />
- `addIssue` <Property {...properties.addIssue} />
60 changes: 60 additions & 0 deletions website/src/routes/api/(actions)/rawCheck/Context/properties.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import type { PropertyProps } from '~/components';

export const properties: Record<string, PropertyProps> = {
TInput: {
modifier: 'extends',
type: 'any',
},
dataset: {
type: {
type: 'custom',
name: 'Dataset',
href: '../../Dataset/',
generics: [
{
type: 'custom',
name: 'TInput',
},
{
type: 'custom',
name: 'BaseIssue',
href: '../../BaseIssue/',
generics: ['unknown'],
},
],
},
},
config: {
type: {
type: 'custom',
name: 'Config',
href: '../../Config/',
generics: [
{
type: 'custom',
name: 'RawCheckIssue',
href: '../../RawCheckIssue/',
generics: [
{
type: 'custom',
name: 'TInput',
},
],
},
],
},
},
addIssue: {
type: {
type: 'custom',
name: 'AddIssue',
href: '../AddIssue/',
generics: [
{
type: 'custom',
name: 'TInput',
},
],
},
},
};
27 changes: 27 additions & 0 deletions website/src/routes/api/(actions)/rawCheck/IssueInfo/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: IssueInfo
description: Issue info type.
contributors:
- EltonLobo07
---

import { Property } from '~/components';
import { properties } from './properties';

# IssueInfo

Issue info type.

## Generics

- `TInput` <Property {...properties.TInput} />

## Definition

- `IssueInfo`
- `label` <Property {...properties.label} />
- `input` <Property {...properties.input} />
- `expected` <Property {...properties.expected} />
- `received` <Property {...properties.received} />
- `message` <Property {...properties.message} />
- `path` <Property {...properties.path} />
91 changes: 91 additions & 0 deletions website/src/routes/api/(actions)/rawCheck/IssueInfo/properties.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import type { PropertyProps } from '~/components';

export const properties: Record<string, PropertyProps> = {
TInput: {
modifier: 'extends',
type: 'any',
},
kind: {
type: {
type: 'string',
value: 'metadata',
},
},
label: {
type: {
type: 'union',
options: ['string', 'undefined'],
},
},
input: {
type: {
type: 'union',
options: ['unknown', 'undefined'],
},
},
expected: {
type: {
type: 'union',
options: ['string', 'undefined'],
},
},
received: {
type: {
type: 'union',
options: ['string', 'undefined'],
},
},
message: {
type: {
type: 'union',
options: [
{
type: 'custom',
name: 'ErrorMessage',
href: '../../ErrorMessage/',
generics: [
{
type: 'custom',
name: 'RawCheckIssue',
href: '../../RawCheckIssue/',
generics: [
{
type: 'custom',
name: 'TInput',
},
],
},
],
},
'undefined',
],
},
},
path: {
type: {
type: 'union',
options: [
{
type: 'tuple',
items: [
{
type: 'custom',
name: 'IssuePathItem',
href: '../../IssuePathItem/',
},
{
type: 'array',
item: {
type: 'custom',
name: 'IssuePathItem',
href: '../../IssuePathItem/',
},
spread: true,
},
],
},
'undefined',
],
},
},
};
128 changes: 6 additions & 122 deletions website/src/routes/api/(actions)/rawCheck/properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,129 +12,13 @@ export const properties: Record<string, PropertyProps> = {
{
name: 'context',
type: {
type: 'object',
entries: [
type: 'custom',
name: 'Context',
href: './Context/',
generics: [
{
key: 'dataset',
value: {
type: 'custom',
name: 'Dataset',
href: '../Dataset/',
generics: [
{
type: 'custom',
name: 'TInput',
},
{
type: 'custom',
name: 'BaseIssue',
generics: ['unknown'],
},
],
},
},
{
key: 'config',
value: {
type: 'custom',
name: 'Config',
href: '../Config/',
generics: [
{
type: 'custom',
name: 'RawCheckIssue',
href: '../RawCheckIssue/',
generics: [
{
type: 'custom',
name: 'TInput',
},
],
},
],
},
},
{
key: 'addIssue',
value: {
type: 'function',
params: [
{
name: 'info',
type: {
type: 'object',
entries: [
{
key: 'label',
optional: true,
value: 'string',
},
{
key: 'input',
optional: true,
value: 'unknown',
},
{
key: 'expected',
optional: true,
value: 'string',
},
{
key: 'received',
optional: true,
value: 'string',
},
{
key: 'message',
optional: true,
value: {
type: 'custom',
name: 'ErrorMessage',
href: '../ErrorMessage/',
generics: [
{
type: 'custom',
name: 'RawCheckIssue',
href: '../RawCheckIssue/',
generics: [
{
type: 'custom',
name: 'TInput',
},
],
},
],
},
},
{
key: 'path',
optional: true,
value: {
type: 'tuple',
items: [
{
type: 'custom',
name: 'IssuePathItem',
href: '../IssuePathItem/',
},
{
type: 'array',
spread: true,
item: {
type: 'custom',
name: 'IssuePathItem',
href: '../IssuePathItem/',
},
},
],
},
},
],
},
},
],
return: 'void',
},
type: 'custom',
name: 'TInput',
},
],
},
Expand Down
Loading

0 comments on commit 8802fa6

Please sign in to comment.