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

    Class Run

    Index

    Constructors

    Methods

    • Tests the email configuration by sending a test message.

      Parameters

      • data: { body: string; subject: string }

      Returns Promise<string>

      const resources = new Resources({ token: "YOUR-PROFILE-TOKEN" });
      const result = await resources.run.emailTest({ subject: "Test Email", body: "This is a test message" });
      console.log(result); // E-mail sent to example@email.com
    • Retrieves a paginated list of Run users with customizable fields and filtering options.

      Type Parameters

      Parameters

      • query: T

      Returns Promise<
          UserListItem<
              T["fields"] extends (keyof UserInfo)[]
                  ? any[any] extends readonly (string | number | symbol)[]
                      ? any[any][number]
                      : never
                  : "id" | "name",
          >[],
      >

      If receive an error "Authorization Denied", or return empty list check policy Run User / Access in Access Management.

      const result = await Resources.run.listUsers({
      page: 1,
      fields: ["id", "name", "email"],
      amount: 20
      });
      console.log(result); // [ { id: 'user-id-123', name: 'John Doe', email: 'example@email.com' } ]
    • Generates a login token to authenticate as a specific Run user.

      Parameters

      Returns Promise<LoginResponseRun>

      If receive an error "Authorization Denied", check policy Run User / Login as user in Access Management.

      const result = await Resources.run.loginAsUser("user-id-123");
      console.log(result.token); // "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."
    • Deletes a notification from the Run environment.

      Parameters

      • notificationID: string

      Returns Promise<string>

      If receive an error "Authorization Denied", check policy Run User / Delete notification in Access Management.

      const result = await Resources.run.notificationDelete("notification-id-123");
      console.log(result); // Successfully Removed
    • Updates an existing notification in the Run environment.

      Parameters

      Returns Promise<string>

      If receive an error "Authorization Denied", check policy Run User / Edit notification in Access Management.

      const result = await Resources.run.notificationEdit("notification-id-123", { title: "Updated Title" });
      console.log(result); // TagoIO Notification User Successfully Updated
    • Creates a new user in the Run environment. With generate_password or send_email and no active, the user is created active; active: false together with send_email is rejected.

      Parameters

      Returns Promise<UserCreateResponse>

      If receive an error "Authorization Denied", check policy Run User / Create in Access Management.

      const result = await Resources.run.userCreate({
      name: "John Doe",
      email: "john@example.com",
      timezone: "America/New_York",
      generate_password: true,
      send_email: true,
      });
      console.log(result); // { user: 'user-id-123' }
    • Permanently deletes a user from the Run environment.

      Parameters

      • userID: string

      Returns Promise<string>

      If receive an error "Authorization Denied", check policy Run User / Delete in Access Management.

      const result = await Resources.run.userDelete("user-id-123");
      console.log(result); // Successfully Removed
    • Updates information for an existing Run user. Sending password sets a new password for the user.

      Parameters

      Returns Promise<string>

      If receive an error "Authorization Denied", check policy Run User / Edit in Access Management.

      const result = await Resources.run.userEdit("user-id-123", { name: "Updated Name", logout_sessions: true });
      console.log(result); // TagoIO Run User Successfully Updated
    • Retrieves detailed information about a specific Run user.

      Parameters

      • userID: string

      Returns Promise<UserInfo>

      If receive an error "Authorization Denied", check policy Run User / Access in Access Management.

      const result = await Resources.run.userInfo("user-id-123");
      console.log(result); // { id: 'user-id-123', name: 'John Doe', email: 'example@email.com', ... }
    • Resends the set-password invite link to a Run user. Allowed only while the invite is pending (the user never signed in and force_password_change is true), at most once per hour per user. Resending to an inactive user is rejected.

      Parameters

      • userID: string
      • Optionaldata: { invite_template?: string }

      Returns Promise<string>

      If receive an error "Authorization Denied", check policy Run User / Edit in Access Management.

      const result = await Resources.run.userResendInvite("user-id-123", { invite_template: "invite" });
      console.log(result); // Invite sent