docs: edits and fixes to commerce module docs (#7468)
Apply edits and fixes to the commerce modules docs
This commit is contained in:
1 parent
130de74d6d
commit
2c5ba408d4
160 files changed
+6400
-3790
No files matched your search
+3
-4
@@ -22,21 +22,20 @@ The following example is in the context of an API route, where
|
||||
`req` is an instance of the `MedusaRequest` object:
|
||||
|
||||
```ts
|
||||
const { success, authUser, location, error } =
|
||||
const { success, authIdentity, location, error } =
|
||||
await authModuleService.authenticate("emailpass", {
|
||||
url: req.url,
|
||||
headers: req.headers,
|
||||
query: req.query,
|
||||
body: req.body,
|
||||
authScope: "admin",
|
||||
protocol: req.protocol,
|
||||
} as AuthenticationInput)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"provider","type":"`string`","description":"The ID of the provider to authenticate the user with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerData","type":"[AuthenticationInput](../../../interfaces/auth.AuthenticationInput/page.mdx)","description":"The data to pass to the provider to authenticate the user.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authScope","type":"`string`","description":"Scope for the authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="authenticate"/>
|
||||
<TypeList types={[{"name":"provider","type":"`string`","description":"The ID of the provider to authenticate the user with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerData","type":"[AuthenticationInput](../../../interfaces/auth.AuthenticationInput/page.mdx)","description":"The data to pass to the provider to authenticate the user.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="authenticate"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../interfaces/auth.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The details of the authentication result.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../interfaces/auth.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authUser","type":"`any`","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"successRedirectUrl","type":"`string`","description":"Some authentication providers support redirecting to a specified URL on\nsuccess. In those cases, the URL to redirect to is set in this field.\n\nSo, if `success` is true, there's no `location` set, and this field\nis set, you can redirect to this URL.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="authenticate"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../interfaces/auth.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The details of the authentication result.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../interfaces/auth.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"`any`","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"successRedirectUrl","type":"`string`","description":"Some authentication providers support redirecting to a specified URL on\nsuccess. In those cases, the URL to redirect to is set in this field.\n\nSo, if `success` is true, there's no `location` set, and this field\nis set, you can redirect to this URL.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="authenticate"/>
|
||||
+10
-13
@@ -10,53 +10,50 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `create` method. This belongs to the Auth Module.
|
||||
|
||||
## create(data, sharedContext?): Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)[]>
|
||||
## create(data, sharedContext?): Promise<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)[]>
|
||||
|
||||
This method creates auth users.
|
||||
This method creates auth identities.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const authUsers = await authModuleService.create([
|
||||
const authIdentities = await authModuleService.create([
|
||||
{
|
||||
provider: "emailpass",
|
||||
entity_id: "user@example.com",
|
||||
scope: "admin",
|
||||
},
|
||||
{
|
||||
provider: "google",
|
||||
entity_id: "user@gmail.com",
|
||||
scope: "email profile",
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateAuthUserDTO](../../../interfaces/auth.CreateAuthUserDTO/page.mdx)[]","description":"The auth users to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate\nthe user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"scope","type":"`string`","description":"The scope of the auth user. For example,\n`admin` or `store`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the third-party app in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="create"/>
|
||||
<TypeList types={[{"name":"data","type":"[CreateAuthIdentityDTO](../../../interfaces/auth.CreateAuthIdentityDTO/page.mdx)[]","description":"The auth identities to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate\nthe user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="create"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The created auth users.","expandable":false,"children":[{"name":"AuthUserDTO[]","type":"[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthUserDTO","type":"`object`","description":"The auth user details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="create"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The created auth identities.","expandable":false,"children":[{"name":"AuthIdentityDTO[]","type":"[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthIdentityDTO","type":"`object`","description":"The auth identity details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="create"/>
|
||||
|
||||
## create(data, sharedContext?): Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)>
|
||||
## create(data, sharedContext?): Promise<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>
|
||||
|
||||
This method creates an auth user.
|
||||
This method creates an auth identity.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const authUser = await authModuleService.create({
|
||||
const authIdentity = await authModuleService.create({
|
||||
provider: "emailpass",
|
||||
entity_id: "user@example.com",
|
||||
scope: "admin",
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateAuthUserDTO](../../../interfaces/auth.CreateAuthUserDTO/page.mdx)","description":"The auth user to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate\nthe user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"scope","type":"`string`","description":"The scope of the auth user. For example,\n`admin` or `store`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the third-party app in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="create"/>
|
||||
<TypeList types={[{"name":"data","type":"[CreateAuthIdentityDTO](../../../interfaces/auth.CreateAuthIdentityDTO/page.mdx)","description":"The auth identity to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate\nthe user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="create"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The created auth user.","expandable":false,"children":[{"name":"AuthUserDTO","type":"[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)","optional":false,"defaultValue":"","description":"The auth user details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"scope","type":"`string`","description":"The scope of the auth user. For example,\n`admin` or `store`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the third-party app in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="create"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The created auth identity.","expandable":false,"children":[{"name":"AuthIdentityDTO","type":"[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)","optional":false,"defaultValue":"","description":"The auth identity details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="create"/>
|
||||
+6
-6
@@ -10,14 +10,14 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `list` method. This belongs to the Auth Module.
|
||||
|
||||
This method retrieves a paginated list of auth users based on optional filters and configuration.
|
||||
This method retrieves a paginated list of auth identities based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of auth users using their IDs:
|
||||
To retrieve a list of auth identities using their IDs:
|
||||
|
||||
```ts
|
||||
const authUsers = await authModuleService.list({
|
||||
const authIdentities = await authModuleService.list({
|
||||
id: ["authusr_123", "authusr_321"],
|
||||
})
|
||||
```
|
||||
@@ -25,7 +25,7 @@ const authUsers = await authModuleService.list({
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const authUsers = await authModuleService.list(
|
||||
const authIdentities = await authModuleService.list(
|
||||
{
|
||||
id: ["authusr_123", "authusr_321"],
|
||||
},
|
||||
@@ -38,8 +38,8 @@ const authUsers = await authModuleService.list(
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableAuthUserProps](../../../interfaces/auth.FilterableAuthUserProps/page.mdx)","description":"The filters to apply on the retrieved auth users.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth user by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string` \\| `string`[]","description":"Filter the auth users by the ID of their auth provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthUserProps](../../../interfaces/auth.FilterableAuthUserProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthUserProps](../../../interfaces/auth.FilterableAuthUserProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthUserProps](../../../interfaces/auth.FilterableAuthUserProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthUserProps](../../../interfaces/auth.FilterableAuthUserProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)>","description":"The configurations determining how the auth user is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a auth user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type"Line truncated
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)","description":"The filters to apply on the retrieved auth identities.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string` \\| `string`[]","description":"Filter the auth identities by the ID of their auth provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"The configurations determining how the auth identity is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":Line truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of auth users.","expandable":false,"children":[{"name":"AuthUserDTO[]","type":"[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthUserDTO","type":"`object`","description":"The auth user details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="list"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of auth identities.","expandable":false,"children":[{"name":"AuthIdentityDTO[]","type":"[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthIdentityDTO","type":"`object`","description":"The auth identity details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="list"/>
|
||||
+6
-6
@@ -10,14 +10,14 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `listAndCount` method. This belongs to the Auth Module.
|
||||
|
||||
This method retrieves a paginated list of auth users along with the total count of available auth users satisfying the provided filters.
|
||||
This method retrieves a paginated list of auth identities along with the total count of available auth identities satisfying the provided filters.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of auth users using their IDs:
|
||||
To retrieve a list of auth identities using their IDs:
|
||||
|
||||
```ts
|
||||
const [authUsers, count] =
|
||||
const [authIdentities, count] =
|
||||
await authModuleService.listAndCount({
|
||||
id: ["authusr_123", "authusr_321"],
|
||||
})
|
||||
@@ -26,7 +26,7 @@ const [authUsers, count] =
|
||||
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
|
||||
|
||||
```ts
|
||||
const [authUsers, count] =
|
||||
const [authIdentities, count] =
|
||||
await authModuleService.listAndCount(
|
||||
{
|
||||
id: ["authusr_123", "authusr_321"],
|
||||
@@ -40,8 +40,8 @@ const [authUsers, count] =
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableAuthUserProps](../../../interfaces/auth.FilterableAuthUserProps/page.mdx)","description":"The filters to apply on the retrieved auth users.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth user by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string` \\| `string`[]","description":"Filter the auth users by the ID of their auth provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthUserProps](../../../interfaces/auth.FilterableAuthUserProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthUserProps](../../../interfaces/auth.FilterableAuthUserProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthUserProps](../../../interfaces/auth.FilterableAuthUserProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthUserProps](../../../interfaces/auth.FilterableAuthUserProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)>","description":"The configurations determining how the auth user is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a auth user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type"Line truncated
|
||||
<TypeList types={[{"name":"filters","type":"[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)","description":"The filters to apply on the retrieved auth identities.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string` \\| `string`[]","description":"Filter the auth identities by the ID of their auth provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx) \\| [BaseFilterable](../../../interfaces/auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](../../../interfaces/auth.FilterableAuthIdentityProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"The configurations determining how the auth identity is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":Line truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)[], number]>","optional":false,"defaultValue":"","description":"The list of auth users along with their total count.","expandable":false,"children":[{"name":"AuthUserDTO[]","type":"[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCount"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)[], number]>","optional":false,"defaultValue":"","description":"The list of auth identities along with their total count.","expandable":false,"children":[{"name":"AuthIdentityDTO[]","type":"[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCount"/>
|
||||
+4
-4
@@ -10,18 +10,18 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `retrieve` method. This belongs to the Auth Module.
|
||||
|
||||
This method retrieves an auth user by its ID.
|
||||
This method retrieves an auth identity by its ID.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
const authUser = await authModuleService.retrieve("authusr_1")
|
||||
const authIdentity = await authModuleService.retrieve("authusr_1")
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)>","description":"The configurations determining how the auth user is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a auth user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrieve"/>
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/auth.FindConfig/page.mdx)<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"The configurations determining how the auth identity is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrieve"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The retrieved auth user.","expandable":false,"children":[{"name":"AuthUserDTO","type":"[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)","optional":false,"defaultValue":"","description":"The auth user details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"scope","type":"`string`","description":"The scope of the auth user. For example,\n`admin` or `store`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the third-party app in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="retrieve"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The retrieved auth identity.","expandable":false,"children":[{"name":"AuthIdentityDTO","type":"[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)","optional":false,"defaultValue":"","description":"The auth identity details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="retrieve"/>
|
||||
+8
-14
@@ -10,50 +10,44 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `update` method. This belongs to the Auth Module.
|
||||
|
||||
## update(data, sharedContext?): Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)[]>
|
||||
## update(data, sharedContext?): Promise<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)[]>
|
||||
|
||||
This method updates existing auths.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const authUsers = await authModuleService.update([
|
||||
const authIdentities = await authModuleService.update([
|
||||
{
|
||||
id: "authusr_123",
|
||||
app_metadata: {
|
||||
test: true,
|
||||
},
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpdateAuthUserDTO](../../../interfaces/auth.UpdateAuthUserDTO/page.mdx)[]","description":"The attributes to update in the auth users.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the third-party app in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="update"/>
|
||||
<TypeList types={[{"name":"data","type":"[UpdateAuthIdentityDTO](../../../interfaces/auth.UpdateAuthIdentityDTO/page.mdx)[]","description":"The attributes to update in the auth identities.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="update"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The updated auths.","expandable":false,"children":[{"name":"AuthUserDTO[]","type":"[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthUserDTO","type":"`object`","description":"The auth user details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="update"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The updated auths.","expandable":false,"children":[{"name":"AuthIdentityDTO[]","type":"[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthIdentityDTO","type":"`object`","description":"The auth identity details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="update"/>
|
||||
|
||||
## update(data, sharedContext?): Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)>
|
||||
## update(data, sharedContext?): Promise<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>
|
||||
|
||||
This method updates an existing auth.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const authUser = await authModuleService.update({
|
||||
const authIdentity = await authModuleService.update({
|
||||
id: "authusr_123",
|
||||
app_metadata: {
|
||||
test: true,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpdateAuthUserDTO](../../../interfaces/auth.UpdateAuthUserDTO/page.mdx)","description":"The attributes to update in the auth user.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the third-party app in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="update"/>
|
||||
<TypeList types={[{"name":"data","type":"[UpdateAuthIdentityDTO](../../../interfaces/auth.UpdateAuthIdentityDTO/page.mdx)","description":"The attributes to update in the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/auth.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/auth.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="update"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The updated auth.","expandable":false,"children":[{"name":"AuthUserDTO","type":"[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)","optional":false,"defaultValue":"","description":"The auth user details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"scope","type":"`string`","description":"The scope of the auth user. For example,\n`admin` or `store`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the third-party app in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="update"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The updated auth.","expandable":false,"children":[{"name":"AuthIdentityDTO","type":"[AuthIdentityDTO](../../../interfaces/auth.AuthIdentityDTO/page.mdx)","optional":false,"defaultValue":"","description":"The auth identity details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="update"/>
|
||||
+3
-4
@@ -28,21 +28,20 @@ The following example is in the context of an API route, where
|
||||
`req` is an instance of the `MedusaRequest` object:
|
||||
|
||||
```ts
|
||||
const { success, authUser, error, successRedirectUrl } =
|
||||
const { success, authIdentity, error, successRedirectUrl } =
|
||||
await authModuleService.validateCallback("google", {
|
||||
url: req.url,
|
||||
headers: req.headers,
|
||||
query: req.query,
|
||||
body: req.body,
|
||||
authScope: "admin",
|
||||
protocol: req.protocol,
|
||||
} as AuthenticationInput)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"provider","type":"`string`","description":"The ID of the provider to use to validate the callback.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerData","type":"[AuthenticationInput](../../../interfaces/auth.AuthenticationInput/page.mdx)","description":"The data to pass to the provider to validate the callback.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authScope","type":"`string`","description":"Scope for the authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="validateCallback"/>
|
||||
<TypeList types={[{"name":"provider","type":"`string`","description":"The ID of the provider to use to validate the callback.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerData","type":"[AuthenticationInput](../../../interfaces/auth.AuthenticationInput/page.mdx)","description":"The data to pass to the provider to validate the callback.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="validateCallback"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../interfaces/auth.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The details of the authentication result.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../interfaces/auth.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authUser","type":"`any`","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"successRedirectUrl","type":"`string`","description":"Some authentication providers support redirecting to a specified URL on\nsuccess. In those cases, the URL to redirect to is set in this field.\n\nSo, if `success` is true, there's no `location` set, and this field\nis set, you can redirect to this URL.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="validateCallback"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../interfaces/auth.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The details of the authentication result.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../interfaces/auth.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"`any`","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"successRedirectUrl","type":"`string`","description":"Some authentication providers support redirecting to a specified URL on\nsuccess. In those cases, the URL to redirect to is set in this field.\n\nSo, if `success` is true, there's no `location` set, and this field\nis set, you can redirect to this URL.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="validateCallback"/>
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
displayed_sidebar: authReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# AuthIdentityDTO
|
||||
|
||||
The auth identity details.
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="AuthIdentityDTO"/>
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
displayed_sidebar: authReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# AuthUserDTO
|
||||
|
||||
The auth user details.
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"scope","type":"`string`","description":"The scope of the auth user. For example,\n`admin` or `store`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the third-party app in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="AuthUserDTO"/>
|
||||
@@ -9,4 +9,4 @@ import { TypeList } from "docs-ui"
|
||||
The data passed to the auth provider when authenticating a user
|
||||
or validating a callback.
|
||||
|
||||
<TypeList types={[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authScope","type":"`string`","description":"Scope for the authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="AuthenticationInput"/>
|
||||
<TypeList types={[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="AuthenticationInput"/>
|
||||
@@ -8,4 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
The details of the authentication response.
|
||||
|
||||
<TypeList types={[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authUser","type":"`any`","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"successRedirectUrl","type":"`string`","description":"Some authentication providers support redirecting to a specified URL on\nsuccess. In those cases, the URL to redirect to is set in this field.\n\nSo, if `success` is true, there's no `location` set, and this field\nis set, you can redirect to this URL.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="AuthenticationResponse"/>
|
||||
<TypeList types={[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"`any`","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"successRedirectUrl","type":"`string`","description":"Some authentication providers support redirecting to a specified URL on\nsuccess. In those cases, the URL to redirect to is set in this field.\n\nSo, if `success` is true, there's no `location` set, and this field\nis set, you can redirect to this URL.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="AuthenticationResponse"/>
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
displayed_sidebar: authReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CreateAuthIdentityDTO
|
||||
|
||||
The auth identity to be created.
|
||||
|
||||
<TypeList types={[{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate\nthe user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateAuthIdentityDTO"/>
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
displayed_sidebar: authReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CreateAuthUserDTO
|
||||
|
||||
The auth user to be created.
|
||||
|
||||
<TypeList types={[{"name":"provider","type":"`string`","description":"The ID of the provider used to authenticate\nthe user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"scope","type":"`string`","description":"The scope of the auth user. For example,\n`admin` or `store`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the third-party app in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateAuthUserDTO"/>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
---
|
||||
displayed_sidebar: authReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# FilterableAuthIdentityProps
|
||||
|
||||
The filters to apply on the retrieved auth identity.
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth identity by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string` \\| `string`[]","description":"Filter the auth identities by the ID of their auth provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthIdentityProps](page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthIdentityProps](page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthIdentityProps](page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableAuthIdentityProps"/>
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
displayed_sidebar: authReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# FilterableAuthUserProps
|
||||
|
||||
The filters to apply on the retrieved auth user.
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`[]","description":"The IDs to filter the auth user by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string` \\| `string`[]","description":"Filter the auth users by the ID of their auth provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableAuthUserProps](page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthUserProps](page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableAuthUserProps](page.mdx) \\| [BaseFilterable](../auth.BaseFilterable/page.mdx)<[FilterableAuthUserProps](page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableAuthUserProps"/>
|
||||
@@ -13,4 +13,4 @@ which provides correct typing of field names in its properties.
|
||||
|
||||
<TypeList types={[{"name":"Entity","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
|
||||
|
||||
<TypeList types={[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
|
||||
<TypeList types={[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
|
||||
@@ -6,4 +6,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# JoinerServiceConfig
|
||||
|
||||
<TypeList types={[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"alias","type":"[JoinerServiceConfigAlias](../auth.JoinerServiceConfigAlias/page.mdx) \\| [JoinerServiceConfigAlias](../auth.JoinerServiceConfigAlias/page.mdx)[]","description":"Property name to use as entrypoint to the service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record<string, string \\| object>`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[JoinerRelationship](../../types/auth.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/auth.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfig"/>
|
||||
<TypeList types={[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"alias","type":"[JoinerServiceConfigAlias](../auth.JoinerServiceConfigAlias/page.mdx) \\| [JoinerServiceConfigAlias](../auth.JoinerServiceConfigAlias/page.mdx)[]","description":"Property name to use as entrypoint to the service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record<string, string \\| object>`","description":"alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[JoinerRelationship](../../types/auth.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/auth.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfig"/>
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
displayed_sidebar: authReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# UpdateAuthIdentityDTO
|
||||
|
||||
The attributes to update in the auth identity.
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdateAuthIdentityDTO"/>
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
displayed_sidebar: authReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# UpdateAuthUserDTO
|
||||
|
||||
The attributes to update in the auth user.
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the auth user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the third-party app in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdateAuthUserDTO"/>
|
||||
@@ -10,4 +10,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerRelationship"/>
|
||||
<TypeList types={[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerRelationship"/>
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
displayed_sidebar: authModelReference
|
||||
slug: /references/auth/models/AuthIdentity
|
||||
sidebar_label: AuthIdentity
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# AuthIdentity - Auth Module Data Models Reference
|
||||
|
||||
This documentation provides a reference to the AuthIdentity . This belongs to the Auth Module.
|
||||
|
||||
<TypeList types={[{"name":"[OptionalProps]","type":"`OptionalFields`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"null","expandable":false,"children":[]}]} sectionTitle="AuthIdentity"/>
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
displayed_sidebar: authModelReference
|
||||
slug: /references/auth/models/AuthUser
|
||||
sidebar_label: AuthUser
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# AuthUser - Auth Module Data Models Reference
|
||||
|
||||
This documentation provides a reference to the AuthUser . This belongs to the Auth Module.
|
||||
|
||||
<TypeList types={[{"name":"[OptionalProps]","type":"`OptionalFields`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"scope","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"provider_metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"null","expandable":false,"children":[]}]} sectionTitle="AuthUser"/>
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
---
|
||||
slug: /references/auth/provider
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# How to Create an Auth Provider Module
|
||||
|
||||
In this document, you’ll learn how to create an auth provider module and the methods you must implement in its main service.
|
||||
|
||||
---
|
||||
|
||||
## 1. Create Module Directory
|
||||
|
||||
Start by creating a new directory for your module. For example, `src/modules/my-auth`.
|
||||
|
||||
---
|
||||
|
||||
## 2. Create the Auth Provider Service
|
||||
|
||||
Create the file `src/modules/my-auth/service.ts` that holds the module's main service. It must extend the `AbstractAuthModuleProvider` class imported from `@medusajs/utils`:
|
||||
|
||||
```ts title="src/modules/my-auth/service.ts"
|
||||
import { AbstractAuthModuleProvider } from "@medusajs/utils"
|
||||
|
||||
class MyAuthProviderService extends AbstractAuthModuleProvider {
|
||||
// TODO implement methods
|
||||
}
|
||||
|
||||
export default MyAuthProviderService
|
||||
```
|
||||
|
||||
### constructor
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"provider","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"displayName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config.provider","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.displayName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new AbstractAuthModuleProvider"/>
|
||||
|
||||
### provider
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="provider"/>
|
||||
|
||||
### displayName
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="displayName"/>
|
||||
|
||||
### authenticate
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../../../auth/interfaces/auth.AuthenticationInput/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"`AuthIdentityProviderService`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authenticate"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"`any`","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"successRedirectUrl","type":"`string`","description":"Some authentication providers support redirecting to a specified URL on\nsuccess. In those cases, the URL to redirect to is set in this field.\n\nSo, if `success` is true, there's no `location` set, and this field\nis set, you can redirect to this URL.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="authenticate"/>
|
||||
|
||||
### validateCallback
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../../../auth/interfaces/auth.AuthenticationInput/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"`AuthIdentityProviderService`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateCallback"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"`any`","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"successRedirectUrl","type":"`string`","description":"Some authentication providers support redirecting to a specified URL on\nsuccess. In those cases, the URL to redirect to is set in this field.\n\nSo, if `success` is true, there's no `location` set, and this field\nis set, you can redirect to this URL.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="validateCallback"/>
|
||||
|
||||
---
|
||||
|
||||
## 3. Create Module Definition File
|
||||
|
||||
Create the file `src/modules/my-auth/index.ts` with the following content:
|
||||
|
||||
```ts title="src/modules/my-auth/index.ts"
|
||||
import MyAuthProviderService from "./service"
|
||||
|
||||
export default {
|
||||
service: MyAuthProviderService,
|
||||
}
|
||||
```
|
||||
|
||||
This exports the module's definition, indicating that the `MyAuthProviderService` is the main service of the module.
|
||||
|
||||
---
|
||||
|
||||
## 4. Use Module
|
||||
|
||||
To use your Auth Provider Module, add it to the `providers` array of the Auth Module:
|
||||
|
||||
```js title="medusa-config.js"
|
||||
const { Modules } = require("@medusajs/modules-sdk")
|
||||
|
||||
// ...
|
||||
|
||||
const modules = {
|
||||
// ...
|
||||
[Modules.AUTH]: {
|
||||
resolve: "@medusajs/auth",
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
resolve: "./dist/modules/my-auth",
|
||||
options: {
|
||||
config: {
|
||||
"my-auth": {
|
||||
// provider options...
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
+2
-4
@@ -6,7 +6,7 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# How to Create a File Provider Module
|
||||
|
||||
In this document, you’ll learn how to create a file provider module and the methods you must implement in it.
|
||||
In this document, you’ll learn how to create a file provider module and the methods you must implement in its main service.
|
||||
|
||||
---
|
||||
|
||||
@@ -18,9 +18,7 @@ Start by creating a new directory for your module. For example, `src/modules/my-
|
||||
|
||||
## 2. Create the File Provider Service
|
||||
|
||||
Create the file `src/modules/my-file/service.ts` that holds the implementation of the file service.
|
||||
|
||||
The File Provider Module's main service must extend the `AbstractFileProviderService` class imported from `@medusajs/utils`:
|
||||
Create the file `src/modules/my-file/service.ts` that holds the implementation of the module's main service. It must extend the `AbstractFileProviderService` class imported from `@medusajs/utils`:
|
||||
|
||||
```ts title="src/modules/my-file/service.ts"
|
||||
import { AbstractFileProviderService } from "@medusajs/utils"
|
||||
|
||||
+214
@@ -0,0 +1,214 @@
|
||||
---
|
||||
slug: /references/fulfillment/provider
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# How to Create a Fulfillment Provider Module
|
||||
|
||||
In this document, you’ll learn how to create a fulfillment provider module and the methods you must implement in its main service.
|
||||
|
||||
---
|
||||
|
||||
## 1. Create Module Directory
|
||||
|
||||
Start by creating a new directory for your module. For example, `src/modules/my-fulfillment`.
|
||||
|
||||
---
|
||||
|
||||
## 2. Create the Fulfillment Provider Service
|
||||
|
||||
Create the file `src/modules/my-fulfillment/service.ts` that holds the module's main service. It must extend the `AbstractFulfillmentProviderService` class imported from `@medusajs/utils`:
|
||||
|
||||
```ts title="src/modules/my-fulfillment/service.ts"
|
||||
import { AbstractFulfillmentProviderService } from "@medusajs/utils"
|
||||
|
||||
class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
|
||||
// TODO implement methods
|
||||
}
|
||||
|
||||
export default MyFulfillmentProviderService
|
||||
```
|
||||
|
||||
### constructor
|
||||
|
||||
### isFulfillmentService
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"obj","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isFulfillmentService"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="isFulfillmentService"/>
|
||||
|
||||
### getIdentifier
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getIdentifier"/>
|
||||
|
||||
### getFulfillmentOptions
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<Record<string, unknown>[]>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"Record<string, unknown>[]","type":"`Record<string, unknown>`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"Record","type":"`Record<string, unknown>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]}]} sectionTitle="getFulfillmentOptions"/>
|
||||
|
||||
### validateFulfillmentData
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"optionData","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentData"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<any>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="validateFulfillmentData"/>
|
||||
|
||||
### validateOption
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateOption"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<boolean>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="validateOption"/>
|
||||
|
||||
### canCalculate
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="canCalculate"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="canCalculate"/>
|
||||
|
||||
### calculatePrice
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"optionData","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculatePrice"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="calculatePrice"/>
|
||||
|
||||
### createFulfillment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<any>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="createFulfillment"/>
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"fulfillment","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<any>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="cancelFulfillment"/>
|
||||
|
||||
### getFulfillmentDocuments
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getFulfillmentDocuments"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<never[]>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"never[]","type":"`never`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"never","type":"`never`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]}]} sectionTitle="getFulfillmentDocuments"/>
|
||||
|
||||
### createReturnFulfillment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"fromData","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createReturnFulfillment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<any>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="createReturnFulfillment"/>
|
||||
|
||||
### getReturnDocuments
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getReturnDocuments"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<never[]>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"never[]","type":"`never`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"never","type":"`never`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]}]} sectionTitle="getReturnDocuments"/>
|
||||
|
||||
### getShipmentDocuments
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShipmentDocuments"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<never[]>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"never[]","type":"`never`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"never","type":"`never`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]}]} sectionTitle="getShipmentDocuments"/>
|
||||
|
||||
### retrieveDocuments
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"fulfillmentData","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"documentType","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveDocuments"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveDocuments"/>
|
||||
|
||||
---
|
||||
|
||||
## 3. Create Module Definition File
|
||||
|
||||
Create the file `src/modules/my-fulfillment/index.ts` with the following content:
|
||||
|
||||
```ts title="src/modules/my-fulfillment/index.ts"
|
||||
import MyFulfillmentProviderService from "./service"
|
||||
|
||||
export default {
|
||||
service: MyFulfillmentProviderService,
|
||||
}
|
||||
```
|
||||
|
||||
This exports the module's definition, indicating that the `MyFulfillmentProviderService` is the main service of the module.
|
||||
|
||||
---
|
||||
|
||||
## 4. Use Module
|
||||
|
||||
To use your Fulfillment Provider Module, add it to the `providers` array of the Fulfillment Module:
|
||||
|
||||
```js title="medusa-config.js"
|
||||
const { Modules } = require("@medusajs/modules-sdk")
|
||||
|
||||
// ...
|
||||
|
||||
const modules = {
|
||||
// ...
|
||||
[Modules.FULFILLMENT]: {
|
||||
resolve: "@medusajs/fulfillment",
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
resolve: "./dist/modules/my-fulfillment",
|
||||
options: {
|
||||
config: {
|
||||
"my-fulfillment": {
|
||||
// provider options...
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# AdminOptions
|
||||
|
||||
Admin dashboard configurations.
|
||||
|
||||
<TypeList types={[{"name":"disable","type":"`boolean`","description":"Whether to disable the admin dashboard. If set to `true`, the admin dashboard is disabled,\nin both development and production environments. The default value is `false`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"path","type":"\\`/${string}\\`","description":"The path to the admin dashboard. The default value is `/app`.\n\nThe value cannot be one of the reserved paths:\n- `/admin`\n- `/store`\n- `/auth`\n- `/`","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"outDir","type":"`string`","description":"The directory where the admin build is output. This is where the build process places the generated files.\nThe default value is `./build`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"backendUrl","type":"`string`","description":"The URL of your Medusa backend. Defaults to an empty string, which means requests will hit the same server that serves the dashboard.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"vite","type":"(`config`: `InlineConfig`) => `InlineConfig`","description":"Configure the Vite configuration for the admin dashboard. This function receives the default Vite configuration\nand returns the modified configuration. The default value is `undefined`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="AdminOptions"/>
|
||||
+80
-200
@@ -8,17 +8,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
In this document, you’ll learn how to create a file service in the Medusa backend and the methods you must implement in it.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
This document assumes you already followed along with the [Prepare Environment documentation](https://docs.medusajs.com/development/backend/prepare-environment) and have a Medusa backend installed.
|
||||
|
||||
---
|
||||
|
||||
The configurations for your Medusa backend are in `medusa-config.js` located in the root of your Medusa project. The configurations include database, modules, and plugin configurations, among other configurations.
|
||||
|
||||
`medusa-config.js` exports an object having the following properties:
|
||||
|
||||
- [projectConfig](page.mdx#projectconfig): (required): An object that holds general configurations related to the Medusa backend, such as database or CORS configurations.
|
||||
- [projectConfig](page.mdx#projectconfig) (required): An object that holds general configurations related to the Medusa backend, such as database or CORS configurations.
|
||||
- [admin](page.mdx#admin): An object that holds admin-related configurations.
|
||||
- [plugins](page.mdx#plugins): An array of plugin configurations that defines what plugins are installed and optionally specifies each of their configurations.
|
||||
- [modules](page.mdx#modules): An object that defines what modules are installed and optionally specifies each of their configurations.
|
||||
- [featureFlags](page.mdx#featureflags): An object that enables or disables features guarded by a feature flag.
|
||||
@@ -28,7 +23,7 @@ For example:
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
projectConfig,
|
||||
plugins,
|
||||
admin,
|
||||
modules,
|
||||
featureFlags,
|
||||
}
|
||||
@@ -49,195 +44,7 @@ setting the environment variables depends on the hosting provider.
|
||||
|
||||
This property holds essential configurations related to the Medusa backend, such as database and CORS configurations.
|
||||
|
||||
### store_cors
|
||||
|
||||
The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.
|
||||
|
||||
`store_cors` is a string used to specify the accepted URLs or patterns for store API Routes. It can either be one accepted origin, or a comma-separated list of accepted origins.
|
||||
|
||||
Every origin in that list must either be:
|
||||
|
||||
1. A URL. For example, `http://localhost:8000`. The URL must not end with a backslash;
|
||||
2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\1([gimsuy]*)$`.
|
||||
|
||||
#### Example
|
||||
|
||||
Some example values of common use cases:
|
||||
|
||||
```bash
|
||||
# Allow different ports locally starting with 800
|
||||
STORE_CORS=/http://localhost:800\d+$/
|
||||
|
||||
# Allow any origin ending with vercel.app. For example, storefront.vercel.app
|
||||
STORE_CORS=/vercel\.app$/
|
||||
|
||||
# Allow all HTTP requests
|
||||
STORE_CORS=/http://.+/
|
||||
```
|
||||
|
||||
Then, set the configuration in `medusa-config.js`:
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
store_cors: process.env.STORE_CORS,
|
||||
// ...
|
||||
},
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
If you’re adding the value directly within `medusa-config.js`, make sure to add an extra escaping `/` for every backslash in the pattern. For example:
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
store_cors: "/vercel\\.app$/",
|
||||
// ...
|
||||
},
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
### admin_cors
|
||||
|
||||
The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.
|
||||
|
||||
`admin_cors` is a string used to specify the accepted URLs or patterns for admin API Routes. It can either be one accepted origin, or a comma-separated list of accepted origins.
|
||||
|
||||
Every origin in that list must either be:
|
||||
|
||||
1. A URL. For example, `http://localhost:7001`. The URL must not end with a backslash;
|
||||
2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\1([gimsuy]*)$`.
|
||||
|
||||
#### Example
|
||||
|
||||
Some example values of common use cases:
|
||||
|
||||
```bash
|
||||
# Allow different ports locally starting with 700
|
||||
ADMIN_CORS=/http://localhost:700\d+$/
|
||||
|
||||
# Allow any origin ending with vercel.app. For example, admin.vercel.app
|
||||
ADMIN_CORS=/vercel\.app$/
|
||||
|
||||
# Allow all HTTP requests
|
||||
ADMIN_CORS=/http://.+/
|
||||
```
|
||||
|
||||
Then, set the configuration in `medusa-config.js`:
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
admin_cors: process.env.ADMIN_CORS,
|
||||
// ...
|
||||
},
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
If you’re adding the value directly within `medusa-config.js`, make sure to add an extra escaping `/` for every backslash in the pattern. For example:
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
admin_cors: "/http:\\/\\/localhost:700\\d+$/",
|
||||
// ...
|
||||
},
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
### authCors
|
||||
|
||||
The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.
|
||||
|
||||
`auth_cors` is a string used to specify the accepted URLs or patterns for API Routes starting with `/auth`. It can either be one accepted origin, or a comma-separated list of accepted origins.
|
||||
|
||||
Every origin in that list must either be:
|
||||
|
||||
1. A URL. For example, `http://localhost:7001`. The URL must not end with a backslash;
|
||||
2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\1([gimsuy]*)$`.
|
||||
|
||||
#### Example
|
||||
|
||||
Some example values of common use cases:
|
||||
|
||||
```bash
|
||||
# Allow different ports locally starting with 700
|
||||
AUTH_CORS=/http://localhost:700\d+$/
|
||||
|
||||
# Allow any origin ending with vercel.app. For example, admin.vercel.app
|
||||
AUTH_CORS=/vercel\.app$/
|
||||
|
||||
# Allow all HTTP requests
|
||||
AUTH_CORS=/http://.+/
|
||||
```
|
||||
|
||||
Then, set the configuration in `medusa-config.js`:
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
authCors: process.env.AUTH_CORS,
|
||||
// ...
|
||||
},
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
If you’re adding the value directly within `medusa-config.js`, make sure to add an extra escaping `/` for every backslash in the pattern. For example:
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
authCors: "/http:\\/\\/localhost:700\\d+$/",
|
||||
// ...
|
||||
},
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
### cookieSecret
|
||||
|
||||
A random string used to create cookie tokens. Although this configuration option is not required, it’s highly recommended to set it for better security.
|
||||
|
||||
In a development environment, if this option is not set, the default secret is `supersecret` However, in production, if this configuration is not set, an error is thrown and
|
||||
the backend crashes.
|
||||
|
||||
#### Example
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
cookieSecret: process.env.COOKIE_SECRET || "supersecret",
|
||||
// ...
|
||||
},
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
### jwtSecret
|
||||
|
||||
A random string used to create authentication tokens. Although this configuration option is not required, it’s highly recommended to set it for better security.
|
||||
|
||||
In a development environment, if this option is not set the default secret is `supersecret` However, in production, if this configuration is not set an error, an
|
||||
error is thrown and the backend crashes.
|
||||
|
||||
#### Example
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
jwtSecret: process.env.JWT_SECRET || "supersecret",
|
||||
// ...
|
||||
},
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
### databaseName
|
||||
### database\_database
|
||||
|
||||
The name of the database to connect to. If specified in `databaseUrl`, then it’s not required to include it.
|
||||
|
||||
@@ -600,10 +407,14 @@ module.exports = {
|
||||
Configure HTTP compression from the application layer. If you have access to the HTTP server, the recommended approach would be to enable it there.
|
||||
However, some platforms don't offer access to the HTTP layer and in those cases, this is a good alternative.
|
||||
|
||||
Its value is an object that has the following properties:
|
||||
|
||||
If you enable HTTP compression and you want to disable it for specific API Routes, you can pass in the request header `"x-no-compression": true`.
|
||||
|
||||
:::note[Deprecated]
|
||||
|
||||
use [http](../medusa_config.ProjectConfigOptions/page.mdx#http)'s `compression` property instead.
|
||||
|
||||
:::
|
||||
|
||||
#### Example
|
||||
|
||||
```js title="medusa-config.js"
|
||||
@@ -707,7 +518,76 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
### http
|
||||
|
||||
Configure the application's http-specific settings
|
||||
|
||||
#### Example
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
http: {
|
||||
cookieSecret: "some-super-secret",
|
||||
compression: { ... },
|
||||
}
|
||||
// ...
|
||||
},
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
#### Properties
|
||||
|
||||
<TypeList types={[{"name":"authCors","type":"`string`","description":"The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.\n\n`cors` is a string used to specify the accepted URLs or patterns for API Routes starting with `/auth`. It can either be one accepted origin, or a comma-separated list of accepted origins.\n\nEvery origin in that list must either be:\n\n1. A URL. For example, `http://localhost:7001`. The URL must not end with a backslash;\n2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\\1([gimsuy]*)$`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"storeCors","type":"`string`","description":"The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.\n\n`store_cors` is a string used to specify the accepted URLs or patterns for store API Routes. It can either be one accepted origin, or a comma-separated list of accepted origins.\n\nEvery origin in that list must either be:\n\n1. A URL. For example, `http://localhost:8000`. The URL must not end with a backslash;\n2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\\1([gimsuy]*)$`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adminCors","type":"`string`","description":"The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.\n\n`admin_cors` is a string used to specify the accepted URLs or patterns for admin API Routes. It can either be one accepted origin, or a comma-separated list of accepted origins.\n\nEvery origin in that list must either be:\n\n1. A URL. For example, `http://localhost:7001`. The URL must not end with a backslash;\n2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\\1([gimsuy]*)$`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authMethodsPerActor","type":"`Record<string, string[]>`","description":"Optionally you can specify the supported authentication providers per actor type (such as user, customer, or any custom actors).\nFor example, you only want to allow SSO logins for `users` to the admin, while you want to allow email/password logins for `customers` to the storefront.\n\n`authMethodsPerActor` is a a map where the actor type (eg. 'user') is the key, and an array of supported auth providers as the value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"jwtSecret","type":"`string`","description":"A random string used to create authentication tokens in the http layer. Although this configuration option is not required, it’s highly recommended to set it for better security.\n\nIn a development environment, if this option is not set the default secret is `supersecret` However, in production, if this configuration is not set an error, an\nerror is thrown and the backend crashes.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"jwtExpiresIn","type":"`string`","description":"The expiration time for the JWT token. If not provided, the default value is `24h`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cookieSecret","type":"`string`","description":"A random string used to create cookie tokens in the http layer. Although this configuration option is not required, it’s highly recommended to set it for better security.\n\nIn a development environment, if this option is not set, the default secret is `supersecret` However, in production, if this configuration is not set, an error is thrown and\nthe backend crashes.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compression","type":"[HttpCompressionOptions](../medusa_config.HttpCompressionOptions/page.mdx)","description":"Configure HTTP compression from the application layer. If you have access to the HTTP server, the recommended approach would be to enable it there.\nHowever, some platforms don't offer access to the HTTP layer and in those cases, this is a good alternative.\n\nIts value is an object that has the following properties:\n\nIf you enable HTTP compression and you want to disable it for specific API Routes, you can pass in the request header `\"x-no-compression\": true`.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"enabled","type":"`boolean`","description":"Whether HLine truncated
|
||||
|
||||
___
|
||||
|
||||
## admin
|
||||
|
||||
Admin dashboard configurations.
|
||||
|
||||
### Example
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
admin: {
|
||||
backendUrl: process.env.MEDUSA_BACKEND_URL || "http://localhost:9000"
|
||||
}
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
### disable
|
||||
|
||||
Whether to disable the admin dashboard. If set to `true`, the admin dashboard is disabled,
|
||||
in both development and production environments. The default value is `false`.
|
||||
|
||||
### path
|
||||
|
||||
The path to the admin dashboard. The default value is `/app`.
|
||||
|
||||
The value cannot be one of the reserved paths:
|
||||
- `/admin`
|
||||
- `/store`
|
||||
- `/auth`
|
||||
- `/`
|
||||
|
||||
### outDir
|
||||
|
||||
The directory where the admin build is output. This is where the build process places the generated files.
|
||||
The default value is `./build`.
|
||||
|
||||
### backendUrl
|
||||
|
||||
The URL of your Medusa backend. Defaults to an empty string, which means requests will hit the same server that serves the dashboard.
|
||||
|
||||
### vite
|
||||
|
||||
Configure the Vite configuration for the admin dashboard. This function receives the default Vite configuration
|
||||
and returns the modified configuration. The default value is `undefined`.
|
||||
|
||||
___
|
||||
|
||||
## plugins
|
||||
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
Essential configurations related to the Medusa backend, such as database and CORS configurations.
|
||||
|
||||
<TypeList types={[{"name":"database_logging","type":"`LoggerOptions`","description":"This configuration specifies what database messages to log. Its value can be one of the following:\n\n- (default) A boolean value that indicates whether any messages should be logged.\n- The string value `all` that indicates all types of messages should be logged.\n- An array of log-level strings to indicate which type of messages to show in the logs. The strings can be `query`, `schema`, `error`, `warn`, `info`, `log`, or `migration`. Refer to [Typeorm’s documentation](https://typeorm.io/logging#logging-options) for more details on what each of these values means.\n\nIf this configuration isn't set, its default value is `false`, meaning no database messages are logged.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store_cors","type":"`string`","description":"The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.\n\n`store_cors` is a string used to specify the accepted URLs or patterns for store API Routes. It can either be one accepted origin, or a comma-separated list of accepted origins.\n\nEvery origin in that list must either be:\n\n1. A URL. For example, `http://localhost:8000`. The URL must not end with a backslash;\n2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\\1([gimsuy]*)$`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"admin_cors","type":"`string`","description":"The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.\n\n`admin_cors` is a string used to specify the accepted URLs or patterns for admin API Routes. It can either be one accepted origin, or a comma-separated list of accepted origins.\n\nEvery origin in that list must either be:\n\n1. A URL. For example, `http://localhost:7001`. The URL must not end with a backslash;\n2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\\1([gimsuy]*)$`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_cors","type":"`string`","description":"The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.\n\n`auth_cors` is a string used to specify the accepted URLs or patterns for API Routes starting with `/auth`. It can either be one accepted origin, or a comma-separated list of accepted origins.\n\nEvery origin in that list must either be:\n\n1. A URL. For example, `http://localhost:7001`. The URL must not end with a backslash;\n2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\\1([gimsuy]*)$`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cookie_secret","type":"`string`","description":"A random string used to create cookie tokens. Although this configuration option is not required, it’s highly recommended to set it for better security.\n\nIn a development environment, if this option is not set, the default secret is `supersecret` However, in production, if this configuration is not set, an error is thrown and\nthe backend crashes.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"jwt_secret","type":"`string`","description":"A random string used to create authentication tokens. Although this configuration option is not required, it’s highly recommended to set it for better security.\n\nIn a development environment, if this option is not set the default secret is `supersecret` However, in production, if this configuration is not set an error, an\nerror is thrown and the backend crashes.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"database_database","type":"`string`","description":"The name of the database to connect to. If specified in `database_url`, then it’s not required to include it.\n\nMake sure to create the PostgreSQL database before using it. You can check how to create a database in\n[PostgreSQL's documentation](https://www.postgresql.org/docs/current/sql-createdatabase.html).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"database_url","type":"`string`","description":"The connection URL of the database. The format of the connection URL for PostgreSQL is:\n\n```bash\npostgres://[user][:password]@[host][:port]/[dbname]\n```\n\nWhere:\n\n- `[user]`: (required) your PostgreSQL uLine truncated
|
||||
<TypeList types={[{"name":"database_logging","type":"`LoggerOptions`","description":"This configuration specifies what database messages to log. Its value can be one of the following:\n\n- (default) A boolean value that indicates whether any messages should be logged.\n- The string value `all` that indicates all types of messages should be logged.\n- An array of log-level strings to indicate which type of messages to show in the logs. The strings can be `query`, `schema`, `error`, `warn`, `info`, `log`, or `migration`. Refer to [Typeorm’s documentation](https://typeorm.io/logging#logging-options) for more details on what each of these values means.\n\nIf this configuration isn't set, its default value is `false`, meaning no database messages are logged.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"http","type":"`object`","description":"Configure the application's http-specific settings","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"authCors","type":"`string`","description":"The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.\n\n`cors` is a string used to specify the accepted URLs or patterns for API Routes starting with `/auth`. It can either be one accepted origin, or a comma-separated list of accepted origins.\n\nEvery origin in that list must either be:\n\n1. A URL. For example, `http://localhost:7001`. The URL must not end with a backslash;\n2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\\1([gimsuy]*)$`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"storeCors","type":"`string`","description":"The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.\n\n`store_cors` is a string used to specify the accepted URLs or patterns for store API Routes. It can either be one accepted origin, or a comma-separated list of accepted origins.\n\nEvery origin in that list must either be:\n\n1. A URL. For example, `http://localhost:8000`. The URL must not end with a backslash;\n2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\\1([gimsuy]*)$`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adminCors","type":"`string`","description":"The Medusa backend’s API Routes are protected by Cross-Origin Resource Sharing (CORS). So, only allowed URLs or URLs matching a specified pattern can send requests to the backend’s API Routes.\n\n`admin_cors` is a string used to specify the accepted URLs or patterns for admin API Routes. It can either be one accepted origin, or a comma-separated list of accepted origins.\n\nEvery origin in that list must either be:\n\n1. A URL. For example, `http://localhost:7001`. The URL must not end with a backslash;\n2. Or a regular expression pattern that can match more than one origin. For example, `.example.com`. The regex pattern that the backend tests for is `^([/~@;%#'])(.*?)\\1([gimsuy]*)$`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authMethodsPerActor","type":"`Record<string, string[]>`","description":"Optionally you can specify the supported authentication providers per actor type (such as user, customer, or any custom actors).\nFor example, you only want to allow SSO logins for `users` to the admin, while you want to allow email/password logins for `customers` to the storefront.\n\n`authMethodsPerActor` is a a map where the actor type (eg. 'user') is the key, and an array of supported auth providers as the value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"jwtSecret","type":"`string`","description":"A random string used to create authentication tokens in the http layer. Although this configuration option is not required, it’s highly recommended to set it for better security.\n\nIn a development environment, if this option is not set the default secret is `supersecret` However, in production, if this configuration is not set an error, an\nerror is thrown and the backend crashes.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"jwtExpiresIn","type":"`string`","description":"The expiration time for the JWT token. If not provided, the default value is `24h`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cookieSecret","type":"`string`","description":"A random string used to create cookie tokens in the http layer. Although this configuration option is not required, it’s highly recommended to set it for better security.\n\Line truncated
|
||||
@@ -4,10 +4,10 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
## Interfaces
|
||||
|
||||
- [AuthUserDTO](../../auth/interfaces/auth.AuthUserDTO/page.mdx)
|
||||
- [CreateAuthUserDTO](../../auth/interfaces/auth.CreateAuthUserDTO/page.mdx)
|
||||
- [UpdateAuthUserDTO](../../auth/interfaces/auth.UpdateAuthUserDTO/page.mdx)
|
||||
- [FilterableAuthUserProps](../../auth/interfaces/auth.FilterableAuthUserProps/page.mdx)
|
||||
- [AuthIdentityDTO](../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)
|
||||
- [CreateAuthIdentityDTO](../../auth/interfaces/auth.CreateAuthIdentityDTO/page.mdx)
|
||||
- [UpdateAuthIdentityDTO](../../auth/interfaces/auth.UpdateAuthIdentityDTO/page.mdx)
|
||||
- [FilterableAuthIdentityProps](../../auth/interfaces/auth.FilterableAuthIdentityProps/page.mdx)
|
||||
- [AuthenticationResponse](../../auth/interfaces/auth.AuthenticationResponse/page.mdx)
|
||||
- [AuthenticationInput](../../auth/interfaces/auth.AuthenticationInput/page.mdx)
|
||||
- [IAuthModuleService](../../auth/interfaces/auth.IAuthModuleService/page.mdx)
|
||||
|
||||
@@ -11,4 +11,4 @@ This documentation provides a reference to the data models in the Auth Module
|
||||
|
||||
## Classes
|
||||
|
||||
- [AuthUser](../../auth_models/classes/auth_models.AuthUser/page.mdx)
|
||||
- [AuthIdentity](../../auth_models/classes/auth_models.AuthIdentity/page.mdx)
|
||||
@@ -0,0 +1,7 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# auth-provider
|
||||
|
||||
## Classes
|
||||
|
||||
- [AbstractAuthModuleProvider](../../auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx)
|
||||
@@ -0,0 +1,7 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# fulfillment-provider
|
||||
|
||||
## Classes
|
||||
|
||||
- [AbstractFulfillmentProviderService](../../fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx)
|
||||
@@ -1105,10 +1105,12 @@ ___
|
||||
|
||||
<TypeList types={[{"name":"RequestHandler","type":"RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ParamsDictionary","type":"`ParamsDictionary`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"ParsedQs","type":"`ParsedQs`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Record","type":"`Record<string, any>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]}]} sectionTitle="wrapHandler"/>
|
||||
|
||||
#### Deprecated
|
||||
:::note[Deprecated]
|
||||
|
||||
use `import { wrapHandler } from "@medusajs/utils"`
|
||||
|
||||
:::
|
||||
|
||||
### canAccessBatchJob
|
||||
|
||||
#### Parameters
|
||||
@@ -1285,10 +1287,12 @@ Middleware that transform the query input for the store endpoints
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="__type"/>
|
||||
|
||||
#### Deprecated
|
||||
:::note[Deprecated]
|
||||
|
||||
use `transformQuery` instead
|
||||
|
||||
:::
|
||||
|
||||
### reserveQuantityForDraftOrder
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -4,6 +4,7 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
## Interfaces
|
||||
|
||||
- [AdminOptions](../../medusa_config/interfaces/medusa_config.AdminOptions/page.mdx)
|
||||
- [HttpCompressionOptions](../../medusa_config/interfaces/medusa_config.HttpCompressionOptions/page.mdx)
|
||||
- [ProjectConfigOptions](../../medusa_config/interfaces/medusa_config.ProjectConfigOptions/page.mdx)
|
||||
- [ConfigModule](../../medusa_config/interfaces/medusa_config.ConfigModule/page.mdx)
|
||||
|
||||
@@ -2,12 +2,14 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# SharedContext
|
||||
|
||||
## Deprecated
|
||||
:::note[Deprecated]
|
||||
|
||||
use `Context` instead
|
||||
|
||||
A context used to share resources, such as transaction manager, between the application and the module.
|
||||
|
||||
:::
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"transactionManager","type":"`EntityManager`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`EntityManager`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="SharedContext"/>
|
||||
Reference in new issue
Block a user