@@ -22,6 +22,7 @@ import "temporal/api/enums/v1/update.proto";
2222import "temporal/api/enums/v1/activity.proto" ;
2323import "temporal/api/enums/v1/nexus.proto" ;
2424import "temporal/api/activity/v1/message.proto" ;
25+ import "temporal/api/callback/v1/message.proto" ;
2526import "temporal/api/common/v1/message.proto" ;
2627import "temporal/api/history/v1/message.proto" ;
2728import "temporal/api/workflow/v1/message.proto" ;
@@ -3387,3 +3388,142 @@ message DeleteNexusOperationExecutionRequest {
33873388
33883389message DeleteNexusOperationExecutionResponse {
33893390}
3391+
3392+ message StartCallbackExecutionRequest {
3393+ string namespace = 1 ;
3394+ // The identity of the client who initiated this request.
3395+ string identity = 2 ;
3396+ // A unique identifier for this start request. Typically UUIDv4.
3397+ string request_id = 3 ;
3398+ // Identifier for this callback. Required. Must be unique among callbacks in the same namespace.
3399+ // If a callback with this ID already exists, the request will fail with CallbackExecutionAlreadyStarted.
3400+ string callback_id = 4 ;
3401+ // Information on how this callback should be invoked (e.g. its URL and type).
3402+ temporal.api.common.v1.Callback callback = 5 ;
3403+ // Schedule-to-close timeout for this callback.
3404+ // (-- api-linter: core::0140::prepositions=disabled
3405+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
3406+ google.protobuf.Duration schedule_to_close_timeout = 6 ;
3407+ // Search attributes for indexing.
3408+ temporal.api.common.v1.SearchAttributes search_attributes = 7 ;
3409+ // The input data to deliver to the callback URL.
3410+ oneof input {
3411+ // The Nexus completion data to deliver to the callback URL.
3412+ // Contains either a successful result payload or a failure.
3413+ temporal.api.callback.v1.CallbackExecutionCompletion completion = 8 ;
3414+ }
3415+ }
3416+
3417+ message StartCallbackExecutionResponse {
3418+ // The run ID of the callback that was started.
3419+ string run_id = 1 ;
3420+ }
3421+
3422+ message DescribeCallbackExecutionRequest {
3423+ string namespace = 1 ;
3424+ // Identifier for the callback
3425+ string callback_id = 2 ;
3426+ // Run ID of the callback execution to describe. If empty, the latest run will be described.
3427+ string run_id = 3 ;
3428+ // Include the input field in the response.
3429+ bool include_input = 4 ;
3430+ // Include the outcome (result/failure) in the response if the callback has completed.
3431+ bool include_outcome = 5 ;
3432+ // Token from a previous DescribeCallbackExecutionResponse. If present, long-poll until callback
3433+ // state changes from the state encoded in this token. If absent, return current state immediately.
3434+ // Note that callback state may change multiple times between requests, therefore it is not
3435+ // guaranteed that a client making a sequence of long-poll requests will see a complete
3436+ // sequence of state changes.
3437+ bytes long_poll_token = 6 ;
3438+ }
3439+
3440+ message DescribeCallbackExecutionResponse {
3441+ // Information about the callback execution.
3442+ temporal.api.callback.v1.CallbackExecutionInfo info = 1 ;
3443+ // Only set if the callback is completed and include_outcome was true in the request.
3444+ temporal.api.callback.v1.CallbackExecutionOutcome outcome = 2 ;
3445+ // Token for follow-on long-poll requests. Absent only if the callback is complete.
3446+ bytes long_poll_token = 3 ;
3447+ }
3448+
3449+ message PollCallbackExecutionRequest {
3450+ string namespace = 1 ;
3451+ // Identifier for the callback
3452+ string callback_id = 2 ;
3453+ // Run ID of the callback execution to poll. If empty, the latest run will be polled.
3454+ string run_id = 3 ;
3455+ }
3456+
3457+ message PollCallbackExecutionResponse {
3458+ // The run ID of the callback, useful when run_id was not specified in the request.
3459+ string run_id = 1 ;
3460+ temporal.api.callback.v1.CallbackExecutionOutcome outcome = 2 ;
3461+ }
3462+
3463+ message ListCallbackExecutionsRequest {
3464+ string namespace = 1 ;
3465+ // Max number of executions to return per page.
3466+ int32 page_size = 2 ;
3467+ // Token returned in ListCallbackExecutionsResponse.
3468+ bytes next_page_token = 3 ;
3469+ // Visibility query, see https://docs.temporal.io/list-filter for the syntax.
3470+ string query = 4 ;
3471+ }
3472+
3473+ message ListCallbackExecutionsResponse {
3474+ repeated temporal.api.callback.v1.CallbackExecutionListInfo executions = 1 ;
3475+ // Token to use to fetch the next page. If empty, there is no next page.
3476+ bytes next_page_token = 2 ;
3477+ }
3478+
3479+ message CountCallbackExecutionsRequest {
3480+ string namespace = 1 ;
3481+ // Visibility query, see https://docs.temporal.io/list-filter for the syntax.
3482+ string query = 2 ;
3483+ }
3484+
3485+ message CountCallbackExecutionsResponse {
3486+ // If `query` is not grouping by any field, the count is an approximate number
3487+ // of callbacks that match the query.
3488+ // If `query` is grouping by a field, the count is simply the sum of the counts
3489+ // of the groups returned in the response. This number can be smaller than the
3490+ // total number of callbacks matching the query.
3491+ int64 count = 1 ;
3492+
3493+ // Contains the groups if the request is grouping by a field.
3494+ // The list might not be complete, and the counts of each group is approximate.
3495+ repeated AggregationGroup groups = 2 ;
3496+
3497+ message AggregationGroup {
3498+ repeated temporal.api.common.v1.Payload group_values = 1 ;
3499+ int64 count = 2 ;
3500+ }
3501+ }
3502+
3503+ message TerminateCallbackExecutionRequest {
3504+ string namespace = 1 ;
3505+ // Identifier for the callback
3506+ string callback_id = 2 ;
3507+ // Run ID of the callback execution to terminate. If empty, the latest run will be terminated.
3508+ string run_id = 3 ;
3509+ // The identity of the worker/client.
3510+ string identity = 4 ;
3511+ // Used to de-dupe termination requests.
3512+ string request_id = 5 ;
3513+ // Reason for requesting the termination.
3514+ string reason = 6 ;
3515+ }
3516+
3517+ message TerminateCallbackExecutionResponse {
3518+ }
3519+
3520+ message DeleteCallbackExecutionRequest {
3521+ string namespace = 1 ;
3522+ // Identifier for the callback
3523+ string callback_id = 2 ;
3524+ // Run ID of the callback execution to delete. If empty, the latest run will be deleted.
3525+ string run_id = 3 ;
3526+ }
3527+
3528+ message DeleteCallbackExecutionResponse {
3529+ }
0 commit comments