ultra-telegram-framework
    Preparing search index...

    Class PropertiesStorage<T>

    Session storage for Google Apps Script based on PropertiesService. Allows storing state between different requests (doPost).

    ✅ Pros: reliable, no 6-hour limit, well-suited for large data ❌ Cons: slower than CacheService, has a limit of 500 requests/day

    Type Parameters

    • T

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Type Parameters

      • T

      Parameters

      • service: Properties = ...

        Which service to use (ScriptProperties by default)

      • prefix: string = 'session:'

        Prefix for keys in storage (to avoid mixing with other settings)

      Returns PropertiesStorage<T>

    Methods

    • Clear ALL sessions with this prefix

      Returns void

    • Delete session (e.g., if the user finished the dialogue).

      Parameters

      • key: string

      Returns void

    • Get session data by key.

      Parameters

      • key: string

      Returns T | undefined

    • Save session data by key.

      Parameters

      • key: string
      • value: T

      Returns void