@@ -21,6 +21,7 @@ import "temporal/api/enums/v1/deployment.proto";
2121import "temporal/api/enums/v1/update.proto" ;
2222import "temporal/api/enums/v1/activity.proto" ;
2323import "temporal/api/activity/v1/message.proto" ;
24+ import "temporal/api/callback/v1/message.proto" ;
2425import "temporal/api/common/v1/message.proto" ;
2526import "temporal/api/history/v1/message.proto" ;
2627import "temporal/api/workflow/v1/message.proto" ;
@@ -2956,3 +2957,137 @@ message DeleteActivityExecutionRequest {
29562957
29572958message DeleteActivityExecutionResponse {
29582959}
2960+
2961+ message StartCallbackExecutionRequest {
2962+ string namespace = 1 ;
2963+ // The identity of the client who initiated this request.
2964+ string identity = 2 ;
2965+ // A unique identifier for this start request. Typically UUIDv4.
2966+ string request_id = 3 ;
2967+ // Identifier for this callback. Required. Must be unique among callbacks in the same namespace.
2968+ // If a callback with this ID already exists, the request will fail with CallbackExecutionAlreadyStarted.
2969+ string callback_id = 4 ;
2970+ // Callback execution run ID, targets the latest run if run_id is empty.
2971+ string run_id = 5 ;
2972+ // Information on how this callback should be invoked (e.g. its URL and type).
2973+ temporal.api.common.v1.Callback callback = 6 ;
2974+ // Schedule-to-close timeout for this callback.
2975+ // (-- api-linter: core::0140::prepositions=disabled
2976+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
2977+ google.protobuf.Duration schedule_to_close_timeout = 7 ;
2978+ // Search attributes for indexing.
2979+ temporal.api.common.v1.SearchAttributes search_attributes = 8 ;
2980+ // The Nexus completion data to deliver to the callback URL.
2981+ // Required. Contains either a successful result payload or a failure.
2982+ temporal.api.callback.v1.CallbackExecutionCompletion completion = 9 ;
2983+ }
2984+
2985+ message StartCallbackExecutionResponse {
2986+ // The run ID of the callback that was started.
2987+ string run_id = 1 ;
2988+ }
2989+
2990+ message DescribeCallbackExecutionRequest {
2991+ string namespace = 1 ;
2992+ // Identifier for the callback
2993+ string callback_id = 2 ;
2994+ // Run ID of the callback execution to describe. If empty, the latest run will be described.
2995+ string run_id = 3 ;
2996+ // Include the outcome (result/failure) in the response if the callback has completed.
2997+ bool include_outcome = 4 ;
2998+ // Token from a previous DescribeCallbackExecutionResponse. If present, long-poll until callback
2999+ // state changes from the state encoded in this token. If absent, return current state immediately.
3000+ // Note that callback state may change multiple times between requests, therefore it is not
3001+ // guaranteed that a client making a sequence of long-poll requests will see a complete
3002+ // sequence of state changes.
3003+ bytes long_poll_token = 5 ;
3004+ }
3005+
3006+ message DescribeCallbackExecutionResponse {
3007+ // Information about the callback execution.
3008+ temporal.api.callback.v1.CallbackExecutionInfo info = 1 ;
3009+ // Only set if the callback is completed and include_outcome was true in the request.
3010+ temporal.api.callback.v1.CallbackExecutionOutcome outcome = 2 ;
3011+ // Token for follow-on long-poll requests. Absent only if the callback is complete.
3012+ bytes long_poll_token = 3 ;
3013+ }
3014+
3015+ message PollCallbackExecutionRequest {
3016+ string namespace = 1 ;
3017+ // Identifier for the callback
3018+ string callback_id = 2 ;
3019+ // Run ID of the callback execution to poll. If empty, the latest run will be polled.
3020+ string run_id = 3 ;
3021+ }
3022+
3023+ message PollCallbackExecutionResponse {
3024+ temporal.api.callback.v1.CallbackExecutionOutcome outcome = 1 ;
3025+ }
3026+
3027+ message ListCallbackExecutionsRequest {
3028+ string namespace = 1 ;
3029+ // Max number of executions to return per page.
3030+ int32 page_size = 2 ;
3031+ // Token returned in ListCallbackExecutionsResponse.
3032+ bytes next_page_token = 3 ;
3033+ // Visibility query, see https://docs.temporal.io/list-filter for the syntax.
3034+ string query = 4 ;
3035+ }
3036+
3037+ message ListCallbackExecutionsResponse {
3038+ repeated temporal.api.callback.v1.CallbackExecutionListInfo executions = 1 ;
3039+ // Token to use to fetch the next page. If empty, there is no next page.
3040+ bytes next_page_token = 2 ;
3041+ }
3042+
3043+ message CountCallbackExecutionsRequest {
3044+ string namespace = 1 ;
3045+ // Visibility query, see https://docs.temporal.io/list-filter for the syntax.
3046+ string query = 2 ;
3047+ }
3048+
3049+ message CountCallbackExecutionsResponse {
3050+ // If `query` is not grouping by any field, the count is an approximate number
3051+ // of callbacks that match the query.
3052+ // If `query` is grouping by a field, the count is simply the sum of the counts
3053+ // of the groups returned in the response. This number can be smaller than the
3054+ // total number of callbacks matching the query.
3055+ int64 count = 1 ;
3056+
3057+ // Contains the groups if the request is grouping by a field.
3058+ // The list might not be complete, and the counts of each group is approximate.
3059+ repeated AggregationGroup groups = 2 ;
3060+
3061+ message AggregationGroup {
3062+ repeated temporal.api.common.v1.Payload group_values = 1 ;
3063+ int64 count = 2 ;
3064+ }
3065+ }
3066+
3067+ message TerminateCallbackExecutionRequest {
3068+ string namespace = 1 ;
3069+ // Identifier for the callback
3070+ string callback_id = 2 ;
3071+ // Run ID of the callback execution to terminate. If empty, the latest run will be terminated.
3072+ string run_id = 3 ;
3073+ // The identity of the worker/client.
3074+ string identity = 4 ;
3075+ // Used to de-dupe termination requests.
3076+ string request_id = 5 ;
3077+ // Reason for requesting the termination.
3078+ string reason = 6 ;
3079+ }
3080+
3081+ message TerminateCallbackExecutionResponse {
3082+ }
3083+
3084+ message DeleteCallbackExecutionRequest {
3085+ string namespace = 1 ;
3086+ // Identifier for the callback
3087+ string callback_id = 2 ;
3088+ // Run ID of the callback execution to delete. If empty, the latest run will be deleted.
3089+ string run_id = 3 ;
3090+ }
3091+
3092+ message DeleteCallbackExecutionResponse {
3093+ }
0 commit comments