Skip to main content

deleteAllCompleted

client.todos.deleteAllCompleted(params?: TodoListParams): Promise<void>

Deletes all completed todos, optionally filtered by thread.

Removes all todos with a completed status. When a threadId is provided, only completed todos within that specific thread are deleted. This is useful for cleanup operations to maintain a tidy task list.

Parameters

ParameterTypeRequiredDescription
paramsTodoListParamsNoOptional query parameters for filtering deletion scope

Returns

Promise<void> — A promise that resolves when all completed todos have been deleted

Example

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

const client = new CodeBoltClient();

const result = await client.todos.deleteAllCompleted();
console.log(result);