Skip to main content

updateProjectState

plugin.cbstate.updateProjectState(key: string, value: any): Promise<UpdateProjectStateResponse>

Updates the project state on the server via WebSocket.

Parameters

ParameterTypeRequiredDescription
keystringYesThe key to update in the project state.
valueanyYesThe value to set for the key.

Returns

Promise<UpdateProjectStateResponse> — A promise that resolves with the response to the update request.

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.cbstate.updateProjectState('key', /* any */);
console.log(result);