Powered by AppSignal & Oban Pro

Domain Documentation

livebooks/livebook-ash.livemd

Domain Documentation

Domain Sensocto.Accounts

Class Diagram

classDiagram
    class Token {
        UUID id
        String jti
        String purpose
        Map extra_data
        store_confirmation_changes(String token, Map extra_data, String purpose)
        get_confirmation_changes(String jti)
        read_expired()
        read()
        expired()
        get_token(String token, String jti, String purpose)
        revoked?(String token, String jti)
        revoke_token(String token, Map extra_data)
        store_token(String token, Map extra_data, String purpose)
        expunge_expired()
    }
    class User {
        UUID id
        CiString email
        confirm(String confirm, CiString email)
        read()
        get_by_subject(String subject)
        get_by_email(CiString email)
        sign_in_with_magic_link(String token)
        request_magic_link(CiString email)
        change_password(String current_password, String password, String password_confirmation)
        sign_in_with_password(CiString email, String password)
        sign_in_with_token(String token)
        register_with_password(CiString email, String password, String password_confirmation)
        request_password_reset_token(CiString email)
        reset_password_with_token(String reset_token, String password, String password_confirmation)
    }

ER Diagram

erDiagram
    Token {
        UUID id
        String jti
        String purpose
        Map extra_data
    }
    User {
        UUID id
        CiString email
    }

Resources

Token

Attributes

Name Type Description
created_at UtcDatetimeUsec
id UUID
jti String
subject String
expires_at UtcDatetime
purpose String
extra_data Map
inserted_at UtcDatetimeUsec
updated_at UtcDatetimeUsec

Actions

Name Type Input Description
store_confirmation_changes create <ul><li><b>token</b> <i>String</i> </li><li><b>extra_data</b> <i>Map</i> attribute</li><li><b>purpose</b> <i>String</i> attribute</li></ul>
get_confirmation_changes read <ul><li><b>jti</b> <i>String</i> </li></ul>
read_expired read <ul></ul>
read read <ul></ul>
expired read <ul></ul> Look up all expired tokens.
get_token read <ul><li><b>token</b> <i>String</i> </li><li><b>jti</b> <i>String</i> </li><li><b>purpose</b> <i>String</i> </li></ul> Look up a token by JTI or token, and an optional purpose.
revoked? action <ul><li><b>token</b> <i>String</i> </li><li><b>jti</b> <i>String</i> </li></ul> Returns true if a revocation token is found for the provided token
revoke_token create <ul><li><b>token</b> <i>String</i> </li><li><b>extra_data</b> <i>Map</i> attribute</li></ul> Revoke a token. Creates a revocation token corresponding to the provided token.
store_token create <ul><li><b>token</b> <i>String</i> </li><li><b>extra_data</b> <i>Map</i> attribute</li><li><b>purpose</b> <i>String</i> attribute</li></ul> Stores a token used for the provided purpose.
expunge_expired destroy <ul></ul> Deletes expired tokens.

User

Attributes

Name Type Description
confirmed_at UtcDatetimeUsec
id UUID
email CiString
hashed_password String

Actions

Name Type Input Description
confirm update <ul><li><b>confirm</b> <i>String</i> </li><li><b>email</b> <i>CiString</i> attribute</li></ul>
read read <ul></ul>
get_by_subject read <ul><li><b>subject</b> <i>String</i> </li></ul> Get a user by the subject claim in a JWT
get_by_email read <ul><li><b>email</b> <i>CiString</i> </li></ul> Looks up a user by their email
sign_in_with_magic_link create <ul><li><b>token</b> <i>String</i> The token from the magic link that was sent to the user</li></ul> Sign in or register a user with magic link.
request_magic_link action <ul><li><b>email</b> <i>CiString</i> </li></ul>
change_password update <ul><li><b>current_password</b> <i>String</i> </li><li><b>password</b> <i>String</i> </li><li><b>password_confirmation</b> <i>String</i> </li></ul>
sign_in_with_password read <ul><li><b>email</b> <i>CiString</i> The email to use for retrieving the user.</li><li><b>password</b> <i>String</i> The password to check for the matching user.</li></ul> Attempt to sign in using a email and password.
sign_in_with_token read <ul><li><b>token</b> <i>String</i> The short-lived sign in token.</li></ul> Attempt to sign in using a short-lived sign in token.
register_with_password create <ul><li><b>email</b> <i>CiString</i> </li><li><b>password</b> <i>String</i> The proposed password for the user, in plain text.</li><li><b>password_confirmation</b> <i>String</i> The proposed password for the user (again), in plain text.</li></ul> Register a new user with a email and password.
request_password_reset_token action <ul><li><b>email</b> <i>CiString</i> </li></ul> Send password reset instructions to a user if they exist.
reset_password_with_token update <ul><li><b>reset_token</b> <i>String</i> </li><li><b>password</b> <i>String</i> The proposed password for the user, in plain text.</li><li><b>password_confirmation</b> <i>String</i> The proposed password for the user (again), in plain text.</li></ul>

Domain Sensocto.Sensors

Class Diagram

classDiagram
    class Sensor {
        UUID id
        String name
        UUID sensor_type_id
        String mac_address
        Integer sampling_rate
        Map configuration
    }
    class SensorAttribute {
        UUID id
    }
    class SensorType {

    }
    class Connector {
        UUID id
    }
    class ConnectorSensorType {

    }
    class RoomSensorType {

    }
    class Room {
        UUID id
    }
    class SensorConnection {

    }

    Connector -- ConnectorSensorType
    Connector -- Sensor
    Connector -- SensorConnection
    ConnectorSensorType -- SensorType
    Room -- RoomSensorType
    Room -- SensorConnection
    RoomSensorType -- SensorType
    Sensor -- SensorAttribute
    Sensor -- SensorConnection
    Sensor -- SensorType

ER Diagram

erDiagram
    Sensor {
        UUID id
        String name
        UUID sensor_type_id
        String mac_address
        Integer sampling_rate
        Map configuration
    }
    SensorAttribute {
        UUID id
    }
    SensorType {

    }
    Connector {
        UUID id
    }
    ConnectorSensorType {

    }
    RoomSensorType {

    }
    Room {
        UUID id
    }
    SensorConnection {

    }

    Connector ||--|| ConnectorSensorType : ""
    Connector ||--|| Sensor : ""
    Connector ||--|| SensorConnection : ""
    ConnectorSensorType ||--|| SensorType : ""
    Room ||--|| RoomSensorType : ""
    Room ||--|| SensorConnection : ""
    RoomSensorType ||--|| SensorType : ""
    Sensor ||--|| SensorAttribute : ""
    Sensor ||--|| SensorConnection : ""
    Sensor ||--|| SensorType : ""

Resources

Sensor

Attributes

Name Type Description
id UUID
name String
sensor_type_id UUID
mac_address String
sampling_rate Integer
configuration Map
connector_id UUID
sensor_type_rel_id UUID

Actions

Name Type Input Description

SensorAttribute

Attributes

Name Type Description
id UUID
sensor_id UUID
attribute_id Atom
values Map

Actions

Name Type Input Description

SensorType

Attributes

Name Type Description
id UUID
name Atom
allowed_attributes Atom[]

Actions

Name Type Input Description

Connector

Attributes

Name Type Description
id UUID
name String
connector_type Atom
configuration Map

Actions

Name Type Input Description

ConnectorSensorType

Attributes

Name Type Description
id UUID
connector_id UUID
sensor_type_id UUID

Actions

Name Type Input Description

RoomSensorType

Attributes

Name Type Description
id UUID
room_id UUID
sensor_type_id UUID

Actions

Name Type Input Description

Room

Attributes

Name Type Description
id UUID
name String
description String
configuration Map

Actions

Name Type Input Description

SensorConnection

Attributes

Name Type Description
id UUID
sensor_id UUID
connector_id UUID
room_id UUID
connected_at UtcDatetime
disconnected_at UtcDatetime

Actions

Name Type Input Description