docs: TSDoc + reference of fulfillment service (#5761)

This commit is contained in:
Shahed Nasser
2023-11-29 11:58:08 +00:00
committed by GitHub
parent 8f25ed8a10
commit f802e2460f
1479 changed files with 30259 additions and 16135 deletions

View File

@@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Orchestrates dynamic middleware registered through the Medusa Middleware API
## Constructors
#### constructor
## constructor
`**new MiddlewareService**()`
___
## Properties
<ParameterTypes parameters={[
@@ -55,15 +55,17 @@ Orchestrates dynamic middleware registered through the Medusa Middleware API
}
]} />
___
## Methods
#### addPostAuthentication
### addPostAuthentication
`**addPostAuthentication**(middleware, options): void`
Adds a middleware function to be called after authentication is completed.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -86,7 +88,7 @@ Adds a middleware function to be called after authentication is completed.
}
]} />
##### Returns
#### Returns
`void`
@@ -104,13 +106,13 @@ Adds a middleware function to be called after authentication is completed.
___
#### addPreAuthentication
### addPreAuthentication
`**addPreAuthentication**(middleware, options): void`
Adds a middleware function to be called before authentication is completed.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -133,7 +135,7 @@ Adds a middleware function to be called before authentication is completed.
}
]} />
##### Returns
#### Returns
`void`
@@ -151,13 +153,13 @@ Adds a middleware function to be called before authentication is completed.
___
#### addPreCartCreation
### addPreCartCreation
`**addPreCartCreation**(middleware): void`
Adds a middleware function to be called before cart creation
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -171,7 +173,7 @@ Adds a middleware function to be called before cart creation
}
]} />
##### Returns
#### Returns
`void`
@@ -189,11 +191,11 @@ Adds a middleware function to be called before cart creation
___
#### addRouter
### addRouter
`**addRouter**(path, router): void`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -216,7 +218,7 @@ ___
}
]} />
##### Returns
#### Returns
`void`
@@ -234,11 +236,11 @@ ___
___
#### getRouters
### getRouters
`**getRouters**(path): Router[]`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -252,7 +254,7 @@ ___
}
]} />
##### Returns
#### Returns
Router[]
@@ -270,13 +272,13 @@ Router[]
___
#### usePostAuthentication
### usePostAuthentication
`**usePostAuthentication**(app): void`
Adds post authentication middleware to an express app.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -290,7 +292,7 @@ Adds post authentication middleware to an express app.
}
]} />
##### Returns
#### Returns
`void`
@@ -308,13 +310,13 @@ Adds post authentication middleware to an express app.
___
#### usePreAuthentication
### usePreAuthentication
`**usePreAuthentication**(app): void`
Adds pre authentication middleware to an express app.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -328,7 +330,7 @@ Adds pre authentication middleware to an express app.
}
]} />
##### Returns
#### Returns
`void`
@@ -346,11 +348,11 @@ Adds pre authentication middleware to an express app.
___
#### usePreCartCreation
### usePreCartCreation
`**usePreCartCreation**(): RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]`
##### Returns
#### Returns
RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]
@@ -368,13 +370,13 @@ RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&
___
#### validateMiddleware\_
### validateMiddleware\_
`**validateMiddleware_**(fn): void`
Validates a middleware function, throws if fn is not of type function.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -388,7 +390,7 @@ Validates a middleware function, throws if fn is not of type function.
}
]} />
##### Returns
#### Returns
`void`