feat(actors): Implement GetActorReminder to retrieve a registered reminder
- Dominant language
- JavaScript
- Stars
- 217
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
The Dapr runtime exposes a `GetActorReminder` RPC (defined in `dapr.proto` line 111) that retrieves the configuration of an already-registered actor reminder. The JS SDK does not currently implement this method.
## Motivation
- **SDK parity:** The Go, Python, .NET, and Java SDKs all expose a `GetActorReminder` method.
- **Diagnostics & Debugging:** Allows users to inspect reminder configuration (dueTime, period, TTL, data) at runtime without maintaining separate bookkeeping.
- **Proto readiness:** The proto messages are already defined and generated:
- `GetActorReminderRequest` — `actor_type`, `actor_id`, `name`
- `GetActorReminderResponse` — `actor_type`, `actor_id`, `due_time`, `period`, `data`, `ttl`
## Proto Definition
From `src/proto/dapr/proto/runtime/v1/actors.proto`:
```protobuf
message GetActorReminderRequest {
string actor_type = 1;
string actor_id = 2;
string name = 3;
}
message GetActorReminderResponse {
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
// IClientActor interface addition:
getActorReminder(actorType: string, actorId: ActorId, name: string): Promise;
```
## Implementation Notes
- gRPC path: Call GetActorReminder on the Dapr service via ConnectRPC client.
- HTTP path: GET /v1.0/actors/{actorType}/{actorId}/reminders/{name}
- Parse due_time, period, and ttl strings back into Temporal.Duration values consistent with the existing ActorReminderType.
- Add appropriate JSDoc annotations describing parameters and return type.
## Acceptance Criteria
- [ ] getActorReminder added to IClientActor interface
- [ ] gRPC implementation in GRPCClient/actor.ts
- [ ] HTTP implementation in HTTPClient/actor.ts
- [ ] Unit tests
- [ ] E2E tests (register a reminder, then retrieve and verify its properties)
- [ ] JSDoc documentation on the new method
## 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 111
- Messages: `src/proto/dapr/proto/runtime/v1/actors.proto` lines 120-135
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.