chore(docs): Generated References (#5743)

Generated the following references:
- `entities`
- `inventory`
- `js-client`
- `pricing`
- `product`
- `services`
- `stock-location`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-11-27 18:58:52 +00:00
committed by GitHub
parent dc6b815b12
commit cdd42dbdcd
1383 changed files with 18978 additions and 20154 deletions

View File

@@ -12,11 +12,11 @@ are available in the JS Client under the `medusa.admin.custom` property.
## Methods
### delete
#### delete
Send a `DELETE` request to a custom API Route. The method accepts a type parameters `TResponse` indicating the type of response, which defaults to `any`.
#### Example
##### Example
```ts
import Medusa from "@medusajs/medusa-js"
@@ -27,7 +27,7 @@ medusa.admin.custom.delete(`/blog/posts/${postId}`).then(() => {
})
```
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -78,7 +78,7 @@ medusa.admin.custom.delete(`/blog/posts/${postId}`).then(() => {
}
]} />
#### Returns
##### Returns
<ParameterTypes parameters={[
{
@@ -88,18 +88,28 @@ medusa.admin.custom.delete(`/blog/posts/${postId}`).then(() => {
"defaultValue": "",
"description": "The response data.",
"expandable": false,
"children": []
"children": [
{
"name": "TResponse",
"type": "`TResponse`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]
}
]} />
___
### get
#### get
Send a `GET` request to a custom API Route. The method accepts a tuple of type parameters: the first `TQuery` is the type of accepted query parameters,
which defaults to `Record<string, any>`; the second `TResponse` is the type of response, which defaults to `any`.
#### Example
##### Example
```ts
import Medusa from "@medusajs/medusa-js"
@@ -116,7 +126,7 @@ medusa.admin.custom.get<Record<string, any>, PostsResponse>(
})
```
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -176,7 +186,7 @@ medusa.admin.custom.get<Record<string, any>, PostsResponse>(
}
]} />
#### Returns
##### Returns
<ParameterTypes parameters={[
{
@@ -186,18 +196,28 @@ medusa.admin.custom.get<Record<string, any>, PostsResponse>(
"defaultValue": "",
"description": "The response data.",
"expandable": false,
"children": []
"children": [
{
"name": "TResponse",
"type": "`TResponse`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]
}
]} />
___
### post
#### post
Send a `POST` request to a custom API Route. The method accepts a tuple of type parameters: the first `TPayload` is the type of accepted body parameters,
which defaults to `Record<string, any>`; the second `TResponse` is the type of response, which defaults to `any`.
#### Example
##### Example
```ts
import Medusa from "@medusajs/medusa-js"
@@ -220,7 +240,7 @@ medusa.admin.custom.post<PostRequest, PostResponse>(
})
```
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -280,7 +300,7 @@ medusa.admin.custom.post<PostRequest, PostResponse>(
}
]} />
#### Returns
##### Returns
<ParameterTypes parameters={[
{
@@ -290,6 +310,16 @@ medusa.admin.custom.post<PostRequest, PostResponse>(
"defaultValue": "",
"description": "The response data.",
"expandable": false,
"children": []
"children": [
{
"name": "TResponse",
"type": "`TResponse`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]
}
]} />