docs: generate medusa-react reference (#6004)

* add new plugin for better organization

* added handling in theme for mutations and query types

* added tsdoc to hooks

* added tsdocs to utility functions

* added tsdoc to providers

* generated reference

* general fixes for generated reference

* generated api reference specs + general fixes

* add missing import react

* split utilities into different directories

* added overview page

* added link to customer authentication section

* fix lint errors

* added changeset

* fix readme

* fixed build error

* added expand fields + other sections to overview

* updated what's new section

* general refactoring

* remove unnecessary query field

* fix links

* added ignoreApi option
This commit is contained in:
Shahed Nasser
2024-01-05 17:03:38 +02:00
committed by GitHub
parent 6fc6a9de6a
commit 7d650771d1
2811 changed files with 231856 additions and 455063 deletions
@@ -14,44 +14,7 @@ ___
## Properties
<ParameterTypes parameters={[
{
"name": "postAuthentication_",
"type": "`middlewareType`[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "preAuthentication_",
"type": "`middlewareType`[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "preCartCreation_",
"type": "RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "routers",
"type": "`Record<string, Router[]>`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"postAuthentication_","type":"`middlewareType`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"preAuthentication_","type":"`middlewareType`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"preCartCreation_","type":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"routers","type":"`Record<string, Router[]>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
___
@@ -63,40 +26,11 @@ Adds a middleware function to be called after authentication is completed.
#### Parameters
<ParameterTypes parameters={[
{
"name": "middleware",
"type": "`middlewareHandlerType`",
"description": "the middleware function. Should return a\n middleware function.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "`Record<string, unknown>`",
"description": "the arguments that will be passed to the\n middleware",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"middleware","type":"`middlewareHandlerType`","description":"the middleware function. Should return a\n middleware function.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, unknown>`","description":"the arguments that will be passed to the\n middleware","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "void",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} />
___
@@ -106,40 +40,11 @@ Adds a middleware function to be called before authentication is completed.
#### Parameters
<ParameterTypes parameters={[
{
"name": "middleware",
"type": "`middlewareHandlerType`",
"description": "the middleware function. Should return a\n middleware function.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "options",
"type": "`Record<string, unknown>`",
"description": "the arguments that will be passed to the\n middleware",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"middleware","type":"`middlewareHandlerType`","description":"the middleware function. Should return a\n middleware function.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, unknown>`","description":"the arguments that will be passed to the\n middleware","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "void",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} />
___
@@ -149,31 +54,11 @@ Adds a middleware function to be called before cart creation
#### Parameters
<ParameterTypes parameters={[
{
"name": "middleware",
"type": "RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;",
"description": "the middleware function. Should return a\n middleware function.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"middleware","type":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;","description":"the middleware function. Should return a\n middleware function.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
___
@@ -181,40 +66,11 @@ ___
#### Parameters
<ParameterTypes parameters={[
{
"name": "path",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "router",
"type": "`Router`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"router","type":"`Router`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
___
@@ -222,31 +78,11 @@ ___
#### Parameters
<ParameterTypes parameters={[
{
"name": "path",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "Router[]",
"type": "`Router`[]",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"Router[]","type":"`Router`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
___
@@ -256,31 +92,11 @@ Adds post authentication middleware to an express app.
#### Parameters
<ParameterTypes parameters={[
{
"name": "app",
"type": "`Router`",
"description": "the express app to add the middleware to",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"app","type":"`Router`","description":"the express app to add the middleware to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
___
@@ -290,31 +106,11 @@ Adds pre authentication middleware to an express app.
#### Parameters
<ParameterTypes parameters={[
{
"name": "app",
"type": "`Router`",
"description": "the express app to add the middleware to",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"app","type":"`Router`","description":"the express app to add the middleware to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
___
@@ -322,17 +118,7 @@ ___
#### Returns
<ParameterTypes parameters={[
{
"name": "RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]",
"type": "RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]","type":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
___
@@ -342,28 +128,8 @@ Validates a middleware function, throws if fn is not of type function.
#### Parameters
<ParameterTypes parameters={[
{
"name": "fn",
"type": "`unknown`",
"description": "the middleware function to validate.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"fn","type":"`unknown`","description":"the middleware function to validate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
#### Returns
<ParameterTypes parameters={[
{
"name": "void",
"type": "`void`",
"optional": true,
"defaultValue": "",
"description": "nothing if the middleware is a function",
"expandable": false,
"children": []
}
]} />
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"nothing if the middleware is a function","expandable":false,"children":[]}]} />