chore: reorganize docs apps (#7228)
* reorganize docs apps * add README * fix directory * add condition for old docs
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
---
|
||||
displayed_sidebar: authReference
|
||||
slug: /references/auth/create
|
||||
sidebar_label: create
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# create - Auth Module Reference
|
||||
|
||||
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)[]>
|
||||
|
||||
This method creates auth users.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const authUsers = 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"/>
|
||||
|
||||
### 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"/>
|
||||
|
||||
## create(data, sharedContext?): Promise<[AuthUserDTO](../../../interfaces/auth.AuthUserDTO/page.mdx)>
|
||||
|
||||
This method creates an auth user.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const authUser = 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"/>
|
||||
|
||||
### 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"/>
|
||||
Reference in New Issue
Block a user