feat(state): Implement deleteBulk method (DeleteBulkState RPC)
- Dominant language
- JavaScript
- Stars
- 217
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
The Dapr runtime exposes a `DeleteBulkState` RPC that allows deleting multiple state keys in a single call, but the JavaScript SDK does not currently expose this capability. Users must loop and call `delete()` individually for each key — losing atomicity and incurring extra round-trips.
## Motivation
- **Proto parity:** The `DeleteBulkState` RPC is defined in `dapr.proto` and the `DeleteBulkStateRequest` message is fully generated in both the ConnectRPC and legacy gRPC stubs.
- **Consistency:** We already expose `getBulk` for batch reads; a symmetric `deleteBulk` for batch deletes matches user expectations.
- **Performance:** Batch deletion in a single RPC call reduces latency and allows the state store to optimise the operation.
- **Other SDKs:** The Go, Python, .NET, and Java Dapr SDKs all expose bulk-delete methods.
## Proposed API Surface
```ts
// IClientState interface addition:
deleteBulk(
storeName: string,
keys: KeyValuePairType[], // key + optional etag/metadata per item
options?: StateDeleteBulkOptions
): Promise;
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.