Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions nexus/deps/nexus-temporal-types/model.wit
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface model {
/// @nexus.type
/// python="typing.Any"
/// typescript="common.Payload"
/// go="any"
/// dotnet="object?"
/// dotnet-from="ProtoExtensions.FromPayload"
/// dotnet-to="ProtoExtensions.ToPayload"
Expand All @@ -16,7 +17,11 @@ interface model {

/// @nexus.proto "temporal.api.common.v1.Payloads"
/// typescript-import="@temporalio/proto"
/// @nexus.type dotnet="IReadOnlyCollection<object?>" dotnet-from="ProtoExtensions.FromPayloads" dotnet-to="ProtoExtensions.ToPayloads"
/// @nexus.type
/// go="[]any"
/// dotnet="IReadOnlyCollection<object?>"
/// dotnet-from="ProtoExtensions.FromPayloads"
/// dotnet-to="ProtoExtensions.ToPayloads"
type payloads = list<payload>;

/// Temporal failure represented by the target SDK's native exception/error type.
Expand All @@ -35,11 +40,12 @@ interface model {
/// @nexus.type
/// python="collections.abc.Awaitable[WorkflowResult]"
/// typescript="Promise<any>"
/// go="any"
/// dotnet="System.Threading.Tasks.Task<object?>"
type workflow-result = placeholder;

/// Receiver/context argument for workflow callable method forms.
/// @nexus.type python="typing.Any" typescript="any" dotnet="object"
/// @nexus.type python="typing.Any" typescript="any" go="go.temporal.io/sdk/workflow:workflow.Context" dotnet="object"
type callable-prefix = placeholder;

/// @nexus.function-args
Expand All @@ -49,7 +55,7 @@ interface model {
workflow-call: async func(callable-prefix: callable-prefix, args: payloads) -> workflow-result;

/// Callable result annotation for signal functions.
/// @nexus.type python="None | collections.abc.Awaitable[None]" typescript="void" dotnet="void"
/// @nexus.type python="None | collections.abc.Awaitable[None]" typescript="void" go="any" dotnet="void"
type signal-result = placeholder;

/// @nexus.function-args
Expand All @@ -62,6 +68,7 @@ interface model {
/// @nexus.type
/// python="str"
/// typescript="string"
/// go="string"
/// dotnet="string"
/// dotnet-from="ProtoExtensions.FromWorkflowTypeProto"
/// dotnet-to="ProtoExtensions.ToWorkflowTypeProto"
Expand All @@ -73,6 +80,7 @@ interface model {
/// args-field="input"
/// result-type-parameter="WorkflowResult"
/// alternate-type="workflow-type"
/// go-name-extractor="WorkflowFunctionName"
/// dotnet-name-extractor="TemporalFunctionNames.WorkflowName"
/// dotnet-call-extractor="TemporalFunctionNames.ExtractCall"
/// @nexus.add-rpc-compatible-with "workflow-type"
Expand All @@ -82,6 +90,8 @@ interface model {
/// signature="signal-call"
/// args-field="signal-input"
/// alternate-type="string"
/// go-value-type="string"
/// go-args-type="any"
/// python-converter="signal_function_to_proto"
/// typescript-name-extractor="signalFunctionName"
/// dotnet-name-extractor="TemporalFunctionNames.SignalName"
Expand All @@ -96,6 +106,7 @@ interface model {
/// @nexus.type
/// python="temporalio.common.RetryPolicy"
/// typescript="common.RetryPolicy"
/// go="go.temporal.io/sdk/temporal.RetryPolicy"
/// dotnet="Temporalio.Common.RetryPolicy"
/// dotnet-from="ProtoExtensions.FromRetryPolicyProto"
/// typescript-import="@temporalio/common"
Expand All @@ -105,13 +116,19 @@ interface model {
/// @nexus.type
/// python="str"
/// typescript="string"
/// go="string"
/// dotnet="string"
/// dotnet-from="ProtoExtensions.FromTaskQueueProto"
/// dotnet-to="ProtoExtensions.ToTaskQueueProto"
type task-queue = placeholder;

/// @nexus.proto "temporal.api.common.v1.Memo" typescript-import="@temporalio/proto"
/// @nexus.type python="collections.abc.Mapping[str, typing.Any]" typescript="Record<string, unknown>" dotnet="IReadOnlyDictionary<string, object?>" dotnet-from="ProtoExtensions.FromMemoProto"
/// @nexus.type
/// python="collections.abc.Mapping[str, typing.Any]"
/// typescript="Record<string, unknown>"
/// go="map[string]any"
/// dotnet="IReadOnlyDictionary<string, object?>"
/// dotnet-from="ProtoExtensions.FromMemoProto"
type memo = placeholder;

/// @nexus.proto "temporal.api.common.v1.Header" typescript-import="@temporalio/proto"
Expand All @@ -129,6 +146,7 @@ interface model {
/// @nexus.type
/// python="temporalio.common.TypedSearchAttributes"
/// typescript="common.TypedSearchAttributes"
/// go="go.temporal.io/sdk/temporal.SearchAttributes"
/// dotnet="Temporalio.Common.SearchAttributeCollection"
/// dotnet-from="ProtoExtensions.FromSearchAttributesProto"
/// typescript-import="@temporalio/common"
Expand All @@ -138,6 +156,7 @@ interface model {
/// @nexus.type
/// python="temporalio.common.Priority"
/// typescript="common.Priority"
/// go="go.temporal.io/sdk/temporal.Priority"
/// dotnet="Temporalio.Common.Priority"
/// dotnet-from="ProtoExtensions.FromPriorityProto"
/// typescript-import="@temporalio/common"
Expand All @@ -147,6 +166,7 @@ interface model {
/// @nexus.type
/// python="temporalio.common.VersioningOverride"
/// typescript="common.VersioningOverride"
/// go="go.temporal.io/sdk/client.VersioningOverride"
/// dotnet="Temporalio.Common.VersioningOverride"
/// dotnet-from="ProtoExtensions.FromVersioningOverrideProto"
/// typescript-import="@temporalio/common"
Expand All @@ -156,6 +176,7 @@ interface model {
/// @nexus.type
/// python="datetime.timedelta"
/// typescript="common.Duration"
/// go="time.Duration"
/// dotnet="System.TimeSpan"
/// dotnet-from="ProtoExtensions.FromDurationProto"
/// typescript-import="@temporalio/common"
Expand All @@ -165,6 +186,7 @@ interface model {
/// @nexus.type
/// python="temporalio.common.WorkflowIDReusePolicy"
/// typescript="common.WorkflowIdReusePolicy"
/// go="go.temporal.io/api/enums/v1:enums.WorkflowIdReusePolicy"
/// dotnet="Temporalio.Api.Enums.V1.WorkflowIdReusePolicy"
/// typescript-import="@temporalio/common"
type workflow-id-reuse-policy = placeholder;
Expand All @@ -173,6 +195,7 @@ interface model {
/// @nexus.type
/// python="temporalio.common.WorkflowIDConflictPolicy"
/// typescript="common.WorkflowIdConflictPolicy"
/// go="go.temporal.io/api/enums/v1:enums.WorkflowIdConflictPolicy"
/// dotnet="Temporalio.Api.Enums.V1.WorkflowIdConflictPolicy"
/// typescript-import="@temporalio/common"
type workflow-id-conflict-policy = placeholder;
Expand All @@ -184,11 +207,11 @@ interface model {
record user-metadata {
/// @nexus.doc "Single-line fixed summary for the workflow execution that may appear in UI and CLI. This can be in single-line Temporal Markdown format."
/// @nexus.proto-field "summary"
/// @nexus.flattened-type python="str" typescript="string" dotnet="string"
/// @nexus.flattened-type python="str" typescript="string" dotnet="string" go="string"
static-summary: option<payload>,
/// @nexus.doc "General fixed details for the workflow execution that may appear in UI and CLI. This can be in Temporal Markdown format and can span multiple lines. This value is fixed on the workflow execution and cannot be updated."
/// @nexus.proto-field "details"
/// @nexus.flattened-type python="str" typescript="string" dotnet="string"
/// @nexus.flattened-type python="str" typescript="string" dotnet="string" go="string"
static-details: option<payload>,
}
}
10 changes: 7 additions & 3 deletions nexus/workflow-service.wit
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ world system {

/// @nexus.endpoint "__temporal_system"
/// @nexus.service-name "temporal.api.workflowservice.v1.WorkflowService"
/// @nexus.namespace dotnet="Temporalio.Workflows"
/// @nexus.namespace dotnet="Temporalio.Workflows" go="go.temporal.io/sdk/workflow"
/// @nexus.operations-class dotnet="Workflow"
/// @nexus.delay-load-temporalio-workflow
/// @nexus.experimental
Expand Down Expand Up @@ -49,6 +49,7 @@ interface workflow-service {
/// python="Signal name or callable to send with the start request."
/// typescript="Signal name or signal definition to send with the start request."
/// dotnet="Signal name or signal expression to send with the start request."
/// go="Signal name to send with the start request."
/// @nexus.proto-field "signal_name"
signal: signal-function,
/// @nexus.doc "Total workflow execution timeout, including retries and continue-as-new. Defaults to unlimited."
Expand All @@ -70,9 +71,11 @@ interface workflow-service {
/// @nexus.doc "Behavior when a closed workflow with the same ID exists. Default is allow-duplicate."
/// @nexus.proto-field "workflow_id_reuse_policy"
/// @nexus.default "allow-duplicate"
/// @nexus.name go="WorkflowIDReusePolicy"
id-reuse-policy: workflow-id-reuse-policy,
/// @nexus.doc "Behavior when a workflow is currently running with the same ID. Set to use-existing for idempotent deduplication on workflow ID. Cannot be set if id-reuse-policy is terminate-if-running. Defaults to use-existing."
/// @nexus.proto-field "workflow_id_conflict_policy"
/// @nexus.name go="WorkflowIDConflictPolicy"
id-conflict-policy: option<workflow-id-conflict-policy>,
/// @nexus.doc "Retry policy for the workflow."
retry-policy: option<retry-policy>,
Expand All @@ -81,6 +84,7 @@ interface workflow-service {
/// @nexus.doc "Memo for the workflow."
memo: option<memo>,
/// @nexus.doc "Typed search attributes for the workflow."
/// @nexus.name go="TypedSearchAttributes"
search-attributes: option<search-attributes>,
/// @nexus.doc "Priority of the workflow execution."
priority: option<priority>,
Expand All @@ -91,7 +95,7 @@ interface workflow-service {
start-delay: option<duration>,
/// @nexus.doc "Static metadata for the workflow execution."
user-metadata: option<user-metadata>,
/// @nexus.source python="workflow_namespace()" typescript="workflowNamespace()" go="workflow.GetInfo(ctx).Namespace" dotnet="TemporalWorkflowContext.WorkflowNamespace()"
/// @nexus.source python="workflow_namespace()" typescript="workflowNamespace()" go="WorkflowNamespace(ctx)" dotnet="TemporalWorkflowContext.WorkflowNamespace()"
/// @nexus.doc "Namespace of the workflow execution."
namespace: string,
/// @nexus.omit
Expand Down Expand Up @@ -133,7 +137,7 @@ interface workflow-service {
/// dotnet-type="Temporalio.Workflows.ExternalWorkflowHandle"
/// dotnet="Temporalio.Workflows.Workflow.GetExternalWorkflowHandle(request.Id, result.RunId)"
/// @nexus.operation name="SignalWithStartWorkflowExecution"
/// @nexus.serialization-context python="signal_with_start_workflow_serialization_context" typescript="signalWithStartWorkflowSerializationContext" dotnet="WorkflowServiceSerializationContexts.SignalWithStartWorkflow"
/// @nexus.serialization-context python="signal_with_start_workflow_serialization_context" typescript="signalWithStartWorkflowSerializationContext" dotnet="WorkflowServiceSerializationContexts.SignalWithStartWorkflow" go="SignalWithStartWorkflowSerializationContext"
/// @nexus.experimental
signal-with-start-workflow: func(
request: signal-with-start-workflow-request,
Expand Down
Loading