Instance properties
store
Exposes namespaced Key-Value Stores you can access in and outside of your Jobs.
Only use this for small values - there’s a 256KB size limit per item.
Namespaces
store.env
to access and store data across your Environment
Methods
delete()
Deletes an item from the Key-Value Store.
key
string
requiredThe key
of the item to delete.
Returns
A Promise
that resolves when the item has been deleted.
await client.store.env.delete("key")
has()
Checks if an item exists in the Key-Value Store.
key
string
requiredThe key
of the item to check existence of.
Returns
A Promise
that resolves to a boolean
value indicating existence.
const exists = await client.store.env.has("key")
get()
Retrieves an item from the Key-Value Store.
key
string
requiredThe key
of the item to retrieve.
Returns
A Promise
that resolves to the stored value or undefined
if missing.
const val = await client.store.env.get("key")
set()
Stores an item in the Key-Value Store.
key
string
requiredThe key
of the item to store.
value
any
requiredThe serializable value
to store.
const val = await client.store.env.set("key", "value")
Returns
A Promise
that resolves to the stored value.
Was this page helpful?