docs: add optional field indicators

This commit is contained in:
Bereket Engida
2024-10-07 13:23:53 +03:00
parent 266a46fdab
commit 8e7dbcf14b
5 changed files with 72 additions and 22 deletions

View File

@@ -178,6 +178,12 @@ Table Name: `user`
type: "string",
description: "User's email address for communication and login"
},
{
name: "image",
type: "string",
description: "User's image url",
isOptional: true
},
{
name: "createdAt",
type: "Date",
@@ -217,12 +223,14 @@ Table Name: `session`
{
name: "ipAddress",
type: "string",
description: "The IP address of the device"
description: "The IP address of the device",
isOptional: true
},
{
name: "userAgent",
type: "string",
description: "The user agent information of the device"
description: "The user agent information of the device",
isOptional: true
},
]}
/>
@@ -259,21 +267,25 @@ Table Name: `account`
name: "accessToken",
type: "string",
description: "The access token of the account. Returned by the provider",
isOptional: true,
},
{
name: "refreshToken",
type: "string",
description: "The refresh token of the account. Returned by the provider",
isOptional: true,
},
{
name: "expiresAt",
type: "Date",
description: "The time when the access token expires",
isOptional: true,
},
{
name: "password",
type: "string",
description: "The password of the account. Mainly used for email and password authentication",
isOptional: true,
},
]}
/>

View File

@@ -282,9 +282,9 @@ The plugin requires 3 additional fields in the `user` table.
<DatabaseTable
fields={[
{ name: "twoFactorEnabled", type: "boolean", description: "Whether two factor authentication is enabled for the user." },
{ name: "twoFactorSecret", type: "string", description: "The secret key used to generate TOTP codes." },
{ name: "twoFactorBackupCodes", type: "string", description: "Encrypted backup codes for account recovery." },
{ name: "twoFactorEnabled", type: "boolean", description: "Whether two factor authentication is enabled for the user.", isOptional: true },
{ name: "twoFactorSecret", type: "string", description: "The secret key used to generate TOTP codes.", isOptional: true },
{ name: "twoFactorBackupCodes", type: "string", description: "Encrypted backup codes for account recovery.", isOptional: true },
]}
/>

View File

@@ -106,6 +106,6 @@ The anonymous plugin requires an additional field in the user table:
<DatabaseTable
fields={[
{ name: "isAnonymous", type: "boolean", description: "Indicates whether the user is anonymous." },
{ name: "isAnonymous", type: "boolean", description: "Indicates whether the user is anonymous.", isOptional: true },
]}
/>

View File

@@ -525,12 +525,14 @@ Table Name: `organization`
{
name: "logo",
type: "string",
description: "The logo of the organization"
description: "The logo of the organization",
isOptional: true
},
{
name: "metadata",
type: "string",
description: "Additional metadata for the organization"
description: "Additional metadata for the organization",
isOptional: true
},
{
name: "createdAt",