diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 0919cb5d..c577a4a8 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -10440,6 +10440,15 @@ }, "description": "Used by the worker versioning APIs, represents an unordered set of one or more versions which are\nconsidered to be compatible with each other. Currently the versions are always worker build IDs." }, + "v1CompleteNexusOperationResponse": { + "type": "object", + "properties": { + "handlerError": { + "$ref": "#/definitions/v1HandlerError", + "description": "The user handler has responded with an error or failed to respond in time." + } + } + }, "v1CompleteWorkflowExecutionCommandAttributes": { "type": "object", "properties": { diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 619f764c..06cf2291 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -2718,3 +2718,29 @@ message GetNexusOperationResultResponse { temporal.api.nexus.v1.HandlerError handler_error = 4; } } + +message CompleteNexusOperationRequest { + // The identity of the client who initiated this request. + string identity = 1; + // The namespace from which the user operation handler is calling. + string namespace = 2; + + // The callback containing the URL where the server should deliver the completion and additional headers to forward + // with the request. + temporal.api.common.v1.Callback.Nexus callback = 3; + // Request headers to send with the callback request. + map header = 4; + + + oneof outcome { + // The operation completed successfully. + temporal.api.common.v1.Payload result = 5; + // The operation completed unsuccessfully (failed or canceled). + temporal.api.nexus.v1.UnsuccessfulOperationError operation_error = 6; + } +} + +message CompleteNexusOperationResponse { + // The user handler has responded with an error or failed to respond in time. + temporal.api.nexus.v1.HandlerError handler_error = 1; +} diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index 44dc60a5..39e516af 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -1276,4 +1276,11 @@ service WorkflowService { // aip.dev/not-precedent: Nexus has a separately defined HTTP API. --) rpc GetNexusOperationResult (GetNexusOperationResultRequest) returns (GetNexusOperationResultResponse) { } + + // Request the server to invoke an operation completion on the caller's behalf. + // + // (-- api-linter: core::0127::http-annotation=disabled + // aip.dev/not-precedent: Nexus has a separately defined HTTP API. --) + rpc CompleteNexusOperation (CompleteNexusOperationRequest) returns (CompleteNexusOperationResponse) { + } }