- Keys must be at least 1 character long
- Keys cannot contain
:(colon) or#(hash) characters - Data stored must be JSON-serializable
PersistentStore
get
get
ParametersReturnsA Promise that resolves to the value associated with the key, or throws an error if the key is invalid or the operation fails.Throws
The key to retrieve the value for. Must be at least 1 character long and cannot contain
: or # characters.ZodError: If the key is invalid (empty or contains forbidden characters)Error: If the operation fails
set
set
ParametersReturnsA Promise that resolves when the value is successfully stored.Throws
The key to set the value for. Must be at least 1 character long and cannot contain
: or # characters.The value to store. Can be any JSON-serializable type (object, array, string, number, boolean, null).
ZodError: If the key is invalid (empty or contains forbidden characters)Error: If the operation fails