1+ /*
2+ Copyright 2025 The Dapr Authors
3+ Licensed under the Apache License, Version 2.0 (the "License");
4+ you may not use this file except in compliance with the License.
5+ You may obtain a copy of the License at
6+ http://www.apache.org/licenses/LICENSE-2.0
7+ Unless required by applicable law or agreed to in writing, software
8+ distributed under the License is distributed on an "AS IS" BASIS,
9+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+ See the License for the specific language governing permissions and
11+ limitations under the License.
12+ */
13+
14+ syntax = "proto3" ;
15+
16+ package dapr.proto.runtime.v1 ;
17+
18+ import "google/protobuf/any.proto" ;
19+ import "dapr/proto/common/v1/common.proto" ;
20+
21+ option csharp_namespace = "Dapr.Client.Autogen.Grpc.v1" ;
22+ option java_outer_classname = "DaprProtos" ;
23+ option java_package = "io.dapr.v1" ;
24+ option go_package = "github.com/dapr/dapr/pkg/proto/runtime/v1;runtime" ;
25+
26+ // RegisterActorTimerRequest is the message to register a timer for an actor of a given type and id.
27+ message RegisterActorTimerRequest {
28+ string actor_type = 1 [json_name = "actorType" ];
29+ string actor_id = 2 [json_name = "actorId" ];
30+ string name = 3 ;
31+ string due_time = 4 [json_name = "dueTime" ];
32+ string period = 5 ;
33+ string callback = 6 ;
34+ bytes data = 7 ;
35+ string ttl = 8 ;
36+ }
37+
38+ // UnregisterActorTimerRequest is the message to unregister an actor timer
39+ message UnregisterActorTimerRequest {
40+ string actor_type = 1 [json_name = "actorType" ];
41+ string actor_id = 2 [json_name = "actorId" ];
42+ string name = 3 ;
43+ }
44+
45+ // RegisterActorReminderRequest is the message to register a reminder for an actor of a given type and id.
46+ message RegisterActorReminderRequest {
47+ string actor_type = 1 [json_name = "actorType" ];
48+ string actor_id = 2 [json_name = "actorId" ];
49+ string name = 3 ;
50+ string due_time = 4 [json_name = "dueTime" ];
51+ string period = 5 ;
52+ bytes data = 6 ;
53+ string ttl = 7 ;
54+
55+ // If true, allows this reminder to overwrite an existing reminder with the
56+ // same name. If not set, defaults to true.
57+ optional bool overwrite = 8 ;
58+
59+ // failure_policy is the optional policy for handling job failures. If not
60+ // set, the reminder will have the failure policy of trying 3 times on a
61+ // single tick before giving up.
62+ optional common.v1.JobFailurePolicy failure_policy = 9 [json_name = "failure_policy" ];
63+ }
64+
65+ // UnregisterActorReminderRequest is the message to unregister an actor reminder.
66+ message UnregisterActorReminderRequest {
67+ string actor_type = 1 [json_name = "actorType" ];
68+ string actor_id = 2 [json_name = "actorId" ];
69+ string name = 3 ;
70+ }
71+
72+ // GetActorStateRequest is the message to get key-value states from specific actor.
73+ message GetActorStateRequest {
74+ string actor_type = 1 [json_name = "actorType" ];
75+ string actor_id = 2 [json_name = "actorId" ];
76+ string key = 3 ;
77+ }
78+
79+ // GetActorStateResponse is the response conveying the actor's state value.
80+ message GetActorStateResponse {
81+ bytes data = 1 ;
82+
83+ // The metadata which will be sent to app.
84+ map <string , string > metadata = 2 ;
85+ }
86+
87+ // ExecuteActorStateTransactionRequest is the message to execute multiple operations on a specified actor.
88+ message ExecuteActorStateTransactionRequest {
89+ string actor_type = 1 [json_name = "actorType" ];
90+ string actor_id = 2 [json_name = "actorId" ];
91+ repeated TransactionalActorStateOperation operations = 3 ;
92+ }
93+
94+ // TransactionalActorStateOperation is the message to execute a specified operation with a key-value pair.
95+ message TransactionalActorStateOperation {
96+ string operationType = 1 ;
97+ string key = 2 ;
98+ google.protobuf.Any value = 3 ;
99+ // The metadata used for transactional operations.
100+ //
101+ // Common metadata property:
102+ // - ttlInSeconds : the time to live in seconds for the stored value.
103+ map <string , string > metadata = 4 ;
104+ }
105+
106+ // InvokeActorRequest is the message to call an actor.
107+ message InvokeActorRequest {
108+ string actor_type = 1 [json_name = "actorType" ];
109+ string actor_id = 2 [json_name = "actorId" ];
110+ string method = 3 ;
111+ bytes data = 4 ;
112+ map <string , string > metadata = 5 ;
113+ }
114+
115+ // InvokeActorResponse is the method that returns an actor invocation response.
116+ message InvokeActorResponse {
117+ bytes data = 1 ;
118+ }
119+
120+ // GetActorReminderRequest is the message to get an already-registered actor reminder
121+ message GetActorReminderRequest {
122+ string actor_type = 1 [json_name = "actorType" ];
123+ string actor_id = 2 [json_name = "actorID" ];
124+ string name = 3 ;
125+ }
126+
127+ // GetActorReminderResponse is the response conveying an actor's reminder.
128+ message GetActorReminderResponse {
129+ string actor_type = 1 [json_name = "actorType" ];
130+ string actor_id = 2 [json_name = "actorID" ];
131+ optional string due_time = 4 [json_name = "dueTime" ];
132+ optional string period = 5 ;
133+ google.protobuf.Any data = 6 ;
134+ optional string ttl = 7 ;
135+ }
136+
137+ message ListActorRemindersRequest {
138+ string actor_type = 1 [json_name = "actorType" ];
139+ optional string actor_id = 2 [json_name = "actorId" ];
140+ }
141+
142+ message ListActorRemindersResponse {
143+ repeated NamedActorReminder reminders = 1 ;
144+ }
145+
146+ message NamedActorReminder {
147+ string name = 1 ;
148+ ActorReminder reminder = 2 ;
149+ }
150+
151+ message ActorReminder {
152+ string actor_type = 1 [json_name = "actorType" ];
153+ string actor_id = 2 [json_name = "actorID" ];
154+ optional string due_time = 4 [json_name = "dueTime" ];
155+ optional string period = 5 ;
156+ google.protobuf.Any data = 6 ;
157+ optional string ttl = 7 ;
158+ }
159+
160+ // UnregisterActorRemindersByTypeRequest is the message to unregister an actor
161+ // reminders by the given type. Optional actor_id can be provided to limit the
162+ // scope of the operation to a specific actor instance.
163+ message UnregisterActorRemindersByTypeRequest {
164+ string actor_type = 1 [json_name = "actorType" ];
165+ optional string actor_id = 2 [json_name = "actorId" ];
166+ }
167+
168+ message UnregisterActorRemindersByTypeResponse {}
0 commit comments