Skip to main content

Storage

Description

Storage allows you to store and retrieve key-value data associated with your account.

Methods

create

Creates a new storage record with the specified key and value.

Props

NameTypeRequiredDescription
keystringYesThe unique key to identify the record
valueanyYesThe value to be stored with the given key

Returns

Promise<any> - The created storage record

Example

const storage = await client.storage.create({ key: 'myKey', value: 'myValue' });

delete

Deletes a storage record by its key.

Props

NameTypeRequiredDescription
keystringYesThe key of the record to delete

Returns

Promise<void>

Example

await client.storage.delete({ key: 'myKey' });

get

Retrieves a storage record by its key.

Props

NameTypeRequiredDescription
keystringYesThe key of the record to retrieve

Returns

Promise<any> - The value stored under the specified key

Example

const value = await client.storage.get({ key: 'myKey' });

update

Updates an existing storage record with a new value.

Props

NameTypeRequiredDescription
keystringYesThe key of the record to update
valueanyYesThe new value to store with the given key

Returns

Promise<any> - The updated storage record

Example

const updatedStorage = await client.storage.update({ key: 'myKey', value: 'myUpdatedValue' });