Members
(constant) ENCRYPTION_KEY
How this encryption key was generated 👇
.How this encryption key was generated 👇
- Source:
Example
import crypto from "crypto";
crypto.randomBytes(32).toString('hex');
Methods
Editor()
The editor which is used to create the annotation.
The editor which is used to create the annotation. Supports formatting.
- Source:
MainNavigation()
Navigation items are organized by usage order (data from G.A.)
.Navigation items are organized by usage order (data from G.A.)
- Source:
addMissingAICommentData()
- Source:
addMissingWordFreqData()
- Source:
generateUrlLoc(pages)
Generates an XML URL loc
.Generates an XML URL loc
Parameters:
Name | Type | Description |
---|---|---|
pages |
Array.<string> | The set of filenames under the pages folder. |
- Source:
getAuthProps()
Must be used on every authenticated page
.Must be used on every authenticated page
- Source:
Example
export default function Page(props) {
const { serverSession } = props;
if (serverSession?.user) {
return <Authenticated serverSession={serverSession} />;
}
return <NotAuthenticated/>;
}
export async function getServerSideProps(context) {
return getAuthProps(context);
}
getCommandOptionValue()
Get the value from the option passed into the command.
Get the value from the option passed into the command.
getCommentById(commentId)
Gets a comment on a publication by its id
.Gets a comment on a publication by its id
Parameters:
Name | Type | Description |
---|---|---|
commentId |
string | The comment id |
- Source:
getDreamById(dreamId)
Get a dream by its id and optionally filter the results
.Get a dream by its id and optionally filter the results
Parameters:
Name | Type | Description |
---|---|---|
dreamId |
string | The dream id |
- Source:
getInbox(userEmail)
Gets the inbox data of a user
.Gets the inbox data of a user
Parameters:
Name | Type | Description |
---|---|---|
userEmail |
string | The user email |
- Source:
getInboxCount(userEmail)
Gets the count of unread messages in the inbox
.Gets the count of unread messages in the inbox
Parameters:
Name | Type | Description |
---|---|---|
userEmail |
string | The user email |
- Source:
getLatestPublicDreams()
- Source:
getShortcutString()
Get a normalized shortcut as a string.
Get a normalized shortcut as a string.
getStar(userEmail, postId)
Gets a star from a specific publication by its id
.Gets a star from a specific publication by its id
Parameters:
Name | Type | Description |
---|---|---|
userEmail |
string | The user email |
postId |
string | The publication id |
- Source:
getUiShortcutString()
Get the string value from the available UI Shortcut.
Get the string value from the available UI Shortcut.
getUserByEmail()
- Source:
getUserById()
- Source:
hasAiCommentedOnDream(postId) → {Promise.<boolean>}
Checks if the AI has commented on a dream
.Checks if the AI has commented on a dream
Parameters:
Name | Type | Description |
---|---|---|
postId |
string | The post id |
- Source:
Returns:
- Type
- Promise.<boolean>
hasCommentedOnDream(userName, postId) → {Promise.<boolean>}
Checks whether a user has commented on a post or not
.Checks whether a user has commented on a post or not
Parameters:
Name | Type | Description |
---|---|---|
userName |
string | The user name |
postId |
string | The post id |
- Source:
Returns:
- Type
- Promise.<boolean>
hitChiron()
Hit Chiron with data for AI training.
Hit Chiron with data for AI training. Starts a Human in the Loop workflow.
- Source:
isStringArray()
Checks whether the first element in an array is a string and assumes the whole array is a string array.
Checks whether the first element in an array is a string and assumes the whole array is a string array.
module:pages()
The home page and landing page.
The home page and landing page. This page is only accessible for logged out users.
- Source:
module:pages/api/auth/error()
This page is shown when the user encounters an error while signing up or signing in.
This page is shown when the user encounters an error while signing up or signing in.
- Source:
module:pages/api/auth/signin(props)
Sign in page.
Sign in page. This page shows the user a sign in form. The user can sign in with their email or with a third-party provider. The user can also sign up seamlessly on this page.
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | The props this component gets from getServerSideProps |
- Source:
module:pages/dreams(props)
The home page for logged in users.
The home page for logged in users. This page shows a feed with the latest public dreams.
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | The props this component gets from getServerSideProps |
- Source:
module:pages/dreams/:dreamId(props)
Dream page.
Dream page. This page shows a user's dream.
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | The props this component gets from getServerSideProps |
- Source:
module:pages/publish/:postId(props)
The page for editing a dream.
The page for editing a dream. This page is only accessible for logged in users. This page is used for creating dreams. Once the dream is synced to the cloud, it redirects the user to another page that looks exactly the same as this, which is used for editing dreams.
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | The props this component gets from getServerSideProps |
- Source:
text()
Email Text body (fallback for email clients that don't render HTML, e.g.
Email Text body (fallback for email clients that don't render HTML, e.g. feature phones)
- Source:
updateUser(data) → {Promise.<boolean>}
Updates the user's data.
Updates the user's data.
Parameters:
Name | Type | Description |
---|---|---|
data |
object |
- Source:
Returns:
- Type
- Promise.<boolean>