docs: update docusaurus to v3 (#5625)
* update dependencies * update onboarding mdx * fixes for mdx issues * fixes for mdx compatibility * resolve mdx errors * fixes in reference * fix check errors * revert change in vale action * fix node version in action * fix summary in markdown
This commit is contained in:
@@ -7,7 +7,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# AdminAuthResource
|
||||
|
||||
This class is used to send requests to [Admin Auth API Routes](https://docs.medusajs.com/api/admin#auth_getauth). All its method
|
||||
This class is used to send requests to [Admin Auth API Routes](https://docs.medusajs.com/api/admin#auth\_getauth). All its method
|
||||
are available in the JS Client under the `medusa.admin.auth` property.
|
||||
|
||||
The methods in this class allow admin users to manage their session, such as login or log out.
|
||||
@@ -41,7 +41,7 @@ medusa.admin.AdminAuthResource.createSession({
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`AdminPostAuthReq`](../internal/classes/internal.AdminPostAuthReq.mdx)",
|
||||
"type": "[AdminPostAuthReq](../internal/classes/internal.AdminPostAuthReq.mdx)",
|
||||
"description": "The credentials of the user.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -69,7 +69,7 @@ medusa.admin.AdminAuthResource.createSession({
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Custom headers to attach to the request.",
|
||||
"optional": false,
|
||||
"defaultValue": "{}",
|
||||
@@ -83,7 +83,7 @@ medusa.admin.AdminAuthResource.createSession({
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../internal/types/internal.ResponsePromise.mdx)<[`AdminAuthRes`](../internal/types/internal.AdminAuthRes.mdx)\\>",
|
||||
"type": "[ResponsePromise](../internal/types/internal.ResponsePromise.mdx)<[AdminAuthRes](../internal/types/internal.AdminAuthRes.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "Resolves to the user's details.",
|
||||
@@ -99,7 +99,7 @@ medusa.admin.AdminAuthResource.createSession({
|
||||
"children": [
|
||||
{
|
||||
"name": "user",
|
||||
"type": "[`Omit`](../internal/types/internal.Omit.mdx)<[`User`](../internal/classes/internal.User.mdx), ``\"password_hash\"``\\>",
|
||||
"type": "[Omit](../internal/types/internal.Omit.mdx)<[User](../internal/classes/internal.User.mdx), `\"password_hash\"`>",
|
||||
"description": "User details.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -170,7 +170,7 @@ medusa.admin.AdminAuthResource.createSession({
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "An optional key-value map with additional details",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -179,7 +179,7 @@ medusa.admin.AdminAuthResource.createSession({
|
||||
},
|
||||
{
|
||||
"name": "role",
|
||||
"type": "[`UserRoles`](../internal/enums/internal.internal.UserRoles.mdx)",
|
||||
"type": "[UserRoles](../internal/enums/internal.internal.UserRoles.mdx)",
|
||||
"description": "The user's role. These roles don't provide any different privileges.",
|
||||
"optional": false,
|
||||
"defaultValue": "member",
|
||||
@@ -224,7 +224,7 @@ medusa.admin.auth.deleteSession()
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Custom headers to attach to the request.",
|
||||
"optional": false,
|
||||
"defaultValue": "{}",
|
||||
@@ -238,7 +238,7 @@ medusa.admin.auth.deleteSession()
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../internal/types/internal.ResponsePromise.mdx)<`void`\\>",
|
||||
"type": "[ResponsePromise](../internal/types/internal.ResponsePromise.mdx)<void>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "Resolves when user is logged out successfully.",
|
||||
@@ -269,7 +269,7 @@ medusa.admin.auth.getSession().then(({ user }) => {
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Custom headers to attach to the request.",
|
||||
"optional": false,
|
||||
"defaultValue": "{}",
|
||||
@@ -283,7 +283,7 @@ medusa.admin.auth.getSession().then(({ user }) => {
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../internal/types/internal.ResponsePromise.mdx)<[`AdminAuthRes`](../internal/types/internal.AdminAuthRes.mdx)\\>",
|
||||
"type": "[ResponsePromise](../internal/types/internal.ResponsePromise.mdx)<[AdminAuthRes](../internal/types/internal.AdminAuthRes.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "Resolves to the logged-in user's details.",
|
||||
@@ -299,7 +299,7 @@ medusa.admin.auth.getSession().then(({ user }) => {
|
||||
"children": [
|
||||
{
|
||||
"name": "user",
|
||||
"type": "[`Omit`](../internal/types/internal.Omit.mdx)<[`User`](../internal/classes/internal.User.mdx), ``\"password_hash\"``\\>",
|
||||
"type": "[Omit](../internal/types/internal.Omit.mdx)<[User](../internal/classes/internal.User.mdx), `\"password_hash\"`>",
|
||||
"description": "User details.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -370,7 +370,7 @@ medusa.admin.auth.getSession().then(({ user }) => {
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "An optional key-value map with additional details",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -379,7 +379,7 @@ medusa.admin.auth.getSession().then(({ user }) => {
|
||||
},
|
||||
{
|
||||
"name": "role",
|
||||
"type": "[`UserRoles`](../internal/enums/internal.internal.UserRoles.mdx)",
|
||||
"type": "[UserRoles](../internal/enums/internal.internal.UserRoles.mdx)",
|
||||
"description": "The user's role. These roles don't provide any different privileges.",
|
||||
"optional": false,
|
||||
"defaultValue": "member",
|
||||
@@ -429,7 +429,7 @@ medusa.admin.auth
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`AdminPostAuthReq`](../internal/classes/internal.AdminPostAuthReq.mdx)",
|
||||
"type": "[AdminPostAuthReq](../internal/classes/internal.AdminPostAuthReq.mdx)",
|
||||
"description": "The credentials of the user.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -457,7 +457,7 @@ medusa.admin.auth
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Custom headers to attach to the request.",
|
||||
"optional": false,
|
||||
"defaultValue": "{}",
|
||||
@@ -471,7 +471,7 @@ medusa.admin.auth
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../internal/types/internal.ResponsePromise.mdx)<[`AdminBearerAuthRes`](../internal/types/internal.AdminBearerAuthRes.mdx)\\>",
|
||||
"type": "[ResponsePromise](../internal/types/internal.ResponsePromise.mdx)<[AdminBearerAuthRes](../internal/types/internal.AdminBearerAuthRes.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "Resolves to the access token of the user, if they're authenticated successfully.",
|
||||
|
||||
Reference in New Issue
Block a user