Initial commit

Co-Authored-By: kotte <14197736+mrtamagotchi@users.noreply.github.com>
Co-Authored-By: mikaeltellhed <2311083+mikaeltellhed@users.noreply.github.com>
Co-Authored-By: Tore Knudsen <18231882+torekndsn@users.noreply.github.com>
Co-Authored-By: Michael Cartner <32543275+michaelcartner@users.noreply.github.com>
This commit is contained in:
Eric Tuvesson
2023-09-05 12:08:55 +02:00
commit 53f0d6320e
2704 changed files with 76354 additions and 0 deletions

49
nodes/data/user/log-in.md Normal file
View File

@@ -0,0 +1,49 @@
---
hide_title: true
hide_table_of_contents: true
title: Log In
---
<##head##>
# Log In
This node is used to log in users that exist in the Noodl Cloud Service. You need to provide a <span className="ndl-data">Username</span> and a <span className="ndl-data">Password</span> and then send a signal to the <span className="ndl-signal">Do</span> action.
<div className="ndl-image-with-background l">
![](/nodes/data/user/log-in/login_visual.png)
</div>
Once a user is logged in, their data can be accessed through the <span className="ndl-data">User</span> node.
<div className="ndl-image-with-background l">
![](/nodes/data/user/log-in/login_node.png)
</div>
<##head##>
## Inputs
| Data | Description |
| ------------------------------------------ | --------------------------------------------------------------------------------- |
| <span className="ndl-data">Username</span> | <##input:username##>The username of the user that should be logged in.<##input##> |
| <span className="ndl-data">Password</span> | <##input:password##>The password of the user that should be logged in.<##input##> |
| Signal | Description |
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-signal">Do</span> | <##input:do##>Send a signal to this action to log in the user. You need to make sure the **Username** and **Password** is connected, these will be sent to the backend for authentication.<##input##> |
## Outputs
| Signal | Description |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-signal">Success</span> | <##output:success##>This event will be triggered if the log in was succesful.<##output##> |
| <span className="ndl-signal">Failure</span> | <##output:failure##>This event will be triggered if something went wrong while trying to log in the user. The error message can be found in the **Error** output.<##output##> |
| Data | Description |
| --------------------------------------- | ---------------------------------------------------------------------------------------------- |
| <span className="ndl-data">Error</span> | <##output:error##>This output will contain the error message if the log in failed.<##output##> |

View File

@@ -0,0 +1,36 @@
---
hide_title: true
hide_table_of_contents: true
title: Log Out
---
<##head##>
# Log Out
This node is used to log out a user from the current session. That means that the <span className="ndl-data">User</span> node will no longer be able to access user data and that it will trigger the <span className="ndl-signal">Logged Out</span> event as well as the <span className="ndl-data">Authenticated</span> output will be false.
<div className="ndl-image-with-background l">
![](/nodes/data/user/log-out/logout.png)
</div>
<##head##>
## Inputs
| Signal | Description |
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-signal">Do</span> | <##input:do##>Send a signal to this action to logout the user. The user session will be removed from the browser.<##input##> |
## Outputs
| Signal | Description |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-signal">Success</span> | <##output:success##>This event will be triggered if the logout was succesful.<##output##> |
| <span className="ndl-signal">Failure</span> | <##output:failure##>This event will be triggered if something went wrong while trying to logout the user. The error message can be found in the **Error** output.<##output##> |
| Data | Description |
| --------------------------------------- | ----------------------------------------------------------------------------------------------- |
| <span className="ndl-data">Error</span> | <##output:error##>This output will contain the error message if the log out failed.<##output##> |

View File

@@ -0,0 +1,42 @@
---
hide_title: true
hide_table_of_contents: true
title: Set User Properties
---
<##head##>
# Set User Properties
This node is used to set properties on the currently logged in user.
<div className="ndl-image-with-background l">
![](/nodes/data/user/set-user-properties/set-user-properties-nodes.png)
</div>
A user needs to be logged in via either the <span className="ndl-node">Sign Up</span> node or the <span className="ndl-node">Log In</span> node. If you want to read user properties of the currently logged in user you can use the <span className="ndl-node">User</span> node.
<##head##>
## Inputs
| Data | Description |
| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-data">Email</span> | <##input:email##>This input is used to set the **Email** property.<##input##> |
| <span className="ndl-data">Your custom properties</span> | <##input:prop-\*##>A property of the **User** class. You can add additional properties to the **User** class in the Noodl Cloud Services dashboard. <##input##> These will show up as inputs on the **Set User Properties** node. |
| Signal | Description |
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-signal">Do</span> | <##input:do##>Send a signal to this input to store the properties in the user record in the Noodl Cloud Services. Once completed the **Success** or **Failure** action will be triggered.<##input##> |
## Outputs
| Signal | Description |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-signal">Success</span> | <##output:success##>This event will be triggered if the properties was succesfully stored.<##output##> |
| <span className="ndl-signal">Failure</span> | <##output:failure##>This event will be triggered if something went wrong while trying to store the properties on the **User** record in the Noodl Cloud Services. The error message can be found in the **Error** output.<##output##> |
| Data | Description |
| --------------------------------------- | ---------------------------------------------------------------------------------------------- |
| <span className="ndl-data">Error</span> | <##output:error##>This output will contain the error message if the action failed.<##output##> |

View File

@@ -0,0 +1,51 @@
---
hide_title: true
hide_table_of_contents: true
title: Sign Up
---
<##head##>
# Sign Up
This node is used to sign up new users in the Noodl Cloud Service.
<div className="ndl-image-with-background l">
![](/nodes/data/user/sign-up/sign-up_visual.png)
</div>
The <span className="ndl-node">Sign Up</span> node is the easiest way to handle users in a Noodl web app. Once a user is created with this node, they can log in through the <span className="ndl-node">Log In</span> node and you can access user information via the <span className="ndl-node">User</span> node.
<div className="ndl-image-with-background l">
![](/nodes/data/user/sign-up/sign-up_node.png)
</div>
<##head##>
## Inputs
| Data | Description |
| -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-data">Username</span> | <##input:username##>This is the username of the new user that is going to sign up. It is required that this input has a value and it must be unique, or the sign up will fail.<##input##> |
| <span className="ndl-data">Password</span> | <##input:password##>This input should contain the password for the new user.<##input##> |
| <span className="ndl-data">Email</span> | <##input:email##>Optionally the new user can be given assigned an email.<##input##> |
| <span className="ndl-data">Your custom properties</span> | <##input:prop-\*##>A property of the **User** class. You can add additional properties to the **User** class in the Noodl Cloud Services dashboard. <##input##> These will show up as inputs on the **Sign Up** node to optionally bhe given a value during sign up. |
| Signal | Description |
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-signal">Do</span> | <##input:do##>Send a signal to this action to trigger the sign up. Once completed the **Success** or **Failure** event will be triggered.<##input##> |
## Outputs
| Signal | Description |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-signal">Success</span> | <##output:success##>This action will be triggered if the sign up was succesful. The user is now logged in and information about the user can be accessed via the **User** node.<##output##> |
| <span className="ndl-signal">Failure</span> | <##output:failure##>This action will be triggered if something went wrong while trying to sign up the user. The error message can be found in the **Error** output.<##output##> |
| Data | Description |
| --------------------------------------- | ----------------------------------------------------------------------------------------------- |
| <span className="ndl-data">Error</span> | <##output:error##>This output will contain the error message if the sign up failed.<##output##> |

View File

@@ -0,0 +1,54 @@
---
hide_title: true
hide_table_of_contents: true
title: User
---
<##head##>
# User
This node provides information about the current user session, if the web app has a logged in user.
<div className="ndl-image-with-background l">
![](/nodes/data/user/user/user_node.png)
</div>
The <span className="ndl-node">User</span> node only works if the user is created in the projects Noodl Cloud Service, and is logged in via the <span className="ndl-node">Log In</span> node.
<div className="ndl-image-with-background l">
![](/nodes/data/user/log-in/login_node.png)
</div>
<##head##>
## Inputs
| Signal | Description |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-signal">Fetch</span> | <##input:fetch##>Send a signal to this input to fetch the user properties for the current logged in user from the Noodl Cloud Services. There must be a valid user session for this to work.<##input##> |
## Outputs
| Data | Description |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-data">Id</span> | <##output:id##>The **Id** of the User record for the current logged in user.<##output##> |
| <span className="ndl-data">Username</span> | <##output:username##>The **Username** of the current logged in user.<##output##> |
| <span className="ndl-data">Email</span> | <##output:email##>The **Email** of the current logged in user, if the user has an email stored.<##output##> |
| <span className="ndl-data">Authenticated</span> | <##output:authenticated##>This output will be true if a valid user session exists in the browser, i.e. there is a logged in user.<##output##> |
| <span className="ndl-data">Error</span> | <##output:error##>If a **Fetch** action failed to retrieve the user information from the Noodl Cloud Services this output will contain the error message.<##output##> |
| <span className="ndl-data">Your custom properties</span> | <##output:prop-\*##>The value of extra properties of the **User** class specified in the Noodl Cloud Services.<##output##> The node will contain the latest value of all user properties. |
| Signal | Description |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="ndl-signal">Fetched</span> | <##output:fetched##>This signal is triggered after a **Fetch** has been successfully performed. That is the **Fetch** action is triggered by a signal and the user data is return from the Noodl Cloud Services.<##output##> |
| <span className="ndl-signal">Changed</span> | <##output:changed##>This signal is triggered when the User is changed locally by a **Set User Properties** node or a **Fetch** action of a **User** node.<##output##> |
| <span className="ndl-signal">Failure</span> | <##output:failure##>This signal is triggered when a **Fetch** action failed to retrieve the latest user data from the Noodl Cloud Services. This could be due to an invalid session.<##output##> |
| <span className="ndl-signal">Logged In</span> | <##output:logged in##>This signal is triggered when a user has been successfully logged in.<##output##> |
| <span className="ndl-signal">Logged Out</span> | <##output:logged out##>This signal is triggered when a user has been successfully logged out.<##output##> |
| <span className="ndl-signal">Session Lost</span> | <##output:session lost##>This signal is triggered when the current user session becomes invalid, e.g. if it has timed out.<##output##> |
| <span className="ndl-signal">Changed events</span> | <##output:changed-\*##>This signal will be triggered when the property is changed using the **Set User Property** node or when the latest user data is retrieved from the Noodl Cloud Services with the **Fetch** action.<##output##> |