TagoIO SDK for JavaScript and TypeScript
    Preparing search index...

    Class RunUser

    End-user runtime context for TagoIO Run applications

    This class provides functionality for managing end-users in TagoIO Run applications, including user authentication, profile management, and user-specific data operations. Used primarily in customer-facing applications built with TagoIO Run.

    import { RunUser } from "@tago-io/sdk";

    const runUser = new RunUser({ token: "your-run-token" });

    // User login
    const loginResult = await runUser.login({
    email: "user@example.com",
    password: "userpassword"
    });

    // Get user info
    const userInfo = await runUser.info();
    // Create a new user
    const newUser = await runUser.create({
    email: "newuser@example.com",
    password: "securepassword",
    name: "New User"
    });

    // Access user-specific database
    const sdb = runUser.sdb;
    await sdb.set("user_preference", "dark_mode");
    Index

    Constructors

    Properties

    SDB: SDB = ...

    Methods

    • Confirm OTP enabling process for a given OTP Type

      Parameters

      • tagoIORunURL: string
      • pinCode: string
      • typeOTP: OTPType

        authenticator, sms or email

      Returns Promise<string>

    • Delete Run user info

      Parameters

      • tagoIORunURL: string

        TagoIO Run url without http

      Returns Promise<string>

    • Edit Run user info

      Parameters

      • tagoIORunURL: string

        TagoIO Run url without http

      • userChangesObj: Partial<RunUserInfo>

        Data to change in user

      Returns Promise<string>

    • Enable OTP for a given OTP Type. You will be requested to confirm the operation with a pin code.

      Parameters

      Returns Promise<string>

    • Trigger notification button

      Parameters

      • tagoIORunURL: string

        TagoIO Run url without http

      • notificationID: string

        TagoIO Run notification id

      • buttonID: string

        Notification button id

      Returns Promise<any>

    • Delete notification

      Parameters

      • tagoIORunURL: string

        TagoIO Run url without http

      • notificationID: string

        TagoIO Run notification id

      Returns Promise<string>

    • Mark all notifications as read

      Parameters

      • tagoIORunURL: string

        TagoIO Run url without http

      Returns Promise<string>

    • Mark notification as read

      Parameters

      • tagoIORunURL: string

        TagoIO Run url without http

      • notificationIDs: string | string[]

        array of notification ids or a single id

      Returns Promise<string>

    • Mark notification as unread

      Parameters

      • tagoIORunURL: string

        TagoIO Run url without http

      • notificationIDs: string | string[]

        array of notification ids or a single id

      Returns Promise<string>

    • Change password using token of the password recover.

      Parameters

      • tagoIORunURL: string

        TagoIO Run url without http

      • password: string

        New password

      Returns Promise<string>

    • Confirm User on TagoIO Run (Anonymous)

      Parameters

      • tagoIORunURL: string

        TagoIO Run url without http

      • token: string

        TagoIO Run user token

      • Optionalregion: RegionsObj | Regions

        TagoIO Region Server [default usa-1]

      Returns Promise<string>

    • Sends a password recover e-mail

      Parameters

      • tagoIORunURL: string

        TagoIO Run url without http

      • email: string

        Run user email to recover the password

      • Optionalregion: RegionsObj | Regions

        TagoIO Region Server [default usa-1]

      Returns Promise<string>