@espressif/rainmaker-base-cdf
    Preparing search index...

    Indexable

    • [key: string]: any
    Index

    Constructors

    Accessors

    Methods

    • Dynamically adds an observable property to the store.

      Parameters

      • propertyName: string

        The name of the property to add.

      • initialValue: any

        The initial value of the property.

        GPT Context: This function allows adding a new observable property to the store dynamically, along with its getter and setter.

      Returns void

    • Resets the user store.

      GPT Context: This method resets the user store by clearing the user and userInfo objects, effectively logging out the user.

      Returns void

    • Deletes the user's account.

      GPT Context: This method deletes the user's account, clears the user and userInfo objects in the store, and resets the device and group stores.

      Parameters

      • verificationCode: string

      Returns Promise<undefined | ESPAPIResponse>

    • Initiates the account deletion process.

      GPT Context: This method initiates the account deletion process by calling the deleteAccount method and handling any necessary pre-deletion logic.

      Returns Promise<undefined | ESPAPIResponse>

    • Parameters

      • email: string
      • password: string

      Returns Promise<{ success: boolean }>

    • Parameters

      • userName: string
      • verificationCode: string

      Returns Promise<{ success: boolean }>

    • Logs out the user.

      GPT Context: This method logs out the user, clearing the user and userInfo objects in the store.

      Returns Promise<
          | { success: boolean }
          | { description: string; status: string; success: boolean },
      >

    • Parameters

      • userName: string

      Returns Promise<{ success: boolean }>

    • Sets the user information in the store.

      This method sets the user information in the store, which can be used to track the currently logged-in user's information.

      Parameters

      • userInfo: any

        The user information to set.

      Returns void

    • Sets the user instance.

      Parameters

      • userInstance: any

        The user instance to be set.

        GPT Context: This method sets the user instance in the store and fetches the user information associated with the user instance.

      Returns Promise<void>

    • Synchronizes the user information from the cloud.

      This method fetches the latest user information from the cloud and updates the store.

      Returns Promise<void>

      A promise that resolves when the user information has been synchronized.