Skip to main content

deleteValue

client.kvStore.deleteValue(instanceId: string, namespace: string, key: string): Promise<unknown>

Deletes a single key-value pair from the store.

Removes the specified key and its value from the namespace. Other keys in the same namespace are not affected.

Parameters

ParameterTypeRequiredDescription
instanceIdstringYesThe unique identifier of the KV store instance
namespacestringYesThe namespace containing the key
keystringYesThe key to delete

Returns

Promise<unknown> — A promise that resolves when the key-value pair has been deleted

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.kvStore.deleteValue('instanceId', 'namespace', 'key');
console.log(result);