Shallow-merge contact onto the stored record; same undefined = unset rule as upsertChat.
Delivery cursor for long-poll/webhook transports (Telegram update_id).
Compare-and-set (see IStore.setCheckpointIf): one synchronous step, so concurrent callers see one winner.
Conditional delete: true when the row is absent, or its revision (0 without one)
matched expectedRevision and it was deleted; false when a different revision is
stored (the row is left untouched). Same atomicity rule as setCheckpointIf.
Read one entry. MUST return undefined when the entry is missing OR its
expiresAt is <= Date.now() (lazy expiry — expired rows may still exist
physically until purged).
Upsert one entry as a SINGLE atomic write that replaces both value and
expiresAt (no read-modify-write inside the store). An entry whose
expiresAt is already in the past may be dropped instead of written.
Delete one key (namespace + key), one whole namespace (key omitted)
or every namespace of the user (namespace omitted; key is then ignored).
Deleting missing data is a no-op.
Optionalnamespace: stringOptionalkey: stringLive (non-expired) entries of a user — all namespaces, or just namespace. Order unspecified.
Optionalnamespace: stringPhysically remove entries whose expiresAt <= now (default Date.now())
across the whole store; resolves with how many were removed. Stores with
native expiry (Redis) resolve 0.
Shallow-merge
chatonto the stored record. An own field set toundefinedUNSETS that field, so a partial upsert must omit what it does not know (the Bot does).