feat(actors): Implement ListActorReminders to list reminders for an actor type
- Dominant language
- JavaScript
- Stars
- 217
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
The Dapr runtime exposes a `ListActorReminders` RPC (defined in `dapr.proto` line 105) that lists all registered reminders for a given actor type, optionally filtered by actor ID. The JS SDK does not currently implement this method.
## Motivation
- **SDK parity:** Other Dapr SDKs expose this capability.
- **Operational visibility:** Enables applications to enumerate all active reminders for monitoring, debugging, or graceful-shutdown scenarios.
- **Bulk management:** Combined with `UnregisterActorRemindersByType`, this enables audit-then-cleanup patterns.
## Proto Definition
From `src/proto/dapr/proto/runtime/v1/actors.proto`:
```protobuf
message ListActorRemindersRequest {
string actor_type = 1;
optional string actor_id = 2;
}
message ListActorRemindersResponse {
repeated NamedActorReminder reminders = 1;
}
message NamedActorReminder {
string name = 1;
ActorReminder reminder = 2;
}
message ActorReminder {
string actor_type = 1;
string actor_id = 2;
optional string due_time = 4;
optional string period = 5;
google.protobuf.Any data = 6;
optional string ttl = 7;
}
```
## Proposed API Surface
```ts
// New response type:
export type NamedActorReminderType = {
name: string;
actorType: string;
actorId: string;
period?: Temporal.Duration;
dueTime?: Temporal.Duration;
data?: any;
ttl?: Temporal.Duration;
};
// IClientActor interface addition:
listActorReminders(actorType: string, actorId?: ActorId): Promise;
```
## Implementation Notes
- gRPC path: Call ListActorReminders on the Dapr service via ConnectRPC client.
- HTTP path: GET /v1.0/actors/{actorType}/reminders (with optional ?actorId= query param, per Dapr HTTP API if supported — verify against runtime).
- The actor_id field in the request is optional; when omitted, all reminders for the type are returned.
- Deserialize duration strings to Temporal.Duration.
## Acceptance Criteria
- [ ] listActorReminders added to IClientActor interface
- [ ] New NamedActorReminderType (or equivalent) response type
- [ ] gRPC implementation
- [ ] HTTP implementation
- [ ] Unit tests
- [ ] E2E tests (register multiple reminders, list them, verify completeness)
- [ ] JSDoc documentation
## References
- Dapr Actors API reference: [https://docs.dapr.io/reference/api/actors_api/](https://docs.dapr.io/reference/api/actors_api/)
- Proto: `src/proto/dapr/proto/runtime/v1/dapr.proto` line 105
- Messages: `src/proto/dapr/proto/runtime/v1/actors.proto` lines 137-158
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.