@creator.co/module-identity-client - v1.1.11
    Preparing search index...

    Class representing a Storage manager that handles setting, getting, and cleaning cookies.

    Index

    Constructors

    Methods

    • Cleans the specified key or keys from the cookie engine after initializing the engine.

      Parameters

      • key: string | string[]

        The key or keys to be cleaned from the cookie engine.

      Returns Promise<unknown>

      A promise that resolves once the key(s) have been cleaned.

    • Asynchronously retrieves the value associated with the given key from the cookie engine after initializing the engine if it has not been initialized yet.

      Parameters

      • key: string

        The key to look up in the cookie engine.

      Returns Promise<unknown>

      The value associated with the key, or undefined if the key is not found.

    • Asynchronously sets a default value for a given key in the cookie engine.

      Parameters

      • key: string

        The key for which the default value is being set.

      • val: string

        The default value to set for the key.

      Returns Promise<unknown>

      A promise that resolves once the default value is set in the cookie engine.

    • Sets a long-lived value in the cookie engine with the given key and value.

      Parameters

      • key: string

        The key to set in the cookie engine.

      • val: string

        The value to associate with the key.

      Returns Promise<unknown>

      A promise that resolves when the value is successfully set.

    • Asynchronously sets a key-value pair in the cookie engine with a specified time-to-live (TTL).

      Parameters

      • key: string

        The key to set in the cookie engine.

      • val: string

        The value to associate with the key.

      • ttl: number

        The time-to-live (in seconds) for the key-value pair.

      Returns Promise<unknown>

      A promise that resolves when the key-value pair is successfully set in the cookie engine.