diff --git a/.gitmodules b/.gitmodules index b3e72e9d6..1033e1e91 100644 --- a/.gitmodules +++ b/.gitmodules @@ -128,3 +128,8 @@ url = https://github.com/distilled-mirror/spec-mirror-modal.git ignore = dirty shallow = true +[submodule "packages/temporal/specs/spec-mirror-temporal"] + path = packages/temporal/specs/spec-mirror-temporal + url = https://github.com/distilled-mirror/spec-mirror-temporal.git + ignore = dirty + shallow = true diff --git a/packages/temporal/.generated-specs/temporal.json b/packages/temporal/.generated-specs/temporal.json new file mode 100644 index 000000000..f31030bf2 --- /dev/null +++ b/packages/temporal/.generated-specs/temporal.json @@ -0,0 +1,24048 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "UnreferencedShape", + "namespace": "*" + } + ] + }, + "shapes": { + "com.temporal.api#GetClusterInfoResponse": { + "type": "structure", + "members": { + "supportedClients": { + "target": "com.temporal.api#GetClusterInfoResponseSupportedClientsMap", + "traits": { + "smithy.api#documentation": "Key is client name i.e \"temporal-go\", \"temporal-java\", or \"temporal-cli\".\n Value is ranges of supported versions of this client i.e \">1.1.1 <=1.4.0 || ^5.0.0\"." + } + }, + "serverVersion": { + "target": "smithy.api#String" + }, + "clusterId": { + "target": "smithy.api#String" + }, + "versionInfo": { + "target": "com.temporal.api#VersionInfo" + }, + "clusterName": { + "target": "smithy.api#String" + }, + "historyShardCount": { + "target": "smithy.api#Integer" + }, + "persistenceStore": { + "target": "smithy.api#String" + }, + "visibilityStore": { + "target": "smithy.api#String" + }, + "initialFailoverVersion": { + "target": "smithy.api#String" + }, + "failoverVersionIncrement": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "GetClusterInfoResponse contains information about Temporal cluster." + } + }, + "com.temporal.api#GetClusterInfoResponseSupportedClientsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Key is client name i.e \"temporal-go\", \"temporal-java\", or \"temporal-cli\".\n Value is ranges of supported versions of this client i.e \">1.1.1 <=1.4.0 || ^5.0.0\"." + } + }, + "com.temporal.api#VersionInfo": { + "type": "structure", + "members": { + "current": { + "target": "com.temporal.api#ReleaseInfo" + }, + "recommended": { + "target": "com.temporal.api#ReleaseInfo" + }, + "instructions": { + "target": "smithy.api#String" + }, + "alerts": { + "target": "com.temporal.api#VersionInfoAlertsList" + }, + "lastUpdateTime": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "VersionInfo contains details about current and recommended release versions as well as alerts and upgrade instructions." + } + }, + "com.temporal.api#ReleaseInfo": { + "type": "structure", + "members": { + "version": { + "target": "smithy.api#String" + }, + "releaseTime": { + "target": "smithy.api#String" + }, + "notes": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "ReleaseInfo contains information about specific version of temporal." + } + }, + "com.temporal.api#Alert": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "severity": { + "target": "com.temporal.api#AlertSeverity" + } + }, + "traits": { + "smithy.api#documentation": "Alert contains notification and severity." + } + }, + "com.temporal.api#AlertSeverity": { + "type": "enum", + "members": { + "SEVERITY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SEVERITY_UNSPECIFIED" + } + }, + "SEVERITY_HIGH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SEVERITY_HIGH" + } + }, + "SEVERITY_MEDIUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SEVERITY_MEDIUM" + } + }, + "SEVERITY_LOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SEVERITY_LOW" + } + } + }, + "traits": {} + }, + "com.temporal.api#VersionInfoAlertsList": { + "type": "list", + "member": { + "target": "com.temporal.api#Alert" + }, + "traits": {} + }, + "com.temporal.api#GetClusterInfo": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.temporal.api#GetClusterInfoResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/cluster-info", + "code": 200 + }, + "smithy.api#documentation": "GetClusterInfo returns information about temporal cluster" + } + }, + "com.temporal.api#ListNamespacesRequest": { + "type": "structure", + "members": { + "pageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "pageSize" + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken" + } + }, + "namespaceFilter_includeDeleted": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "namespaceFilter.includeDeleted", + "smithy.api#documentation": "By default namespaces in NAMESPACE_STATE_DELETED state are not included.\n Setting include_deleted to true will include deleted namespaces.\n Note: Namespace is in NAMESPACE_STATE_DELETED state when it was deleted from the system but associated data is not deleted yet." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListNamespacesResponse": { + "type": "structure", + "members": { + "namespaces": { + "target": "com.temporal.api#ListNamespacesResponseNamespacesList" + }, + "nextPageToken": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#DescribeNamespaceResponse": { + "type": "structure", + "members": { + "namespaceInfo": { + "target": "com.temporal.api#NamespaceInfo" + }, + "config": { + "target": "com.temporal.api#NamespaceConfig" + }, + "replicationConfig": { + "target": "com.temporal.api#NamespaceReplicationConfig" + }, + "failoverVersion": { + "target": "smithy.api#String" + }, + "isGlobalNamespace": { + "target": "smithy.api#Boolean" + }, + "failoverHistory": { + "target": "com.temporal.api#DescribeNamespaceResponseFailoverHistoryList", + "traits": { + "smithy.api#documentation": "Contains the historical state of failover_versions for the cluster, truncated to contain only the last N\n states to ensure that the list does not grow unbounded." + } + } + }, + "traits": {} + }, + "com.temporal.api#NamespaceInfo": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + }, + "state": { + "target": "com.temporal.api#NamespaceInfoState" + }, + "description": { + "target": "smithy.api#String" + }, + "ownerEmail": { + "target": "smithy.api#String" + }, + "data": { + "target": "com.temporal.api#NamespaceInfoDataMap", + "traits": { + "smithy.api#documentation": "A key-value map for any customized purpose." + } + }, + "id": { + "target": "smithy.api#String" + }, + "capabilities": { + "target": "com.temporal.api#NamespaceInfoCapabilities", + "traits": { + "smithy.api#documentation": "All capabilities the namespace supports." + } + }, + "limits": { + "target": "com.temporal.api#NamespaceInfoLimits", + "traits": { + "smithy.api#documentation": "Namespace configured limits" + } + }, + "supportsSchedules": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether scheduled workflows are supported on this namespace. This is only needed\n temporarily while the feature is experimental, so we can give it a high tag." + } + } + }, + "traits": {} + }, + "com.temporal.api#NamespaceInfoState": { + "type": "enum", + "members": { + "NAMESPACE_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAMESPACE_STATE_UNSPECIFIED" + } + }, + "NAMESPACE_STATE_REGISTERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAMESPACE_STATE_REGISTERED" + } + }, + "NAMESPACE_STATE_DEPRECATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAMESPACE_STATE_DEPRECATED" + } + }, + "NAMESPACE_STATE_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAMESPACE_STATE_DELETED" + } + } + }, + "traits": {} + }, + "com.temporal.api#NamespaceInfoDataMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A key-value map for any customized purpose." + } + }, + "com.temporal.api#NamespaceInfoCapabilities": { + "type": "structure", + "members": { + "eagerWorkflowStart": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the namespace supports eager workflow start." + } + }, + "syncUpdate": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the namespace supports sync update" + } + }, + "asyncUpdate": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the namespace supports async update" + } + }, + "workerHeartbeats": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the namespace supports worker heartbeats" + } + }, + "reportedProblemsSearchAttribute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the namespace supports reported problems search attribute" + } + }, + "workflowPause": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the namespace supports pausing workflows" + } + }, + "standaloneActivities": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the namespace supports standalone activities" + } + }, + "workerPollCompleteOnShutdown": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the namespace supports server-side completion of outstanding worker polls on shutdown.\n When enabled, the server will complete polls for workers that send WorkerInstanceKey in their\n poll requests and call ShutdownWorker with the same WorkerInstanceKey. The poll will return\n an empty response. When this flag is true, workers should allow polls to return gracefully\n rather than terminating any open polls on shutdown." + } + }, + "pollerAutoscaling": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the namespace supports poller autoscaling" + } + }, + "workerCommands": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the namespace supports worker commands (server-to-worker communication via control queues)." + } + } + }, + "traits": { + "smithy.api#documentation": "Namespace capability details. Should contain what features are enabled in a namespace." + } + }, + "com.temporal.api#NamespaceInfoLimits": { + "type": "structure", + "members": { + "blobSizeLimitError": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum size in bytes for payload fields in workflow history events\n (e.g., workflow/activity inputs and results, failure details, signal payloads).\n When exceeded, the server will reject the operation with an error." + } + }, + "memoSizeLimitError": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum total memo size in bytes per workflow execution." + } + } + }, + "traits": {} + }, + "com.temporal.api#NamespaceConfig": { + "type": "structure", + "members": { + "workflowExecutionRetentionTtl": { + "target": "smithy.api#String" + }, + "badBinaries": { + "target": "com.temporal.api#BadBinaries" + }, + "historyArchivalState": { + "target": "com.temporal.api#NamespaceConfigHistoryArchivalState", + "traits": { + "smithy.api#documentation": "If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used." + } + }, + "historyArchivalUri": { + "target": "smithy.api#String" + }, + "visibilityArchivalState": { + "target": "com.temporal.api#NamespaceConfigVisibilityArchivalState", + "traits": { + "smithy.api#documentation": "If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used." + } + }, + "visibilityArchivalUri": { + "target": "smithy.api#String" + }, + "customSearchAttributeAliases": { + "target": "com.temporal.api#NamespaceConfigCustomSearchAttributeAliasesMap", + "traits": { + "smithy.api#documentation": "Map from field name to alias." + } + } + }, + "traits": {} + }, + "com.temporal.api#BadBinaries": { + "type": "structure", + "members": { + "binaries": { + "target": "com.temporal.api#BadBinariesBinariesMap" + } + }, + "traits": {} + }, + "com.temporal.api#BadBinaryInfo": { + "type": "structure", + "members": { + "reason": { + "target": "smithy.api#String" + }, + "operator": { + "target": "smithy.api#String" + }, + "createTime": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#BadBinariesBinariesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#BadBinaryInfo" + }, + "traits": {} + }, + "com.temporal.api#NamespaceConfigHistoryArchivalState": { + "type": "enum", + "members": { + "ARCHIVAL_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_UNSPECIFIED" + } + }, + "ARCHIVAL_STATE_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_DISABLED" + } + }, + "ARCHIVAL_STATE_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_ENABLED" + } + } + }, + "traits": { + "smithy.api#documentation": "If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used." + } + }, + "com.temporal.api#NamespaceConfigVisibilityArchivalState": { + "type": "enum", + "members": { + "ARCHIVAL_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_UNSPECIFIED" + } + }, + "ARCHIVAL_STATE_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_DISABLED" + } + }, + "ARCHIVAL_STATE_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_ENABLED" + } + } + }, + "traits": { + "smithy.api#documentation": "If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used." + } + }, + "com.temporal.api#NamespaceConfigCustomSearchAttributeAliasesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Map from field name to alias." + } + }, + "com.temporal.api#NamespaceReplicationConfig": { + "type": "structure", + "members": { + "activeClusterName": { + "target": "smithy.api#String" + }, + "clusters": { + "target": "com.temporal.api#NamespaceReplicationConfigClustersList" + }, + "state": { + "target": "com.temporal.api#NamespaceReplicationConfigState" + } + }, + "traits": {} + }, + "com.temporal.api#ClusterReplicationConfig": { + "type": "structure", + "members": { + "clusterName": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#NamespaceReplicationConfigClustersList": { + "type": "list", + "member": { + "target": "com.temporal.api#ClusterReplicationConfig" + }, + "traits": {} + }, + "com.temporal.api#NamespaceReplicationConfigState": { + "type": "enum", + "members": { + "REPLICATION_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLICATION_STATE_UNSPECIFIED" + } + }, + "REPLICATION_STATE_NORMAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLICATION_STATE_NORMAL" + } + }, + "REPLICATION_STATE_HANDOVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLICATION_STATE_HANDOVER" + } + } + }, + "traits": {} + }, + "com.temporal.api#FailoverStatus": { + "type": "structure", + "members": { + "failoverTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp when the Cluster switched to the following failover_version" + } + }, + "failoverVersion": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Represents a historical replication status of a Namespace" + } + }, + "com.temporal.api#DescribeNamespaceResponseFailoverHistoryList": { + "type": "list", + "member": { + "target": "com.temporal.api#FailoverStatus" + }, + "traits": { + "smithy.api#documentation": "Contains the historical state of failover_versions for the cluster, truncated to contain only the last N\n states to ensure that the list does not grow unbounded." + } + }, + "com.temporal.api#ListNamespacesResponseNamespacesList": { + "type": "list", + "member": { + "target": "com.temporal.api#DescribeNamespaceResponse" + }, + "traits": {} + }, + "com.temporal.api#ListNamespaces": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListNamespacesRequest" + }, + "output": { + "target": "com.temporal.api#ListNamespacesResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces", + "code": 200 + }, + "smithy.api#documentation": "ListNamespaces returns the information and configuration for all namespaces." + } + }, + "com.temporal.api#RegisterNamespaceRequestClustersList": { + "type": "list", + "member": { + "target": "com.temporal.api#ClusterReplicationConfig" + }, + "traits": {} + }, + "com.temporal.api#RegisterNamespaceRequestDataMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A key-value map for any customized purpose." + } + }, + "com.temporal.api#RegisterNamespaceRequestHistoryArchivalState": { + "type": "enum", + "members": { + "ARCHIVAL_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_UNSPECIFIED" + } + }, + "ARCHIVAL_STATE_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_DISABLED" + } + }, + "ARCHIVAL_STATE_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_ENABLED" + } + } + }, + "traits": { + "smithy.api#documentation": "If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used." + } + }, + "com.temporal.api#RegisterNamespaceRequestVisibilityArchivalState": { + "type": "enum", + "members": { + "ARCHIVAL_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_UNSPECIFIED" + } + }, + "ARCHIVAL_STATE_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_DISABLED" + } + }, + "ARCHIVAL_STATE_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARCHIVAL_STATE_ENABLED" + } + } + }, + "traits": { + "smithy.api#documentation": "If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used." + } + }, + "com.temporal.api#RegisterNamespaceRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String" + }, + "description": { + "target": "smithy.api#String" + }, + "ownerEmail": { + "target": "smithy.api#String" + }, + "workflowExecutionRetentionPeriod": { + "target": "smithy.api#String" + }, + "clusters": { + "target": "com.temporal.api#RegisterNamespaceRequestClustersList" + }, + "activeClusterName": { + "target": "smithy.api#String" + }, + "data": { + "target": "com.temporal.api#RegisterNamespaceRequestDataMap", + "traits": { + "smithy.api#documentation": "A key-value map for any customized purpose." + } + }, + "securityToken": { + "target": "smithy.api#String" + }, + "isGlobalNamespace": { + "target": "smithy.api#Boolean" + }, + "historyArchivalState": { + "target": "com.temporal.api#RegisterNamespaceRequestHistoryArchivalState", + "traits": { + "smithy.api#documentation": "If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used." + } + }, + "historyArchivalUri": { + "target": "smithy.api#String" + }, + "visibilityArchivalState": { + "target": "com.temporal.api#RegisterNamespaceRequestVisibilityArchivalState", + "traits": { + "smithy.api#documentation": "If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used." + } + }, + "visibilityArchivalUri": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RegisterNamespaceResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#RegisterNamespace": { + "type": "operation", + "input": { + "target": "com.temporal.api#RegisterNamespaceRequest" + }, + "output": { + "target": "com.temporal.api#RegisterNamespaceResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces", + "code": 200 + }, + "smithy.api#documentation": "RegisterNamespace creates a new namespace which can be used as a container for all resources.\n\n A Namespace is a top level entity within Temporal, and is used as a container for resources\n like workflow executions, task queues, etc. A Namespace acts as a sandbox and provides\n isolation for all resources within the namespace. All resources belongs to exactly one\n namespace." + } + }, + "com.temporal.api#DescribeNamespaceRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "id" + } + }, + "weakConsistency": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "weakConsistency", + "smithy.api#documentation": "If true, the server may serve the response from an eventually-consistent\n source instead of reading through to persistence. Defaults to false,\n which preserves read-after-write consistency. SDKs should set this when\n fetching namespace capabilities on worker/client startup." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeNamespace": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeNamespaceRequest" + }, + "output": { + "target": "com.temporal.api#DescribeNamespaceResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}", + "code": 200 + }, + "smithy.api#documentation": "DescribeNamespace returns the information and configuration for a registered namespace." + } + }, + "com.temporal.api#ListActivityExecutionsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "pageSize", + "smithy.api#documentation": "Max number of executions to return per page." + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken", + "smithy.api#documentation": "Token returned in ListActivityExecutionsResponse." + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#documentation": "Visibility query, see https://docs.temporal.io/list-filter for the syntax." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListActivityExecutionsResponse": { + "type": "structure", + "members": { + "executions": { + "target": "com.temporal.api#ListActivityExecutionsResponseExecutionsList" + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Token to use to fetch the next page. If empty, there is no next page." + } + } + }, + "traits": {} + }, + "com.temporal.api#ActivityExecutionListInfo": { + "type": "structure", + "members": { + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier of this activity within its namespace along with run ID (below)." + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run ID of the standalone activity." + } + }, + "activityType": { + "target": "com.temporal.api#ActivityType", + "traits": { + "smithy.api#documentation": "The type of the activity, a string that maps to a registered activity on a worker." + } + }, + "scheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time the activity was originally scheduled via a StartActivityExecution request." + } + }, + "closeTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If the activity is in a terminal status, this field represents the time the activity transitioned to that status." + } + }, + "status": { + "target": "com.temporal.api#ActivityExecutionListInfoStatus", + "traits": { + "smithy.api#documentation": "Only scheduled and terminal statuses appear here. More detailed information in PendingActivityInfo but not\n available in the list response." + } + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes", + "traits": { + "smithy.api#documentation": "Search attributes from the start request." + } + }, + "taskQueue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The task queue this activity was scheduled on when it was originally started, updated on activity options update." + } + }, + "stateTransitionCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Updated on terminal status." + } + }, + "stateSizeBytes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Updated once on scheduled and once on terminal status." + } + }, + "executionDuration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The difference between close time and scheduled time.\n This field is only populated if the activity is closed." + } + } + }, + "traits": { + "smithy.api#documentation": "Limited activity information returned in the list response.\n When adding fields here, ensure that it is also present in ActivityExecutionInfo (note that it\n may already be present in ActivityExecutionInfo but not at the top-level)." + } + }, + "com.temporal.api#ActivityType": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Represents the identifier used by a activity author to define the activity. Typically, the\n name of a function. This is sometimes referred to as the activity's \"name\"" + } + }, + "com.temporal.api#ActivityExecutionListInfoStatus": { + "type": "enum", + "members": { + "ACTIVITY_EXECUTION_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_UNSPECIFIED" + } + }, + "ACTIVITY_EXECUTION_STATUS_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_RUNNING" + } + }, + "ACTIVITY_EXECUTION_STATUS_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_COMPLETED" + } + }, + "ACTIVITY_EXECUTION_STATUS_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_FAILED" + } + }, + "ACTIVITY_EXECUTION_STATUS_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_CANCELED" + } + }, + "ACTIVITY_EXECUTION_STATUS_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_TERMINATED" + } + }, + "ACTIVITY_EXECUTION_STATUS_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_TIMED_OUT" + } + } + }, + "traits": { + "smithy.api#documentation": "Only scheduled and terminal statuses appear here. More detailed information in PendingActivityInfo but not\n available in the list response." + } + }, + "com.temporal.api#SearchAttributes": { + "type": "structure", + "members": { + "indexedFields": { + "target": "com.temporal.api#SearchAttributesIndexedFieldsMap" + } + }, + "traits": { + "smithy.api#documentation": "A user-defined set of *indexed* fields that are used/exposed when listing/searching workflows.\n The payload is not serialized in a user-defined way." + } + }, + "com.temporal.api#SearchAttributesIndexedFieldsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.temporal.api#ListActivityExecutionsResponseExecutionsList": { + "type": "list", + "member": { + "target": "com.temporal.api#ActivityExecutionListInfo" + }, + "traits": {} + }, + "com.temporal.api#ListActivityExecutions": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListActivityExecutionsRequest" + }, + "output": { + "target": "com.temporal.api#ListActivityExecutionsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/activities", + "code": 200 + }, + "smithy.api#documentation": "ListActivityExecutions is a visibility API to list activity executions in a specific namespace." + } + }, + "com.temporal.api#WorkflowExecution": { + "type": "structure", + "members": { + "workflowId": { + "target": "smithy.api#String" + }, + "runId": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Identifies a specific workflow within a namespace. Practically speaking, because run_id is a\n uuid, a workflow execution is globally unique. Note that many commands allow specifying an empty\n run id as a way of saying \"target the latest run of the workflow\"." + } + }, + "com.temporal.api#PauseActivityRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity." + } + }, + "execution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "Execution info of the workflow which scheduled this activity" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Only the activity with this ID will be paused." + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Pause all running activities of this type.\n Note: Experimental - the behavior of pause by activity type might change in a future release." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason to pause the activity." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe pause requests." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#PauseActivityResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#PauseActivity": { + "type": "operation", + "input": { + "target": "com.temporal.api#PauseActivityRequest" + }, + "output": { + "target": "com.temporal.api#PauseActivityResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities-deprecated/pause", + "code": 200 + }, + "smithy.api#documentation": "PauseActivity pauses the execution of an activity specified by its ID or type.\n If there are multiple pending activities of the provided type - all of them will be paused\n\n Pausing an activity means:\n - If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n - If the activity is already paused, calling this method will have no effect.\n - If the activity is running and finishes successfully, the activity will be completed.\n - If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\n For long-running activities:\n - activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n - The activity should respond to the cancellation accordingly.\n\n Returns a `NotFound` error if there is no pending activity with the provided ID or type\n This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and\n structured to work well for standalone activities." + } + }, + "com.temporal.api#ResetActivityRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity." + } + }, + "execution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "Execution info of the workflow which scheduled this activity" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Only activity with this ID will be reset." + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reset all running activities with of this type." + } + }, + "matchAll": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Reset all running activities." + } + }, + "resetHeartbeat": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Indicates that activity should reset heartbeat details.\n This flag will be applied only to the new instance of the activity." + } + }, + "keepPaused": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If activity is paused, it will remain paused after reset" + } + }, + "jitter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration.\n (unless it is paused and keep_paused is set)" + } + }, + "restoreOriginalOptions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If set, the activity options will be restored to the defaults.\n Default options are then options activity was created with.\n They are part of the first schedule event." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ResetActivityResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#ResetActivity": { + "type": "operation", + "input": { + "target": "com.temporal.api#ResetActivityRequest" + }, + "output": { + "target": "com.temporal.api#ResetActivityResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities-deprecated/reset", + "code": 200 + }, + "smithy.api#documentation": "ResetActivity resets the execution of an activity specified by its ID or type.\n If there are multiple pending activities of the provided type - all of them will be reset.\n\n Resetting an activity means:\n * number of attempts will be reset to 0.\n * activity timeouts will be reset.\n * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\n Flags:\n\n 'jitter': the activity will be scheduled at a random time within the jitter duration.\n If the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n 'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n 'keep_paused': if the activity is paused, it will remain paused.\n\n Returns a `NotFound` error if there is no pending activity with the provided ID or type.\n This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and\n structured to work well for standalone activities." + } + }, + "com.temporal.api#UnpauseActivityRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity." + } + }, + "execution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "Execution info of the workflow which scheduled this activity" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Only the activity with this ID will be unpaused." + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unpause all running activities with of this type." + } + }, + "unpauseAll": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Unpause all running activities." + } + }, + "resetAttempts": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Providing this flag will also reset the number of attempts." + } + }, + "resetHeartbeat": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Providing this flag will also reset the heartbeat details." + } + }, + "jitter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If set, the activity will start at a random time within the specified jitter duration." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UnpauseActivityResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#UnpauseActivity": { + "type": "operation", + "input": { + "target": "com.temporal.api#UnpauseActivityRequest" + }, + "output": { + "target": "com.temporal.api#UnpauseActivityResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities-deprecated/unpause", + "code": 200 + }, + "smithy.api#documentation": "UnpauseActivity unpauses the execution of an activity specified by its ID or type.\n If there are multiple pending activities of the provided type - all of them will be unpaused.\n\n If activity is not paused, this call will have no effect.\n If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\n Once the activity is unpaused, all timeout timers will be regenerated.\n\n Flags:\n 'jitter': the activity will be scheduled at a random time within the jitter duration.\n 'reset_attempts': the number of attempts will be reset.\n 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\n Returns a `NotFound` error if there is no pending activity with the provided ID or type\n This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\n structured to work well for standalone activities." + } + }, + "com.temporal.api#ActivityOptions": { + "type": "structure", + "members": { + "taskQueue": { + "target": "com.temporal.api#TaskQueue" + }, + "scheduleToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Indicates how long the caller is willing to wait for an activity completion. Limits how long\n retries will be attempted. Either this or `start_to_close_timeout` must be specified.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "scheduleToStartTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Limits time an activity task can stay in a task queue before a worker picks it up. This\n timeout is always non retryable, as all a retry would achieve is to put it back into the same\n queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not\n specified.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "startToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum time an activity is allowed to execute after being picked up by a worker. This\n timeout is always retryable. Either this or `schedule_to_close_timeout` must be\n specified.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "heartbeatTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum permitted time between successful worker heartbeats." + } + }, + "retryPolicy": { + "target": "com.temporal.api#RetryPolicy", + "traits": { + "smithy.api#documentation": "The retry policy for the activity. Will never exceed `schedule_to_close_timeout`." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata. If this message is not present, or any fields are not\n present, they inherit the values from the workflow." + } + } + }, + "traits": {} + }, + "com.temporal.api#TaskQueue": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + }, + "kind": { + "target": "com.temporal.api#TaskQueueKind", + "traits": { + "smithy.api#documentation": "Default: TASK_QUEUE_KIND_NORMAL." + } + }, + "normalName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of\n the normal task queue that the sticky worker is running on." + } + } + }, + "traits": { + "smithy.api#documentation": "See https://docs.temporal.io/docs/concepts/task-queues/" + } + }, + "com.temporal.api#TaskQueueKind": { + "type": "enum", + "members": { + "TASK_QUEUE_KIND_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_KIND_UNSPECIFIED" + } + }, + "TASK_QUEUE_KIND_NORMAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_KIND_NORMAL" + } + }, + "TASK_QUEUE_KIND_STICKY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_KIND_STICKY" + } + }, + "TASK_QUEUE_KIND_WORKER_COMMANDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_KIND_WORKER_COMMANDS" + } + } + }, + "traits": { + "smithy.api#documentation": "Default: TASK_QUEUE_KIND_NORMAL." + } + }, + "com.temporal.api#RetryPolicy": { + "type": "structure", + "members": { + "initialInterval": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries." + } + }, + "backoffCoefficient": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Coefficient used to calculate the next retry interval.\n The next retry interval is previous interval multiplied by the coefficient.\n Must be 1 or larger." + } + }, + "maximumInterval": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum interval between retries. Exponential backoff leads to interval increase.\n This value is the cap of the increase. Default is 100x of the initial interval." + } + }, + "maximumAttempts": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of attempts. When exceeded the retries stop even if not expired yet.\n 1 disables retries. 0 means unlimited (up to the timeouts)" + } + }, + "nonRetryableErrorTypes": { + "target": "com.temporal.api#RetryPolicyNonRetryableErrorTypesList", + "traits": { + "smithy.api#documentation": "Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that\n this is not a substring match, the error *type* (not message) must match exactly." + } + } + }, + "traits": { + "smithy.api#documentation": "How retries ought to be handled, usable by both workflows and activities" + } + }, + "com.temporal.api#RetryPolicyNonRetryableErrorTypesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that\n this is not a substring match, the error *type* (not message) must match exactly." + } + }, + "com.temporal.api#Priority": { + "type": "structure", + "members": { + "priorityKey": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Priority key is a positive integer from 1 to n, where smaller integers\n correspond to higher priorities (tasks run sooner). In general, tasks in\n a queue should be processed in close to priority order, although small\n deviations are possible.\n\n The maximum priority value (minimum priority) is determined by server\n configuration, and defaults to 5.\n\n If priority is not present (or zero), then the effective priority will be\n the default priority, which is calculated by (min+max)/2. With the\n default max of 5, and min of 1, that comes out to 3." + } + }, + "fairnessKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Fairness key is a short string that's used as a key for a fairness\n balancing mechanism. It may correspond to a tenant id, or to a fixed\n string like \"high\" or \"low\". The default is the empty string.\n\n The fairness mechanism attempts to dispatch tasks for a given key in\n proportion to its weight. For example, using a thousand distinct tenant\n ids, each with a weight of 1.0 (the default) will result in each tenant\n getting a roughly equal share of task dispatch throughput.\n\n (Note: this does not imply equal share of worker capacity! Fairness\n decisions are made based on queue statistics, not\n current worker load.)\n\n As another example, using keys \"high\" and \"low\" with weight 9.0 and 1.0\n respectively will prefer dispatching \"high\" tasks over \"low\" tasks at a\n 9:1 ratio, while allowing either key to use all worker capacity if the\n other is not present.\n\n All fairness mechanisms, including rate limits, are best-effort and\n probabilistic. The results may not match what a \"perfect\" algorithm with\n infinite resources would produce. The more unique keys are used, the less\n accurate the results will be.\n\n Fairness keys are limited to 64 bytes." + } + }, + "fairnessWeight": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Fairness weight for a task can come from multiple sources for\n flexibility. From highest to lowest precedence:\n 1. Weights for a small set of keys can be overridden in task queue\n configuration with an API.\n 2. It can be attached to the workflow/activity in this field.\n 3. The default weight of 1.0 will be used.\n\n Weight values are clamped to the range [0.001, 1000]." + } + } + }, + "traits": { + "smithy.api#documentation": "Priority contains metadata that controls relative ordering of task processing\n when tasks are backed up in a queue. Initially, Priority will be used in\n matching (workflow and activity) task queues. Later it may be used in history\n task queues and in rate limiting decisions.\n\n Priority is attached to workflows and activities. By default, activities\n inherit Priority from the workflow that created them, but may override fields\n when an activity is started or modified.\n\n Despite being named \"Priority\", this message also contains fields that\n control \"fairness\" mechanisms.\n\n For all fields, the field not present or equal to zero/empty string means to\n inherit the value from the calling workflow, or if there is no calling\n workflow, then use the default value.\n\n For all fields other than fairness_key, the zero value isn't meaningful so\n there's no confusion between inherit/default and a meaningful value. For\n fairness_key, the empty string will be interpreted as \"inherit\". This means\n that if a workflow has a non-empty fairness key, you can't override the\n fairness key of its activity to the empty string.\n\n The overall semantics of Priority are:\n 1. First, consider \"priority\": higher priority (lower number) goes first.\n 2. Then, consider fairness: try to dispatch tasks for different fairness keys\n in proportion to their weight.\n\n Applications may use any subset of mechanisms that are useful to them and\n leave the other fields to use default values.\n\n Not all queues in the system may support the \"full\" semantics of all priority\n fields. (Currently only support in matching task queues is planned.)" + } + }, + "com.temporal.api#UpdateActivityOptionsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity" + } + }, + "execution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "Execution info of the workflow which scheduled this activity" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request" + } + }, + "activityOptions": { + "target": "com.temporal.api#ActivityOptions", + "traits": { + "smithy.api#documentation": "Activity options. Partial updates are accepted and controlled by update_mask" + } + }, + "updateMask": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Controls which fields from `activity_options` will be applied" + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Only activity with this ID will be updated." + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Update all running activities of this type." + } + }, + "matchAll": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Update all running activities." + } + }, + "restoreOriginal": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If set, the activity options will be restored to the default.\n Default options are then options activity was created with.\n They are part of the first schedule event.\n This flag cannot be combined with any other option; if you supply\n restore_original together with other options, the request will be rejected." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateActivityOptionsResponse": { + "type": "structure", + "members": { + "activityOptions": { + "target": "com.temporal.api#ActivityOptions", + "traits": { + "smithy.api#documentation": "Activity options after an update" + } + } + }, + "traits": { + "smithy.api#documentation": "Deprecated. Use `UpdateActivityExecutionOptionsResponse`." + } + }, + "com.temporal.api#UpdateActivityOptions": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateActivityOptionsRequest" + }, + "output": { + "target": "com.temporal.api#UpdateActivityOptionsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities-deprecated/update-options", + "code": 200 + }, + "smithy.api#documentation": "UpdateActivityOptions is called by the client to update the options of an activity by its ID or type.\n If there are multiple pending activities of the provided type - all of them will be updated.\n This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and\n structured to work well for standalone activities." + } + }, + "com.temporal.api#DescribeActivityExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "runId", + "smithy.api#documentation": "Activity run ID. If empty the request targets the latest run." + } + }, + "includeInput": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "includeInput", + "smithy.api#documentation": "Include the input field in the response." + } + }, + "includeOutcome": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "includeOutcome", + "smithy.api#documentation": "Include the outcome (result/failure) in the response if the activity has completed." + } + }, + "longPollToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "longPollToken", + "smithy.api#documentation": "Token from a previous DescribeActivityExecutionResponse. If present, long-poll until activity\n state changes from the state encoded in this token. If absent, return current state immediately.\n If present, run_id must also be present.\n Note that activity state may change multiple times between requests, therefore it is not\n guaranteed that a client making a sequence of long-poll requests will see a complete\n sequence of state changes." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeActivityExecutionResponse": { + "type": "structure", + "members": { + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run ID of the activity, useful when run_id was not specified in the request." + } + }, + "info": { + "target": "com.temporal.api#ActivityExecutionInfo", + "traits": { + "smithy.api#documentation": "Information about the activity execution." + } + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized activity input, passed as arguments to the activity function.\n Only set if include_input was true in the request." + } + }, + "outcome": { + "target": "com.temporal.api#ActivityExecutionOutcome", + "traits": { + "smithy.api#documentation": "Only set if the activity is completed and include_outcome was true in the request." + } + }, + "longPollToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Token for follow-on long-poll requests. Absent only if the activity is complete." + } + }, + "callbacks": { + "target": "com.temporal.api#DescribeActivityExecutionResponseCallbacksList", + "traits": { + "smithy.api#documentation": "Callbacks attached to this activity execution and their current state." + } + } + }, + "traits": {} + }, + "com.temporal.api#ActivityExecutionInfo": { + "type": "structure", + "members": { + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of this activity within its namespace along with run ID (below)." + } + }, + "runId": { + "target": "smithy.api#String" + }, + "activityType": { + "target": "com.temporal.api#ActivityType", + "traits": { + "smithy.api#documentation": "The type of the activity, a string that maps to a registered activity on a worker." + } + }, + "status": { + "target": "com.temporal.api#ActivityExecutionInfoStatus", + "traits": { + "smithy.api#documentation": "A general status for this activity, indicates whether it is currently running or in one of the terminal statuses." + } + }, + "runState": { + "target": "com.temporal.api#ActivityExecutionInfoRunState", + "traits": { + "smithy.api#documentation": "More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING." + } + }, + "taskQueue": { + "target": "smithy.api#String" + }, + "scheduleToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Indicates how long the caller is willing to wait for an activity completion. Limits how long\n retries will be attempted.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "scheduleToStartTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Limits time an activity task can stay in a task queue before a worker picks it up. This\n timeout is always non retryable, as all a retry would achieve is to put it back into the same\n queue. Defaults to `schedule_to_close_timeout`.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "startToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum time a single activity attempt is allowed to execute after being picked up by a worker. This\n timeout is always retryable.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "heartbeatTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum permitted time between successful worker heartbeats." + } + }, + "retryPolicy": { + "target": "com.temporal.api#RetryPolicy", + "traits": { + "smithy.api#documentation": "The retry policy for the activity. Will never exceed `schedule_to_close_timeout`." + } + }, + "heartbeatDetails": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Details provided in the last recorded activity heartbeat." + } + }, + "lastHeartbeatTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time the last heartbeat was recorded." + } + }, + "lastStartedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time the last attempt was started." + } + }, + "attempt": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The attempt this activity is currently on. Incremented each time a new attempt is scheduled." + } + }, + "executionDuration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "How long this activity has been running for, including all attempts and backoff between attempts." + } + }, + "scheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time the activity was originally scheduled via a StartActivityExecution request." + } + }, + "expirationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Scheduled time + schedule to close timeout." + } + }, + "closeTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time when the activity transitioned to a closed state." + } + }, + "lastFailure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Failure details from the last failed attempt." + } + }, + "lastWorkerIdentity": { + "target": "smithy.api#String" + }, + "currentRetryInterval": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time from the last attempt failure to the next activity retry.\n If the activity is currently running, this represents the next retry interval in case the attempt fails.\n If activity is currently backing off between attempt, this represents the current retry interval.\n If there is no next retry allowed, this field will be null.\n This interval is typically calculated from the specified retry policy, but may be modified if an activity fails\n with a retryable application failure specifying a retry delay." + } + }, + "lastAttemptCompleteTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the last activity attempt completed. If activity has not been completed yet, it will be null." + } + }, + "nextAttemptScheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the next activity attempt will be scheduled.\n If activity is currently scheduled or started, this field will be null." + } + }, + "lastDeploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "The Worker Deployment Version this activity was dispatched to most recently.\n If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata." + } + }, + "stateTransitionCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Incremented each time the activity's state is mutated in persistence." + } + }, + "stateSizeBytes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Updated once on scheduled and once on terminal status." + } + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "header": { + "target": "com.temporal.api#Header" + }, + "userMetadata": { + "target": "com.temporal.api#UserMetadata", + "traits": { + "smithy.api#documentation": "Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity." + } + }, + "canceledReason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Set if activity cancelation was requested." + } + }, + "links": { + "target": "com.temporal.api#ActivityExecutionInfoLinksList", + "traits": { + "smithy.api#documentation": "Links to related entities, such as the entity that started this activity." + } + }, + "totalHeartbeatCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Total number of heartbeats recorded across all attempts of this activity, including retries." + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a standalone activity." + } + }, + "com.temporal.api#ActivityExecutionInfoStatus": { + "type": "enum", + "members": { + "ACTIVITY_EXECUTION_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_UNSPECIFIED" + } + }, + "ACTIVITY_EXECUTION_STATUS_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_RUNNING" + } + }, + "ACTIVITY_EXECUTION_STATUS_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_COMPLETED" + } + }, + "ACTIVITY_EXECUTION_STATUS_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_FAILED" + } + }, + "ACTIVITY_EXECUTION_STATUS_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_CANCELED" + } + }, + "ACTIVITY_EXECUTION_STATUS_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_TERMINATED" + } + }, + "ACTIVITY_EXECUTION_STATUS_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_EXECUTION_STATUS_TIMED_OUT" + } + } + }, + "traits": { + "smithy.api#documentation": "A general status for this activity, indicates whether it is currently running or in one of the terminal statuses." + } + }, + "com.temporal.api#ActivityExecutionInfoRunState": { + "type": "enum", + "members": { + "PENDING_ACTIVITY_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_UNSPECIFIED" + } + }, + "PENDING_ACTIVITY_STATE_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_SCHEDULED" + } + }, + "PENDING_ACTIVITY_STATE_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_STARTED" + } + }, + "PENDING_ACTIVITY_STATE_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_CANCEL_REQUESTED" + } + }, + "PENDING_ACTIVITY_STATE_PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_PAUSED" + } + }, + "PENDING_ACTIVITY_STATE_PAUSE_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_PAUSE_REQUESTED" + } + } + }, + "traits": { + "smithy.api#documentation": "More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING." + } + }, + "com.temporal.api#Payloads": { + "type": "structure", + "members": { + "payloads": { + "target": "com.temporal.api#PayloadsPayloadsList" + } + }, + "traits": { + "smithy.api#documentation": "See `Payload`" + } + }, + "com.temporal.api#PayloadsPayloadsList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.temporal.api#Failure": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "source": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK\n In some SDKs this is used to rehydrate the stack trace into an exception object." + } + }, + "stackTrace": { + "target": "smithy.api#String" + }, + "encodedAttributes": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of\n errors originating in user code which might contain sensitive information.\n The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto\n message.\n\n SDK authors:\n - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that:\n - Uses a JSON object to represent `{ message, stack_trace }`.\n - Overwrites the original message with \"Encoded failure\" to indicate that more information could be extracted.\n - Overwrites the original stack_trace with an empty string.\n - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed\n by the user-provided PayloadCodec\n\n - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes." + } + }, + "cause": { + "target": "com.temporal.api#Failure" + }, + "applicationFailureInfo": { + "target": "com.temporal.api#ApplicationFailureInfo" + }, + "timeoutFailureInfo": { + "target": "com.temporal.api#TimeoutFailureInfo" + }, + "canceledFailureInfo": { + "target": "com.temporal.api#CanceledFailureInfo" + }, + "terminatedFailureInfo": { + "target": "com.temporal.api#TerminatedFailureInfo" + }, + "serverFailureInfo": { + "target": "com.temporal.api#ServerFailureInfo" + }, + "resetWorkflowFailureInfo": { + "target": "com.temporal.api#ResetWorkflowFailureInfo" + }, + "activityFailureInfo": { + "target": "com.temporal.api#ActivityFailureInfo" + }, + "childWorkflowExecutionFailureInfo": { + "target": "com.temporal.api#ChildWorkflowExecutionFailureInfo" + }, + "nexusOperationExecutionFailureInfo": { + "target": "com.temporal.api#NexusOperationFailureInfo" + }, + "nexusHandlerFailureInfo": { + "target": "com.temporal.api#NexusHandlerFailureInfo" + } + }, + "traits": {} + }, + "com.temporal.api#ApplicationFailureInfo": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String" + }, + "nonRetryable": { + "target": "smithy.api#Boolean" + }, + "details": { + "target": "com.temporal.api#Payloads" + }, + "nextRetryDelay": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "next_retry_delay can be used by the client to override the activity\n retry interval calculated by the retry policy. Retry attempts will\n still be subject to the maximum retries limit and total time limit\n defined by the policy." + } + }, + "category": { + "target": "com.temporal.api#ApplicationFailureInfoCategory" + } + }, + "traits": {} + }, + "com.temporal.api#ApplicationFailureInfoCategory": { + "type": "enum", + "members": { + "APPLICATION_ERROR_CATEGORY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPLICATION_ERROR_CATEGORY_UNSPECIFIED" + } + }, + "APPLICATION_ERROR_CATEGORY_BENIGN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPLICATION_ERROR_CATEGORY_BENIGN" + } + } + }, + "traits": {} + }, + "com.temporal.api#TimeoutFailureInfo": { + "type": "structure", + "members": { + "timeoutType": { + "target": "com.temporal.api#TimeoutFailureInfoTimeoutType" + }, + "lastHeartbeatDetails": { + "target": "com.temporal.api#Payloads" + } + }, + "traits": {} + }, + "com.temporal.api#TimeoutFailureInfoTimeoutType": { + "type": "enum", + "members": { + "TIMEOUT_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT_TYPE_UNSPECIFIED" + } + }, + "TIMEOUT_TYPE_START_TO_CLOSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT_TYPE_START_TO_CLOSE" + } + }, + "TIMEOUT_TYPE_SCHEDULE_TO_START": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT_TYPE_SCHEDULE_TO_START" + } + }, + "TIMEOUT_TYPE_SCHEDULE_TO_CLOSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT_TYPE_SCHEDULE_TO_CLOSE" + } + }, + "TIMEOUT_TYPE_HEARTBEAT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT_TYPE_HEARTBEAT" + } + } + }, + "traits": {} + }, + "com.temporal.api#CanceledFailureInfo": { + "type": "structure", + "members": { + "details": { + "target": "com.temporal.api#Payloads" + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker or client that requested the cancellation." + } + } + }, + "traits": {} + }, + "com.temporal.api#TerminatedFailureInfo": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker or client that requested the termination." + } + } + }, + "traits": {} + }, + "com.temporal.api#ServerFailureInfo": { + "type": "structure", + "members": { + "nonRetryable": { + "target": "smithy.api#Boolean" + } + }, + "traits": {} + }, + "com.temporal.api#ResetWorkflowFailureInfo": { + "type": "structure", + "members": { + "lastHeartbeatDetails": { + "target": "com.temporal.api#Payloads" + } + }, + "traits": {} + }, + "com.temporal.api#ActivityFailureInfo": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String" + }, + "startedEventId": { + "target": "smithy.api#String" + }, + "identity": { + "target": "smithy.api#String" + }, + "activityType": { + "target": "com.temporal.api#ActivityType" + }, + "activityId": { + "target": "smithy.api#String" + }, + "retryState": { + "target": "com.temporal.api#ActivityFailureInfoRetryState" + } + }, + "traits": {} + }, + "com.temporal.api#ActivityFailureInfoRetryState": { + "type": "enum", + "members": { + "RETRY_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_UNSPECIFIED" + } + }, + "RETRY_STATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_IN_PROGRESS" + } + }, + "RETRY_STATE_NON_RETRYABLE_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_NON_RETRYABLE_FAILURE" + } + }, + "RETRY_STATE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_TIMEOUT" + } + }, + "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + } + }, + "RETRY_STATE_RETRY_POLICY_NOT_SET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_RETRY_POLICY_NOT_SET" + } + }, + "RETRY_STATE_INTERNAL_SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_INTERNAL_SERVER_ERROR" + } + }, + "RETRY_STATE_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_CANCEL_REQUESTED" + } + } + }, + "traits": {} + }, + "com.temporal.api#ChildWorkflowExecutionFailureInfo": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "initiatedEventId": { + "target": "smithy.api#String" + }, + "startedEventId": { + "target": "smithy.api#String" + }, + "retryState": { + "target": "com.temporal.api#ChildWorkflowExecutionFailureInfoRetryState" + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowType": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Represents the identifier used by a workflow author to define the workflow. Typically, the\n name of a function. This is sometimes referred to as the workflow's \"name\"" + } + }, + "com.temporal.api#ChildWorkflowExecutionFailureInfoRetryState": { + "type": "enum", + "members": { + "RETRY_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_UNSPECIFIED" + } + }, + "RETRY_STATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_IN_PROGRESS" + } + }, + "RETRY_STATE_NON_RETRYABLE_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_NON_RETRYABLE_FAILURE" + } + }, + "RETRY_STATE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_TIMEOUT" + } + }, + "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + } + }, + "RETRY_STATE_RETRY_POLICY_NOT_SET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_RETRY_POLICY_NOT_SET" + } + }, + "RETRY_STATE_INTERNAL_SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_INTERNAL_SERVER_ERROR" + } + }, + "RETRY_STATE_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_CANCEL_REQUESTED" + } + } + }, + "traits": {} + }, + "com.temporal.api#NexusOperationFailureInfo": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The NexusOperationScheduled event ID." + } + }, + "endpoint": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Endpoint name." + } + }, + "service": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Service name." + } + }, + "operation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation name." + } + }, + "operationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation ID - may be empty if the operation completed synchronously.\n\n Deprecated. Renamed to operation_token." + } + }, + "operationToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation token - may be empty if the operation completed synchronously." + } + } + }, + "traits": { + "smithy.api#documentation": "Representation of the Temporal SDK NexusOperationError object that is returned to workflow callers." + } + }, + "com.temporal.api#NexusHandlerFailureInfo": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The Nexus error type as defined in the spec:\n https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors." + } + }, + "retryBehavior": { + "target": "com.temporal.api#NexusHandlerFailureInfoRetryBehavior", + "traits": { + "smithy.api#documentation": "Retry behavior, defaults to the retry behavior of the error type as defined in the spec." + } + } + }, + "traits": {} + }, + "com.temporal.api#NexusHandlerFailureInfoRetryBehavior": { + "type": "enum", + "members": { + "NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED" + } + }, + "NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE" + } + }, + "NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE" + } + } + }, + "traits": { + "smithy.api#documentation": "Retry behavior, defaults to the retry behavior of the error type as defined in the spec." + } + }, + "com.temporal.api#WorkerDeploymentVersion": { + "type": "structure", + "members": { + "buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this Version within the Deployment it is a part of.\n Not necessarily unique within the namespace.\n The combination of `deployment_name` and `build_id` uniquely identifies this\n Version within the namespace, because Deployment names are unique within a namespace." + } + }, + "deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identifies the Worker Deployment this Version is part of." + } + } + }, + "traits": { + "smithy.api#documentation": "A Worker Deployment Version (Version, for short) represents a\n version of workers within a Worker Deployment. (see documentation of WorkerDeploymentVersionInfo)\n Version records are created in Temporal server automatically when their\n first poller arrives to the server.\n Experimental. Worker Deployment Versions are experimental and might significantly change in the future." + } + }, + "com.temporal.api#Header": { + "type": "structure", + "members": { + "fields": { + "target": "com.temporal.api#HeaderFieldsMap" + } + }, + "traits": { + "smithy.api#documentation": "Contains metadata that can be attached to a variety of requests, like starting a workflow, and\n can be propagated between, for example, workflows and activities." + } + }, + "com.temporal.api#HeaderFieldsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.temporal.api#UserMetadata": { + "type": "structure", + "members": { + "summary": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Short-form text that provides a summary. This payload should be a \"json/plain\"-encoded payload\n that is a single JSON string for use in user interfaces. User interface formatting may not\n apply to this text when used in \"title\" situations. The payload data section is limited to 400\n bytes by default." + } + }, + "details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Long-form text that provides details. This payload should be a \"json/plain\"-encoded payload\n that is a single JSON string for use in user interfaces. User interface formatting may apply to\n this text in common use. The payload data section is limited to 20000 bytes by default." + } + } + }, + "traits": { + "smithy.api#documentation": "Information a user can set, often for use by user interfaces." + } + }, + "com.temporal.api#Link": { + "type": "structure", + "members": { + "workflowEvent": { + "target": "com.temporal.api#LinkWorkflowEvent" + }, + "batchJob": { + "target": "com.temporal.api#LinkBatchJob" + }, + "activity": { + "target": "com.temporal.api#LinkActivity" + }, + "nexusOperation": { + "target": "com.temporal.api#LinkNexusOperation" + } + }, + "traits": { + "smithy.api#documentation": "Link can be associated with history events. It might contain information about an external entity\n related to the history event. For example, workflow A makes a Nexus call that starts workflow B:\n in this case, a history event in workflow A could contain a Link to the workflow started event in\n workflow B, and vice-versa." + } + }, + "com.temporal.api#LinkWorkflowEvent": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String" + }, + "workflowId": { + "target": "smithy.api#String" + }, + "runId": { + "target": "smithy.api#String" + }, + "eventRef": { + "target": "com.temporal.api#WorkflowEventEventReference" + }, + "requestIdRef": { + "target": "com.temporal.api#WorkflowEventRequestIdReference" + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowEventEventReference": { + "type": "structure", + "members": { + "eventId": { + "target": "smithy.api#String" + }, + "eventType": { + "target": "com.temporal.api#WorkflowEventEventReferenceEventType" + } + }, + "traits": { + "smithy.api#documentation": "EventReference is a direct reference to a history event through the event ID." + } + }, + "com.temporal.api#WorkflowEventEventReferenceEventType": { + "type": "enum", + "members": { + "EVENT_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_UNSPECIFIED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_STARTED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_FAILED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_STARTED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_FAILED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_CANCELED" + } + }, + "EVENT_TYPE_TIMER_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_STARTED" + } + }, + "EVENT_TYPE_TIMER_FIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_FIRED" + } + }, + "EVENT_TYPE_TIMER_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_CANCELED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED" + } + }, + "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_MARKER_RECORDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_MARKER_RECORDED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW" + } + }, + "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED" + } + }, + "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED" + } + }, + "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY" + } + }, + "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY" + } + }, + "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_STARTED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_COMPLETED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_FAILED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCELED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowEventRequestIdReference": { + "type": "structure", + "members": { + "requestId": { + "target": "smithy.api#String" + }, + "eventType": { + "target": "com.temporal.api#WorkflowEventRequestIdReferenceEventType" + } + }, + "traits": { + "smithy.api#documentation": "RequestIdReference is a indirect reference to a history event through the request ID." + } + }, + "com.temporal.api#WorkflowEventRequestIdReferenceEventType": { + "type": "enum", + "members": { + "EVENT_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_UNSPECIFIED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_STARTED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_FAILED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_STARTED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_FAILED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_CANCELED" + } + }, + "EVENT_TYPE_TIMER_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_STARTED" + } + }, + "EVENT_TYPE_TIMER_FIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_FIRED" + } + }, + "EVENT_TYPE_TIMER_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_CANCELED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED" + } + }, + "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_MARKER_RECORDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_MARKER_RECORDED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW" + } + }, + "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED" + } + }, + "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED" + } + }, + "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY" + } + }, + "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY" + } + }, + "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_STARTED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_COMPLETED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_FAILED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCELED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED" + } + } + }, + "traits": {} + }, + "com.temporal.api#LinkBatchJob": { + "type": "structure", + "members": { + "jobId": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "A link to a built-in batch job.\n Batch jobs can be used to perform operations on a set of workflows (e.g. terminate, signal, cancel, etc).\n This link can be put on workflow history events generated by actions taken by a batch job." + } + }, + "com.temporal.api#LinkActivity": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String" + }, + "activityId": { + "target": "smithy.api#String" + }, + "runId": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "A link to an activity." + } + }, + "com.temporal.api#LinkNexusOperation": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String" + }, + "operationId": { + "target": "smithy.api#String" + }, + "runId": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "A link to a standalone Nexus operation." + } + }, + "com.temporal.api#ActivityExecutionInfoLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links to related entities, such as the entity that started this activity." + } + }, + "com.temporal.api#ActivityExecutionOutcome": { + "type": "structure", + "members": { + "result": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "The result if the activity completed successfully." + } + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "The failure if the activity completed unsuccessfully." + } + } + }, + "traits": { + "smithy.api#documentation": "The outcome of a completed activity execution: either a successful result or a failure." + } + }, + "com.temporal.api#CallbackInfo": { + "type": "structure", + "members": { + "callback": { + "target": "com.temporal.api#Callback", + "traits": { + "smithy.api#documentation": "Information on how this callback should be invoked (e.g. its URL and type)." + } + }, + "registrationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the callback was registered." + } + }, + "state": { + "target": "com.temporal.api#CallbackInfoState", + "traits": { + "smithy.api#documentation": "The current state of the callback." + } + }, + "attempt": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of attempts made to deliver the callback.\n This number represents a minimum bound since the attempt is incremented after the callback request completes." + } + }, + "lastAttemptCompleteTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the last attempt completed." + } + }, + "lastAttemptFailure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "The last attempt's failure, if any." + } + }, + "nextAttemptScheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the next attempt is scheduled." + } + }, + "blockedReason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If the state is BLOCKED, blocked reason provides additional information." + } + } + }, + "traits": { + "smithy.api#documentation": "Common callback information. Specific CallbackInfo messages should embed this and may include additional fields." + } + }, + "com.temporal.api#Callback": { + "type": "structure", + "members": { + "nexus": { + "target": "com.temporal.api#CallbackNexus" + }, + "internal": { + "target": "com.temporal.api#CallbackInternal" + }, + "links": { + "target": "com.temporal.api#CallbackLinksList", + "traits": { + "smithy.api#documentation": "Links associated with the callback. It can be used to link to underlying resources of the\n callback." + } + } + }, + "traits": { + "smithy.api#documentation": "Callback to attach to various events in the system, e.g. workflow run completion." + } + }, + "com.temporal.api#CallbackNexus": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Callback URL." + } + }, + "header": { + "target": "com.temporal.api#CallbackNexusHeaderMap", + "traits": { + "smithy.api#documentation": "Header to attach to callback request." + } + } + }, + "traits": {} + }, + "com.temporal.api#CallbackNexusHeaderMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Header to attach to callback request." + } + }, + "com.temporal.api#CallbackInternal": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Opaque internal data." + } + } + }, + "traits": { + "smithy.api#documentation": "Callbacks to be delivered internally within the system.\n This variant is not settable in the API and will be rejected by the service with an INVALID_ARGUMENT error.\n The only reason that this is exposed is because callbacks are replicated across clusters via the\n WorkflowExecutionStarted event, which is defined in the public API." + } + }, + "com.temporal.api#CallbackLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links associated with the callback. It can be used to link to underlying resources of the\n callback." + } + }, + "com.temporal.api#CallbackInfoState": { + "type": "enum", + "members": { + "CALLBACK_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CALLBACK_STATE_UNSPECIFIED" + } + }, + "CALLBACK_STATE_STANDBY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CALLBACK_STATE_STANDBY" + } + }, + "CALLBACK_STATE_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CALLBACK_STATE_SCHEDULED" + } + }, + "CALLBACK_STATE_BACKING_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CALLBACK_STATE_BACKING_OFF" + } + }, + "CALLBACK_STATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CALLBACK_STATE_FAILED" + } + }, + "CALLBACK_STATE_SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CALLBACK_STATE_SUCCEEDED" + } + }, + "CALLBACK_STATE_BLOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CALLBACK_STATE_BLOCKED" + } + } + }, + "traits": { + "smithy.api#documentation": "The current state of the callback." + } + }, + "com.temporal.api#DescribeActivityExecutionResponseCallbacksList": { + "type": "list", + "member": { + "target": "com.temporal.api#CallbackInfo" + }, + "traits": { + "smithy.api#documentation": "Callbacks attached to this activity execution and their current state." + } + }, + "com.temporal.api#DescribeActivityExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeActivityExecutionRequest" + }, + "output": { + "target": "com.temporal.api#DescribeActivityExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}", + "code": 200 + }, + "smithy.api#documentation": "DescribeActivityExecution returns information about an activity execution.\n It can be used to:\n - Get current activity info without waiting\n - Long-poll for next state change and return new activity info\n Response can optionally include activity input or outcome (if the activity has completed)." + } + }, + "com.temporal.api#StartActivityExecutionRequestIdReusePolicy": { + "type": "enum", + "members": { + "ACTIVITY_ID_REUSE_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_ID_REUSE_POLICY_UNSPECIFIED" + } + }, + "ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE" + } + }, + "ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + } + }, + "ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE" + } + } + }, + "traits": { + "smithy.api#documentation": "Defines whether to allow re-using the activity id from a previously *closed* activity.\n The default policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE." + } + }, + "com.temporal.api#StartActivityExecutionRequestIdConflictPolicy": { + "type": "enum", + "members": { + "ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED" + } + }, + "ACTIVITY_ID_CONFLICT_POLICY_FAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_ID_CONFLICT_POLICY_FAIL" + } + }, + "ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING" + } + } + }, + "traits": { + "smithy.api#documentation": "Defines how to resolve an activity id conflict with a *running* activity.\n The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL." + } + }, + "com.temporal.api#StartActivityExecutionRequestCompletionCallbacksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Callback" + }, + "traits": { + "smithy.api#documentation": "Callbacks to be called by the server when this activity reaches a terminal state.\n Callback addresses must be whitelisted in the server's dynamic configuration." + } + }, + "com.temporal.api#StartActivityExecutionRequestLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links to be associated with the activity. Callbacks may also have associated links;\n links already included with a callback should not be duplicated here." + } + }, + "com.temporal.api#OnConflictOptions": { + "type": "structure", + "members": { + "attachRequestId": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Attaches the request ID to the running execution." + } + }, + "attachCompletionCallbacks": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Attaches the completion callbacks to the running execution." + } + }, + "attachLinks": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Attaches the links to the running execution." + } + } + }, + "traits": { + "smithy.api#documentation": "When starting an execution with a conflict policy that uses an existing execution and there is already an existing\n running execution, OnConflictOptions defines actions to be taken on the existing running execution." + } + }, + "com.temporal.api#StartActivityExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Identifier for this activity. Required. This identifier should be meaningful in the user's\n own system. It must be unique among activities in the same namespace, subject to the rules\n imposed by id_reuse_policy and id_conflict_policy." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request" + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this start request. Typically UUIDv4." + } + }, + "activityType": { + "target": "com.temporal.api#ActivityType", + "traits": { + "smithy.api#documentation": "The type of the activity, a string that corresponds to a registered activity on a worker." + } + }, + "taskQueue": { + "target": "com.temporal.api#TaskQueue", + "traits": { + "smithy.api#documentation": "Task queue to schedule this activity on." + } + }, + "scheduleToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Indicates how long the caller is willing to wait for an activity completion. Limits how long\n retries will be attempted. Either this or `start_to_close_timeout` must be specified.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "scheduleToStartTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Limits time an activity task can stay in a task queue before a worker picks it up. This\n timeout is always non retryable, as all a retry would achieve is to put it back into the same\n queue. Defaults to `schedule_to_close_timeout` if not specified.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "startToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum time an activity is allowed to execute after being picked up by a worker. This\n timeout is always retryable. Either this or `schedule_to_close_timeout` must be\n specified.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "heartbeatTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum permitted time between successful worker heartbeats." + } + }, + "retryPolicy": { + "target": "com.temporal.api#RetryPolicy", + "traits": { + "smithy.api#documentation": "The retry policy for the activity. Will never exceed `schedule_to_close_timeout`." + } + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized arguments to the activity. These are passed as arguments to the activity function." + } + }, + "idReusePolicy": { + "target": "com.temporal.api#StartActivityExecutionRequestIdReusePolicy", + "traits": { + "smithy.api#documentation": "Defines whether to allow re-using the activity id from a previously *closed* activity.\n The default policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE." + } + }, + "idConflictPolicy": { + "target": "com.temporal.api#StartActivityExecutionRequestIdConflictPolicy", + "traits": { + "smithy.api#documentation": "Defines how to resolve an activity id conflict with a *running* activity.\n The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL." + } + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes", + "traits": { + "smithy.api#documentation": "Search attributes for indexing." + } + }, + "header": { + "target": "com.temporal.api#Header", + "traits": { + "smithy.api#documentation": "Header for context propagation and tracing purposes." + } + }, + "userMetadata": { + "target": "com.temporal.api#UserMetadata", + "traits": { + "smithy.api#documentation": "Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata." + } + }, + "completionCallbacks": { + "target": "com.temporal.api#StartActivityExecutionRequestCompletionCallbacksList", + "traits": { + "smithy.api#documentation": "Callbacks to be called by the server when this activity reaches a terminal state.\n Callback addresses must be whitelisted in the server's dynamic configuration." + } + }, + "links": { + "target": "com.temporal.api#StartActivityExecutionRequestLinksList", + "traits": { + "smithy.api#documentation": "Links to be associated with the activity. Callbacks may also have associated links;\n links already included with a callback should not be duplicated here." + } + }, + "onConflictOptions": { + "target": "com.temporal.api#OnConflictOptions", + "traits": { + "smithy.api#documentation": "Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING." + } + }, + "startDelay": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time to wait before dispatching the first activity task. This delay is not applied to retry attempts." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#StartActivityExecutionResponse": { + "type": "structure", + "members": { + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run ID of the activity that was started - or used (via ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING)." + } + }, + "started": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, a new activity was started." + } + }, + "link": { + "target": "com.temporal.api#Link", + "traits": { + "smithy.api#documentation": "Link to the started activity." + } + } + }, + "traits": {} + }, + "com.temporal.api#StartActivityExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#StartActivityExecutionRequest" + }, + "output": { + "target": "com.temporal.api#StartActivityExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}", + "code": 200 + }, + "smithy.api#documentation": "StartActivityExecution starts a new activity execution.\n\n Returns an `ActivityExecutionAlreadyStarted` error if an instance already exists with same activity ID in this namespace\n unless permitted by the specified ID conflict policy." + } + }, + "com.temporal.api#RequestCancelActivityExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Activity run ID, targets the latest run if run_id is empty." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe cancellation requests." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for requesting the cancellation, recorded and available via the PollActivityExecution API.\n Not propagated to a worker if an activity attempt is currently running." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RequestCancelActivityExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#RequestCancelActivityExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#RequestCancelActivityExecutionRequest" + }, + "output": { + "target": "com.temporal.api#RequestCancelActivityExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/cancel", + "code": 200 + }, + "smithy.api#documentation": "RequestCancelActivityExecution requests cancellation of an activity execution.\n\n Cancellation is cooperative: this call records the request, but the activity must detect and\n acknowledge it for the activity to reach CANCELED status. The cancellation signal is\n delivered via `cancel_requested` in the heartbeat response; SDKs surface this via\n language-idiomatic mechanisms (context cancellation, exceptions, abort signals)." + } + }, + "com.temporal.api#RespondActivityTaskCompletedByIdRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity" + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Id of the activity to complete" + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity" + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "For a workflow activity - the run ID of the workflow which scheduled this activity.\n For a standalone activity - the run ID of the activity." + } + }, + "result": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "The serialized result of activity execution" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains \"workflow:workflow_id\" or \"activity:activity_id\" for standalone activities." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RespondActivityTaskCompletedByIdResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#RespondActivityTaskCompletedById": { + "type": "operation", + "input": { + "target": "com.temporal.api#RespondActivityTaskCompletedByIdRequest" + }, + "output": { + "target": "com.temporal.api#RespondActivityTaskCompletedByIdResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/complete", + "code": 200 + }, + "smithy.api#documentation": "See `RespondActivityTaskCompleted`. This version allows clients to record completions by\n namespace/workflow id/activity id instead of task token.\n\n (-- api-linter: core::0136::prepositions=disabled\n aip.dev/not-precedent: \"By\" is used to indicate request type. --)" + } + }, + "com.temporal.api#RespondActivityTaskFailedByIdRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity" + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Id of the activity to fail" + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity" + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "For a workflow activity - the run ID of the workflow which scheduled this activity.\n For a standalone activity - the run ID of the activity." + } + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Detailed failure information" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "lastHeartbeatDetails": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Additional details to be stored as last activity heartbeat" + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains \"workflow:workflow_id\" or \"activity:activity_id\" for standalone activities." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RespondActivityTaskFailedByIdResponse": { + "type": "structure", + "members": { + "failures": { + "target": "com.temporal.api#RespondActivityTaskFailedByIdResponseFailuresList", + "traits": { + "smithy.api#documentation": "Server validation failures could include\n last_heartbeat_details payload is too large, request failure is too large" + } + } + }, + "traits": {} + }, + "com.temporal.api#RespondActivityTaskFailedByIdResponseFailuresList": { + "type": "list", + "member": { + "target": "com.temporal.api#Failure" + }, + "traits": { + "smithy.api#documentation": "Server validation failures could include\n last_heartbeat_details payload is too large, request failure is too large" + } + }, + "com.temporal.api#RespondActivityTaskFailedById": { + "type": "operation", + "input": { + "target": "com.temporal.api#RespondActivityTaskFailedByIdRequest" + }, + "output": { + "target": "com.temporal.api#RespondActivityTaskFailedByIdResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/fail", + "code": 200 + }, + "smithy.api#documentation": "See `RecordActivityTaskFailed`. This version allows clients to record failures by\n namespace/workflow id/activity id instead of task token.\n\n (-- api-linter: core::0136::prepositions=disabled\n aip.dev/not-precedent: \"By\" is used to indicate request type. --)" + } + }, + "com.temporal.api#RecordActivityTaskHeartbeatByIdRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity" + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Id of the activity we're heartbeating" + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity" + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "For a workflow activity - the run ID of the workflow which scheduled this activity.\n For a standalone activity - the run ID of the activity." + } + }, + "details": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Arbitrary data, of which the most recent call is kept, to store for this activity" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains \"workflow:workflow_id\" or \"activity:activity_id\" for standalone activities." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RecordActivityTaskHeartbeatByIdResponse": { + "type": "structure", + "members": { + "cancelRequested": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Will be set to true if the activity has been asked to cancel itself. The SDK should then\n notify the activity of cancellation if it is still running." + } + }, + "activityPaused": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Will be set to true if the activity is paused." + } + }, + "activityReset": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Will be set to true if the activity was reset.\n Applies only to the current run." + } + } + }, + "traits": {} + }, + "com.temporal.api#RecordActivityTaskHeartbeatById": { + "type": "operation", + "input": { + "target": "com.temporal.api#RecordActivityTaskHeartbeatByIdRequest" + }, + "output": { + "target": "com.temporal.api#RecordActivityTaskHeartbeatByIdResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/heartbeat", + "code": 200 + }, + "smithy.api#documentation": "See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by\n namespace/workflow id/activity id instead of task token.\n\n (-- api-linter: core::0136::prepositions=disabled\n aip.dev/not-precedent: \"By\" is used to indicate request type. --)" + } + }, + "com.temporal.api#PollActivityExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "runId", + "smithy.api#documentation": "Activity run ID. If empty the request targets the latest run." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#PollActivityExecutionResponse": { + "type": "structure", + "members": { + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run ID of the activity, useful when run_id was not specified in the request." + } + }, + "outcome": { + "target": "com.temporal.api#ActivityExecutionOutcome" + } + }, + "traits": {} + }, + "com.temporal.api#PollActivityExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#PollActivityExecutionRequest" + }, + "output": { + "target": "com.temporal.api#PollActivityExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/outcome", + "code": 200 + }, + "smithy.api#documentation": "PollActivityExecution long-polls for an activity execution to complete and returns the\n outcome (result or failure)." + } + }, + "com.temporal.api#PauseActivityExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity." + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The ID of the activity to target." + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If provided, pause a workflow activity (or activities) for the given workflow ID.\n If empty, targets a standalone activity." + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Run ID of the workflow or standalone activity." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason to pause the activity." + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains \"workflow:{workflow_id}\" for workflow activities or \"activity:{activity_id}\" for standalone activities." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe pause requests." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#PauseActivityExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#PauseActivityExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#PauseActivityExecutionRequest" + }, + "output": { + "target": "com.temporal.api#PauseActivityExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/pause", + "code": 200 + }, + "smithy.api#documentation": "PauseActivityExecution pauses the execution of an activity specified by its ID.\n This API can be used to target a workflow activity or a standalone activity\n\n Pausing an activity means:\n - If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n - If the activity is already paused, calling this method will have no effect.\n - If the activity is running and finishes successfully, the activity will be completed.\n - If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\n For long-running activities:\n - activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n\n Returns a `NotFound` error if there is no pending activity with the provided ID" + } + }, + "com.temporal.api#ResetActivityExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity." + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The ID of the activity to target." + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If provided, targets a workflow activity for the given workflow ID.\n If empty, targets a standalone activity." + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Run ID of the workflow or standalone activity." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "resetHeartbeat": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Indicates that activity should reset heartbeat details.\n This flag will be applied only to the new instance of the activity." + } + }, + "keepPaused": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If activity is paused, it will remain paused after reset" + } + }, + "jitter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration.\n (unless it is paused and keep_paused is set)" + } + }, + "restoreOriginalOptions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If set, the activity options will be restored to the defaults.\n Default options are then options activity was created with.\n They are part of the first schedule event." + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains \"workflow:{workflow_id}\" for workflow activities or \"activity:{activity_id}\" for standalone activities." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ResetActivityExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#ResetActivityExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#ResetActivityExecutionRequest" + }, + "output": { + "target": "com.temporal.api#ResetActivityExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/reset", + "code": 200 + }, + "smithy.api#documentation": "ResetActivityExecution resets the execution of an activity specified by its ID.\n This API can be used to target a workflow activity or a standalone activity.\n\n Resetting an activity means:\n * number of attempts will be reset to 0.\n * activity timeouts will be reset.\n * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag)\n\n Returns a `NotFound` error if there is no pending activity with the provided ID or type." + } + }, + "com.temporal.api#WorkerDeploymentOptions": { + "type": "structure", + "members": { + "deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Required when `worker_versioning_mode==VERSIONED`." + } + }, + "buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The Build ID of the worker. Required when `worker_versioning_mode==VERSIONED`, in which case,\n the worker will be part of a Deployment Version." + } + }, + "workerVersioningMode": { + "target": "com.temporal.api#WorkerDeploymentOptionsWorkerVersioningMode", + "traits": { + "smithy.api#documentation": "Required. Versioning Mode for this worker. Must be the same for all workers with the\n same `deployment_name` and `build_id` combination, across all Task Queues.\n When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version." + } + } + }, + "traits": { + "smithy.api#documentation": "Worker Deployment options set in SDK that need to be sent to server in every poll." + } + }, + "com.temporal.api#WorkerDeploymentOptionsWorkerVersioningMode": { + "type": "enum", + "members": { + "WORKER_VERSIONING_MODE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_VERSIONING_MODE_UNSPECIFIED" + } + }, + "WORKER_VERSIONING_MODE_UNVERSIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_VERSIONING_MODE_UNVERSIONED" + } + }, + "WORKER_VERSIONING_MODE_VERSIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_VERSIONING_MODE_VERSIONED" + } + } + }, + "traits": { + "smithy.api#documentation": "Required. Versioning Mode for this worker. Must be the same for all workers with the\n same `deployment_name` and `build_id` combination, across all Task Queues.\n When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version." + } + }, + "com.temporal.api#RespondActivityTaskCanceledByIdRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity" + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Id of the activity to confirm is cancelled" + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity" + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "For a workflow activity - the run ID of the workflow which scheduled this activity.\n For a standalone activity - the run ID of the activity." + } + }, + "details": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized additional information to attach to the cancellation" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "deploymentOptions": { + "target": "com.temporal.api#WorkerDeploymentOptions", + "traits": { + "smithy.api#documentation": "Worker deployment options that user has set in the worker." + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains \"workflow:workflow_id\" or \"activity:activity_id\" for standalone activities." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RespondActivityTaskCanceledByIdResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#RespondActivityTaskCanceledById": { + "type": "operation", + "input": { + "target": "com.temporal.api#RespondActivityTaskCanceledByIdRequest" + }, + "output": { + "target": "com.temporal.api#RespondActivityTaskCanceledByIdResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/resolve-as-canceled", + "code": 200 + }, + "smithy.api#documentation": "See `RespondActivityTaskCanceled`. This version allows clients to record failures by\n namespace/workflow id/activity id instead of task token.\n\n (-- api-linter: core::0136::prepositions=disabled\n aip.dev/not-precedent: \"By\" is used to indicate request type. --)" + } + }, + "com.temporal.api#TerminateActivityExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Activity run ID, targets the latest run if run_id is empty." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe termination requests." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for requesting the termination, recorded in in the activity's result failure outcome." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#TerminateActivityExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#TerminateActivityExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#TerminateActivityExecutionRequest" + }, + "output": { + "target": "com.temporal.api#TerminateActivityExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/terminate", + "code": 200 + }, + "smithy.api#documentation": "TerminateActivityExecution terminates an existing activity execution immediately.\n\n Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a\n running attempt." + } + }, + "com.temporal.api#UnpauseActivityExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity." + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The ID of the activity to target." + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If provided, targets a workflow activity for the given workflow ID.\n If empty, targets a standalone activity." + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Run ID of the workflow or standalone activity." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "resetAttempts": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Providing this flag will also reset the number of attempts." + } + }, + "resetHeartbeat": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Providing this flag will also reset the heartbeat details." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason to unpause the activity." + } + }, + "jitter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If set, the activity will start at a random time within the specified jitter duration." + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains \"workflow:{workflow_id}\" for workflow activities or \"activity:{activity_id}\" for standalone activities." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UnpauseActivityExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#UnpauseActivityExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#UnpauseActivityExecutionRequest" + }, + "output": { + "target": "com.temporal.api#UnpauseActivityExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/unpause", + "code": 200 + }, + "smithy.api#documentation": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\n This API can be used to target a workflow activity or a standalone activity.\n\n If activity is not paused, this call will have no effect.\n If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\n Once the activity is unpaused, all timeout timers will be regenerated.\n\n Returns a `NotFound` error if there is no pending activity with the provided ID" + } + }, + "com.temporal.api#UpdateActivityExecutionOptionsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow which scheduled this activity" + } + }, + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The ID of the activity to target." + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If provided, targets a workflow activity for the given workflow ID.\n If empty, targets a standalone activity." + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Run ID of the workflow or standalone activity." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request" + } + }, + "activityOptions": { + "target": "com.temporal.api#ActivityOptions", + "traits": { + "smithy.api#documentation": "Activity options. Partial updates are accepted and controlled by update_mask" + } + }, + "updateMask": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Controls which fields from `activity_options` will be applied" + } + }, + "restoreOriginal": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If set, the activity options will be restored to the default.\n Default options are then options activity was created with.\n They are part of the first schedule event.\n This flag cannot be combined with any other option; if you supply\n restore_original together with other options, the request will be rejected." + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains \"workflow:{workflow_id}\" for workflow activities or \"activity:{activity_id}\" for standalone activities." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateActivityExecutionOptionsResponse": { + "type": "structure", + "members": { + "activityOptions": { + "target": "com.temporal.api#ActivityOptions", + "traits": { + "smithy.api#documentation": "Activity options after an update" + } + } + }, + "traits": {} + }, + "com.temporal.api#UpdateActivityExecutionOptions": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateActivityExecutionOptionsRequest" + }, + "output": { + "target": "com.temporal.api#UpdateActivityExecutionOptionsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activities/{activityId}/update-options", + "code": 200 + }, + "smithy.api#documentation": "UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID.\n This API can be used to target a workflow activity or a standalone activity." + } + }, + "com.temporal.api#WorkerVersionStamp": { + "type": "structure", + "members": { + "buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An opaque whole-worker identifier. Replaces the deprecated `binary_checksum` field when this\n message is included in requests which previously used that." + } + }, + "useVersioning": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If set, the worker is opting in to worker versioning. Otherwise, this is used only as a\n marker for workflow reset points and the BuildIDs search attribute." + } + } + }, + "traits": { + "smithy.api#documentation": "Deprecated. This message is replaced with `Deployment` and `VersioningBehavior`.\n Identifies the version(s) of a worker that processed a task" + } + }, + "com.temporal.api#Deployment": { + "type": "structure", + "members": { + "seriesName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Different versions of the same worker service/application are related together by having a\n shared series name.\n Out of all deployments of a series, one can be designated as the current deployment, which\n receives new workflow executions and new tasks of workflows with\n `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior." + } + }, + "buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Build ID changes with each version of the worker when the worker program code and/or config\n changes." + } + } + }, + "traits": { + "smithy.api#documentation": "`Deployment` identifies a deployment of Temporal workers. The combination of deployment series\n name + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker\n programs to specify these values.\n Deprecated." + } + }, + "com.temporal.api#RespondActivityTaskCompletedRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "taskToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The task token as received in `PollActivityTaskQueueResponse`" + } + }, + "result": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "The result of successfully executing the activity" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains the workflow ID or activity ID for standalone activities." + } + }, + "workerVersion": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Version info of the worker who processed this task. This message's `build_id` field should\n always be set by SDKs. Workers opting into versioning will also set the `use_versioning`\n field to true. See message docstrings for more.\n Deprecated. Use `deployment_options` instead." + } + }, + "deployment": { + "target": "com.temporal.api#Deployment", + "traits": { + "smithy.api#documentation": "Deployment info of the worker that completed this task. Must be present if user has set\n `WorkerDeploymentOptions` regardless of versioning being enabled or not.\n Deprecated. Replaced with `deployment_options`." + } + }, + "deploymentOptions": { + "target": "com.temporal.api#WorkerDeploymentOptions", + "traits": { + "smithy.api#documentation": "Worker deployment options that user has set in the worker." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RespondActivityTaskCompletedResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#RespondActivityTaskCompleted": { + "type": "operation", + "input": { + "target": "com.temporal.api#RespondActivityTaskCompletedRequest" + }, + "output": { + "target": "com.temporal.api#RespondActivityTaskCompletedResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activity-complete", + "code": 200 + }, + "smithy.api#documentation": "RespondActivityTaskCompleted is called by workers when they successfully complete an activity\n task.\n\n For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history\n and a new workflow task created for the workflow. Fails with `NotFound` if the task token is\n no longer valid due to activity timeout, already being completed, or never having existed." + } + }, + "com.temporal.api#CountActivityExecutionsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#documentation": "Visibility query, see https://docs.temporal.io/list-filter for the syntax." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#CountActivityExecutionsResponse": { + "type": "structure", + "members": { + "count": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If `query` is not grouping by any field, the count is an approximate number\n of activities that match the query.\n If `query` is grouping by a field, the count is simply the sum of the counts\n of the groups returned in the response. This number can be smaller than the\n total number of activities matching the query." + } + }, + "groups": { + "target": "com.temporal.api#CountActivityExecutionsResponseGroupsList", + "traits": { + "smithy.api#documentation": "Contains the groups if the request is grouping by a field.\n The list might not be complete, and the counts of each group is approximate." + } + } + }, + "traits": {} + }, + "com.temporal.api#CountActivityExecutionsResponseAggregationGroup": { + "type": "structure", + "members": { + "groupValues": { + "target": "com.temporal.api#CountActivityExecutionsResponseAggregationGroupGroupValuesList" + }, + "count": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#CountActivityExecutionsResponseAggregationGroupGroupValuesList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.temporal.api#CountActivityExecutionsResponseGroupsList": { + "type": "list", + "member": { + "target": "com.temporal.api#CountActivityExecutionsResponseAggregationGroup" + }, + "traits": { + "smithy.api#documentation": "Contains the groups if the request is grouping by a field.\n The list might not be complete, and the counts of each group is approximate." + } + }, + "com.temporal.api#CountActivityExecutions": { + "type": "operation", + "input": { + "target": "com.temporal.api#CountActivityExecutionsRequest" + }, + "output": { + "target": "com.temporal.api#CountActivityExecutionsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/activity-count", + "code": 200 + }, + "smithy.api#documentation": "CountActivityExecutions is a visibility API to count activity executions in a specific namespace." + } + }, + "com.temporal.api#RespondActivityTaskFailedRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "taskToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The task token as received in `PollActivityTaskQueueResponse`" + } + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Detailed failure information" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains the workflow ID or activity ID for standalone activities." + } + }, + "lastHeartbeatDetails": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Additional details to be stored as last activity heartbeat" + } + }, + "workerVersion": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Version info of the worker who processed this task. This message's `build_id` field should\n always be set by SDKs. Workers opting into versioning will also set the `use_versioning`\n field to true. See message docstrings for more.\n Deprecated. Use `deployment_options` instead." + } + }, + "deployment": { + "target": "com.temporal.api#Deployment", + "traits": { + "smithy.api#documentation": "Deployment info of the worker that completed this task. Must be present if user has set\n `WorkerDeploymentOptions` regardless of versioning being enabled or not.\n Deprecated. Replaced with `deployment_options`." + } + }, + "deploymentOptions": { + "target": "com.temporal.api#WorkerDeploymentOptions", + "traits": { + "smithy.api#documentation": "Worker deployment options that user has set in the worker." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RespondActivityTaskFailedResponse": { + "type": "structure", + "members": { + "failures": { + "target": "com.temporal.api#RespondActivityTaskFailedResponseFailuresList", + "traits": { + "smithy.api#documentation": "Server validation failures could include\n last_heartbeat_details payload is too large, request failure is too large" + } + } + }, + "traits": {} + }, + "com.temporal.api#RespondActivityTaskFailedResponseFailuresList": { + "type": "list", + "member": { + "target": "com.temporal.api#Failure" + }, + "traits": { + "smithy.api#documentation": "Server validation failures could include\n last_heartbeat_details payload is too large, request failure is too large" + } + }, + "com.temporal.api#RespondActivityTaskFailed": { + "type": "operation", + "input": { + "target": "com.temporal.api#RespondActivityTaskFailedRequest" + }, + "output": { + "target": "com.temporal.api#RespondActivityTaskFailedResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activity-fail", + "code": 200 + }, + "smithy.api#documentation": "RespondActivityTaskFailed is called by workers when processing an activity task fails.\n\n This results in a new `ACTIVITY_TASK_FAILED` event being written to the workflow history and\n a new workflow task created for the workflow. Fails with `NotFound` if the task token is no\n longer valid due to activity timeout, already being completed, or never having existed." + } + }, + "com.temporal.api#RecordActivityTaskHeartbeatRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "taskToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The task token as received in `PollActivityTaskQueueResponse`" + } + }, + "details": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Arbitrary data, of which the most recent call is kept, to store for this activity" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains the workflow ID or activity ID for standalone activities." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RecordActivityTaskHeartbeatResponse": { + "type": "structure", + "members": { + "cancelRequested": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Will be set to true if the activity has been asked to cancel itself. The SDK should then\n notify the activity of cancellation if it is still running." + } + }, + "activityPaused": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Will be set to true if the activity is paused." + } + }, + "activityReset": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Will be set to true if the activity was reset.\n Applies only to the current run." + } + } + }, + "traits": {} + }, + "com.temporal.api#RecordActivityTaskHeartbeat": { + "type": "operation", + "input": { + "target": "com.temporal.api#RecordActivityTaskHeartbeatRequest" + }, + "output": { + "target": "com.temporal.api#RecordActivityTaskHeartbeatResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activity-heartbeat", + "code": 200 + }, + "smithy.api#documentation": "RecordActivityTaskHeartbeat is optionally called by workers while they execute activities.\n\n If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task,\n then the current attempt times out. Depending on RetryPolicy, this may trigger a retry or\n time out the activity.\n\n For workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow\n history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations,\n in that event, the SDK should request cancellation of the activity.\n\n The request may contain response `details` which will be persisted by the server and may be\n used by the activity to checkpoint progress. The `cancel_requested` field in the response\n indicates whether cancellation has been requested for the activity." + } + }, + "com.temporal.api#RespondActivityTaskCanceledRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "taskToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The task token as received in `PollActivityTaskQueueResponse`" + } + }, + "details": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized additional information to attach to the cancellation" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains the workflow ID or activity ID for standalone activities." + } + }, + "workerVersion": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Version info of the worker who processed this task. This message's `build_id` field should\n always be set by SDKs. Workers opting into versioning will also set the `use_versioning`\n field to true. See message docstrings for more.\n Deprecated. Use `deployment_options` instead." + } + }, + "deployment": { + "target": "com.temporal.api#Deployment", + "traits": { + "smithy.api#documentation": "Deployment info of the worker that completed this task. Must be present if user has set\n `WorkerDeploymentOptions` regardless of versioning being enabled or not.\n Deprecated. Replaced with `deployment_options`." + } + }, + "deploymentOptions": { + "target": "com.temporal.api#WorkerDeploymentOptions", + "traits": { + "smithy.api#documentation": "Worker deployment options that user has set in the worker." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RespondActivityTaskCanceledResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#RespondActivityTaskCanceled": { + "type": "operation", + "input": { + "target": "com.temporal.api#RespondActivityTaskCanceledRequest" + }, + "output": { + "target": "com.temporal.api#RespondActivityTaskCanceledResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/activity-resolve-as-canceled", + "code": 200 + }, + "smithy.api#documentation": "RespondActivityTaskFailed is called by workers when processing an activity task fails.\n\n For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history\n and a new workflow task created for the workflow. Fails with `NotFound` if the task token is\n no longer valid due to activity timeout, already being completed, or never having existed." + } + }, + "com.temporal.api#ListArchivedWorkflowExecutionsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "pageSize" + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken" + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListArchivedWorkflowExecutionsResponse": { + "type": "structure", + "members": { + "executions": { + "target": "com.temporal.api#ListArchivedWorkflowExecutionsResponseExecutionsList" + }, + "nextPageToken": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionInfo": { + "type": "structure", + "members": { + "execution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "type": { + "target": "com.temporal.api#WorkflowType" + }, + "startTime": { + "target": "smithy.api#String" + }, + "closeTime": { + "target": "smithy.api#String" + }, + "status": { + "target": "com.temporal.api#WorkflowExecutionInfoStatus" + }, + "historyLength": { + "target": "smithy.api#String" + }, + "parentNamespaceId": { + "target": "smithy.api#String" + }, + "parentExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "executionTime": { + "target": "smithy.api#String" + }, + "memo": { + "target": "com.temporal.api#Memo" + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "autoResetPoints": { + "target": "com.temporal.api#ResetPoints" + }, + "taskQueue": { + "target": "smithy.api#String" + }, + "stateTransitionCount": { + "target": "smithy.api#String" + }, + "historySizeBytes": { + "target": "smithy.api#String" + }, + "mostRecentWorkerVersionStamp": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "If set, the most recent worker version stamp that appeared in a workflow task completion\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + }, + "executionDuration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Workflow execution duration is defined as difference between close time and execution time.\n This field is only populated if the workflow is closed." + } + }, + "rootExecution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "Contains information about the root workflow execution.\n The root workflow execution is defined as follows:\n 1. A workflow without parent workflow is its own root workflow.\n 2. A workflow that has a parent workflow has the same root workflow as its parent workflow.\n Note: workflows continued as new or reseted may or may not have parents, check examples below.\n\n Examples:\n Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3.\n - The root workflow of all three workflows is W1.\n Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3.\n - The root workflow of all three workflows is W1.\n Scenario 3: Workflow W1 continued as new W2.\n - The root workflow of W1 is W1 and the root workflow of W2 is W2.\n Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3\n - The root workflow of all three workflows is W1.\n Scenario 5: Workflow W1 is reseted, creating W2.\n - The root workflow of W1 is W1 and the root workflow of W2 is W2." + } + }, + "assignedBuildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The currently assigned build ID for this execution. Presence of this value means worker versioning is used\n for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules\n when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled\n again, the assigned build ID may change according to the latest versioning rules.\n Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to\n this execution.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + }, + "inheritedBuildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead\n of using the assignment rules.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + }, + "firstRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The first run ID in the execution chain.\n Executions created via the following operations are considered to be in the same chain\n - ContinueAsNew\n - Workflow Retry\n - Workflow Reset\n - Cron Schedule" + } + }, + "versioningInfo": { + "target": "com.temporal.api#WorkflowExecutionVersioningInfo", + "traits": { + "smithy.api#documentation": "Absent value means the workflow execution is not versioned. When present, the execution might\n be versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`.\n Experimental. Versioning info is experimental and might change in the future." + } + }, + "workerDeploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of Worker Deployment that completed the most recent workflow task." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata" + } + }, + "externalPayloadSizeBytes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Total size in bytes of all external payloads referenced in workflow history." + } + }, + "externalPayloadCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Count of external payloads referenced in workflow history." + } + } + }, + "traits": { + "smithy.api#documentation": "Hold basic information about a workflow execution.\n This structure is a part of visibility, and thus contain a limited subset of information." + } + }, + "com.temporal.api#WorkflowExecutionInfoStatus": { + "type": "enum", + "members": { + "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED" + } + }, + "WORKFLOW_EXECUTION_STATUS_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_RUNNING" + } + }, + "WORKFLOW_EXECUTION_STATUS_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_COMPLETED" + } + }, + "WORKFLOW_EXECUTION_STATUS_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_FAILED" + } + }, + "WORKFLOW_EXECUTION_STATUS_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_CANCELED" + } + }, + "WORKFLOW_EXECUTION_STATUS_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_TERMINATED" + } + }, + "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW" + } + }, + "WORKFLOW_EXECUTION_STATUS_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_TIMED_OUT" + } + }, + "WORKFLOW_EXECUTION_STATUS_PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_PAUSED" + } + } + }, + "traits": {} + }, + "com.temporal.api#Memo": { + "type": "structure", + "members": { + "fields": { + "target": "com.temporal.api#MemoFieldsMap" + } + }, + "traits": { + "smithy.api#documentation": "A user-defined set of *unindexed* fields that are exposed when listing/searching workflows" + } + }, + "com.temporal.api#MemoFieldsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.temporal.api#ResetPoints": { + "type": "structure", + "members": { + "points": { + "target": "com.temporal.api#ResetPointsPointsList" + } + }, + "traits": {} + }, + "com.temporal.api#ResetPointInfo": { + "type": "structure", + "members": { + "buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker build id." + } + }, + "binaryChecksum": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. A worker binary version identifier." + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The first run ID in the execution chain that was touched by this worker build." + } + }, + "firstWorkflowTaskCompletedId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Event ID of the first WorkflowTaskCompleted event processed by this worker build." + } + }, + "createTime": { + "target": "smithy.api#String" + }, + "expireTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "(-- api-linter: core::0214::resource-expiry=disabled\n aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --)\n The time that the run is deleted due to retention." + } + }, + "resettable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "false if the reset point has pending childWFs/reqCancels/signalExternals." + } + } + }, + "traits": { + "smithy.api#documentation": "ResetPointInfo records the workflow event id that is the first one processed by a given\n build id or binary checksum. A new reset point will be created if either build id or binary\n checksum changes (although in general only one or the other will be used at a time)." + } + }, + "com.temporal.api#ResetPointsPointsList": { + "type": "list", + "member": { + "target": "com.temporal.api#ResetPointInfo" + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionVersioningInfo": { + "type": "structure", + "members": { + "behavior": { + "target": "com.temporal.api#WorkflowExecutionVersioningInfoBehavior", + "traits": { + "smithy.api#documentation": "Versioning behavior determines how the server should treat this execution when workers are\n upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means\n unversioned. See the comments in `VersioningBehavior` enum for more info about different\n behaviors.\n\n Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning \n Behavior and Version (except when the new execution runs on a task queue not belonging to the \n same deployment version as the parent/previous run's task queue). The first workflow task will\n be dispatched according to the inherited behavior (or to the current version of the task-queue's \n deployment in the case of AutoUpgrade.) After completion of their first workflow task the \n Deployment Version and Behavior of the execution will update according to configuration on the worker.\n \n Note that `behavior` is overridden by `versioning_override` if the latter is present." + } + }, + "deployment": { + "target": "com.temporal.api#Deployment", + "traits": { + "smithy.api#documentation": "The worker deployment that completed the last workflow task of this workflow execution. Must\n be present if `behavior` is set. Absent value means no workflow task is completed, or the\n last workflow task was completed by an unversioned worker. Unversioned workers may still send\n a deployment value which will be stored here, so the right way to check if an execution is\n versioned if an execution is versioned or not is via the `behavior` field.\n Note that `deployment` is overridden by `versioning_override` if the latter is present.\n Deprecated. Use `deployment_version`." + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `deployment_version`." + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "The Worker Deployment Version that completed the last workflow task of this workflow execution.\n An absent value means no workflow task is completed, or the workflow is unversioned.\n If present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed\n by a worker that is not using versioning but _is_ passing Deployment Name and Build ID.\n\n Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning \n Behavior and Version (except when the new execution runs on a task queue not belonging to the \n same deployment version as the parent/previous run's task queue). The first workflow task will\n be dispatched according to the inherited behavior (or to the current version of the task-queue's \n deployment in the case of AutoUpgrade.) After completion of their first workflow task the \n Deployment Version and Behavior of the execution will update according to configuration on the worker.\n\n Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version`\n will override this value." + } + }, + "versioningOverride": { + "target": "com.temporal.api#VersioningOverride", + "traits": { + "smithy.api#documentation": "Present if user has set an execution-specific versioning override. This override takes\n precedence over SDK-sent `behavior` (and `version` when override is PINNED). An\n override can be set when starting a new execution, as well as afterwards by calling the\n `UpdateWorkflowExecutionOptions` API.\n Pinned overrides are automatically inherited by child workflows, continue-as-new workflows,\n workflow retries, and cron workflows." + } + }, + "deploymentTransition": { + "target": "com.temporal.api#DeploymentTransition", + "traits": { + "smithy.api#documentation": "When present, indicates the workflow is transitioning to a different deployment. Can\n indicate one of the following transitions: unversioned -> versioned, versioned -> versioned\n on a different deployment, or versioned -> unversioned.\n Not applicable to workflows with PINNED behavior.\n When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically\n start a transition to the task queue's current deployment if the task queue's current\n deployment is different from the workflow's deployment.\n If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those\n tasks will be redirected to the task queue's current deployment. As soon as a poller from\n that deployment is available to receive the task, the workflow will automatically start a\n transition to that deployment and continue execution there.\n A deployment transition can only exist while there is a pending or started workflow task.\n Once the pending workflow task completes on the transition's target deployment, the\n transition completes and the workflow's `deployment` and `behavior` fields are updated per\n the worker's task completion response.\n Pending activities will not start new attempts during a transition. Once the transition is\n completed, pending activities will start their next attempt on the new deployment.\n Deprecated. Use version_transition." + } + }, + "versionTransition": { + "target": "com.temporal.api#DeploymentVersionTransition", + "traits": { + "smithy.api#documentation": "When present, indicates the workflow is transitioning to a different deployment version\n (which may belong to the same deployment name or another). Can indicate one of the following\n transitions: unversioned -> versioned, versioned -> versioned\n on a different deployment version, or versioned -> unversioned.\n Not applicable to workflows with PINNED behavior.\n When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically\n start a transition to the task queue's current version if the task queue's current version is\n different from the workflow's current deployment version.\n If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those\n tasks will be redirected to the task queue's current version. As soon as a poller from\n that deployment version is available to receive the task, the workflow will automatically\n start a transition to that version and continue execution there.\n A version transition can only exist while there is a pending or started workflow task.\n Once the pending workflow task completes on the transition's target version, the\n transition completes and the workflow's `behavior`, and `deployment_version` fields are updated per the\n worker's task completion response.\n Pending activities will not start new attempts during a transition. Once the transition is\n completed, pending activities will start their next attempt on the new version." + } + }, + "revisionNumber": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Monotonic counter reflecting the latest routing decision for this workflow execution.\n Used for staleness detection between history and matching when dispatching tasks to workers.\n Incremented when a workflow execution routes to a new deployment version, which happens\n when a worker of the new deployment version completes a workflow task.\n Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not\n face the problem of inconsistent dispatching that arises from eventual consistency between\n task queues and their partitions." + } + }, + "continueAsNewInitialVersioningBehavior": { + "target": "com.temporal.api#WorkflowExecutionVersioningInfoContinueAsNewInitialVersioningBehavior", + "traits": { + "smithy.api#documentation": "Experimental.\n If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\n specified in that command.\n Only used for the initial task of this run and the initial task of any retries of this run.\n Not passed to children or to future continue-as-new.\n\n Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade,\n a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility\n with ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent\n to ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade." + } + } + }, + "traits": { + "smithy.api#documentation": "Holds all the information about worker versioning for a particular workflow execution.\n Experimental. Versioning info is experimental and might change in the future." + } + }, + "com.temporal.api#WorkflowExecutionVersioningInfoBehavior": { + "type": "enum", + "members": { + "VERSIONING_BEHAVIOR_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSIONING_BEHAVIOR_UNSPECIFIED" + } + }, + "VERSIONING_BEHAVIOR_PINNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSIONING_BEHAVIOR_PINNED" + } + }, + "VERSIONING_BEHAVIOR_AUTO_UPGRADE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSIONING_BEHAVIOR_AUTO_UPGRADE" + } + } + }, + "traits": { + "smithy.api#documentation": "Versioning behavior determines how the server should treat this execution when workers are\n upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means\n unversioned. See the comments in `VersioningBehavior` enum for more info about different\n behaviors.\n\n Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning \n Behavior and Version (except when the new execution runs on a task queue not belonging to the \n same deployment version as the parent/previous run's task queue). The first workflow task will\n be dispatched according to the inherited behavior (or to the current version of the task-queue's \n deployment in the case of AutoUpgrade.) After completion of their first workflow task the \n Deployment Version and Behavior of the execution will update according to configuration on the worker.\n \n Note that `behavior` is overridden by `versioning_override` if the latter is present." + } + }, + "com.temporal.api#VersioningOverride": { + "type": "structure", + "members": { + "pinned": { + "target": "com.temporal.api#VersioningOverridePinnedOverride", + "traits": { + "smithy.api#documentation": "Override the workflow to have Pinned behavior." + } + }, + "autoUpgrade": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Override the workflow to have AutoUpgrade behavior." + } + }, + "behavior": { + "target": "com.temporal.api#VersioningOverrideBehavior", + "traits": { + "smithy.api#documentation": "Required.\n Deprecated. Use `override`." + } + }, + "deployment": { + "target": "com.temporal.api#Deployment", + "traits": { + "smithy.api#documentation": "Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`.\n Identifies the worker deployment to pin the workflow to.\n Deprecated. Use `override.pinned.version`." + } + }, + "pinnedVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Required if behavior is `PINNED`. Must be absent if behavior is not `PINNED`.\n Identifies the worker deployment version to pin the workflow to, in the format\n \".\".\n Deprecated. Use `override.pinned.version`." + } + } + }, + "traits": { + "smithy.api#documentation": "Used to override the versioning behavior (and pinned deployment version, if applicable) of a\n specific workflow execution. If set, this override takes precedence over worker-sent values.\n See `WorkflowExecutionInfo.VersioningInfo` for more information.\n\n To remove the override, call `UpdateWorkflowExecutionOptions` with a null\n `VersioningOverride`, and use the `update_mask` to indicate that it should be mutated.\n\n Pinned behavior overrides are automatically inherited by child workflows, workflow retries, continue-as-new\n workflows, and cron workflows." + } + }, + "com.temporal.api#VersioningOverridePinnedOverride": { + "type": "structure", + "members": { + "behavior": { + "target": "com.temporal.api#VersioningOverridePinnedOverrideBehavior", + "traits": { + "smithy.api#documentation": "Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED.\n See `PinnedOverrideBehavior` for details." + } + }, + "version": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "Specifies the Worker Deployment Version to pin this workflow to.\n Required if the target workflow is not already pinned to a version.\n\n If omitted and the target workflow is already pinned, the effective\n pinned version will be the existing pinned version.\n\n If omitted and the target workflow is not pinned, the override request\n will be rejected with a PreconditionFailed error." + } + } + }, + "traits": {} + }, + "com.temporal.api#VersioningOverridePinnedOverrideBehavior": { + "type": "enum", + "members": { + "PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED" + } + }, + "PINNED_OVERRIDE_BEHAVIOR_PINNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PINNED_OVERRIDE_BEHAVIOR_PINNED" + } + } + }, + "traits": { + "smithy.api#documentation": "Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED.\n See `PinnedOverrideBehavior` for details." + } + }, + "com.temporal.api#VersioningOverrideBehavior": { + "type": "enum", + "members": { + "VERSIONING_BEHAVIOR_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSIONING_BEHAVIOR_UNSPECIFIED" + } + }, + "VERSIONING_BEHAVIOR_PINNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSIONING_BEHAVIOR_PINNED" + } + }, + "VERSIONING_BEHAVIOR_AUTO_UPGRADE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSIONING_BEHAVIOR_AUTO_UPGRADE" + } + } + }, + "traits": { + "smithy.api#documentation": "Required.\n Deprecated. Use `override`." + } + }, + "com.temporal.api#DeploymentTransition": { + "type": "structure", + "members": { + "deployment": { + "target": "com.temporal.api#Deployment", + "traits": { + "smithy.api#documentation": "The target deployment of the transition. Null means a so-far-versioned workflow is\n transitioning to unversioned workers." + } + } + }, + "traits": { + "smithy.api#documentation": "Holds information about ongoing transition of a workflow execution from one deployment to another.\n Deprecated. Use DeploymentVersionTransition." + } + }, + "com.temporal.api#DeploymentVersionTransition": { + "type": "structure", + "members": { + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `deployment_version`." + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "The target Version of the transition.\n If nil, a so-far-versioned workflow is transitioning to unversioned workers." + } + } + }, + "traits": { + "smithy.api#documentation": "Holds information about ongoing transition of a workflow execution from one worker\n deployment version to another.\n Experimental. Might change in the future." + } + }, + "com.temporal.api#WorkflowExecutionVersioningInfoContinueAsNewInitialVersioningBehavior": { + "type": "enum", + "members": { + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED" + } + }, + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE" + } + }, + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION" + } + } + }, + "traits": { + "smithy.api#documentation": "Experimental.\n If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\n specified in that command.\n Only used for the initial task of this run and the initial task of any retries of this run.\n Not passed to children or to future continue-as-new.\n\n Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade,\n a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility\n with ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent\n to ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade." + } + }, + "com.temporal.api#ListArchivedWorkflowExecutionsResponseExecutionsList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkflowExecutionInfo" + }, + "traits": {} + }, + "com.temporal.api#ListArchivedWorkflowExecutions": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListArchivedWorkflowExecutionsRequest" + }, + "output": { + "target": "com.temporal.api#ListArchivedWorkflowExecutionsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/archived-workflows", + "code": 200 + }, + "smithy.api#documentation": "ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace." + } + }, + "com.temporal.api#ListBatchOperationsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace that contains the batch operation" + } + }, + "pageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "pageSize", + "smithy.api#documentation": "List page size" + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken", + "smithy.api#documentation": "Next page token" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListBatchOperationsResponse": { + "type": "structure", + "members": { + "operationInfo": { + "target": "com.temporal.api#ListBatchOperationsResponseOperationInfoList", + "traits": { + "smithy.api#documentation": "BatchOperationInfo contains the basic info about batch operation" + } + }, + "nextPageToken": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#BatchOperationInfo": { + "type": "structure", + "members": { + "jobId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Batch job ID" + } + }, + "state": { + "target": "com.temporal.api#BatchOperationInfoState", + "traits": { + "smithy.api#documentation": "Batch operation state" + } + }, + "startTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Batch operation start time" + } + }, + "closeTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Batch operation close time" + } + } + }, + "traits": {} + }, + "com.temporal.api#BatchOperationInfoState": { + "type": "enum", + "members": { + "BATCH_OPERATION_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_STATE_UNSPECIFIED" + } + }, + "BATCH_OPERATION_STATE_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_STATE_RUNNING" + } + }, + "BATCH_OPERATION_STATE_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_STATE_COMPLETED" + } + }, + "BATCH_OPERATION_STATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_STATE_FAILED" + } + } + }, + "traits": { + "smithy.api#documentation": "Batch operation state" + } + }, + "com.temporal.api#ListBatchOperationsResponseOperationInfoList": { + "type": "list", + "member": { + "target": "com.temporal.api#BatchOperationInfo" + }, + "traits": { + "smithy.api#documentation": "BatchOperationInfo contains the basic info about batch operation" + } + }, + "com.temporal.api#ListBatchOperations": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListBatchOperationsRequest" + }, + "output": { + "target": "com.temporal.api#ListBatchOperationsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/batch-operations", + "code": 200 + }, + "smithy.api#documentation": "ListBatchOperations returns a list of batch operations" + } + }, + "com.temporal.api#DescribeBatchOperationRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace that contains the batch operation" + } + }, + "jobId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Batch job id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeBatchOperationResponse": { + "type": "structure", + "members": { + "operationType": { + "target": "com.temporal.api#DescribeBatchOperationResponseOperationType", + "traits": { + "smithy.api#documentation": "Batch operation type" + } + }, + "jobId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Batch job ID" + } + }, + "state": { + "target": "com.temporal.api#DescribeBatchOperationResponseState", + "traits": { + "smithy.api#documentation": "Batch operation state" + } + }, + "startTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Batch operation start time" + } + }, + "closeTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Batch operation close time" + } + }, + "totalOperationCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Total operation count" + } + }, + "completeOperationCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Complete operation count" + } + }, + "failureOperationCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Failure operation count" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity indicates the operator identity" + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason indicates the reason to stop a operation" + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeBatchOperationResponseOperationType": { + "type": "enum", + "members": { + "BATCH_OPERATION_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_TYPE_UNSPECIFIED" + } + }, + "BATCH_OPERATION_TYPE_TERMINATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_TYPE_TERMINATE" + } + }, + "BATCH_OPERATION_TYPE_CANCEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_TYPE_CANCEL" + } + }, + "BATCH_OPERATION_TYPE_SIGNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_TYPE_SIGNAL" + } + }, + "BATCH_OPERATION_TYPE_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_TYPE_DELETE" + } + }, + "BATCH_OPERATION_TYPE_RESET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_TYPE_RESET" + } + }, + "BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS" + } + }, + "BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY" + } + }, + "BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS" + } + }, + "BATCH_OPERATION_TYPE_RESET_ACTIVITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_TYPE_RESET_ACTIVITY" + } + } + }, + "traits": { + "smithy.api#documentation": "Batch operation type" + } + }, + "com.temporal.api#DescribeBatchOperationResponseState": { + "type": "enum", + "members": { + "BATCH_OPERATION_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_STATE_UNSPECIFIED" + } + }, + "BATCH_OPERATION_STATE_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_STATE_RUNNING" + } + }, + "BATCH_OPERATION_STATE_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_STATE_COMPLETED" + } + }, + "BATCH_OPERATION_STATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH_OPERATION_STATE_FAILED" + } + } + }, + "traits": { + "smithy.api#documentation": "Batch operation state" + } + }, + "com.temporal.api#DescribeBatchOperation": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeBatchOperationRequest" + }, + "output": { + "target": "com.temporal.api#DescribeBatchOperationResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/batch-operations/{jobId}", + "code": 200 + }, + "smithy.api#documentation": "DescribeBatchOperation returns the information about a batch operation" + } + }, + "com.temporal.api#StartBatchOperationRequestExecutionsList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkflowExecution" + }, + "traits": { + "smithy.api#documentation": "Executions to apply the batch operation\n This field and `visibility_query` are mutually exclusive" + } + }, + "com.temporal.api#BatchOperationTermination": { + "type": "structure", + "members": { + "details": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized value(s) to provide to the termination event" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + } + }, + "traits": { + "smithy.api#documentation": "BatchOperationTermination sends terminate requests to batch workflows.\n Keep the parameter in sync with temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest.\n Ignore first_execution_run_id because this is used for single workflow operation." + } + }, + "com.temporal.api#BatchOperationSignal": { + "type": "structure", + "members": { + "signal": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The workflow author-defined name of the signal to send to the workflow" + } + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized value(s) to provide with the signal" + } + }, + "header": { + "target": "com.temporal.api#Header", + "traits": { + "smithy.api#documentation": "Headers that are passed with the signal to the processing workflow.\n These can include things like auth or tracing tokens." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + } + }, + "traits": { + "smithy.api#documentation": "BatchOperationSignal sends signals to batch workflows.\n Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest." + } + }, + "com.temporal.api#BatchOperationCancellation": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + } + }, + "traits": { + "smithy.api#documentation": "BatchOperationCancellation sends cancel requests to batch workflows.\n Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest.\n Ignore first_execution_run_id because this is used for single workflow operation." + } + }, + "com.temporal.api#BatchOperationDeletion": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + } + }, + "traits": { + "smithy.api#documentation": "BatchOperationDeletion sends deletion requests to batch workflows.\n Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest." + } + }, + "com.temporal.api#BatchOperationReset": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client." + } + }, + "options": { + "target": "com.temporal.api#ResetOptions", + "traits": { + "smithy.api#documentation": "Describes what to reset to and how. If set, `reset_type` and `reset_reapply_type` are ignored." + } + }, + "resetType": { + "target": "com.temporal.api#BatchOperationResetResetType", + "traits": { + "smithy.api#documentation": "Deprecated. Use `options`." + } + }, + "resetReapplyType": { + "target": "com.temporal.api#BatchOperationResetResetReapplyType", + "traits": { + "smithy.api#documentation": "Deprecated. Use `options`." + } + }, + "postResetOperations": { + "target": "com.temporal.api#BatchOperationResetPostResetOperationsList", + "traits": { + "smithy.api#documentation": "Operations to perform after the workflow has been reset. These operations will be applied\n to the *new* run of the workflow execution in the order they are provided.\n All operations are applied to the workflow before the first new workflow task is generated" + } + } + }, + "traits": { + "smithy.api#documentation": "BatchOperationReset sends reset requests to batch workflows.\n Keep the parameter in sync with temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest." + } + }, + "com.temporal.api#ResetOptions": { + "type": "structure", + "members": { + "workflowTaskId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of a specific `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or\n `WORKFLOW_TASK_STARTED` event to reset to.\n Note that this option doesn't make sense when used as part of a batch request." + } + }, + "buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resets to the first workflow task processed by this build id.\n If the workflow was not processed by the build id, or the workflow task can't be\n determined, no reset will be performed.\n Note that by default, this reset is allowed to be to a prior run in a chain of\n continue-as-new." + } + }, + "resetReapplyType": { + "target": "com.temporal.api#ResetOptionsResetReapplyType", + "traits": { + "smithy.api#documentation": "Deprecated. Use `options`.\n Default: RESET_REAPPLY_TYPE_SIGNAL" + } + }, + "currentRunOnly": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, limit the reset to only within the current run. (Applies to build_id targets and\n possibly others in the future.)" + } + }, + "resetReapplyExcludeTypes": { + "target": "com.temporal.api#ResetOptionsResetReapplyExcludeTypesList", + "traits": { + "smithy.api#documentation": "Event types not to be reapplied" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes where and how to reset a workflow, used for batch reset currently\n and may be used for single-workflow reset later." + } + }, + "com.temporal.api#ResetOptionsResetReapplyType": { + "type": "enum", + "members": { + "RESET_REAPPLY_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_UNSPECIFIED" + } + }, + "RESET_REAPPLY_TYPE_SIGNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_SIGNAL" + } + }, + "RESET_REAPPLY_TYPE_NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_NONE" + } + }, + "RESET_REAPPLY_TYPE_ALL_ELIGIBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_ALL_ELIGIBLE" + } + } + }, + "traits": { + "smithy.api#documentation": "Deprecated. Use `options`.\n Default: RESET_REAPPLY_TYPE_SIGNAL" + } + }, + "com.temporal.api#ResetOptionsResetReapplyExcludeTypesItem": { + "type": "enum", + "members": { + "RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED" + } + }, + "RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL" + } + }, + "RESET_REAPPLY_EXCLUDE_TYPE_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_EXCLUDE_TYPE_UPDATE" + } + }, + "RESET_REAPPLY_EXCLUDE_TYPE_NEXUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_EXCLUDE_TYPE_NEXUS" + } + }, + "RESET_REAPPLY_EXCLUDE_TYPE_CANCEL_REQUEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_EXCLUDE_TYPE_CANCEL_REQUEST" + } + } + }, + "traits": {} + }, + "com.temporal.api#ResetOptionsResetReapplyExcludeTypesList": { + "type": "list", + "member": { + "target": "com.temporal.api#ResetOptionsResetReapplyExcludeTypesItem" + }, + "traits": { + "smithy.api#documentation": "Event types not to be reapplied" + } + }, + "com.temporal.api#BatchOperationResetResetType": { + "type": "enum", + "members": { + "RESET_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_TYPE_UNSPECIFIED" + } + }, + "RESET_TYPE_FIRST_WORKFLOW_TASK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_TYPE_FIRST_WORKFLOW_TASK" + } + }, + "RESET_TYPE_LAST_WORKFLOW_TASK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_TYPE_LAST_WORKFLOW_TASK" + } + } + }, + "traits": { + "smithy.api#documentation": "Deprecated. Use `options`." + } + }, + "com.temporal.api#BatchOperationResetResetReapplyType": { + "type": "enum", + "members": { + "RESET_REAPPLY_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_UNSPECIFIED" + } + }, + "RESET_REAPPLY_TYPE_SIGNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_SIGNAL" + } + }, + "RESET_REAPPLY_TYPE_NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_NONE" + } + }, + "RESET_REAPPLY_TYPE_ALL_ELIGIBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_ALL_ELIGIBLE" + } + } + }, + "traits": { + "smithy.api#documentation": "Deprecated. Use `options`." + } + }, + "com.temporal.api#PostResetOperation": { + "type": "structure", + "members": { + "signalWorkflow": { + "target": "com.temporal.api#PostResetOperationSignalWorkflow" + }, + "updateWorkflowOptions": { + "target": "com.temporal.api#PostResetOperationUpdateWorkflowOptions" + } + }, + "traits": { + "smithy.api#documentation": "PostResetOperation represents an operation to be performed on the new workflow execution after a workflow reset." + } + }, + "com.temporal.api#PostResetOperationSignalWorkflow": { + "type": "structure", + "members": { + "signalName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The workflow author-defined name of the signal to send to the workflow." + } + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized value(s) to provide with the signal." + } + }, + "header": { + "target": "com.temporal.api#Header", + "traits": { + "smithy.api#documentation": "Headers that are passed with the signal to the processing workflow." + } + }, + "links": { + "target": "com.temporal.api#PostResetOperationSignalWorkflowLinksList", + "traits": { + "smithy.api#documentation": "Links to be associated with the WorkflowExecutionSignaled event." + } + } + }, + "traits": { + "smithy.api#documentation": "SignalWorkflow represents sending a signal after a workflow reset.\n Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest." + } + }, + "com.temporal.api#PostResetOperationSignalWorkflowLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links to be associated with the WorkflowExecutionSignaled event." + } + }, + "com.temporal.api#PostResetOperationUpdateWorkflowOptions": { + "type": "structure", + "members": { + "workflowExecutionOptions": { + "target": "com.temporal.api#WorkflowExecutionOptions", + "traits": { + "smithy.api#documentation": "Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask." + } + }, + "updateMask": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Controls which fields from `workflow_execution_options` will be applied.\n To unset a field, set it to null and use the update mask to indicate that it should be mutated." + } + } + }, + "traits": { + "smithy.api#documentation": "UpdateWorkflowOptions represents updating workflow execution options after a workflow reset.\n Keep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest." + } + }, + "com.temporal.api#WorkflowExecutionOptions": { + "type": "structure", + "members": { + "versioningOverride": { + "target": "com.temporal.api#VersioningOverride", + "traits": { + "smithy.api#documentation": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "If set, overrides the workflow's priority sent by the SDK." + } + }, + "timeSkippingConfig": { + "target": "com.temporal.api#TimeSkippingConfig", + "traits": { + "smithy.api#documentation": "Time-skipping configuration for this workflow execution.\n If not set, the time-skipping configuration is not updated by this request;\n the existing configuration is preserved." + } + } + }, + "traits": {} + }, + "com.temporal.api#TimeSkippingConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enables or disables time skipping for this workflow execution." + } + }, + "maxSkippedDuration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum total virtual time that can be skipped." + } + }, + "maxElapsedDuration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum elapsed time since time skipping was enabled.\n This includes both skipped time and real time elapsing." + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration for time skipping during a workflow execution.\n When enabled, virtual time advances automatically whenever there is no in-flight work.\n In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,\n and possibly other features added in the future.\n User timers are not classified as in-flight work and will be skipped over.\n When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.\n \n Propagation behavior of time skipping:\n The enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows:\n (1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are\n inherited from the current execution. The configured bound is shared between the inherited skipped\n duration and any additional duration skipped by the new run.\n (2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the\n current workflow started; the accumulated skipped duration of the current run is not propagated.\n (3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays\n all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that\n point, the resulting run ends up with the same final time-skipping configuration as the previous run." + } + }, + "com.temporal.api#BatchOperationResetPostResetOperationsList": { + "type": "list", + "member": { + "target": "com.temporal.api#PostResetOperation" + }, + "traits": { + "smithy.api#documentation": "Operations to perform after the workflow has been reset. These operations will be applied\n to the *new* run of the workflow execution in the order they are provided.\n All operations are applied to the workflow before the first new workflow task is generated" + } + }, + "com.temporal.api#BatchOperationUpdateWorkflowExecutionOptions": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client." + } + }, + "workflowExecutionOptions": { + "target": "com.temporal.api#WorkflowExecutionOptions", + "traits": { + "smithy.api#documentation": "Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask." + } + }, + "updateMask": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Controls which fields from `workflow_execution_options` will be applied.\n To unset a field, set it to null and use the update mask to indicate that it should be mutated." + } + } + }, + "traits": { + "smithy.api#documentation": "BatchOperationUpdateWorkflowExecutionOptions sends UpdateWorkflowExecutionOptions requests to batch workflows.\n Keep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest." + } + }, + "com.temporal.api#BatchOperationUnpauseActivities": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client." + } + }, + "type": { + "target": "smithy.api#String" + }, + "matchAll": { + "target": "smithy.api#Boolean" + }, + "resetAttempts": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Setting this flag will also reset the number of attempts." + } + }, + "resetHeartbeat": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Setting this flag will also reset the heartbeat details." + } + }, + "jitter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If set, the activity will start at a random time within the specified jitter\n duration, introducing variability to the start time." + } + } + }, + "traits": { + "smithy.api#documentation": "BatchOperationUnpauseActivities sends unpause requests to batch workflows." + } + }, + "com.temporal.api#BatchOperationResetActivities": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client." + } + }, + "type": { + "target": "smithy.api#String" + }, + "matchAll": { + "target": "smithy.api#Boolean" + }, + "resetAttempts": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Setting this flag will also reset the number of attempts." + } + }, + "resetHeartbeat": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Setting this flag will also reset the heartbeat details." + } + }, + "keepPaused": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If activity is paused, it will remain paused after reset" + } + }, + "jitter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If set, the activity will start at a random time within the specified jitter\n duration, introducing variability to the start time." + } + }, + "restoreOriginalOptions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If set, the activity options will be restored to the defaults.\n Default options are then options activity was created with.\n They are part of the first ActivityTaskScheduled event." + } + } + }, + "traits": { + "smithy.api#documentation": "BatchOperationResetActivities sends activity reset requests in a batch.\n NOTE: keep in sync with temporal.api.workflowservice.v1.ResetActivityRequest" + } + }, + "com.temporal.api#BatchOperationUpdateActivityOptions": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client." + } + }, + "type": { + "target": "smithy.api#String" + }, + "matchAll": { + "target": "smithy.api#Boolean" + }, + "activityOptions": { + "target": "com.temporal.api#ActivityOptions", + "traits": { + "smithy.api#documentation": "Update Activity options. Partial updates are accepted and controlled by update_mask." + } + }, + "updateMask": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Controls which fields from `activity_options` will be applied" + } + }, + "restoreOriginal": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If set, the activity options will be restored to the default.\n Default options are then options activity was created with.\n They are part of the first ActivityTaskScheduled event.\n This flag cannot be combined with any other option; if you supply\n restore_original together with other options, the request will be rejected." + } + } + }, + "traits": { + "smithy.api#documentation": "BatchOperationUpdateActivityOptions sends an update-activity-options requests in a batch.\n NOTE: keep in sync with temporal.api.workflowservice.v1.UpdateActivityRequest" + } + }, + "com.temporal.api#StartBatchOperationRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace that contains the batch operation" + } + }, + "jobId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Job ID defines the unique ID for the batch job" + } + }, + "visibilityQuery": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Visibility query defines the the group of workflow to apply the batch operation\n This field and `executions` are mutually exclusive" + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason to perform the batch operation" + } + }, + "executions": { + "target": "com.temporal.api#StartBatchOperationRequestExecutionsList", + "traits": { + "smithy.api#documentation": "Executions to apply the batch operation\n This field and `visibility_query` are mutually exclusive" + } + }, + "maxOperationsPerSecond": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Limit for the number of operations processed per second within this batch.\n Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system\n overload and minimize potential delays in executing ongoing tasks for user workers.\n Note that when no explicit limit is provided, the server will operate according to its limit defined by the\n dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the\n server's configured limit." + } + }, + "terminationOperation": { + "target": "com.temporal.api#BatchOperationTermination" + }, + "signalOperation": { + "target": "com.temporal.api#BatchOperationSignal" + }, + "cancellationOperation": { + "target": "com.temporal.api#BatchOperationCancellation" + }, + "deletionOperation": { + "target": "com.temporal.api#BatchOperationDeletion" + }, + "resetOperation": { + "target": "com.temporal.api#BatchOperationReset" + }, + "updateWorkflowOptionsOperation": { + "target": "com.temporal.api#BatchOperationUpdateWorkflowExecutionOptions" + }, + "unpauseActivitiesOperation": { + "target": "com.temporal.api#BatchOperationUnpauseActivities" + }, + "resetActivitiesOperation": { + "target": "com.temporal.api#BatchOperationResetActivities" + }, + "updateActivityOptionsOperation": { + "target": "com.temporal.api#BatchOperationUpdateActivityOptions" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#StartBatchOperationResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#StartBatchOperation": { + "type": "operation", + "input": { + "target": "com.temporal.api#StartBatchOperationRequest" + }, + "output": { + "target": "com.temporal.api#StartBatchOperationResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/batch-operations/{jobId}", + "code": 200 + }, + "smithy.api#documentation": "StartBatchOperation starts a new batch operation" + } + }, + "com.temporal.api#StopBatchOperationRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace that contains the batch operation" + } + }, + "jobId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Batch job id" + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason to stop a batch operation" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity of the operator" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#StopBatchOperationResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#StopBatchOperation": { + "type": "operation", + "input": { + "target": "com.temporal.api#StopBatchOperationRequest" + }, + "output": { + "target": "com.temporal.api#StopBatchOperationResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/batch-operations/{jobId}/stop", + "code": 200 + }, + "smithy.api#documentation": "StopBatchOperation stops a batch operation" + } + }, + "com.temporal.api#UpdateDeploymentMetadata": { + "type": "structure", + "members": { + "upsertEntries": { + "target": "com.temporal.api#UpdateDeploymentMetadataUpsertEntriesMap" + }, + "removeEntries": { + "target": "com.temporal.api#UpdateDeploymentMetadataRemoveEntriesList", + "traits": { + "smithy.api#documentation": "List of keys to remove from the metadata." + } + } + }, + "traits": { + "smithy.api#documentation": "Used as part of Deployment write APIs to update metadata attached to a deployment.\n Deprecated." + } + }, + "com.temporal.api#UpdateDeploymentMetadataUpsertEntriesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.temporal.api#UpdateDeploymentMetadataRemoveEntriesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "List of keys to remove from the metadata." + } + }, + "com.temporal.api#SetCurrentDeploymentRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_series_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment": { + "target": "com.temporal.api#Deployment" + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + }, + "updateMetadata": { + "target": "com.temporal.api#UpdateDeploymentMetadata", + "traits": { + "smithy.api#documentation": "Optional. Use to add or remove user-defined metadata entries. Metadata entries are exposed\n when describing a deployment. It is a good place for information such as operator name,\n links to internal deployment pipelines, etc." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#SetCurrentDeploymentResponse": { + "type": "structure", + "members": { + "currentDeploymentInfo": { + "target": "com.temporal.api#DeploymentInfo" + }, + "previousDeploymentInfo": { + "target": "com.temporal.api#DeploymentInfo", + "traits": { + "smithy.api#documentation": "Info of the deployment that was current before executing this operation." + } + } + }, + "traits": { + "smithy.api#documentation": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" + } + }, + "com.temporal.api#DeploymentInfo": { + "type": "structure", + "members": { + "deployment": { + "target": "com.temporal.api#Deployment" + }, + "createTime": { + "target": "smithy.api#String" + }, + "taskQueueInfos": { + "target": "com.temporal.api#DeploymentInfoTaskQueueInfosList" + }, + "metadata": { + "target": "com.temporal.api#DeploymentInfoMetadataMap", + "traits": { + "smithy.api#documentation": "A user-defined set of key-values. Can be updated as part of write operations to the\n deployment, such as `SetCurrentDeployment`." + } + }, + "isCurrent": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If this deployment is the current deployment of its deployment series." + } + } + }, + "traits": { + "smithy.api#documentation": "`DeploymentInfo` holds information about a deployment. Deployment information is tracked\n automatically by server as soon as the first poll from that deployment reaches the server. There\n can be multiple task queue workers in a single deployment which are listed in this message.\n Deprecated." + } + }, + "com.temporal.api#DeploymentInfoTaskQueueInfo": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + }, + "type": { + "target": "com.temporal.api#DeploymentInfoTaskQueueInfoType" + }, + "firstPollerTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "When server saw the first poller for this task queue in this deployment." + } + } + }, + "traits": {} + }, + "com.temporal.api#DeploymentInfoTaskQueueInfoType": { + "type": "enum", + "members": { + "TASK_QUEUE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_UNSPECIFIED" + } + }, + "TASK_QUEUE_TYPE_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_WORKFLOW" + } + }, + "TASK_QUEUE_TYPE_ACTIVITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_ACTIVITY" + } + }, + "TASK_QUEUE_TYPE_NEXUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_NEXUS" + } + } + }, + "traits": {} + }, + "com.temporal.api#DeploymentInfoTaskQueueInfosList": { + "type": "list", + "member": { + "target": "com.temporal.api#DeploymentInfoTaskQueueInfo" + }, + "traits": {} + }, + "com.temporal.api#DeploymentInfoMetadataMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "A user-defined set of key-values. Can be updated as part of write operations to the\n deployment, such as `SetCurrentDeployment`." + } + }, + "com.temporal.api#SetCurrentDeployment": { + "type": "operation", + "input": { + "target": "com.temporal.api#SetCurrentDeploymentRequest" + }, + "output": { + "target": "com.temporal.api#SetCurrentDeploymentResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/current-deployment/{deployment_series_name}", + "code": 200 + }, + "smithy.api#documentation": "Sets a deployment as the current deployment for its deployment series. Can optionally update\n the metadata of the deployment as well.\n Experimental. This API might significantly change or be removed in a future release.\n Deprecated. Replaced by `SetWorkerDeploymentCurrentVersion`." + } + }, + "com.temporal.api#GetCurrentDeploymentRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "seriesName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#GetCurrentDeploymentResponse": { + "type": "structure", + "members": { + "currentDeploymentInfo": { + "target": "com.temporal.api#DeploymentInfo" + } + }, + "traits": { + "smithy.api#documentation": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" + } + }, + "com.temporal.api#GetCurrentDeployment": { + "type": "operation", + "input": { + "target": "com.temporal.api#GetCurrentDeploymentRequest" + }, + "output": { + "target": "com.temporal.api#GetCurrentDeploymentResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/current-deployment/{seriesName}", + "code": 200 + }, + "smithy.api#documentation": "Returns the current deployment (and its info) for a given deployment series.\n Experimental. This API might significantly change or be removed in a future release.\n Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`." + } + }, + "com.temporal.api#ListDeploymentsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "pageSize" + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken" + } + }, + "seriesName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "seriesName", + "smithy.api#documentation": "Optional. Use to filter based on exact series name match." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListDeploymentsResponse": { + "type": "structure", + "members": { + "nextPageToken": { + "target": "smithy.api#String" + }, + "deployments": { + "target": "com.temporal.api#ListDeploymentsResponseDeploymentsList" + } + }, + "traits": { + "smithy.api#documentation": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" + } + }, + "com.temporal.api#DeploymentListInfo": { + "type": "structure", + "members": { + "deployment": { + "target": "com.temporal.api#Deployment" + }, + "createTime": { + "target": "smithy.api#String" + }, + "isCurrent": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If this deployment is the current deployment of its deployment series." + } + } + }, + "traits": { + "smithy.api#documentation": "DeploymentListInfo is an abbreviated set of fields from DeploymentInfo that's returned in\n ListDeployments.\n Deprecated." + } + }, + "com.temporal.api#ListDeploymentsResponseDeploymentsList": { + "type": "list", + "member": { + "target": "com.temporal.api#DeploymentListInfo" + }, + "traits": {} + }, + "com.temporal.api#ListDeployments": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListDeploymentsRequest" + }, + "output": { + "target": "com.temporal.api#ListDeploymentsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/deployments", + "code": 200 + }, + "smithy.api#documentation": "Lists worker deployments in the namespace. Optionally can filter based on deployment series\n name.\n Experimental. This API might significantly change or be removed in a future release.\n Deprecated. Replaced with `ListWorkerDeployments`." + } + }, + "com.temporal.api#DescribeDeploymentRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_series_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_build_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_seriesName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "deployment.seriesName", + "smithy.api#documentation": "Different versions of the same worker service/application are related together by having a\n shared series name.\n Out of all deployments of a series, one can be designated as the current deployment, which\n receives new workflow executions and new tasks of workflows with\n `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior." + } + }, + "deployment_buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "deployment.buildId", + "smithy.api#documentation": "Build ID changes with each version of the worker when the worker program code and/or config\n changes." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeDeploymentResponse": { + "type": "structure", + "members": { + "deploymentInfo": { + "target": "com.temporal.api#DeploymentInfo" + } + }, + "traits": { + "smithy.api#documentation": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" + } + }, + "com.temporal.api#DescribeDeployment": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeDeploymentRequest" + }, + "output": { + "target": "com.temporal.api#DescribeDeploymentResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/deployments/{deployment_series_name}/{deployment_build_id}", + "code": 200 + }, + "smithy.api#documentation": "Describes a worker deployment.\n Experimental. This API might significantly change or be removed in a future release.\n Deprecated. Replaced with `DescribeWorkerDeploymentVersion`." + } + }, + "com.temporal.api#GetDeploymentReachabilityRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_series_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_build_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_seriesName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "deployment.seriesName", + "smithy.api#documentation": "Different versions of the same worker service/application are related together by having a\n shared series name.\n Out of all deployments of a series, one can be designated as the current deployment, which\n receives new workflow executions and new tasks of workflows with\n `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior." + } + }, + "deployment_buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "deployment.buildId", + "smithy.api#documentation": "Build ID changes with each version of the worker when the worker program code and/or config\n changes." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#GetDeploymentReachabilityResponse": { + "type": "structure", + "members": { + "deploymentInfo": { + "target": "com.temporal.api#DeploymentInfo" + }, + "reachability": { + "target": "com.temporal.api#GetDeploymentReachabilityResponseReachability" + }, + "lastUpdateTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reachability level might come from server cache. This timestamp specifies when the value\n was actually calculated." + } + } + }, + "traits": { + "smithy.api#documentation": "[cleanup-wv-pre-release] Pre-release deployment APIs, clean up later" + } + }, + "com.temporal.api#GetDeploymentReachabilityResponseReachability": { + "type": "enum", + "members": { + "DEPLOYMENT_REACHABILITY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEPLOYMENT_REACHABILITY_UNSPECIFIED" + } + }, + "DEPLOYMENT_REACHABILITY_REACHABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEPLOYMENT_REACHABILITY_REACHABLE" + } + }, + "DEPLOYMENT_REACHABILITY_CLOSED_WORKFLOWS_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEPLOYMENT_REACHABILITY_CLOSED_WORKFLOWS_ONLY" + } + }, + "DEPLOYMENT_REACHABILITY_UNREACHABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEPLOYMENT_REACHABILITY_UNREACHABLE" + } + } + }, + "traits": {} + }, + "com.temporal.api#GetDeploymentReachability": { + "type": "operation", + "input": { + "target": "com.temporal.api#GetDeploymentReachabilityRequest" + }, + "output": { + "target": "com.temporal.api#GetDeploymentReachabilityResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/deployments/{deployment_series_name}/{deployment_build_id}/reachability", + "code": 200 + }, + "smithy.api#documentation": "Returns the reachability level of a worker deployment to help users decide when it is time\n to decommission a deployment. Reachability level is calculated based on the deployment's\n `status` and existing workflows that depend on the given deployment for their execution.\n Calculating reachability is relatively expensive. Therefore, server might return a recently\n cached value. In such a case, the `last_update_time` will inform you about the actual\n reachability calculation time.\n Experimental. This API might significantly change or be removed in a future release.\n Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`." + } + }, + "com.temporal.api#CountNexusOperationExecutionsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#documentation": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.\n See also ListNexusOperationExecutionsRequest for search attributes available for Nexus operations." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#CountNexusOperationExecutionsResponse": { + "type": "structure", + "members": { + "count": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If `query` is not grouping by any field, the count is an approximate number\n of operations that match the query.\n If `query` is grouping by a field, the count is simply the sum of the counts\n of the groups returned in the response. This number can be smaller than the\n total number of operations matching the query." + } + }, + "groups": { + "target": "com.temporal.api#CountNexusOperationExecutionsResponseGroupsList", + "traits": { + "smithy.api#documentation": "Contains the groups if the request is grouping by a field.\n The list might not be complete, and the counts of each group is approximate." + } + } + }, + "traits": {} + }, + "com.temporal.api#CountNexusOperationExecutionsResponseAggregationGroup": { + "type": "structure", + "members": { + "groupValues": { + "target": "com.temporal.api#CountNexusOperationExecutionsResponseAggregationGroupGroupValuesList" + }, + "count": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#CountNexusOperationExecutionsResponseAggregationGroupGroupValuesList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.temporal.api#CountNexusOperationExecutionsResponseGroupsList": { + "type": "list", + "member": { + "target": "com.temporal.api#CountNexusOperationExecutionsResponseAggregationGroup" + }, + "traits": { + "smithy.api#documentation": "Contains the groups if the request is grouping by a field.\n The list might not be complete, and the counts of each group is approximate." + } + }, + "com.temporal.api#CountNexusOperationExecutions": { + "type": "operation", + "input": { + "target": "com.temporal.api#CountNexusOperationExecutionsRequest" + }, + "output": { + "target": "com.temporal.api#CountNexusOperationExecutionsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/nexus-operation-count", + "code": 200 + }, + "smithy.api#documentation": "CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace." + } + }, + "com.temporal.api#ListNexusOperationExecutionsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "pageSize", + "smithy.api#documentation": "Max number of operations to return per page." + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken", + "smithy.api#documentation": "Token returned in ListNexusOperationExecutionsResponse." + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#documentation": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.\n Search attributes that are avaialble for Nexus operations include:\n - OperationId\n - RunId\n - Endpoint\n - Service\n - Operation\n - RequestId\n - StartTime\n - ExecutionTime\n - CloseTime\n - ExecutionStatus\n - ExecutionDuration\n - StateTransitionCount" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListNexusOperationExecutionsResponse": { + "type": "structure", + "members": { + "operations": { + "target": "com.temporal.api#ListNexusOperationExecutionsResponseOperationsList" + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Token to use to fetch the next page. If empty, there is no next page." + } + } + }, + "traits": {} + }, + "com.temporal.api#NexusOperationExecutionListInfo": { + "type": "structure", + "members": { + "operationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier of this operation within its namespace along with run ID (below)." + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run ID of the standalone Nexus operation." + } + }, + "endpoint": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Endpoint name." + } + }, + "service": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Service name." + } + }, + "operation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation name." + } + }, + "scheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time the operation was originally scheduled via a StartNexusOperation request." + } + }, + "closeTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If the operation is in a terminal status, this field represents the time the operation transitioned to that status." + } + }, + "status": { + "target": "com.temporal.api#NexusOperationExecutionListInfoStatus", + "traits": { + "smithy.api#documentation": "The status is updated once, when the operation is originally scheduled, and again when the operation reaches a terminal status." + } + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes", + "traits": { + "smithy.api#documentation": "Search attributes from the start request." + } + }, + "stateTransitionCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Updated on terminal status." + } + }, + "executionDuration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The difference between close time and scheduled time.\n This field is only populated if the operation is closed." + } + } + }, + "traits": { + "smithy.api#documentation": "Limited Nexus operation information returned in the list response.\n When adding fields here, ensure that it is also present in NexusOperationExecutionInfo (note that it may already be present in\n NexusOperationExecutionInfo but not at the top-level)." + } + }, + "com.temporal.api#NexusOperationExecutionListInfoStatus": { + "type": "enum", + "members": { + "NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_RUNNING" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_FAILED" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_CANCELED" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT" + } + } + }, + "traits": { + "smithy.api#documentation": "The status is updated once, when the operation is originally scheduled, and again when the operation reaches a terminal status." + } + }, + "com.temporal.api#ListNexusOperationExecutionsResponseOperationsList": { + "type": "list", + "member": { + "target": "com.temporal.api#NexusOperationExecutionListInfo" + }, + "traits": {} + }, + "com.temporal.api#ListNexusOperationExecutions": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListNexusOperationExecutionsRequest" + }, + "output": { + "target": "com.temporal.api#ListNexusOperationExecutionsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/nexus-operations", + "code": 200 + }, + "smithy.api#documentation": "ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace." + } + }, + "com.temporal.api#DescribeNexusOperationExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "operationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "runId", + "smithy.api#documentation": "Operation run ID. If empty the request targets the latest run." + } + }, + "includeInput": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "includeInput", + "smithy.api#documentation": "Include the input field in the response." + } + }, + "includeOutcome": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "includeOutcome", + "smithy.api#documentation": "Include the outcome (result/failure) in the response if the operation has completed." + } + }, + "longPollToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "longPollToken", + "smithy.api#documentation": "Token from a previous DescribeNexusOperationExecutionResponse. If present, this RPC will long-poll until operation\n state changes from the state encoded in this token. If absent, return current state immediately.\n If present, run_id must also be present.\n Note that operation state may change multiple times between requests, therefore it is not\n guaranteed that a client making a sequence of long-poll requests will see a complete\n sequence of state changes." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeNexusOperationExecutionResponse": { + "type": "structure", + "members": { + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run ID of the operation, useful when run_id was not specified in the request." + } + }, + "info": { + "target": "com.temporal.api#NexusOperationExecutionInfo", + "traits": { + "smithy.api#documentation": "Information about the operation." + } + }, + "input": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Serialized operation input, passed as the request payload.\n Only set if include_input was true in the request." + } + }, + "result": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The result if the operation completed successfully." + } + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "The failure if the operation completed unsuccessfully." + } + }, + "longPollToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Token for follow-on long-poll requests. Absent only if the operation is complete." + } + } + }, + "traits": {} + }, + "com.temporal.api#NexusOperationExecutionInfo": { + "type": "structure", + "members": { + "operationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of this Nexus operation within its namespace along with run ID (below)." + } + }, + "runId": { + "target": "smithy.api#String" + }, + "endpoint": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Endpoint name, resolved to a URL via the cluster's endpoint registry." + } + }, + "service": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Service name." + } + }, + "operation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation name." + } + }, + "status": { + "target": "com.temporal.api#NexusOperationExecutionInfoStatus", + "traits": { + "smithy.api#documentation": "A general status for this operation, indicates whether it is currently running or in one of the terminal statuses.\n Updated once when the operation is originally scheduled, and again when it reaches a terminal status." + } + }, + "state": { + "target": "com.temporal.api#NexusOperationExecutionInfoState", + "traits": { + "smithy.api#documentation": "More detailed breakdown of NEXUS_OPERATION_EXECUTION_STATUS_RUNNING." + } + }, + "scheduleToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Schedule-to-close timeout for this operation.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "scheduleToStartTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Schedule-to-start timeout for this operation.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "startToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Start-to-close timeout for this operation.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "attempt": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of attempts made to deliver the start operation request.\n This number is approximate, it is incremented when a task is added to the history queue.\n In practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task\n was never executed." + } + }, + "scheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time the operation was originally scheduled via a StartNexusOperation request." + } + }, + "expirationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Scheduled time + schedule to close timeout." + } + }, + "closeTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time when the operation transitioned to a closed state." + } + }, + "lastAttemptCompleteTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the last attempt completed." + } + }, + "lastAttemptFailure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "The last attempt's failure, if any." + } + }, + "nextAttemptScheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the next attempt is scheduled." + } + }, + "executionDuration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Elapsed time from schedule_time to now for running operations or to close_time for closed\n operations, including all attempts and backoff between attempts." + } + }, + "cancellationInfo": { + "target": "com.temporal.api#NexusOperationExecutionCancellationInfo" + }, + "blockedReason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If the state is BLOCKED, blocked reason provides additional information." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Server-generated request ID used as an idempotency token when submitting start requests to\n the handler. Distinct from the request_id in StartNexusOperationRequest, which is the\n caller-side idempotency key for the StartNexusOperation RPC itself." + } + }, + "operationToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation token. Only set for asynchronous operations after a successful StartOperation call." + } + }, + "stateTransitionCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Incremented each time the operation's state is mutated in persistence." + } + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "nexusHeader": { + "target": "com.temporal.api#NexusOperationExecutionInfoNexusHeaderMap", + "traits": { + "smithy.api#documentation": "Header for context propagation and tracing purposes." + } + }, + "userMetadata": { + "target": "com.temporal.api#UserMetadata", + "traits": { + "smithy.api#documentation": "Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation." + } + }, + "links": { + "target": "com.temporal.api#NexusOperationExecutionInfoLinksList", + "traits": { + "smithy.api#documentation": "Links attached by the handler of this operation on start or completion." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who started this operation." + } + } + }, + "traits": { + "smithy.api#documentation": "Full current state of a standalone Nexus operation, as of the time of the request." + } + }, + "com.temporal.api#NexusOperationExecutionInfoStatus": { + "type": "enum", + "members": { + "NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_RUNNING" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_FAILED" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_CANCELED" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED" + } + }, + "NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT" + } + } + }, + "traits": { + "smithy.api#documentation": "A general status for this operation, indicates whether it is currently running or in one of the terminal statuses.\n Updated once when the operation is originally scheduled, and again when it reaches a terminal status." + } + }, + "com.temporal.api#NexusOperationExecutionInfoState": { + "type": "enum", + "members": { + "PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED" + } + }, + "PENDING_NEXUS_OPERATION_STATE_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_NEXUS_OPERATION_STATE_SCHEDULED" + } + }, + "PENDING_NEXUS_OPERATION_STATE_BACKING_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_NEXUS_OPERATION_STATE_BACKING_OFF" + } + }, + "PENDING_NEXUS_OPERATION_STATE_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_NEXUS_OPERATION_STATE_STARTED" + } + }, + "PENDING_NEXUS_OPERATION_STATE_BLOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_NEXUS_OPERATION_STATE_BLOCKED" + } + } + }, + "traits": { + "smithy.api#documentation": "More detailed breakdown of NEXUS_OPERATION_EXECUTION_STATUS_RUNNING." + } + }, + "com.temporal.api#NexusOperationExecutionCancellationInfo": { + "type": "structure", + "members": { + "requestedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when cancellation was requested." + } + }, + "state": { + "target": "com.temporal.api#NexusOperationExecutionCancellationInfoState" + }, + "attempt": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of attempts made to deliver the cancel operation request.\n This number represents a minimum bound since the attempt is incremented after the request completes." + } + }, + "lastAttemptCompleteTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the last attempt completed." + } + }, + "lastAttemptFailure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "The last attempt's failure, if any." + } + }, + "nextAttemptScheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the next attempt is scheduled." + } + }, + "blockedReason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If the state is BLOCKED, blocked reason provides additional information." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A reason that may be specified in the CancelNexusOperationRequest." + } + } + }, + "traits": { + "smithy.api#documentation": "NexusOperationExecutionCancellationInfo contains the state of a Nexus operation cancellation." + } + }, + "com.temporal.api#NexusOperationExecutionCancellationInfoState": { + "type": "enum", + "members": { + "NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_FAILED" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED" + } + } + }, + "traits": {} + }, + "com.temporal.api#NexusOperationExecutionInfoNexusHeaderMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Header for context propagation and tracing purposes." + } + }, + "com.temporal.api#NexusOperationExecutionInfoLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links attached by the handler of this operation on start or completion." + } + }, + "com.temporal.api#DescribeNexusOperationExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeNexusOperationExecutionRequest" + }, + "output": { + "target": "com.temporal.api#DescribeNexusOperationExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}", + "code": 200 + }, + "smithy.api#documentation": "DescribeNexusOperationExecution returns information about a Nexus operation.\n Supported use cases include:\n - Get current operation info without waiting\n - Long-poll for next state change and return new operation info\n Response can optionally include operation input or outcome (if the operation has completed)." + } + }, + "com.temporal.api#StartNexusOperationExecutionRequestIdReusePolicy": { + "type": "enum", + "members": { + "NEXUS_OPERATION_ID_REUSE_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_ID_REUSE_POLICY_UNSPECIFIED" + } + }, + "NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE" + } + }, + "NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + } + }, + "NEXUS_OPERATION_ID_REUSE_POLICY_REJECT_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_ID_REUSE_POLICY_REJECT_DUPLICATE" + } + } + }, + "traits": { + "smithy.api#documentation": "Defines whether to allow re-using the operation id from a previously *closed* operation.\n The default policy is NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE." + } + }, + "com.temporal.api#StartNexusOperationExecutionRequestIdConflictPolicy": { + "type": "enum", + "members": { + "NEXUS_OPERATION_ID_CONFLICT_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_ID_CONFLICT_POLICY_UNSPECIFIED" + } + }, + "NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL" + } + }, + "NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING" + } + } + }, + "traits": { + "smithy.api#documentation": "Defines how to resolve an operation id conflict with a *running* operation.\n The default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL." + } + }, + "com.temporal.api#StartNexusOperationExecutionRequestNexusHeaderMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Header to attach to the Nexus request.\n Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and\n transmitted to external services as-is.\n This is useful for propagating tracing information.\n Note these headers are not the same as Temporal headers on internal activities and child workflows, these are\n transmitted to Nexus operations that may be external and are not traditional payloads." + } + }, + "com.temporal.api#StartNexusOperationExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "operationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Identifier for this operation. This is a caller-side ID, distinct from any internal\n operation identifiers generated by the handler. Must be unique among operations in the\n same namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this caller-side start request. Typically UUIDv4.\n StartOperation requests sent to the handler will use a server-generated request ID." + } + }, + "endpoint": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Endpoint name, resolved to a URL via the cluster's endpoint registry." + } + }, + "service": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Service name." + } + }, + "operation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation name." + } + }, + "scheduleToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Schedule-to-close timeout for this operation.\n Indicates how long the caller is willing to wait for operation completion.\n Calls are retried internally by the server.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "scheduleToStartTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Schedule-to-start timeout for this operation.\n Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous)\n by the handler.\n If not set or zero, no schedule-to-start timeout is enforced.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "startToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Start-to-close timeout for this operation.\n Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been\n started. Synchronous operations ignore this timeout.\n If not set or zero, no start-to-close timeout is enforced.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "input": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Serialized input to the operation. Passed as the request payload." + } + }, + "idReusePolicy": { + "target": "com.temporal.api#StartNexusOperationExecutionRequestIdReusePolicy", + "traits": { + "smithy.api#documentation": "Defines whether to allow re-using the operation id from a previously *closed* operation.\n The default policy is NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE." + } + }, + "idConflictPolicy": { + "target": "com.temporal.api#StartNexusOperationExecutionRequestIdConflictPolicy", + "traits": { + "smithy.api#documentation": "Defines how to resolve an operation id conflict with a *running* operation.\n The default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL." + } + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes", + "traits": { + "smithy.api#documentation": "Search attributes for indexing." + } + }, + "nexusHeader": { + "target": "com.temporal.api#StartNexusOperationExecutionRequestNexusHeaderMap", + "traits": { + "smithy.api#documentation": "Header to attach to the Nexus request.\n Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and\n transmitted to external services as-is.\n This is useful for propagating tracing information.\n Note these headers are not the same as Temporal headers on internal activities and child workflows, these are\n transmitted to Nexus operations that may be external and are not traditional payloads." + } + }, + "userMetadata": { + "target": "com.temporal.api#UserMetadata", + "traits": { + "smithy.api#documentation": "Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#StartNexusOperationExecutionResponse": { + "type": "structure", + "members": { + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run ID of the operation that was started - or used (via NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING)." + } + }, + "started": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, a new operation was started." + } + } + }, + "traits": {} + }, + "com.temporal.api#StartNexusOperationExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#StartNexusOperationExecutionRequest" + }, + "output": { + "target": "com.temporal.api#StartNexusOperationExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}", + "code": 200 + }, + "smithy.api#documentation": "StartNexusOperationExecution starts a new Nexus operation.\n\n Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this\n namespace unless permitted by the specified ID conflict policy." + } + }, + "com.temporal.api#RequestCancelNexusOperationExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "operationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation run ID, targets the latest run if empty." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe cancellation requests." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for requesting the cancellation, recorded and available via the DescribeNexusOperationExecution API." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RequestCancelNexusOperationExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#RequestCancelNexusOperationExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#RequestCancelNexusOperationExecutionRequest" + }, + "output": { + "target": "com.temporal.api#RequestCancelNexusOperationExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}/cancel", + "code": 200 + }, + "smithy.api#documentation": "RequestCancelNexusOperationExecution requests cancellation of a Nexus operation.\n\n Requesting to cancel an operation does not automatically transition the operation to canceled status.\n The operation will only transition to canceled status if it supports cancellation and the handler\n processes the cancellation request." + } + }, + "com.temporal.api#PollNexusOperationExecutionRequestWaitStage": { + "type": "enum", + "members": { + "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED" + } + }, + "NEXUS_OPERATION_WAIT_STAGE_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_WAIT_STAGE_STARTED" + } + }, + "NEXUS_OPERATION_WAIT_STAGE_CLOSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_WAIT_STAGE_CLOSED" + } + } + }, + "traits": {} + }, + "com.temporal.api#PollNexusOperationExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "operationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "runId", + "smithy.api#documentation": "Operation run ID. If empty the request targets the latest run." + } + }, + "waitStage": { + "target": "com.temporal.api#PollNexusOperationExecutionRequestWaitStage", + "traits": { + "smithy.api#httpQuery": "waitStage", + "smithy.api#documentation": "Stage to wait for. The operation may be in a more advanced stage when the poll is unblocked." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#PollNexusOperationExecutionResponse": { + "type": "structure", + "members": { + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run ID of the operation, useful when run_id was not specified in the request." + } + }, + "waitStage": { + "target": "com.temporal.api#PollNexusOperationExecutionResponseWaitStage", + "traits": { + "smithy.api#documentation": "The current stage of the operation. May be more advanced than the stage requested in the poll." + } + }, + "operationToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation token. Only populated for asynchronous operations after a successful StartOperation call." + } + }, + "result": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The result if the operation completed successfully." + } + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "The failure if the operation completed unsuccessfully." + } + } + }, + "traits": {} + }, + "com.temporal.api#PollNexusOperationExecutionResponseWaitStage": { + "type": "enum", + "members": { + "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED" + } + }, + "NEXUS_OPERATION_WAIT_STAGE_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_WAIT_STAGE_STARTED" + } + }, + "NEXUS_OPERATION_WAIT_STAGE_CLOSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_WAIT_STAGE_CLOSED" + } + } + }, + "traits": { + "smithy.api#documentation": "The current stage of the operation. May be more advanced than the stage requested in the poll." + } + }, + "com.temporal.api#PollNexusOperationExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#PollNexusOperationExecutionRequest" + }, + "output": { + "target": "com.temporal.api#PollNexusOperationExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}/poll", + "code": 200 + }, + "smithy.api#documentation": "PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns\n the outcome (result or failure)." + } + }, + "com.temporal.api#TerminateNexusOperationExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "operationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation run ID, targets the latest run if empty." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe termination requests." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for requesting the termination, recorded in the operation's result failure outcome." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#TerminateNexusOperationExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#TerminateNexusOperationExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#TerminateNexusOperationExecutionRequest" + }, + "output": { + "target": "com.temporal.api#TerminateNexusOperationExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}/terminate", + "code": 200 + }, + "smithy.api#documentation": "TerminateNexusOperationExecution terminates an existing Nexus operation immediately.\n\n Termination happens immediately and the operation handler cannot react to it. A terminated operation will have\n its outcome set to a failure with a termination reason." + } + }, + "com.temporal.api#CountSchedulesRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#documentation": "Visibility query, see https://docs.temporal.io/list-filter for the syntax." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#CountSchedulesResponse": { + "type": "structure", + "members": { + "count": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If `query` is not grouping by any field, the count is an approximate number\n of schedules that match the query.\n If `query` is grouping by a field, the count is simply the sum of the counts\n of the groups returned in the response. This number can be smaller than the\n total number of schedules matching the query." + } + }, + "groups": { + "target": "com.temporal.api#CountSchedulesResponseGroupsList", + "traits": { + "smithy.api#documentation": "Contains the groups if the request is grouping by a field.\n The list might not be complete, and the counts of each group is approximate." + } + } + }, + "traits": {} + }, + "com.temporal.api#CountSchedulesResponseAggregationGroup": { + "type": "structure", + "members": { + "groupValues": { + "target": "com.temporal.api#CountSchedulesResponseAggregationGroupGroupValuesList" + }, + "count": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#CountSchedulesResponseAggregationGroupGroupValuesList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.temporal.api#CountSchedulesResponseGroupsList": { + "type": "list", + "member": { + "target": "com.temporal.api#CountSchedulesResponseAggregationGroup" + }, + "traits": { + "smithy.api#documentation": "Contains the groups if the request is grouping by a field.\n The list might not be complete, and the counts of each group is approximate." + } + }, + "com.temporal.api#CountSchedules": { + "type": "operation", + "input": { + "target": "com.temporal.api#CountSchedulesRequest" + }, + "output": { + "target": "com.temporal.api#CountSchedulesResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/schedule-count", + "code": 200 + }, + "smithy.api#documentation": "CountSchedules is a visibility API to count schedules in a specific namespace." + } + }, + "com.temporal.api#ListSchedulesRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The namespace to list schedules in." + } + }, + "maximumPageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "maximumPageSize", + "smithy.api#documentation": "How many to return at once." + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken", + "smithy.api#documentation": "Token to get the next page of results." + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#documentation": "Query to filter schedules." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListSchedulesResponse": { + "type": "structure", + "members": { + "schedules": { + "target": "com.temporal.api#ListSchedulesResponseSchedulesList" + }, + "nextPageToken": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#ScheduleListEntry": { + "type": "structure", + "members": { + "scheduleId": { + "target": "smithy.api#String" + }, + "memo": { + "target": "com.temporal.api#Memo" + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "info": { + "target": "com.temporal.api#ScheduleListInfo" + } + }, + "traits": { + "smithy.api#documentation": "ScheduleListEntry is returned by ListSchedules." + } + }, + "com.temporal.api#ScheduleListInfo": { + "type": "structure", + "members": { + "spec": { + "target": "com.temporal.api#ScheduleSpec", + "traits": { + "smithy.api#documentation": "From spec:\n Some fields are dropped from this copy of spec: timezone_data" + } + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType", + "traits": { + "smithy.api#documentation": "From action:\n Action is a oneof field, but we need to encode this in JSON and oneof fields don't work\n well with JSON. If action is start_workflow, this is set:" + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "From state:" + } + }, + "paused": { + "target": "smithy.api#Boolean" + }, + "recentActions": { + "target": "com.temporal.api#ScheduleListInfoRecentActionsList", + "traits": { + "smithy.api#documentation": "From info (maybe fewer entries):" + } + }, + "futureActionTimes": { + "target": "com.temporal.api#ScheduleListInfoFutureActionTimesList" + } + }, + "traits": { + "smithy.api#documentation": "ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo\n that's returned in ListSchedules." + } + }, + "com.temporal.api#ScheduleSpec": { + "type": "structure", + "members": { + "structuredCalendar": { + "target": "com.temporal.api#ScheduleSpecStructuredCalendarList", + "traits": { + "smithy.api#documentation": "Calendar-based specifications of times." + } + }, + "cronString": { + "target": "com.temporal.api#ScheduleSpecCronStringList", + "traits": { + "smithy.api#documentation": "cron_string holds a traditional cron specification as a string. It\n accepts 5, 6, or 7 fields, separated by spaces, and interprets them the\n same way as CalendarSpec.\n 5 fields: minute, hour, day_of_month, month, day_of_week\n 6 fields: minute, hour, day_of_month, month, day_of_week, year\n 7 fields: second, minute, hour, day_of_month, month, day_of_week, year\n If year is not given, it defaults to *. If second is not given, it\n defaults to 0.\n Shorthands @yearly, @monthly, @weekly, @daily, and @hourly are also\n accepted instead of the 5-7 time fields.\n Optionally, the string can be preceded by CRON_TZ= or\n TZ=, which will get copied to timezone_name. (There must\n not also be a timezone_name present.)\n Optionally \"#\" followed by a comment can appear at the end of the string.\n Note that the special case that some cron implementations have for\n treating day_of_month and day_of_week as \"or\" instead of \"and\" when both\n are set is not implemented.\n @every [/] is accepted and gets compiled into an\n IntervalSpec instead. and should be a decimal integer\n with a unit suffix s, m, h, or d." + } + }, + "calendar": { + "target": "com.temporal.api#ScheduleSpecCalendarList", + "traits": { + "smithy.api#documentation": "Calendar-based specifications of times." + } + }, + "interval": { + "target": "com.temporal.api#ScheduleSpecIntervalList", + "traits": { + "smithy.api#documentation": "Interval-based specifications of times." + } + }, + "excludeCalendar": { + "target": "com.temporal.api#ScheduleSpecExcludeCalendarList", + "traits": { + "smithy.api#documentation": "Any timestamps matching any of exclude_* will be skipped.\n Deprecated. Use exclude_structured_calendar." + } + }, + "excludeStructuredCalendar": { + "target": "com.temporal.api#ScheduleSpecExcludeStructuredCalendarList" + }, + "startTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If start_time is set, any timestamps before start_time will be skipped.\n (Together, start_time and end_time make an inclusive interval.)" + } + }, + "endTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If end_time is set, any timestamps after end_time will be skipped." + } + }, + "jitter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "All timestamps will be incremented by a random value from 0 to this\n amount of jitter. Default: 0" + } + }, + "timezoneName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time zone to interpret all calendar-based specs in.\n\n If unset, defaults to UTC. We recommend using UTC for your application if\n at all possible, to avoid various surprising properties of time zones.\n\n Time zones may be provided by name, corresponding to names in the IANA\n time zone database (see https://www.iana.org/time-zones). The definition\n will be loaded by the Temporal server from the environment it runs in.\n\n If your application requires more control over the time zone definition\n used, it may pass in a complete definition in the form of a TZif file\n from the time zone database. If present, this will be used instead of\n loading anything from the environment. You are then responsible for\n updating timezone_data when the definition changes.\n\n Calendar spec matching is based on literal matching of the clock time\n with no special handling of DST: if you write a calendar spec that fires\n at 2:30am and specify a time zone that follows DST, that action will not\n be triggered on the day that has no 2:30am. Similarly, an action that\n fires at 1:30am will be triggered twice on the day that has two 1:30s.\n\n Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC)." + } + }, + "timezoneData": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "ScheduleSpec is a complete description of a set of absolute timestamps\n (possibly infinite) that an action should occur at. The meaning of a\n ScheduleSpec depends only on its contents and never changes, except that the\n definition of a time zone can change over time (most commonly, when daylight\n saving time policy changes for an area). To create a totally self-contained\n ScheduleSpec, use UTC or include timezone_data.\n\n For input, you can provide zero or more of: structured_calendar, calendar,\n cron_string, interval, and exclude_structured_calendar, and all of them will\n be used (the schedule will take action at the union of all of their times,\n minus the ones that match exclude_structured_calendar).\n\n On input, calendar and cron_string fields will be compiled into\n structured_calendar (and maybe interval and timezone_name), so if you\n Describe a schedule, you'll see only structured_calendar, interval, etc.\n\n If a spec has no matching times after the current time, then the schedule\n will be subject to automatic deletion (after several days)." + } + }, + "com.temporal.api#StructuredCalendarSpec": { + "type": "structure", + "members": { + "second": { + "target": "com.temporal.api#StructuredCalendarSpecSecondList", + "traits": { + "smithy.api#documentation": "Match seconds (0-59)" + } + }, + "minute": { + "target": "com.temporal.api#StructuredCalendarSpecMinuteList", + "traits": { + "smithy.api#documentation": "Match minutes (0-59)" + } + }, + "hour": { + "target": "com.temporal.api#StructuredCalendarSpecHourList", + "traits": { + "smithy.api#documentation": "Match hours (0-23)" + } + }, + "dayOfMonth": { + "target": "com.temporal.api#StructuredCalendarSpecDayOfMonthList", + "traits": { + "smithy.api#documentation": "Match days of the month (1-31)\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: standard name of field --)" + } + }, + "month": { + "target": "com.temporal.api#StructuredCalendarSpecMonthList", + "traits": { + "smithy.api#documentation": "Match months (1-12)" + } + }, + "year": { + "target": "com.temporal.api#StructuredCalendarSpecYearList", + "traits": { + "smithy.api#documentation": "Match years." + } + }, + "dayOfWeek": { + "target": "com.temporal.api#StructuredCalendarSpecDayOfWeekList", + "traits": { + "smithy.api#documentation": "Match days of the week (0-6; 0 is Sunday)." + } + }, + "comment": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Free-form comment describing the intention of this spec." + } + } + }, + "traits": { + "smithy.api#documentation": "StructuredCalendarSpec describes an event specification relative to the\n calendar, in a form that's easy to work with programmatically. Each field can\n be one or more ranges.\n A timestamp matches if at least one range of each field matches the\n corresponding fields of the timestamp, except for year: if year is missing,\n that means all years match. For all fields besides year, at least one Range\n must be present to match anything.\n Relative expressions such as \"last day of the month\" or \"third Monday\" are not currently\n representable; callers must enumerate the concrete days they require." + } + }, + "com.temporal.api#Range": { + "type": "structure", + "members": { + "start": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Start of range (inclusive)." + } + }, + "end": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "End of range (inclusive)." + } + }, + "step": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Step (optional, default 1)." + } + } + }, + "traits": { + "smithy.api#documentation": "Range represents a set of integer values, used to match fields of a calendar\n time in StructuredCalendarSpec. If end < start, then end is interpreted as\n equal to start. This means you can use a Range with start set to a value, and\n end and step unset (defaulting to 0) to represent a single value." + } + }, + "com.temporal.api#StructuredCalendarSpecSecondList": { + "type": "list", + "member": { + "target": "com.temporal.api#Range" + }, + "traits": { + "smithy.api#documentation": "Match seconds (0-59)" + } + }, + "com.temporal.api#StructuredCalendarSpecMinuteList": { + "type": "list", + "member": { + "target": "com.temporal.api#Range" + }, + "traits": { + "smithy.api#documentation": "Match minutes (0-59)" + } + }, + "com.temporal.api#StructuredCalendarSpecHourList": { + "type": "list", + "member": { + "target": "com.temporal.api#Range" + }, + "traits": { + "smithy.api#documentation": "Match hours (0-23)" + } + }, + "com.temporal.api#StructuredCalendarSpecDayOfMonthList": { + "type": "list", + "member": { + "target": "com.temporal.api#Range" + }, + "traits": { + "smithy.api#documentation": "Match days of the month (1-31)\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: standard name of field --)" + } + }, + "com.temporal.api#StructuredCalendarSpecMonthList": { + "type": "list", + "member": { + "target": "com.temporal.api#Range" + }, + "traits": { + "smithy.api#documentation": "Match months (1-12)" + } + }, + "com.temporal.api#StructuredCalendarSpecYearList": { + "type": "list", + "member": { + "target": "com.temporal.api#Range" + }, + "traits": { + "smithy.api#documentation": "Match years." + } + }, + "com.temporal.api#StructuredCalendarSpecDayOfWeekList": { + "type": "list", + "member": { + "target": "com.temporal.api#Range" + }, + "traits": { + "smithy.api#documentation": "Match days of the week (0-6; 0 is Sunday)." + } + }, + "com.temporal.api#ScheduleSpecStructuredCalendarList": { + "type": "list", + "member": { + "target": "com.temporal.api#StructuredCalendarSpec" + }, + "traits": { + "smithy.api#documentation": "Calendar-based specifications of times." + } + }, + "com.temporal.api#ScheduleSpecCronStringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "cron_string holds a traditional cron specification as a string. It\n accepts 5, 6, or 7 fields, separated by spaces, and interprets them the\n same way as CalendarSpec.\n 5 fields: minute, hour, day_of_month, month, day_of_week\n 6 fields: minute, hour, day_of_month, month, day_of_week, year\n 7 fields: second, minute, hour, day_of_month, month, day_of_week, year\n If year is not given, it defaults to *. If second is not given, it\n defaults to 0.\n Shorthands @yearly, @monthly, @weekly, @daily, and @hourly are also\n accepted instead of the 5-7 time fields.\n Optionally, the string can be preceded by CRON_TZ= or\n TZ=, which will get copied to timezone_name. (There must\n not also be a timezone_name present.)\n Optionally \"#\" followed by a comment can appear at the end of the string.\n Note that the special case that some cron implementations have for\n treating day_of_month and day_of_week as \"or\" instead of \"and\" when both\n are set is not implemented.\n @every [/] is accepted and gets compiled into an\n IntervalSpec instead. and should be a decimal integer\n with a unit suffix s, m, h, or d." + } + }, + "com.temporal.api#CalendarSpec": { + "type": "structure", + "members": { + "second": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Expression to match seconds. Default: 0" + } + }, + "minute": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Expression to match minutes. Default: 0" + } + }, + "hour": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Expression to match hours. Default: 0" + } + }, + "dayOfMonth": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Expression to match days of the month. Default: *\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: standard name of field --)" + } + }, + "month": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Expression to match months. Default: *" + } + }, + "year": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Expression to match years. Default: *" + } + }, + "dayOfWeek": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Expression to match days of the week. Default: *" + } + }, + "comment": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Free-form comment describing the intention of this spec." + } + } + }, + "traits": { + "smithy.api#documentation": "CalendarSpec describes an event specification relative to the calendar,\n similar to a traditional cron specification, but with labeled fields. Each\n field can be one of:\n *: matches always\n x: matches when the field equals x\n x/y : matches when the field equals x+n*y where n is an integer\n x-z: matches when the field is between x and z inclusive\n w,x,y,...: matches when the field is one of the listed values\n Each x, y, z, ... is either a decimal integer, or a month or day of week name\n or abbreviation (in the appropriate fields).\n A timestamp matches if all fields match.\n Note that fields have different default values, for convenience.\n Note that the special case that some cron implementations have for treating\n day_of_month and day_of_week as \"or\" instead of \"and\" when both are set is\n not implemented.\n day_of_week can accept 0 or 7 as Sunday\n CalendarSpec gets compiled into StructuredCalendarSpec, which is what will be\n returned if you describe the schedule." + } + }, + "com.temporal.api#ScheduleSpecCalendarList": { + "type": "list", + "member": { + "target": "com.temporal.api#CalendarSpec" + }, + "traits": { + "smithy.api#documentation": "Calendar-based specifications of times." + } + }, + "com.temporal.api#IntervalSpec": { + "type": "structure", + "members": { + "interval": { + "target": "smithy.api#String" + }, + "phase": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "IntervalSpec matches times that can be expressed as:\n epoch + n * interval + phase\n where n is an integer.\n phase defaults to zero if missing. interval is required.\n Both interval and phase must be non-negative and are truncated to the nearest\n second before any calculations.\n For example, an interval of 1 hour with phase of zero would match every hour,\n on the hour. The same interval but a phase of 19 minutes would match every\n xx:19:00. An interval of 28 days with phase zero would match\n 2022-02-17T00:00:00Z (among other times). The same interval with a phase of 3\n days, 5 hours, and 23 minutes would match 2022-02-20T05:23:00Z instead." + } + }, + "com.temporal.api#ScheduleSpecIntervalList": { + "type": "list", + "member": { + "target": "com.temporal.api#IntervalSpec" + }, + "traits": { + "smithy.api#documentation": "Interval-based specifications of times." + } + }, + "com.temporal.api#ScheduleSpecExcludeCalendarList": { + "type": "list", + "member": { + "target": "com.temporal.api#CalendarSpec" + }, + "traits": { + "smithy.api#documentation": "Any timestamps matching any of exclude_* will be skipped.\n Deprecated. Use exclude_structured_calendar." + } + }, + "com.temporal.api#ScheduleSpecExcludeStructuredCalendarList": { + "type": "list", + "member": { + "target": "com.temporal.api#StructuredCalendarSpec" + }, + "traits": {} + }, + "com.temporal.api#ScheduleActionResult": { + "type": "structure", + "members": { + "scheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time that the action was taken (according to the schedule, including jitter)." + } + }, + "actualTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time that the action was taken (real time)." + } + }, + "startWorkflowResult": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "If action was start_workflow:" + } + }, + "startWorkflowStatus": { + "target": "com.temporal.api#ScheduleActionResultStartWorkflowStatus", + "traits": { + "smithy.api#documentation": "If the action was start_workflow, this field will reflect an\n eventually-consistent view of the started workflow's status." + } + } + }, + "traits": {} + }, + "com.temporal.api#ScheduleActionResultStartWorkflowStatus": { + "type": "enum", + "members": { + "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED" + } + }, + "WORKFLOW_EXECUTION_STATUS_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_RUNNING" + } + }, + "WORKFLOW_EXECUTION_STATUS_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_COMPLETED" + } + }, + "WORKFLOW_EXECUTION_STATUS_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_FAILED" + } + }, + "WORKFLOW_EXECUTION_STATUS_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_CANCELED" + } + }, + "WORKFLOW_EXECUTION_STATUS_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_TERMINATED" + } + }, + "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW" + } + }, + "WORKFLOW_EXECUTION_STATUS_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_TIMED_OUT" + } + }, + "WORKFLOW_EXECUTION_STATUS_PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_PAUSED" + } + } + }, + "traits": { + "smithy.api#documentation": "If the action was start_workflow, this field will reflect an\n eventually-consistent view of the started workflow's status." + } + }, + "com.temporal.api#ScheduleListInfoRecentActionsList": { + "type": "list", + "member": { + "target": "com.temporal.api#ScheduleActionResult" + }, + "traits": { + "smithy.api#documentation": "From info (maybe fewer entries):" + } + }, + "com.temporal.api#ScheduleListInfoFutureActionTimesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.temporal.api#ListSchedulesResponseSchedulesList": { + "type": "list", + "member": { + "target": "com.temporal.api#ScheduleListEntry" + }, + "traits": {} + }, + "com.temporal.api#ListSchedules": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListSchedulesRequest" + }, + "output": { + "target": "com.temporal.api#ListSchedulesResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/schedules", + "code": 200 + }, + "smithy.api#documentation": "List all schedules in a namespace." + } + }, + "com.temporal.api#DescribeScheduleRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The namespace of the schedule to describe." + } + }, + "scheduleId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The id of the schedule to describe." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeScheduleResponse": { + "type": "structure", + "members": { + "schedule": { + "target": "com.temporal.api#Schedule", + "traits": { + "smithy.api#documentation": "The complete current schedule details. This may not match the schedule as\n created because:\n - some types of schedule specs may get compiled into others (e.g.\n CronString into StructuredCalendarSpec)\n - some unspecified fields may be replaced by defaults\n - some fields in the state are modified automatically\n - the schedule may have been modified by UpdateSchedule or PatchSchedule" + } + }, + "info": { + "target": "com.temporal.api#ScheduleInfo", + "traits": { + "smithy.api#documentation": "Extra schedule state info." + } + }, + "memo": { + "target": "com.temporal.api#Memo", + "traits": { + "smithy.api#documentation": "The memo and search attributes that the schedule was created with." + } + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This value can be passed back to UpdateSchedule to ensure that the\n schedule was not modified between a Describe and an Update, which could\n lead to lost updates and other confusion." + } + } + }, + "traits": {} + }, + "com.temporal.api#Schedule": { + "type": "structure", + "members": { + "spec": { + "target": "com.temporal.api#ScheduleSpec" + }, + "action": { + "target": "com.temporal.api#ScheduleAction" + }, + "policies": { + "target": "com.temporal.api#SchedulePolicies" + }, + "state": { + "target": "com.temporal.api#ScheduleState" + } + }, + "traits": {} + }, + "com.temporal.api#ScheduleAction": { + "type": "structure", + "members": { + "startWorkflow": { + "target": "com.temporal.api#NewWorkflowExecutionInfo", + "traits": { + "smithy.api#documentation": "All fields of NewWorkflowExecutionInfo are valid except for:\n - workflow_id_reuse_policy\n - cron_schedule\n The workflow id of the started workflow may not match this exactly,\n it may have a timestamp appended for uniqueness." + } + } + }, + "traits": {} + }, + "com.temporal.api#NewWorkflowExecutionInfo": { + "type": "structure", + "members": { + "workflowId": { + "target": "smithy.api#String" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "taskQueue": { + "target": "com.temporal.api#TaskQueue" + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized arguments to the workflow." + } + }, + "workflowExecutionTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Total workflow execution timeout including retries and continue as new." + } + }, + "workflowRunTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow run." + } + }, + "workflowTaskTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow task." + } + }, + "workflowIdReusePolicy": { + "target": "com.temporal.api#NewWorkflowExecutionInfoWorkflowIdReusePolicy", + "traits": { + "smithy.api#documentation": "Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE." + } + }, + "retryPolicy": { + "target": "com.temporal.api#RetryPolicy", + "traits": { + "smithy.api#documentation": "The retry policy for the workflow. Will never exceed `workflow_execution_timeout`." + } + }, + "cronSchedule": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/" + } + }, + "memo": { + "target": "com.temporal.api#Memo" + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "header": { + "target": "com.temporal.api#Header" + }, + "userMetadata": { + "target": "com.temporal.api#UserMetadata", + "traits": { + "smithy.api#documentation": "Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig\n for use by user interfaces to display the fixed as-of-start summary and details of the\n workflow." + } + }, + "versioningOverride": { + "target": "com.temporal.api#VersioningOverride", + "traits": { + "smithy.api#documentation": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\n To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata" + } + } + }, + "traits": { + "smithy.api#documentation": "NewWorkflowExecutionInfo is a shared message that encapsulates all the\n required arguments to starting a workflow in different contexts." + } + }, + "com.temporal.api#NewWorkflowExecutionInfoWorkflowIdReusePolicy": { + "type": "enum", + "members": { + "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED" + } + }, + "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE" + } + }, + "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + } + }, + "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE" + } + }, + "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING" + } + } + }, + "traits": { + "smithy.api#documentation": "Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE." + } + }, + "com.temporal.api#SchedulePolicies": { + "type": "structure", + "members": { + "overlapPolicy": { + "target": "com.temporal.api#SchedulePoliciesOverlapPolicy", + "traits": { + "smithy.api#documentation": "Policy for overlaps.\n Note that this can be changed after a schedule has taken some actions,\n and some changes might produce unintuitive results. In general, the later\n policy overrides the earlier policy." + } + }, + "catchupWindow": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Policy for catchups:\n If the Temporal server misses an action due to one or more components\n being down, and comes back up, the action will be run if the scheduled\n time is within this window from the current time.\n This value defaults to one year, and can't be less than 10 seconds." + } + }, + "pauseOnFailure": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, and a workflow run fails or times out, turn on \"paused\".\n This applies after retry policies: the full chain of retries must fail to\n trigger a pause here." + } + }, + "keepOriginalWorkflowId": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, and the action would start a workflow, a timestamp will not be\n appended to the scheduled workflow id." + } + } + }, + "traits": {} + }, + "com.temporal.api#SchedulePoliciesOverlapPolicy": { + "type": "enum", + "members": { + "SCHEDULE_OVERLAP_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_UNSPECIFIED" + } + }, + "SCHEDULE_OVERLAP_POLICY_SKIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_SKIP" + } + }, + "SCHEDULE_OVERLAP_POLICY_BUFFER_ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_BUFFER_ONE" + } + }, + "SCHEDULE_OVERLAP_POLICY_BUFFER_ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_BUFFER_ALL" + } + }, + "SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER" + } + }, + "SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER" + } + }, + "SCHEDULE_OVERLAP_POLICY_ALLOW_ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_ALLOW_ALL" + } + } + }, + "traits": { + "smithy.api#documentation": "Policy for overlaps.\n Note that this can be changed after a schedule has taken some actions,\n and some changes might produce unintuitive results. In general, the later\n policy overrides the earlier policy." + } + }, + "com.temporal.api#ScheduleState": { + "type": "structure", + "members": { + "notes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Informative human-readable message with contextual notes, e.g. the reason\n a schedule is paused. The system may overwrite this message on certain\n conditions, e.g. when pause-on-failure happens." + } + }, + "paused": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, do not take any actions based on the schedule spec." + } + }, + "limitedActions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If limited_actions is true, decrement remaining_actions after each\n action, and do not take any more scheduled actions if remaining_actions\n is zero. Actions may still be taken by explicit request (i.e. trigger\n immediately or backfill). Skipped actions (due to overlap policy) do not\n count against remaining actions.\n If a schedule has no more remaining actions, then the schedule will be\n subject to automatic deletion (after several days)." + } + }, + "remainingActions": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#ScheduleInfo": { + "type": "structure", + "members": { + "actionCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Number of actions taken so far." + } + }, + "missedCatchupWindow": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Number of times a scheduled action was skipped due to missing the catchup window." + } + }, + "overlapSkipped": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Number of skipped actions due to overlap." + } + }, + "bufferDropped": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Number of dropped actions due to buffer limit." + } + }, + "bufferSize": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Number of actions in the buffer. The buffer holds the actions that cannot\n be immediately triggered (due to the overlap policy). These actions can be a result of\n the normal schedule or a backfill." + } + }, + "runningWorkflows": { + "target": "com.temporal.api#ScheduleInfoRunningWorkflowsList", + "traits": { + "smithy.api#documentation": "Currently-running workflows started by this schedule. (There might be\n more than one if the overlap policy allows overlaps.)\n Note that the run_ids in here are the original execution run ids as\n started by the schedule. If the workflows retried, did continue-as-new,\n or were reset, they might still be running but with a different run_id." + } + }, + "recentActions": { + "target": "com.temporal.api#ScheduleInfoRecentActionsList", + "traits": { + "smithy.api#documentation": "Most recent ten actual action times (including manual triggers)." + } + }, + "futureActionTimes": { + "target": "com.temporal.api#ScheduleInfoFutureActionTimesList", + "traits": { + "smithy.api#documentation": "Next ten scheduled action times." + } + }, + "createTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamps of schedule creation and last update." + } + }, + "updateTime": { + "target": "smithy.api#String" + }, + "invalidScheduleError": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated." + } + } + }, + "traits": {} + }, + "com.temporal.api#ScheduleInfoRunningWorkflowsList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkflowExecution" + }, + "traits": { + "smithy.api#documentation": "Currently-running workflows started by this schedule. (There might be\n more than one if the overlap policy allows overlaps.)\n Note that the run_ids in here are the original execution run ids as\n started by the schedule. If the workflows retried, did continue-as-new,\n or were reset, they might still be running but with a different run_id." + } + }, + "com.temporal.api#ScheduleInfoRecentActionsList": { + "type": "list", + "member": { + "target": "com.temporal.api#ScheduleActionResult" + }, + "traits": { + "smithy.api#documentation": "Most recent ten actual action times (including manual triggers)." + } + }, + "com.temporal.api#ScheduleInfoFutureActionTimesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Next ten scheduled action times." + } + }, + "com.temporal.api#DescribeSchedule": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeScheduleRequest" + }, + "output": { + "target": "com.temporal.api#DescribeScheduleResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/schedules/{scheduleId}", + "code": 200 + }, + "smithy.api#documentation": "Returns the schedule description and current state of an existing schedule." + } + }, + "com.temporal.api#SchedulePatch": { + "type": "structure", + "members": { + "triggerImmediately": { + "target": "com.temporal.api#TriggerImmediatelyRequest", + "traits": { + "smithy.api#documentation": "If set, trigger one action immediately." + } + }, + "backfillRequest": { + "target": "com.temporal.api#SchedulePatchBackfillRequestList", + "traits": { + "smithy.api#documentation": "If set, runs though the specified time period(s) and takes actions as if that time\n passed by right now, all at once. The overlap policy can be overridden for the\n scope of the backfill." + } + }, + "pause": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If set, change the state to paused or unpaused (respectively) and set the\n notes field to the value of the string." + } + }, + "unpause": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#TriggerImmediatelyRequest": { + "type": "structure", + "members": { + "overlapPolicy": { + "target": "com.temporal.api#TriggerImmediatelyRequestOverlapPolicy", + "traits": { + "smithy.api#documentation": "If set, override overlap policy for this one request." + } + }, + "scheduledTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp used for the identity of the target workflow.\n If not set the default value is the current time." + } + } + }, + "traits": {} + }, + "com.temporal.api#TriggerImmediatelyRequestOverlapPolicy": { + "type": "enum", + "members": { + "SCHEDULE_OVERLAP_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_UNSPECIFIED" + } + }, + "SCHEDULE_OVERLAP_POLICY_SKIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_SKIP" + } + }, + "SCHEDULE_OVERLAP_POLICY_BUFFER_ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_BUFFER_ONE" + } + }, + "SCHEDULE_OVERLAP_POLICY_BUFFER_ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_BUFFER_ALL" + } + }, + "SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER" + } + }, + "SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER" + } + }, + "SCHEDULE_OVERLAP_POLICY_ALLOW_ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_ALLOW_ALL" + } + } + }, + "traits": { + "smithy.api#documentation": "If set, override overlap policy for this one request." + } + }, + "com.temporal.api#BackfillRequest": { + "type": "structure", + "members": { + "startTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time range to evaluate schedule in. Currently, this time range is\n exclusive on start_time and inclusive on end_time. (This is admittedly\n counterintuitive and it may change in the future, so to be safe, use a\n start time strictly before a scheduled time.) Also note that an action\n nominally scheduled in the interval but with jitter that pushes it after\n end_time will not be included." + } + }, + "endTime": { + "target": "smithy.api#String" + }, + "overlapPolicy": { + "target": "com.temporal.api#BackfillRequestOverlapPolicy", + "traits": { + "smithy.api#documentation": "If set, override overlap policy for this request." + } + } + }, + "traits": {} + }, + "com.temporal.api#BackfillRequestOverlapPolicy": { + "type": "enum", + "members": { + "SCHEDULE_OVERLAP_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_UNSPECIFIED" + } + }, + "SCHEDULE_OVERLAP_POLICY_SKIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_SKIP" + } + }, + "SCHEDULE_OVERLAP_POLICY_BUFFER_ONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_BUFFER_ONE" + } + }, + "SCHEDULE_OVERLAP_POLICY_BUFFER_ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_BUFFER_ALL" + } + }, + "SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER" + } + }, + "SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER" + } + }, + "SCHEDULE_OVERLAP_POLICY_ALLOW_ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_OVERLAP_POLICY_ALLOW_ALL" + } + } + }, + "traits": { + "smithy.api#documentation": "If set, override overlap policy for this request." + } + }, + "com.temporal.api#SchedulePatchBackfillRequestList": { + "type": "list", + "member": { + "target": "com.temporal.api#BackfillRequest" + }, + "traits": { + "smithy.api#documentation": "If set, runs though the specified time period(s) and takes actions as if that time\n passed by right now, all at once. The overlap policy can be overridden for the\n scope of the backfill." + } + }, + "com.temporal.api#CreateScheduleRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The namespace the schedule should be created in." + } + }, + "scheduleId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The id of the new schedule." + } + }, + "schedule": { + "target": "com.temporal.api#Schedule", + "traits": { + "smithy.api#documentation": "The schedule spec, policies, action, and initial state." + } + }, + "initialPatch": { + "target": "com.temporal.api#SchedulePatch", + "traits": { + "smithy.api#documentation": "Optional initial patch (e.g. to run the action once immediately)." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this create request for idempotence. Typically UUIDv4." + } + }, + "memo": { + "target": "com.temporal.api#Memo", + "traits": { + "smithy.api#documentation": "Memo and search attributes to attach to the schedule itself." + } + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#CreateScheduleResponse": { + "type": "structure", + "members": { + "conflictToken": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#CreateSchedule": { + "type": "operation", + "input": { + "target": "com.temporal.api#CreateScheduleRequest" + }, + "output": { + "target": "com.temporal.api#CreateScheduleResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/schedules/{scheduleId}", + "code": 200 + }, + "smithy.api#documentation": "Creates a new schedule." + } + }, + "com.temporal.api#DeleteScheduleRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The namespace of the schedule to delete." + } + }, + "scheduleId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The id of the schedule to delete." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "identity", + "smithy.api#documentation": "The identity of the client who initiated this request." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DeleteScheduleResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#DeleteSchedule": { + "type": "operation", + "input": { + "target": "com.temporal.api#DeleteScheduleRequest" + }, + "output": { + "target": "com.temporal.api#DeleteScheduleResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/v1/namespaces/{namespace}/schedules/{scheduleId}", + "code": 200 + }, + "smithy.api#documentation": "Deletes a schedule, removing it from the system." + } + }, + "com.temporal.api#ListScheduleMatchingTimesRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The namespace of the schedule to query." + } + }, + "scheduleId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The id of the schedule to query." + } + }, + "startTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "startTime", + "smithy.api#documentation": "Time range to query." + } + }, + "endTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "endTime" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListScheduleMatchingTimesResponse": { + "type": "structure", + "members": { + "startTime": { + "target": "com.temporal.api#ListScheduleMatchingTimesResponseStartTimeList" + } + }, + "traits": {} + }, + "com.temporal.api#ListScheduleMatchingTimesResponseStartTimeList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.temporal.api#ListScheduleMatchingTimes": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListScheduleMatchingTimesRequest" + }, + "output": { + "target": "com.temporal.api#ListScheduleMatchingTimesResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/matching-times", + "code": 200 + }, + "smithy.api#documentation": "Lists matching times within a range." + } + }, + "com.temporal.api#PatchScheduleRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The namespace of the schedule to patch." + } + }, + "scheduleId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The id of the schedule to patch." + } + }, + "patch": { + "target": "com.temporal.api#SchedulePatch" + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this update request for idempotence. Typically UUIDv4." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#PatchScheduleResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#PatchSchedule": { + "type": "operation", + "input": { + "target": "com.temporal.api#PatchScheduleRequest" + }, + "output": { + "target": "com.temporal.api#PatchScheduleResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/patch", + "code": 200 + }, + "smithy.api#documentation": "Makes a specific change to a schedule or triggers an immediate action." + } + }, + "com.temporal.api#UpdateScheduleRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The namespace of the schedule to update." + } + }, + "scheduleId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The id of the schedule to update." + } + }, + "schedule": { + "target": "com.temporal.api#Schedule", + "traits": { + "smithy.api#documentation": "The new schedule. The four main fields of the schedule (spec, action,\n policies, state) are replaced completely by the values in this message." + } + }, + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This can be the value of conflict_token from a DescribeScheduleResponse,\n which will cause this request to fail if the schedule has been modified\n between the Describe and this Update.\n If missing, the schedule will be updated unconditionally." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this update request for idempotence. Typically UUIDv4." + } + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes", + "traits": { + "smithy.api#documentation": "Schedule search attributes to be updated.\n Do not set this field if you do not want to update the search attributes.\n A non-null empty object will set the search attributes to an empty map.\n Note: you cannot only update the search attributes with `UpdateScheduleRequest`,\n you must also set the `schedule` field; otherwise, it will unset the schedule." + } + }, + "memo": { + "target": "com.temporal.api#Memo", + "traits": { + "smithy.api#documentation": "Schedule memo to replace. If set, replaces the entire memo.\n Do not set this field if you do not want to update the memo.\n A non-null empty object will clear the memo." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateScheduleResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#UpdateSchedule": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateScheduleRequest" + }, + "output": { + "target": "com.temporal.api#UpdateScheduleResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/update", + "code": 200 + }, + "smithy.api#documentation": "Changes the configuration or state of an existing schedule." + } + }, + "com.temporal.api#ListSearchAttributesRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListSearchAttributesResponse": { + "type": "structure", + "members": { + "customAttributes": { + "target": "com.temporal.api#ListSearchAttributesResponseCustomAttributesMap", + "traits": { + "smithy.api#documentation": "Mapping between custom (user-registered) search attribute name to its IndexedValueType." + } + }, + "systemAttributes": { + "target": "com.temporal.api#ListSearchAttributesResponseSystemAttributesMap", + "traits": { + "smithy.api#documentation": "Mapping between system (predefined) search attribute name to its IndexedValueType." + } + }, + "storageSchema": { + "target": "com.temporal.api#ListSearchAttributesResponseStorageSchemaMap", + "traits": { + "smithy.api#documentation": "Mapping from the attribute name to the visibility storage native type." + } + } + }, + "traits": {} + }, + "com.temporal.api#ListSearchAttributesResponseCustomAttributesValue": { + "type": "enum", + "members": { + "INDEXED_VALUE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_UNSPECIFIED" + } + }, + "INDEXED_VALUE_TYPE_TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_TEXT" + } + }, + "INDEXED_VALUE_TYPE_KEYWORD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_KEYWORD" + } + }, + "INDEXED_VALUE_TYPE_INT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_INT" + } + }, + "INDEXED_VALUE_TYPE_DOUBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_DOUBLE" + } + }, + "INDEXED_VALUE_TYPE_BOOL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_BOOL" + } + }, + "INDEXED_VALUE_TYPE_DATETIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_DATETIME" + } + }, + "INDEXED_VALUE_TYPE_KEYWORD_LIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_KEYWORD_LIST" + } + } + }, + "traits": {} + }, + "com.temporal.api#ListSearchAttributesResponseCustomAttributesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#ListSearchAttributesResponseCustomAttributesValue" + }, + "traits": { + "smithy.api#documentation": "Mapping between custom (user-registered) search attribute name to its IndexedValueType." + } + }, + "com.temporal.api#ListSearchAttributesResponseSystemAttributesValue": { + "type": "enum", + "members": { + "INDEXED_VALUE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_UNSPECIFIED" + } + }, + "INDEXED_VALUE_TYPE_TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_TEXT" + } + }, + "INDEXED_VALUE_TYPE_KEYWORD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_KEYWORD" + } + }, + "INDEXED_VALUE_TYPE_INT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_INT" + } + }, + "INDEXED_VALUE_TYPE_DOUBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_DOUBLE" + } + }, + "INDEXED_VALUE_TYPE_BOOL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_BOOL" + } + }, + "INDEXED_VALUE_TYPE_DATETIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_DATETIME" + } + }, + "INDEXED_VALUE_TYPE_KEYWORD_LIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INDEXED_VALUE_TYPE_KEYWORD_LIST" + } + } + }, + "traits": {} + }, + "com.temporal.api#ListSearchAttributesResponseSystemAttributesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#ListSearchAttributesResponseSystemAttributesValue" + }, + "traits": { + "smithy.api#documentation": "Mapping between system (predefined) search attribute name to its IndexedValueType." + } + }, + "com.temporal.api#ListSearchAttributesResponseStorageSchemaMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Mapping from the attribute name to the visibility storage native type." + } + }, + "com.temporal.api#ListSearchAttributes": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListSearchAttributesRequest" + }, + "output": { + "target": "com.temporal.api#ListSearchAttributesResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/search-attributes", + "code": 200 + }, + "smithy.api#documentation": "ListSearchAttributes returns comprehensive information about search attributes." + } + }, + "com.temporal.api#UpdateTaskQueueConfigRequestTaskQueueType": { + "type": "enum", + "members": { + "TASK_QUEUE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_UNSPECIFIED" + } + }, + "TASK_QUEUE_TYPE_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_WORKFLOW" + } + }, + "TASK_QUEUE_TYPE_ACTIVITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_ACTIVITY" + } + }, + "TASK_QUEUE_TYPE_NEXUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_NEXUS" + } + } + }, + "traits": {} + }, + "com.temporal.api#UpdateTaskQueueConfigRequestRateLimitUpdate": { + "type": "structure", + "members": { + "rateLimit": { + "target": "com.temporal.api#RateLimit", + "traits": { + "smithy.api#documentation": "Rate Limit to be updated" + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for why the rate limit was set." + } + } + }, + "traits": {} + }, + "com.temporal.api#RateLimit": { + "type": "structure", + "members": { + "requestsPerSecond": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Zero is a valid rate limit." + } + } + }, + "traits": {} + }, + "com.temporal.api#UpdateTaskQueueConfigRequestSetFairnessWeightOverridesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#documentation": "If set, overrides the fairness weight for each specified fairness key.\n Fairness keys not listed in this map will keep their existing overrides (if any)." + } + }, + "com.temporal.api#UpdateTaskQueueConfigRequestUnsetFairnessWeightOverridesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "If set, removes any existing fairness weight overrides for each specified fairness key.\n Fairness weights for corresponding keys fall back to the values set during task creation (if any),\n or to the default weight of 1.0." + } + }, + "com.temporal.api#UpdateTaskQueueConfigRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "taskQueue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Selects the task queue to update." + } + }, + "identity": { + "target": "smithy.api#String" + }, + "taskQueueType": { + "target": "com.temporal.api#UpdateTaskQueueConfigRequestTaskQueueType" + }, + "updateQueueRateLimit": { + "target": "com.temporal.api#UpdateTaskQueueConfigRequestRateLimitUpdate", + "traits": { + "smithy.api#documentation": "Update to queue-wide rate limit.\n If not set, this configuration is unchanged.\n NOTE: A limit set by the worker is overriden; and restored again when reset.\n If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit." + } + }, + "updateFairnessKeyRateLimitDefault": { + "target": "com.temporal.api#UpdateTaskQueueConfigRequestRateLimitUpdate", + "traits": { + "smithy.api#documentation": "Update to the default fairness key rate limit.\n If not set, this configuration is unchanged.\n If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit." + } + }, + "setFairnessWeightOverrides": { + "target": "com.temporal.api#UpdateTaskQueueConfigRequestSetFairnessWeightOverridesMap", + "traits": { + "smithy.api#documentation": "If set, overrides the fairness weight for each specified fairness key.\n Fairness keys not listed in this map will keep their existing overrides (if any)." + } + }, + "unsetFairnessWeightOverrides": { + "target": "com.temporal.api#UpdateTaskQueueConfigRequestUnsetFairnessWeightOverridesList", + "traits": { + "smithy.api#documentation": "If set, removes any existing fairness weight overrides for each specified fairness key.\n Fairness weights for corresponding keys fall back to the values set during task creation (if any),\n or to the default weight of 1.0." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateTaskQueueConfigResponse": { + "type": "structure", + "members": { + "config": { + "target": "com.temporal.api#TaskQueueConfig" + } + }, + "traits": {} + }, + "com.temporal.api#TaskQueueConfig": { + "type": "structure", + "members": { + "queueRateLimit": { + "target": "com.temporal.api#RateLimitConfig", + "traits": { + "smithy.api#documentation": "Unless modified, this is the system-defined rate limit." + } + }, + "fairnessKeysRateLimitDefault": { + "target": "com.temporal.api#RateLimitConfig", + "traits": { + "smithy.api#documentation": "If set, each individual fairness key will be limited to this rate, scaled by the weight of the fairness key." + } + }, + "fairnessWeightOverrides": { + "target": "com.temporal.api#TaskQueueConfigFairnessWeightOverridesMap", + "traits": { + "smithy.api#documentation": "If set, overrides the fairness weights for the corresponding fairness keys." + } + } + }, + "traits": {} + }, + "com.temporal.api#RateLimitConfig": { + "type": "structure", + "members": { + "rateLimit": { + "target": "com.temporal.api#RateLimit" + }, + "metadata": { + "target": "com.temporal.api#ConfigMetadata" + } + }, + "traits": {} + }, + "com.temporal.api#ConfigMetadata": { + "type": "structure", + "members": { + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for why the config was set." + } + }, + "updateIdentity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity of the last updater.\n Set by the request's identity field." + } + }, + "updateTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time of the last update." + } + } + }, + "traits": {} + }, + "com.temporal.api#TaskQueueConfigFairnessWeightOverridesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#documentation": "If set, overrides the fairness weights for the corresponding fairness keys." + } + }, + "com.temporal.api#UpdateTaskQueueConfig": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateTaskQueueConfigRequest" + }, + "output": { + "target": "com.temporal.api#UpdateTaskQueueConfigResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/task-queues/{taskQueue}/update-config", + "code": 200 + }, + "smithy.api#documentation": "Updates task queue configuration.\n For the overall queue rate limit: the rate limit set by this api overrides the worker-set rate limit,\n which uncouples the rate limit from the worker lifecycle.\n If the overall queue rate limit is unset, the worker-set rate limit takes effect." + } + }, + "com.temporal.api#GetWorkerBuildIdCompatibilityRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "taskQueue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Must be set, the task queue to interrogate about worker id compatibility." + } + }, + "maxSets": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "maxSets", + "smithy.api#documentation": "Limits how many compatible sets will be returned. Specify 1 to only return the current\n default major version set. 0 returns all sets." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#GetWorkerBuildIdCompatibilityResponse": { + "type": "structure", + "members": { + "majorVersionSets": { + "target": "com.temporal.api#GetWorkerBuildIdCompatibilityResponseMajorVersionSetsList", + "traits": { + "smithy.api#documentation": "Major version sets, in order from oldest to newest. The last element of the list will always\n be the current default major version. IE: New workflows will target the most recent version\n in that version set.\n\n There may be fewer sets returned than exist, if the request chose to limit this response." + } + } + }, + "traits": { + "smithy.api#documentation": "[cleanup-wv-pre-release]" + } + }, + "com.temporal.api#CompatibleVersionSet": { + "type": "structure", + "members": { + "buildIds": { + "target": "com.temporal.api#CompatibleVersionSetBuildIdsList", + "traits": { + "smithy.api#documentation": "All the compatible versions, unordered, except for the last element, which is considered the set \"default\"." + } + } + }, + "traits": { + "smithy.api#documentation": "Used by the worker versioning APIs, represents an unordered set of one or more versions which are\n considered to be compatible with each other. Currently the versions are always worker build IDs." + } + }, + "com.temporal.api#CompatibleVersionSetBuildIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "All the compatible versions, unordered, except for the last element, which is considered the set \"default\"." + } + }, + "com.temporal.api#GetWorkerBuildIdCompatibilityResponseMajorVersionSetsList": { + "type": "list", + "member": { + "target": "com.temporal.api#CompatibleVersionSet" + }, + "traits": { + "smithy.api#documentation": "Major version sets, in order from oldest to newest. The last element of the list will always\n be the current default major version. IE: New workflows will target the most recent version\n in that version set.\n\n There may be fewer sets returned than exist, if the request chose to limit this response." + } + }, + "com.temporal.api#GetWorkerBuildIdCompatibility": { + "type": "operation", + "input": { + "target": "com.temporal.api#GetWorkerBuildIdCompatibilityRequest" + }, + "output": { + "target": "com.temporal.api#GetWorkerBuildIdCompatibilityResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/task-queues/{taskQueue}/worker-build-id-compatibility", + "code": 200 + }, + "smithy.api#documentation": "Deprecated. Use `GetWorkerVersioningRules`.\n Fetches the worker build id versioning sets for a task queue." + } + }, + "com.temporal.api#GetWorkerVersioningRulesRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "taskQueue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#GetWorkerVersioningRulesResponse": { + "type": "structure", + "members": { + "assignmentRules": { + "target": "com.temporal.api#GetWorkerVersioningRulesResponseAssignmentRulesList" + }, + "compatibleRedirectRules": { + "target": "com.temporal.api#GetWorkerVersioningRulesResponseCompatibleRedirectRulesList" + }, + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This value can be passed back to UpdateWorkerVersioningRulesRequest to\n ensure that the rules were not modified between this List and the Update,\n which could lead to lost updates and other confusion." + } + } + }, + "traits": { + "smithy.api#documentation": "[cleanup-wv-pre-release]" + } + }, + "com.temporal.api#TimestampedBuildIdAssignmentRule": { + "type": "structure", + "members": { + "rule": { + "target": "com.temporal.api#BuildIdAssignmentRule" + }, + "createTime": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#BuildIdAssignmentRule": { + "type": "structure", + "members": { + "targetBuildId": { + "target": "smithy.api#String" + }, + "percentageRamp": { + "target": "com.temporal.api#RampByPercentage", + "traits": { + "smithy.api#documentation": "This ramp is useful for gradual Blue/Green deployments (and similar)\n where you want to send a certain portion of the traffic to the target\n Build ID." + } + } + }, + "traits": { + "smithy.api#documentation": "Assignment rules are applied to *new* Workflow and Activity executions at\n schedule time to assign them to a Build ID.\n\n Assignment rules will not be used in the following cases:\n - Child Workflows or Continue-As-New Executions who inherit their\n parent/previous Workflow's assigned Build ID (by setting the\n `inherit_build_id` flag - default behavior in SDKs when the same Task Queue\n is used.)\n - An Activity that inherits the assigned Build ID of its Workflow (by\n setting the `use_workflow_build_id` flag - default behavior in SDKs\n when the same Task Queue is used.)\n\n In absence of (applicable) redirect rules (`CompatibleBuildIdRedirectRule`s)\n the task will be dispatched to Workers of the Build ID determined by the\n assignment rules (or inherited). Otherwise, the final Build ID will be\n determined by the redirect rules.\n\n Once a Workflow completes its first Workflow Task in a particular Build ID it\n stays in that Build ID regardless of changes to assignment rules. Redirect\n rules can be used to move the workflow to another compatible Build ID.\n\n When using Worker Versioning on a Task Queue, in the steady state,\n there should typically be a single assignment rule to send all new executions\n to the latest Build ID. Existence of at least one such \"unconditional\"\n rule at all times is enforces by the system, unless the `force` flag is used\n by the user when replacing/deleting these rules (for exceptional cases).\n\n During a deployment, one or more additional rules can be added to assign a\n subset of the tasks to a new Build ID based on a \"ramp percentage\".\n\n When there are multiple assignment rules for a Task Queue, the rules are\n evaluated in order, starting from index 0. The first applicable rule will be\n applied and the rest will be ignored.\n\n In the event that no assignment rule is applicable on a task (or the Task\n Queue is simply not versioned), the tasks will be dispatched to an\n unversioned Worker." + } + }, + "com.temporal.api#RampByPercentage": { + "type": "structure", + "members": { + "rampPercentage": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Acceptable range is [0,100)." + } + } + }, + "traits": {} + }, + "com.temporal.api#GetWorkerVersioningRulesResponseAssignmentRulesList": { + "type": "list", + "member": { + "target": "com.temporal.api#TimestampedBuildIdAssignmentRule" + }, + "traits": {} + }, + "com.temporal.api#TimestampedCompatibleBuildIdRedirectRule": { + "type": "structure", + "members": { + "rule": { + "target": "com.temporal.api#CompatibleBuildIdRedirectRule" + }, + "createTime": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#CompatibleBuildIdRedirectRule": { + "type": "structure", + "members": { + "sourceBuildId": { + "target": "smithy.api#String" + }, + "targetBuildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Target Build ID must be compatible with the Source Build ID; that is it\n must be able to process event histories made by the Source Build ID by\n using [Patching](https://docs.temporal.io/workflows#patching) or other\n means." + } + } + }, + "traits": { + "smithy.api#documentation": "These rules apply to tasks assigned to a particular Build ID\n (`source_build_id`) to redirect them to another *compatible* Build ID\n (`target_build_id`).\n\n It is user's responsibility to ensure that the target Build ID is compatible\n with the source Build ID (e.g. by using the Patching API).\n\n Most deployments are not expected to need these rules, however following\n situations can greatly benefit from redirects:\n - Need to move long-running Workflow Executions from an old Build ID to a\n newer one.\n - Need to hotfix some broken or stuck Workflow Executions.\n\n In steady state, redirect rules are beneficial when dealing with old\n Executions ran on now-decommissioned Build IDs:\n - To redirecting the Workflow Queries to the current (compatible) Build ID.\n - To be able to Reset an old Execution so it can run on the current\n (compatible) Build ID.\n\n Redirect rules can be chained." + } + }, + "com.temporal.api#GetWorkerVersioningRulesResponseCompatibleRedirectRulesList": { + "type": "list", + "member": { + "target": "com.temporal.api#TimestampedCompatibleBuildIdRedirectRule" + }, + "traits": {} + }, + "com.temporal.api#GetWorkerVersioningRules": { + "type": "operation", + "input": { + "target": "com.temporal.api#GetWorkerVersioningRulesRequest" + }, + "output": { + "target": "com.temporal.api#GetWorkerVersioningRulesResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/task-queues/{taskQueue}/worker-versioning-rules", + "code": 200 + }, + "smithy.api#documentation": "Fetches the Build ID assignment and redirect rules for a Task Queue.\n WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly." + } + }, + "com.temporal.api#DescribeTaskQueueRequestTaskQueueKind": { + "type": "enum", + "members": { + "TASK_QUEUE_KIND_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_KIND_UNSPECIFIED" + } + }, + "TASK_QUEUE_KIND_NORMAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_KIND_NORMAL" + } + }, + "TASK_QUEUE_KIND_STICKY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_KIND_STICKY" + } + }, + "TASK_QUEUE_KIND_WORKER_COMMANDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_KIND_WORKER_COMMANDS" + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeTaskQueueRequestTaskQueueType": { + "type": "enum", + "members": { + "TASK_QUEUE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_UNSPECIFIED" + } + }, + "TASK_QUEUE_TYPE_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_WORKFLOW" + } + }, + "TASK_QUEUE_TYPE_ACTIVITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_ACTIVITY" + } + }, + "TASK_QUEUE_TYPE_NEXUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_NEXUS" + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeTaskQueueRequestApiMode": { + "type": "enum", + "members": { + "DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED" + } + }, + "DESCRIBE_TASK_QUEUE_MODE_ENHANCED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DESCRIBE_TASK_QUEUE_MODE_ENHANCED" + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeTaskQueueRequestVersionsBuildIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.temporal.api#DescribeTaskQueueRequestTaskQueueTypesItem": { + "type": "enum", + "members": { + "TASK_QUEUE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_UNSPECIFIED" + } + }, + "TASK_QUEUE_TYPE_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_WORKFLOW" + } + }, + "TASK_QUEUE_TYPE_ACTIVITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_ACTIVITY" + } + }, + "TASK_QUEUE_TYPE_NEXUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_NEXUS" + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeTaskQueueRequestTaskQueueTypesList": { + "type": "list", + "member": { + "target": "com.temporal.api#DescribeTaskQueueRequestTaskQueueTypesItem" + }, + "traits": {} + }, + "com.temporal.api#DescribeTaskQueueRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "task_queue_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "taskQueue_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "taskQueue.name" + } + }, + "taskQueue_kind": { + "target": "com.temporal.api#DescribeTaskQueueRequestTaskQueueKind", + "traits": { + "smithy.api#httpQuery": "taskQueue.kind", + "smithy.api#documentation": "Default: TASK_QUEUE_KIND_NORMAL." + } + }, + "taskQueue_normalName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "taskQueue.normalName", + "smithy.api#documentation": "Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of\n the normal task queue that the sticky worker is running on." + } + }, + "taskQueueType": { + "target": "com.temporal.api#DescribeTaskQueueRequestTaskQueueType", + "traits": { + "smithy.api#httpQuery": "taskQueueType", + "smithy.api#documentation": "If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used.\n Only supported in default mode (use `task_queue_types` in ENHANCED mode instead)." + } + }, + "reportStats": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "reportStats", + "smithy.api#documentation": "Report stats for the requested task queue type(s)." + } + }, + "reportConfig": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "reportConfig", + "smithy.api#documentation": "Report Task Queue Config" + } + }, + "includeTaskQueueStatus": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "includeTaskQueueStatus", + "smithy.api#documentation": "Deprecated, use `report_stats` instead.\n If true, the task queue status will be included in the response." + } + }, + "apiMode": { + "target": "com.temporal.api#DescribeTaskQueueRequestApiMode", + "traits": { + "smithy.api#httpQuery": "apiMode", + "smithy.api#documentation": "Deprecated. ENHANCED mode is also being deprecated.\n Select the API mode to use for this request: DEFAULT mode (if unset) or ENHANCED mode.\n Consult the documentation for each field to understand which mode it is supported in." + } + }, + "versions_buildIds": { + "target": "com.temporal.api#DescribeTaskQueueRequestVersionsBuildIdsList", + "traits": { + "smithy.api#httpQuery": "versions.buildIds", + "smithy.api#documentation": "Include specific Build IDs." + } + }, + "versions_unversioned": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "versions.unversioned", + "smithy.api#documentation": "Include the unversioned queue." + } + }, + "versions_allActive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "versions.allActive", + "smithy.api#documentation": "Include all active versions. A version is considered active if, in the last few minutes,\n it has had new tasks or polls, or it has been the subject of certain task queue API calls." + } + }, + "taskQueueTypes": { + "target": "com.temporal.api#DescribeTaskQueueRequestTaskQueueTypesList", + "traits": { + "smithy.api#httpQuery": "taskQueueTypes", + "smithy.api#documentation": "Deprecated (as part of the ENHANCED mode deprecation).\n Task queue types to report info about. If not specified, all types are considered." + } + }, + "reportPollers": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "reportPollers", + "smithy.api#documentation": "Deprecated (as part of the ENHANCED mode deprecation).\n Report list of pollers for requested task queue types and versions." + } + }, + "reportTaskReachability": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "reportTaskReachability", + "smithy.api#documentation": "Deprecated (as part of the ENHANCED mode deprecation).\n Report task reachability for the requested versions and all task types (task reachability is not reported\n per task type)." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeTaskQueueResponse": { + "type": "structure", + "members": { + "pollers": { + "target": "com.temporal.api#DescribeTaskQueueResponsePollersList" + }, + "stats": { + "target": "com.temporal.api#TaskQueueStats", + "traits": { + "smithy.api#documentation": "Statistics for the task queue.\n Only set if `report_stats` is set on the request." + } + }, + "statsByPriorityKey": { + "target": "com.temporal.api#DescribeTaskQueueResponseStatsByPriorityKeyMap", + "traits": { + "smithy.api#documentation": "Task queue stats breakdown by priority key. Only contains actively used priority keys.\n Only set if `report_stats` is set on the request.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"by\" is used to clarify the keys and values. --)" + } + }, + "versioningInfo": { + "target": "com.temporal.api#TaskQueueVersioningInfo", + "traits": { + "smithy.api#documentation": "Specifies which Worker Deployment Version(s) Server routes this Task Queue's tasks to.\n When not present, it means the tasks are routed to Unversioned workers (workers with\n UNVERSIONED or unspecified WorkerVersioningMode.)\n Task Queue Versioning info is updated indirectly by calling SetWorkerDeploymentCurrentVersion\n and SetWorkerDeploymentRampingVersion on Worker Deployments.\n Note: This information is not relevant to Pinned workflow executions and their activities as\n they are always routed to their Pinned Deployment Version. However, new workflow executions\n are typically not Pinned until they complete their first task (unless they are started with\n a Pinned VersioningOverride or are Child Workflows of a Pinned parent)." + } + }, + "config": { + "target": "com.temporal.api#TaskQueueConfig", + "traits": { + "smithy.api#documentation": "Only populated if report_task_queue_config is set to true." + } + }, + "effectiveRateLimit": { + "target": "com.temporal.api#DescribeTaskQueueResponseEffectiveRateLimit" + }, + "taskQueueStatus": { + "target": "com.temporal.api#TaskQueueStatus", + "traits": { + "smithy.api#documentation": "Deprecated.\n Status of the task queue. Only populated when `include_task_queue_status` is set to true in the request." + } + }, + "versionsInfo": { + "target": "com.temporal.api#DescribeTaskQueueResponseVersionsInfoMap", + "traits": { + "smithy.api#documentation": "Deprecated.\n Only returned in ENHANCED mode.\n This map contains Task Queue information for each Build ID. Empty string as key value means unversioned." + } + } + }, + "traits": {} + }, + "com.temporal.api#PollerInfo": { + "type": "structure", + "members": { + "lastAccessTime": { + "target": "smithy.api#String" + }, + "identity": { + "target": "smithy.api#String" + }, + "ratePerSecond": { + "target": "smithy.api#Double" + }, + "workerVersionCapabilities": { + "target": "com.temporal.api#WorkerVersionCapabilities", + "traits": { + "smithy.api#documentation": "If a worker has opted into the worker versioning feature while polling, its capabilities will\n appear here.\n Deprecated. Replaced by deployment_options." + } + }, + "deploymentOptions": { + "target": "com.temporal.api#WorkerDeploymentOptions", + "traits": { + "smithy.api#documentation": "Worker deployment options that SDK sent to server." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkerVersionCapabilities": { + "type": "structure", + "members": { + "buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An opaque whole-worker identifier" + } + }, + "useVersioning": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If set, the worker is opting in to worker versioning, and wishes to only receive appropriate\n tasks." + } + }, + "deploymentSeriesName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Must be sent if user has set a deployment series name (versioning-3)." + } + } + }, + "traits": { + "smithy.api#documentation": "Identifies the version that a worker is compatible with when polling or identifying itself,\n and whether or not this worker is opting into the build-id based versioning feature. This is\n used by matching to determine which workers ought to receive what tasks.\n Deprecated. Use WorkerDeploymentOptions instead." + } + }, + "com.temporal.api#DescribeTaskQueueResponsePollersList": { + "type": "list", + "member": { + "target": "com.temporal.api#PollerInfo" + }, + "traits": {} + }, + "com.temporal.api#TaskQueueStats": { + "type": "structure", + "members": { + "approximateBacklogCount": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually\n converges to the right value. Can be relied upon for scaling decisions.\n\n Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because\n those tasks only remain valid for a few seconds, the inaccuracy becomes less significant as the backlog size\n grows." + } + }, + "approximateBacklogAge": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Approximate age of the oldest task in the backlog based on the creation time of the task at the head of\n the queue. Can be relied upon for scaling decisions.\n\n Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because\n those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than\n few seconds." + } + }, + "tasksAddRate": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The approximate tasks per second added to the task queue, averaging the last 30 seconds. These includes tasks\n whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going\n to the backlog (sync-matched).\n\n The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which\n backlog grows/shrinks.\n\n Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by\n tasks_add_rate, because:\n - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is\n enable for activities by default in the latest SDKs.\n - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each\n workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific\n worker instance." + } + }, + "tasksDispatchRate": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds. These includes\n tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without\n going to the backlog (sync-matched).\n\n The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which\n backlog grows/shrinks.\n\n Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by\n tasks_dispatch_rate, because:\n - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is\n enable for activities by default in the latest SDKs.\n - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each\n workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific\n worker instance." + } + } + }, + "traits": { + "smithy.api#documentation": "TaskQueueStats contains statistics about task queue backlog and activity.\n\n For workflow task queue type, this result is partial because tasks sent to sticky queues are not included. Read\n comments above each metric to understand the impact of sticky queue exclusion on that metric accuracy." + } + }, + "com.temporal.api#DescribeTaskQueueResponseStatsByPriorityKeyMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#TaskQueueStats" + }, + "traits": { + "smithy.api#documentation": "Task queue stats breakdown by priority key. Only contains actively used priority keys.\n Only set if `report_stats` is set on the request.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"by\" is used to clarify the keys and values. --)" + } + }, + "com.temporal.api#TaskQueueVersioningInfo": { + "type": "structure", + "members": { + "currentDeploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "Specifies which Deployment Version should receive new workflow executions and tasks of\n existing unversioned or AutoUpgrade workflows.\n Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)\n Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage\n is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`)." + } + }, + "currentVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `current_deployment_version`." + } + }, + "rampingDeploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version.\n Must always be different from `current_deployment_version` unless both are nil.\n Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)\n Note that it is possible to ramp from one Version to another Version, or from unversioned\n workers to a particular Version, or from a particular Version to unversioned workers." + } + }, + "rampingVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `ramping_deployment_version`." + } + }, + "rampingVersionPercentage": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Percentage of tasks that are routed to the Ramping Version instead of the Current Version.\n Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but\n not yet \"promoted\" to be the Current Version, likely due to pending validations.\n A 0% value means the Ramping Version is receiving no traffic." + } + }, + "updateTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last time versioning information of this Task Queue changed." + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeTaskQueueResponseEffectiveRateLimit": { + "type": "structure", + "members": { + "requestsPerSecond": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The effective rate limit for the task queue." + } + }, + "rateLimitSource": { + "target": "com.temporal.api#DescribeTaskQueueResponseEffectiveRateLimitRateLimitSource", + "traits": { + "smithy.api#documentation": "Source of the RateLimit Configuration,which can be one of the following values:\n - SOURCE_API: The rate limit that is set via the TaskQueueConfig api.\n - SOURCE_WORKER: The rate limit is the value set using the workerOptions in TaskQueueActivitiesPerSecond.\n - SOURCE_SYSTEM: The rate limit is the default value set by the system" + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeTaskQueueResponseEffectiveRateLimitRateLimitSource": { + "type": "enum", + "members": { + "RATE_LIMIT_SOURCE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RATE_LIMIT_SOURCE_UNSPECIFIED" + } + }, + "RATE_LIMIT_SOURCE_API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RATE_LIMIT_SOURCE_API" + } + }, + "RATE_LIMIT_SOURCE_WORKER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RATE_LIMIT_SOURCE_WORKER" + } + }, + "RATE_LIMIT_SOURCE_SYSTEM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RATE_LIMIT_SOURCE_SYSTEM" + } + } + }, + "traits": { + "smithy.api#documentation": "Source of the RateLimit Configuration,which can be one of the following values:\n - SOURCE_API: The rate limit that is set via the TaskQueueConfig api.\n - SOURCE_WORKER: The rate limit is the value set using the workerOptions in TaskQueueActivitiesPerSecond.\n - SOURCE_SYSTEM: The rate limit is the default value set by the system" + } + }, + "com.temporal.api#TaskQueueStatus": { + "type": "structure", + "members": { + "backlogCountHint": { + "target": "smithy.api#String" + }, + "readLevel": { + "target": "smithy.api#String" + }, + "ackLevel": { + "target": "smithy.api#String" + }, + "ratePerSecond": { + "target": "smithy.api#Double" + }, + "taskIdBlock": { + "target": "com.temporal.api#TaskIdBlock" + } + }, + "traits": { + "smithy.api#documentation": "Deprecated. Use `InternalTaskQueueStatus`. This is kept until `DescribeTaskQueue` supports legacy behavior." + } + }, + "com.temporal.api#TaskIdBlock": { + "type": "structure", + "members": { + "startId": { + "target": "smithy.api#String" + }, + "endId": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#TaskQueueVersionInfo": { + "type": "structure", + "members": { + "typesInfo": { + "target": "com.temporal.api#TaskQueueVersionInfoTypesInfoMap", + "traits": { + "smithy.api#documentation": "Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum." + } + }, + "taskReachability": { + "target": "com.temporal.api#TaskQueueVersionInfoTaskReachability", + "traits": { + "smithy.api#documentation": "Task Reachability is eventually consistent; there may be a delay until it converges to the most\n accurate value but it is designed in a way to take the more conservative side until it converges.\n For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY.\n\n Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be\n accounted for reachability as server cannot know if they'll happen as they do not use\n assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows\n who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make\n sure to query reachability for the parent/previous workflow's Task Queue as well." + } + } + }, + "traits": {} + }, + "com.temporal.api#TaskQueueTypeInfo": { + "type": "structure", + "members": { + "pollers": { + "target": "com.temporal.api#TaskQueueTypeInfoPollersList", + "traits": { + "smithy.api#documentation": "Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID." + } + }, + "stats": { + "target": "com.temporal.api#TaskQueueStats" + } + }, + "traits": {} + }, + "com.temporal.api#TaskQueueTypeInfoPollersList": { + "type": "list", + "member": { + "target": "com.temporal.api#PollerInfo" + }, + "traits": { + "smithy.api#documentation": "Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID." + } + }, + "com.temporal.api#TaskQueueVersionInfoTypesInfoMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#TaskQueueTypeInfo" + }, + "traits": { + "smithy.api#documentation": "Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum." + } + }, + "com.temporal.api#TaskQueueVersionInfoTaskReachability": { + "type": "enum", + "members": { + "BUILD_ID_TASK_REACHABILITY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD_ID_TASK_REACHABILITY_UNSPECIFIED" + } + }, + "BUILD_ID_TASK_REACHABILITY_REACHABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD_ID_TASK_REACHABILITY_REACHABLE" + } + }, + "BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY" + } + }, + "BUILD_ID_TASK_REACHABILITY_UNREACHABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD_ID_TASK_REACHABILITY_UNREACHABLE" + } + } + }, + "traits": { + "smithy.api#documentation": "Task Reachability is eventually consistent; there may be a delay until it converges to the most\n accurate value but it is designed in a way to take the more conservative side until it converges.\n For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY.\n\n Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be\n accounted for reachability as server cannot know if they'll happen as they do not use\n assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows\n who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make\n sure to query reachability for the parent/previous workflow's Task Queue as well." + } + }, + "com.temporal.api#DescribeTaskQueueResponseVersionsInfoMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#TaskQueueVersionInfo" + }, + "traits": { + "smithy.api#documentation": "Deprecated.\n Only returned in ENHANCED mode.\n This map contains Task Queue information for each Build ID. Empty string as key value means unversioned." + } + }, + "com.temporal.api#DescribeTaskQueue": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeTaskQueueRequest" + }, + "output": { + "target": "com.temporal.api#DescribeTaskQueueResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/task-queues/{task_queue_name}", + "code": 200 + }, + "smithy.api#documentation": "DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID:\n - List of pollers\n - Workflow Reachability status\n - Backlog info for Workflow and/or Activity tasks" + } + }, + "com.temporal.api#UpdateNamespaceInfo": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String" + }, + "ownerEmail": { + "target": "smithy.api#String" + }, + "data": { + "target": "com.temporal.api#UpdateNamespaceInfoDataMap", + "traits": { + "smithy.api#documentation": "A key-value map for any customized purpose.\n If data already exists on the namespace,\n this will merge with the existing key values." + } + }, + "state": { + "target": "com.temporal.api#UpdateNamespaceInfoState", + "traits": { + "smithy.api#documentation": "New namespace state, server will reject if transition is not allowed.\n Allowed transitions are:\n Registered -> [ Deleted | Deprecated | Handover ]\n Handover -> [ Registered ]\n Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state." + } + } + }, + "traits": {} + }, + "com.temporal.api#UpdateNamespaceInfoDataMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A key-value map for any customized purpose.\n If data already exists on the namespace,\n this will merge with the existing key values." + } + }, + "com.temporal.api#UpdateNamespaceInfoState": { + "type": "enum", + "members": { + "NAMESPACE_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAMESPACE_STATE_UNSPECIFIED" + } + }, + "NAMESPACE_STATE_REGISTERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAMESPACE_STATE_REGISTERED" + } + }, + "NAMESPACE_STATE_DEPRECATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAMESPACE_STATE_DEPRECATED" + } + }, + "NAMESPACE_STATE_DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAMESPACE_STATE_DELETED" + } + } + }, + "traits": { + "smithy.api#documentation": "New namespace state, server will reject if transition is not allowed.\n Allowed transitions are:\n Registered -> [ Deleted | Deprecated | Handover ]\n Handover -> [ Registered ]\n Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state." + } + }, + "com.temporal.api#UpdateNamespaceRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "updateInfo": { + "target": "com.temporal.api#UpdateNamespaceInfo" + }, + "config": { + "target": "com.temporal.api#NamespaceConfig" + }, + "replicationConfig": { + "target": "com.temporal.api#NamespaceReplicationConfig" + }, + "securityToken": { + "target": "smithy.api#String" + }, + "deleteBadBinary": { + "target": "smithy.api#String" + }, + "promoteNamespace": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "promote local namespace to global namespace. Ignored if namespace is already global namespace." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateNamespaceResponse": { + "type": "structure", + "members": { + "namespaceInfo": { + "target": "com.temporal.api#NamespaceInfo" + }, + "config": { + "target": "com.temporal.api#NamespaceConfig" + }, + "replicationConfig": { + "target": "com.temporal.api#NamespaceReplicationConfig" + }, + "failoverVersion": { + "target": "smithy.api#String" + }, + "isGlobalNamespace": { + "target": "smithy.api#Boolean" + } + }, + "traits": {} + }, + "com.temporal.api#UpdateNamespace": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateNamespaceRequest" + }, + "output": { + "target": "com.temporal.api#UpdateNamespaceResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/update", + "code": 200 + }, + "smithy.api#documentation": "UpdateNamespace is used to update the information and configuration of a registered\n namespace." + } + }, + "com.temporal.api#ComputeConfig": { + "type": "structure", + "members": { + "scalingGroups": { + "target": "com.temporal.api#ComputeConfigScalingGroupsMap", + "traits": { + "smithy.api#documentation": "Each scaling group describes a compute config for a specific subset of the worker\n deployment version: covering a specific set of task types and/or regions.\n Having different configurations for different task types, allows independent\n tuning of activity and workflow task processing (for example).\n\n The key of the map is the ID of the scaling group used to reference it in subsequent\n update calls." + } + } + }, + "traits": { + "smithy.api#documentation": "ComputeConfig stores configuration that helps a worker control plane\n controller understand *when* and *how* to respond to worker lifecycle\n events." + } + }, + "com.temporal.api#ComputeConfigScalingGroup": { + "type": "structure", + "members": { + "taskQueueTypes": { + "target": "com.temporal.api#ComputeConfigScalingGroupTaskQueueTypesList", + "traits": { + "smithy.api#documentation": "Optional. The set of task queue types this scaling group serves.\n If not provided, this scaling group serves all not otherwise defined\n task types." + } + }, + "provider": { + "target": "com.temporal.api#ComputeProvider", + "traits": { + "smithy.api#documentation": "Stores instructions for a worker control plane controller how to respond\n to worker lifeycle events." + } + }, + "scaler": { + "target": "com.temporal.api#ComputeScaler", + "traits": { + "smithy.api#documentation": "Informs a worker lifecycle controller *when* and *how often* to perform\n certain worker lifecycle actions like starting a serverless worker." + } + } + }, + "traits": {} + }, + "com.temporal.api#ComputeConfigScalingGroupTaskQueueTypesItem": { + "type": "enum", + "members": { + "TASK_QUEUE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_UNSPECIFIED" + } + }, + "TASK_QUEUE_TYPE_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_WORKFLOW" + } + }, + "TASK_QUEUE_TYPE_ACTIVITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_ACTIVITY" + } + }, + "TASK_QUEUE_TYPE_NEXUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_NEXUS" + } + } + }, + "traits": {} + }, + "com.temporal.api#ComputeConfigScalingGroupTaskQueueTypesList": { + "type": "list", + "member": { + "target": "com.temporal.api#ComputeConfigScalingGroupTaskQueueTypesItem" + }, + "traits": { + "smithy.api#documentation": "Optional. The set of task queue types this scaling group serves.\n If not provided, this scaling group serves all not otherwise defined\n task types." + } + }, + "com.temporal.api#ComputeProvider": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Type of the compute provider. This string is implementation-specific and\n can be used by implementations to understand how to interpret the\n contents of the provider_details field." + } + }, + "details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contains provider-specific instructions and configuration.\n For server-implemented providers, use the SDK's default content\n converter to ensure the server can understand it.\n For remote-implemented providers, you might use your own content\n converters according to what the remote endpoints understand." + } + }, + "nexusEndpoint": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. If the compute provider is a Nexus service, this should point\n there." + } + } + }, + "traits": { + "smithy.api#documentation": "ComputeProvider stores information used by a worker control plane controller\n to respond to worker lifecycle events. For example, when a Task is received\n on a TaskQueue that has no active pollers, a serverless worker lifecycle\n controller might need to invoke an AWS Lambda Function that itself ends up\n calling the SDK's worker.New() function." + } + }, + "com.temporal.api#ComputeScaler": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Type of the compute scaler. this string is implementation-specific and\n can be used by implementations to understand how to interpret the\n contents of the scaler_details field." + } + }, + "details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contains scaler-specific instructions and configuration.\n For server-implemented scalers, use the SDK's default data\n converter to ensure the server can understand it.\n For remote-implemented scalers, you might use your own data\n converters according to what the remote endpoints understand." + } + } + }, + "traits": { + "smithy.api#documentation": "ComputeScaler instructs the Temporal Service when to scale up or down the number of\n Workers that comprise a WorkerDeployment." + } + }, + "com.temporal.api#ComputeConfigScalingGroupsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#ComputeConfigScalingGroup" + }, + "traits": { + "smithy.api#documentation": "Each scaling group describes a compute config for a specific subset of the worker\n deployment version: covering a specific set of task types and/or regions.\n Having different configurations for different task types, allows independent\n tuning of activity and workflow task processing (for example).\n\n The key of the map is the ID of the scaling group used to reference it in subsequent\n update calls." + } + }, + "com.temporal.api#CreateWorkerDeploymentVersionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_deployment_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "Required." + } + }, + "computeConfig": { + "target": "com.temporal.api#ComputeConfig", + "traits": { + "smithy.api#documentation": "Optional. Contains the new worker compute configuration for the Worker\n Deployment. Used for worker scale management." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this create request for idempotence. Typically UUIDv4.\n If a second request with the same ID is recieved, it is considered a successful no-op.\n Retrying with a different request ID for the same deployment name + build ID is an error." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#CreateWorkerDeploymentVersionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#CreateWorkerDeploymentVersion": { + "type": "operation", + "input": { + "target": "com.temporal.api#CreateWorkerDeploymentVersionRequest" + }, + "output": { + "target": "com.temporal.api#CreateWorkerDeploymentVersionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}", + "code": 200 + }, + "smithy.api#documentation": "Creates a new Worker Deployment Version.\n\n Experimental. This API might significantly change or be removed in a\n future release." + } + }, + "com.temporal.api#DescribeWorkerDeploymentVersionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_deployment_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_build_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "version", + "smithy.api#documentation": "Deprecated. Use `deployment_version`." + } + }, + "deploymentVersion_buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "deploymentVersion.buildId", + "smithy.api#documentation": "A unique identifier for this Version within the Deployment it is a part of.\n Not necessarily unique within the namespace.\n The combination of `deployment_name` and `build_id` uniquely identifies this\n Version within the namespace, because Deployment names are unique within a namespace." + } + }, + "deploymentVersion_deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "deploymentVersion.deploymentName", + "smithy.api#documentation": "Identifies the Worker Deployment this Version is part of." + } + }, + "reportTaskQueueStats": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "reportTaskQueueStats", + "smithy.api#documentation": "Report stats for task queues which have been polled by this version." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeWorkerDeploymentVersionResponse": { + "type": "structure", + "members": { + "workerDeploymentVersionInfo": { + "target": "com.temporal.api#WorkerDeploymentVersionInfo" + }, + "versionTaskQueues": { + "target": "com.temporal.api#DescribeWorkerDeploymentVersionResponseVersionTaskQueuesList", + "traits": { + "smithy.api#documentation": "All the Task Queues that have ever polled from this Deployment version." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkerDeploymentVersionInfo": { + "type": "structure", + "members": { + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `deployment_version`." + } + }, + "status": { + "target": "com.temporal.api#WorkerDeploymentVersionInfoStatus", + "traits": { + "smithy.api#documentation": "The status of the Worker Deployment Version." + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "Required." + } + }, + "deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. User deployment_version.deployment_name." + } + }, + "createTime": { + "target": "smithy.api#String" + }, + "routingChangedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed." + } + }, + "currentSinceTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "(-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --)\n Unset if not current." + } + }, + "rampingSinceTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "(-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --)\n Unset if not ramping. Updated when the version first starts ramping, not on each ramp change." + } + }, + "firstActivationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp when this version first became current or ramping." + } + }, + "lastCurrentTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp when this version last became current.\n Can be used to determine whether a version has ever been Current." + } + }, + "lastDeactivationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp when this version last stopped being current or ramping.\n Cleared if the version becomes current or ramping again." + } + }, + "rampPercentage": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Range: [0, 100]. Must be zero if the version is not ramping (i.e. `ramping_since_time` is nil).\n Can be in the range [0, 100] if the version is ramping." + } + }, + "taskQueueInfos": { + "target": "com.temporal.api#WorkerDeploymentVersionInfoTaskQueueInfosList", + "traits": { + "smithy.api#documentation": "All the Task Queues that have ever polled from this Deployment version.\n Deprecated. Use `version_task_queues` in DescribeWorkerDeploymentVersionResponse instead." + } + }, + "drainageInfo": { + "target": "com.temporal.api#VersionDrainageInfo", + "traits": { + "smithy.api#documentation": "Helps user determine when it is safe to decommission the workers of this\n Version. Not present when version is current or ramping.\n Current limitations:\n - Not supported for Unversioned mode.\n - Periodically refreshed, may have delays up to few minutes (consult the\n last_checked_time value).\n - Refreshed only when version is not current or ramping AND the status is not\n \"drained\" yet.\n - Once the status is changed to \"drained\", it is not changed until the Version\n becomes Current or Ramping again, at which time the drainage info is cleared.\n This means if the Version is \"drained\" but new workflows are sent to it via\n Pinned Versioning Override, the status does not account for those Pinned-override\n executions and remains \"drained\"." + } + }, + "metadata": { + "target": "com.temporal.api#VersionMetadata", + "traits": { + "smithy.api#documentation": "Arbitrary user-provided metadata attached to this version." + } + }, + "computeConfig": { + "target": "com.temporal.api#ComputeConfig", + "traits": { + "smithy.api#documentation": "Optional. Contains the new worker compute configuration for the Worker\n Deployment. Used for worker scale management." + } + }, + "lastModifierIdentity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity of the last client who modified the configuration of this Version.\n As of now, this field only covers changes through the following APIs:\n - `CreateWorkerDeploymentVersion`\n - `UpdateWorkerDeploymentVersionComputeConfig`\n - `UpdateWorkerDeploymentVersionMetadata`" + } + } + }, + "traits": { + "smithy.api#documentation": "A Worker Deployment Version (Version, for short) represents all workers of the same\n code and config within a Deployment. Workers of the same Version are expected to\n behave exactly the same so when executions move between them there are no\n non-determinism issues.\n Worker Deployment Versions are created in Temporal server automatically when\n their first poller arrives to the server." + } + }, + "com.temporal.api#WorkerDeploymentVersionInfoStatus": { + "type": "enum", + "members": { + "WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_CREATED" + } + } + }, + "traits": { + "smithy.api#documentation": "The status of the Worker Deployment Version." + } + }, + "com.temporal.api#WorkerDeploymentVersionInfoVersionTaskQueueInfo": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + }, + "type": { + "target": "com.temporal.api#WorkerDeploymentVersionInfoVersionTaskQueueInfoType" + } + }, + "traits": {} + }, + "com.temporal.api#WorkerDeploymentVersionInfoVersionTaskQueueInfoType": { + "type": "enum", + "members": { + "TASK_QUEUE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_UNSPECIFIED" + } + }, + "TASK_QUEUE_TYPE_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_WORKFLOW" + } + }, + "TASK_QUEUE_TYPE_ACTIVITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_ACTIVITY" + } + }, + "TASK_QUEUE_TYPE_NEXUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_NEXUS" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkerDeploymentVersionInfoTaskQueueInfosList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkerDeploymentVersionInfoVersionTaskQueueInfo" + }, + "traits": { + "smithy.api#documentation": "All the Task Queues that have ever polled from this Deployment version.\n Deprecated. Use `version_task_queues` in DescribeWorkerDeploymentVersionResponse instead." + } + }, + "com.temporal.api#VersionDrainageInfo": { + "type": "structure", + "members": { + "status": { + "target": "com.temporal.api#VersionDrainageInfoStatus", + "traits": { + "smithy.api#documentation": "Set to DRAINING when the version first stops accepting new executions (is no longer current or ramping).\n Set to DRAINED when no more open pinned workflows exist on this version." + } + }, + "lastChangedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last time the drainage status changed." + } + }, + "lastCheckedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last time the system checked for drainage of this version." + } + } + }, + "traits": { + "smithy.api#documentation": "Information about workflow drainage to help the user determine when it is safe\n to decommission a Version. Not present while version is current or ramping." + } + }, + "com.temporal.api#VersionDrainageInfoStatus": { + "type": "enum", + "members": { + "VERSION_DRAINAGE_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSION_DRAINAGE_STATUS_UNSPECIFIED" + } + }, + "VERSION_DRAINAGE_STATUS_DRAINING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSION_DRAINAGE_STATUS_DRAINING" + } + }, + "VERSION_DRAINAGE_STATUS_DRAINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSION_DRAINAGE_STATUS_DRAINED" + } + } + }, + "traits": { + "smithy.api#documentation": "Set to DRAINING when the version first stops accepting new executions (is no longer current or ramping).\n Set to DRAINED when no more open pinned workflows exist on this version." + } + }, + "com.temporal.api#VersionMetadata": { + "type": "structure", + "members": { + "entries": { + "target": "com.temporal.api#VersionMetadataEntriesMap", + "traits": { + "smithy.api#documentation": "Arbitrary key-values." + } + } + }, + "traits": {} + }, + "com.temporal.api#VersionMetadataEntriesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Arbitrary key-values." + } + }, + "com.temporal.api#DescribeWorkerDeploymentVersionResponseVersionTaskQueue": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + }, + "type": { + "target": "com.temporal.api#DescribeWorkerDeploymentVersionResponseVersionTaskQueueType" + }, + "stats": { + "target": "com.temporal.api#TaskQueueStats", + "traits": { + "smithy.api#documentation": "Only set if `report_task_queue_stats` is set on the request." + } + }, + "statsByPriorityKey": { + "target": "com.temporal.api#DescribeWorkerDeploymentVersionResponseVersionTaskQueueStatsByPriorityKeyMap", + "traits": { + "smithy.api#documentation": "Task queue stats breakdown by priority key. Only contains actively used priority keys.\n Only set if `report_task_queue_stats` is set to true in the request.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"by\" is used to clarify the key. --)" + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeWorkerDeploymentVersionResponseVersionTaskQueueType": { + "type": "enum", + "members": { + "TASK_QUEUE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_UNSPECIFIED" + } + }, + "TASK_QUEUE_TYPE_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_WORKFLOW" + } + }, + "TASK_QUEUE_TYPE_ACTIVITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_ACTIVITY" + } + }, + "TASK_QUEUE_TYPE_NEXUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_NEXUS" + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeWorkerDeploymentVersionResponseVersionTaskQueueStatsByPriorityKeyMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#TaskQueueStats" + }, + "traits": { + "smithy.api#documentation": "Task queue stats breakdown by priority key. Only contains actively used priority keys.\n Only set if `report_task_queue_stats` is set to true in the request.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"by\" is used to clarify the key. --)" + } + }, + "com.temporal.api#DescribeWorkerDeploymentVersionResponseVersionTaskQueuesList": { + "type": "list", + "member": { + "target": "com.temporal.api#DescribeWorkerDeploymentVersionResponseVersionTaskQueue" + }, + "traits": { + "smithy.api#documentation": "All the Task Queues that have ever polled from this Deployment version." + } + }, + "com.temporal.api#DescribeWorkerDeploymentVersion": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeWorkerDeploymentVersionRequest" + }, + "output": { + "target": "com.temporal.api#DescribeWorkerDeploymentVersionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}/{deployment_version_build_id}", + "code": 200 + }, + "smithy.api#documentation": "Describes a worker deployment version.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#DeleteWorkerDeploymentVersionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_deployment_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_build_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "version", + "smithy.api#documentation": "Deprecated. Use `deployment_version`." + } + }, + "deploymentVersion_buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "deploymentVersion.buildId", + "smithy.api#documentation": "A unique identifier for this Version within the Deployment it is a part of.\n Not necessarily unique within the namespace.\n The combination of `deployment_name` and `build_id` uniquely identifies this\n Version within the namespace, because Deployment names are unique within a namespace." + } + }, + "deploymentVersion_deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "deploymentVersion.deploymentName", + "smithy.api#documentation": "Identifies the Worker Deployment this Version is part of." + } + }, + "skipDrainage": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skipDrainage", + "smithy.api#documentation": "Pass to force deletion even if the Version is draining. In this case the open pinned\n workflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "identity", + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DeleteWorkerDeploymentVersionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#DeleteWorkerDeploymentVersion": { + "type": "operation", + "input": { + "target": "com.temporal.api#DeleteWorkerDeploymentVersionRequest" + }, + "output": { + "target": "com.temporal.api#DeleteWorkerDeploymentVersionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}/{deployment_version_build_id}", + "code": 200 + }, + "smithy.api#documentation": "Used for manual deletion of Versions. User can delete a Version only when all the\n following conditions are met:\n - It is not the Current or Ramping Version of its Deployment.\n - It has no active pollers (none of the task queues in the Version have pollers)\n - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition\n can be skipped by passing `skip-drainage=true`.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#ComputeConfigScalingGroupUpdate": { + "type": "structure", + "members": { + "scalingGroup": { + "target": "com.temporal.api#ComputeConfigScalingGroup" + }, + "updateMask": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Controls which fields from `scaling_group` will be applied. Semantics:\n - Mask is ignored for new scaling groups (only applicable when scaling group already exists).\n - Empty mask for an existing scaling group is no-op: no change.\n - Non-empty mask for an existing scaling group will update/unset only to the fields\n mentioned in the mask.\n - Accepted paths: \"task_queue_types\", \"provider\", \"provider.type\", \"provider.details\",\n \"provider.nexus_endpoint\", \"scaler\", \"scaler.type\", \"scaler.details\"" + } + } + }, + "traits": {} + }, + "com.temporal.api#UpdateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#ComputeConfigScalingGroupUpdate" + }, + "traits": { + "smithy.api#documentation": "Optional. Contains the compute config scaling groups to add or update for the Worker\n Deployment." + } + }, + "com.temporal.api#UpdateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Optional. Contains the compute config scaling groups to remove from the Worker Deployment." + } + }, + "com.temporal.api#UpdateWorkerDeploymentVersionComputeConfigRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_deployment_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_build_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "Required." + } + }, + "computeConfigScalingGroups": { + "target": "com.temporal.api#UpdateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap", + "traits": { + "smithy.api#documentation": "Optional. Contains the compute config scaling groups to add or update for the Worker\n Deployment." + } + }, + "removeComputeConfigScalingGroups": { + "target": "com.temporal.api#UpdateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList", + "traits": { + "smithy.api#documentation": "Optional. Contains the compute config scaling groups to remove from the Worker Deployment." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this create request for idempotence. Typically UUIDv4.\n If a second request with the same ID is recieved, it is considered a successful no-op.\n Retrying with a different request ID for the same deployment name + build ID is an error." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateWorkerDeploymentVersionComputeConfigResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#UpdateWorkerDeploymentVersionComputeConfig": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateWorkerDeploymentVersionComputeConfigRequest" + }, + "output": { + "target": "com.temporal.api#UpdateWorkerDeploymentVersionComputeConfigResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}/{deployment_version_build_id}/update-compute-config", + "code": 200 + }, + "smithy.api#documentation": "Updates the compute config attached to a Worker Deployment Version.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#UpdateWorkerDeploymentVersionMetadataRequestUpsertEntriesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.temporal.api#UpdateWorkerDeploymentVersionMetadataRequestRemoveEntriesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "List of keys to remove from the metadata." + } + }, + "com.temporal.api#UpdateWorkerDeploymentVersionMetadataRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_deployment_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_build_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `deployment_version`." + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "Required." + } + }, + "upsertEntries": { + "target": "com.temporal.api#UpdateWorkerDeploymentVersionMetadataRequestUpsertEntriesMap" + }, + "removeEntries": { + "target": "com.temporal.api#UpdateWorkerDeploymentVersionMetadataRequestRemoveEntriesList", + "traits": { + "smithy.api#documentation": "List of keys to remove from the metadata." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateWorkerDeploymentVersionMetadataResponse": { + "type": "structure", + "members": { + "metadata": { + "target": "com.temporal.api#VersionMetadata", + "traits": { + "smithy.api#documentation": "Full metadata after performing the update." + } + } + }, + "traits": {} + }, + "com.temporal.api#UpdateWorkerDeploymentVersionMetadata": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateWorkerDeploymentVersionMetadataRequest" + }, + "output": { + "target": "com.temporal.api#UpdateWorkerDeploymentVersionMetadataResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}/{deployment_version_build_id}/update-metadata", + "code": 200 + }, + "smithy.api#documentation": "Updates the user-given metadata attached to a Worker Deployment Version.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#ValidateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#ComputeConfigScalingGroupUpdate" + }, + "traits": { + "smithy.api#documentation": "Optional. Contains the compute config scaling groups to add or update for the Worker\n Deployment." + } + }, + "com.temporal.api#ValidateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Optional. Contains the compute config scaling groups to remove from the Worker Deployment." + } + }, + "com.temporal.api#ValidateWorkerDeploymentVersionComputeConfigRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_deployment_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deployment_version_build_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "Required." + } + }, + "computeConfigScalingGroups": { + "target": "com.temporal.api#ValidateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap", + "traits": { + "smithy.api#documentation": "Optional. Contains the compute config scaling groups to add or update for the Worker\n Deployment." + } + }, + "removeComputeConfigScalingGroups": { + "target": "com.temporal.api#ValidateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList", + "traits": { + "smithy.api#documentation": "Optional. Contains the compute config scaling groups to remove from the Worker Deployment." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ValidateWorkerDeploymentVersionComputeConfigResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#ValidateWorkerDeploymentVersionComputeConfig": { + "type": "operation", + "input": { + "target": "com.temporal.api#ValidateWorkerDeploymentVersionComputeConfigRequest" + }, + "output": { + "target": "com.temporal.api#ValidateWorkerDeploymentVersionComputeConfigResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}/{deployment_version_build_id}/validate-compute-config", + "code": 200 + }, + "smithy.api#documentation": "Validates the compute config without attaching it to a Worker Deployment Version.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#ListWorkerDeploymentsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "pageSize" + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListWorkerDeploymentsResponse": { + "type": "structure", + "members": { + "nextPageToken": { + "target": "smithy.api#String" + }, + "workerDeployments": { + "target": "com.temporal.api#ListWorkerDeploymentsResponseWorkerDeploymentsList", + "traits": { + "smithy.api#documentation": "The list of worker deployments." + } + } + }, + "traits": {} + }, + "com.temporal.api#ListWorkerDeploymentsResponseWorkerDeploymentSummary": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String" + }, + "createTime": { + "target": "smithy.api#String" + }, + "routingConfig": { + "target": "com.temporal.api#RoutingConfig" + }, + "latestVersionSummary": { + "target": "com.temporal.api#WorkerDeploymentInfoWorkerDeploymentVersionSummary", + "traits": { + "smithy.api#documentation": "Summary of the version that was added most recently in the Worker Deployment." + } + }, + "currentVersionSummary": { + "target": "com.temporal.api#WorkerDeploymentInfoWorkerDeploymentVersionSummary", + "traits": { + "smithy.api#documentation": "Summary of the current version of the Worker Deployment." + } + }, + "rampingVersionSummary": { + "target": "com.temporal.api#WorkerDeploymentInfoWorkerDeploymentVersionSummary", + "traits": { + "smithy.api#documentation": "Summary of the ramping version of the Worker Deployment." + } + } + }, + "traits": { + "smithy.api#documentation": "A subset of WorkerDeploymentInfo" + } + }, + "com.temporal.api#RoutingConfig": { + "type": "structure", + "members": { + "currentDeploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "Specifies which Deployment Version should receive new workflow executions and tasks of\n existing unversioned or AutoUpgrade workflows.\n Nil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.).\n Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage\n is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`)." + } + }, + "currentVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `current_deployment_version`." + } + }, + "rampingDeploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version.\n Must always be different from `current_deployment_version` unless both are nil.\n Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)\n Note that it is possible to ramp from one Version to another Version, or from unversioned\n workers to a particular Version, or from a particular Version to unversioned workers." + } + }, + "rampingVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `ramping_deployment_version`." + } + }, + "rampingVersionPercentage": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Percentage of tasks that are routed to the Ramping Version instead of the Current Version.\n Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but\n not yet \"promoted\" to be the Current Version, likely due to pending validations.\n A 0% value means the Ramping Version is receiving no traffic." + } + }, + "currentVersionChangedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last time current version was changed." + } + }, + "rampingVersionChangedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last time ramping version was changed. Not updated if only the ramp percentage changes." + } + }, + "rampingVersionPercentageChangedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last time ramping version percentage was changed.\n If ramping version is changed, this is also updated, even if the percentage stays the same." + } + }, + "revisionNumber": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Monotonically increasing value which is incremented on every mutation\n to any field of this message to achieve eventual consistency between task queues and their partitions." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkerDeploymentInfoWorkerDeploymentVersionSummary": { + "type": "structure", + "members": { + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `deployment_version`." + } + }, + "status": { + "target": "com.temporal.api#WorkerDeploymentInfoWorkerDeploymentVersionSummaryStatus", + "traits": { + "smithy.api#documentation": "The status of the Worker Deployment Version." + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "Required." + } + }, + "createTime": { + "target": "smithy.api#String" + }, + "drainageStatus": { + "target": "com.temporal.api#WorkerDeploymentInfoWorkerDeploymentVersionSummaryDrainageStatus", + "traits": { + "smithy.api#documentation": "Deprecated. Use `drainage_info` instead." + } + }, + "drainageInfo": { + "target": "com.temporal.api#VersionDrainageInfo", + "traits": { + "smithy.api#documentation": "Information about workflow drainage to help the user determine when it is safe\n to decommission a Version. Not present while version is current or ramping" + } + }, + "currentSinceTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unset if not current.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --)" + } + }, + "rampingSinceTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unset if not ramping. Updated when the version first starts ramping, not on each ramp change.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --)" + } + }, + "routingUpdateTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed." + } + }, + "firstActivationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp when this version first became current or ramping." + } + }, + "lastCurrentTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp when this version last became current.\n Can be used to determine whether a version has ever been Current." + } + }, + "lastDeactivationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp when this version last stopped being current or ramping.\n Cleared if the version becomes current or ramping again." + } + }, + "computeConfig": { + "target": "com.temporal.api#ComputeConfigSummary" + } + }, + "traits": {} + }, + "com.temporal.api#WorkerDeploymentInfoWorkerDeploymentVersionSummaryStatus": { + "type": "enum", + "members": { + "WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED" + } + }, + "WORKER_DEPLOYMENT_VERSION_STATUS_CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_DEPLOYMENT_VERSION_STATUS_CREATED" + } + } + }, + "traits": { + "smithy.api#documentation": "The status of the Worker Deployment Version." + } + }, + "com.temporal.api#WorkerDeploymentInfoWorkerDeploymentVersionSummaryDrainageStatus": { + "type": "enum", + "members": { + "VERSION_DRAINAGE_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSION_DRAINAGE_STATUS_UNSPECIFIED" + } + }, + "VERSION_DRAINAGE_STATUS_DRAINING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSION_DRAINAGE_STATUS_DRAINING" + } + }, + "VERSION_DRAINAGE_STATUS_DRAINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSION_DRAINAGE_STATUS_DRAINED" + } + } + }, + "traits": { + "smithy.api#documentation": "Deprecated. Use `drainage_info` instead." + } + }, + "com.temporal.api#ComputeConfigSummary": { + "type": "structure", + "members": { + "scalingGroups": { + "target": "com.temporal.api#ComputeConfigSummaryScalingGroupsMap" + } + }, + "traits": { + "smithy.api#documentation": "A subset of information in ComputeConfig optimized for list views." + } + }, + "com.temporal.api#ComputeConfigScalingGroupSummary": { + "type": "structure", + "members": { + "taskQueueTypes": { + "target": "com.temporal.api#ComputeConfigScalingGroupSummaryTaskQueueTypesList" + }, + "providerType": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#ComputeConfigScalingGroupSummaryTaskQueueTypesItem": { + "type": "enum", + "members": { + "TASK_QUEUE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_UNSPECIFIED" + } + }, + "TASK_QUEUE_TYPE_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_WORKFLOW" + } + }, + "TASK_QUEUE_TYPE_ACTIVITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_ACTIVITY" + } + }, + "TASK_QUEUE_TYPE_NEXUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_QUEUE_TYPE_NEXUS" + } + } + }, + "traits": {} + }, + "com.temporal.api#ComputeConfigScalingGroupSummaryTaskQueueTypesList": { + "type": "list", + "member": { + "target": "com.temporal.api#ComputeConfigScalingGroupSummaryTaskQueueTypesItem" + }, + "traits": {} + }, + "com.temporal.api#ComputeConfigSummaryScalingGroupsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#ComputeConfigScalingGroupSummary" + }, + "traits": {} + }, + "com.temporal.api#ListWorkerDeploymentsResponseWorkerDeploymentsList": { + "type": "list", + "member": { + "target": "com.temporal.api#ListWorkerDeploymentsResponseWorkerDeploymentSummary" + }, + "traits": { + "smithy.api#documentation": "The list of worker deployments." + } + }, + "com.temporal.api#ListWorkerDeployments": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListWorkerDeploymentsRequest" + }, + "output": { + "target": "com.temporal.api#ListWorkerDeploymentsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/worker-deployments", + "code": 200 + }, + "smithy.api#documentation": "Lists all Worker Deployments that are tracked in the Namespace.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#DescribeWorkerDeploymentRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeWorkerDeploymentResponse": { + "type": "structure", + "members": { + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This value is returned so that it can be optionally passed to APIs\n that write to the Worker Deployment state to ensure that the state\n did not change between this read and a future write." + } + }, + "workerDeploymentInfo": { + "target": "com.temporal.api#WorkerDeploymentInfo" + } + }, + "traits": {} + }, + "com.temporal.api#WorkerDeploymentInfo": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identifies a Worker Deployment. Must be unique within the namespace." + } + }, + "versionSummaries": { + "target": "com.temporal.api#WorkerDeploymentInfoVersionSummariesList", + "traits": { + "smithy.api#documentation": "Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be\n cleaned up automatically if all the following conditions meet:\n - It does not receive new executions (is not current or ramping)\n - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status)\n - It is drained (see WorkerDeploymentVersionInfo.drainage_status)" + } + }, + "createTime": { + "target": "smithy.api#String" + }, + "routingConfig": { + "target": "com.temporal.api#RoutingConfig" + }, + "lastModifierIdentity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity of the last client who modified the configuration of this Deployment. Set to the\n `identity` value sent by APIs such as `SetWorkerDeploymentCurrentVersion` and\n `SetWorkerDeploymentRampingVersion`." + } + }, + "managerIdentity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity of the client that has the exclusive right to make changes to this Worker Deployment.\n Empty by default.\n If this is set, clients whose identity does not match `manager_identity` will not be able to make changes\n to this Worker Deployment. They can either set their own identity as the manager or unset the field to proceed." + } + }, + "routingConfigUpdateState": { + "target": "com.temporal.api#WorkerDeploymentInfoRoutingConfigUpdateState", + "traits": { + "smithy.api#documentation": "Indicates whether the routing_config has been fully propagated to all\n relevant task queues and their partitions." + } + } + }, + "traits": { + "smithy.api#documentation": "A Worker Deployment (Deployment, for short) represents all workers serving\n a shared set of Task Queues. Typically, a Deployment represents one service or\n application.\n A Deployment contains multiple Deployment Versions, each representing a different\n version of workers. (see documentation of WorkerDeploymentVersionInfo)\n Deployment records are created in Temporal server automatically when their\n first poller arrives to the server." + } + }, + "com.temporal.api#WorkerDeploymentInfoVersionSummariesList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkerDeploymentInfoWorkerDeploymentVersionSummary" + }, + "traits": { + "smithy.api#documentation": "Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be\n cleaned up automatically if all the following conditions meet:\n - It does not receive new executions (is not current or ramping)\n - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status)\n - It is drained (see WorkerDeploymentVersionInfo.drainage_status)" + } + }, + "com.temporal.api#WorkerDeploymentInfoRoutingConfigUpdateState": { + "type": "enum", + "members": { + "ROUTING_CONFIG_UPDATE_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROUTING_CONFIG_UPDATE_STATE_UNSPECIFIED" + } + }, + "ROUTING_CONFIG_UPDATE_STATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROUTING_CONFIG_UPDATE_STATE_IN_PROGRESS" + } + }, + "ROUTING_CONFIG_UPDATE_STATE_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROUTING_CONFIG_UPDATE_STATE_COMPLETED" + } + } + }, + "traits": { + "smithy.api#documentation": "Indicates whether the routing_config has been fully propagated to all\n relevant task queues and their partitions." + } + }, + "com.temporal.api#DescribeWorkerDeployment": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeWorkerDeploymentRequest" + }, + "output": { + "target": "com.temporal.api#DescribeWorkerDeploymentResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}", + "code": 200 + }, + "smithy.api#documentation": "Describes a Worker Deployment.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#CreateWorkerDeploymentRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The name of the Worker Deployment to create. If a Worker Deployment with\n this name already exists, an error will be returned." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this create request for idempotence. Typically UUIDv4." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#CreateWorkerDeploymentResponse": { + "type": "structure", + "members": { + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This value is returned so that it can be optionally passed to APIs that\n write to the WorkerDeployment state to ensure that the state did not\n change between this API call and a future write." + } + } + }, + "traits": {} + }, + "com.temporal.api#CreateWorkerDeployment": { + "type": "operation", + "input": { + "target": "com.temporal.api#CreateWorkerDeploymentRequest" + }, + "output": { + "target": "com.temporal.api#CreateWorkerDeploymentResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}", + "code": 200 + }, + "smithy.api#documentation": "Creates a new Worker Deployment.\n\n Experimental. This API might significantly change or be removed in a\n future release." + } + }, + "com.temporal.api#DeleteWorkerDeploymentRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "identity", + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DeleteWorkerDeploymentResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#DeleteWorkerDeployment": { + "type": "operation", + "input": { + "target": "com.temporal.api#DeleteWorkerDeploymentRequest" + }, + "output": { + "target": "com.temporal.api#DeleteWorkerDeploymentResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}", + "code": 200 + }, + "smithy.api#documentation": "Deletes records of (an old) Deployment. A deployment can only be deleted if\n it has no Version in it.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#SetWorkerDeploymentCurrentVersionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `build_id`." + } + }, + "buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The build id of the Version that you want to set as Current.\n Pass an empty value to set the Current Version to nil.\n A nil Current Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)" + } + }, + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. This can be the value of conflict_token from a Describe, or another Worker\n Deployment API. Passing a non-nil conflict token will cause this request to fail if the\n Deployment's configuration has been modified between the API call that generated the\n token and this one." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + }, + "ignoreMissingTaskQueues": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Optional. By default this request would be rejected if not all the expected Task Queues are\n being polled by the new Version, to protect against accidental removal of Task Queues, or\n worker health issues. Pass `true` here to bypass this protection.\n The set of expected Task Queues is the set of all the Task Queues that were ever poller by\n the existing Current Version of the Deployment, with the following exclusions:\n - Task Queues that are not used anymore (inferred by having empty backlog and a task\n add_rate of 0.)\n - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue\n having a different Current Version than the Current Version of this deployment.)\n WARNING: Do not set this flag unless you are sure that the missing task queue pollers are not\n needed. If the request is unexpectedly rejected due to missing pollers, then that means the\n pollers have not reached to the server yet. Only set this if you expect those pollers to\n never arrive." + } + }, + "allowNoPollers": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Optional. By default this request will be rejected if no pollers have been seen for the proposed\n Current Version, in order to protect users from routing tasks to pollers that do not exist, leading\n to possible timeouts. Pass `true` here to bypass this protection." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#SetWorkerDeploymentCurrentVersionResponse": { + "type": "structure", + "members": { + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This value is returned so that it can be optionally passed to APIs\n that write to the Worker Deployment state to ensure that the state\n did not change between this API call and a future write." + } + }, + "previousVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `previous_deployment_version`." + } + }, + "previousDeploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "The version that was current before executing this operation.\n Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the\n Current version info before calling this API. By passing the `conflict_token` got from the\n `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes\n between the two calls." + } + } + }, + "traits": {} + }, + "com.temporal.api#SetWorkerDeploymentCurrentVersion": { + "type": "operation", + "input": { + "target": "com.temporal.api#SetWorkerDeploymentCurrentVersionRequest" + }, + "output": { + "target": "com.temporal.api#SetWorkerDeploymentCurrentVersionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}/set-current-version", + "code": 200 + }, + "smithy.api#documentation": "Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping\n Version if it is the Version being set as Current.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#SetWorkerDeploymentManagerRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "managerIdentity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Arbitrary value for `manager_identity`.\n Empty will unset the field." + } + }, + "self": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True will set `manager_identity` to `identity`." + } + }, + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. This can be the value of conflict_token from a Describe, or another Worker\n Deployment API. Passing a non-nil conflict token will cause this request to fail if the\n Deployment's configuration has been modified between the API call that generated the\n token and this one." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Required. The identity of the client who initiated this request." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#SetWorkerDeploymentManagerResponse": { + "type": "structure", + "members": { + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This value is returned so that it can be optionally passed to APIs\n that write to the Worker Deployment state to ensure that the state\n did not change between this API call and a future write." + } + }, + "previousManagerIdentity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "What the `manager_identity` field was before this change.\n Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the\n manager identity before calling this API. By passing the `conflict_token` got from the\n `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes\n between the two calls." + } + } + }, + "traits": {} + }, + "com.temporal.api#SetWorkerDeploymentManager": { + "type": "operation", + "input": { + "target": "com.temporal.api#SetWorkerDeploymentManagerRequest" + }, + "output": { + "target": "com.temporal.api#SetWorkerDeploymentManagerResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}/set-manager", + "code": 200 + }, + "smithy.api#documentation": "Set/unset the ManagerIdentity of a Worker Deployment.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#SetWorkerDeploymentRampingVersionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "deploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `build_id`." + } + }, + "buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The build id of the Version that you want to ramp traffic to.\n Pass an empty value to set the Ramping Version to nil.\n A nil Ramping Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.)" + } + }, + "percentage": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Ramp percentage to set. Valid range: [0,100]." + } + }, + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. This can be the value of conflict_token from a Describe, or another Worker\n Deployment API. Passing a non-nil conflict token will cause this request to fail if the\n Deployment's configuration has been modified between the API call that generated the\n token and this one." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + }, + "ignoreMissingTaskQueues": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Optional. By default this request would be rejected if not all the expected Task Queues are\n being polled by the new Version, to protect against accidental removal of Task Queues, or\n worker health issues. Pass `true` here to bypass this protection.\n The set of expected Task Queues equals to all the Task Queues ever polled from the existing\n Current Version of the Deployment, with the following exclusions:\n - Task Queues that are not used anymore (inferred by having empty backlog and a task\n add_rate of 0.)\n - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue\n having a different Current Version than the Current Version of this deployment.)\n WARNING: Do not set this flag unless you are sure that the missing task queue poller are not\n needed. If the request is unexpectedly rejected due to missing pollers, then that means the\n pollers have not reached to the server yet. Only set this if you expect those pollers to\n never arrive.\n Note: this check only happens when the ramping version is about to change, not every time\n that the percentage changes. Also note that the check is against the deployment's Current\n Version, not the previous Ramping Version." + } + }, + "allowNoPollers": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Optional. By default this request will be rejected if no pollers have been seen for the proposed\n Current Version, in order to protect users from routing tasks to pollers that do not exist, leading\n to possible timeouts. Pass `true` here to bypass this protection." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#SetWorkerDeploymentRampingVersionResponse": { + "type": "structure", + "members": { + "conflictToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This value is returned so that it can be optionally passed to APIs\n that write to the Worker Deployment state to ensure that the state\n did not change between this API call and a future write." + } + }, + "previousVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. Use `previous_deployment_version`." + } + }, + "previousDeploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "The version that was ramping before executing this operation.\n Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the\n Ramping version info before calling this API. By passing the `conflict_token` got from the\n `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes\n between the two calls." + } + }, + "previousPercentage": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The ramping version percentage before executing this operation.\n Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the\n Ramping version info before calling this API. By passing the `conflict_token` got from the\n `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes\n between the two calls." + } + } + }, + "traits": {} + }, + "com.temporal.api#SetWorkerDeploymentRampingVersion": { + "type": "operation", + "input": { + "target": "com.temporal.api#SetWorkerDeploymentRampingVersionRequest" + }, + "output": { + "target": "com.temporal.api#SetWorkerDeploymentRampingVersionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}/set-ramping-version", + "code": 200 + }, + "smithy.api#documentation": "Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for\n gradual ramp to unversioned workers too.\n Experimental. This API might significantly change or be removed in a future release." + } + }, + "com.temporal.api#GetWorkerTaskReachabilityRequestBuildIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.temporal.api#GetWorkerTaskReachabilityRequestTaskQueuesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.temporal.api#GetWorkerTaskReachabilityRequestReachability": { + "type": "enum", + "members": { + "TASK_REACHABILITY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_REACHABILITY_UNSPECIFIED" + } + }, + "TASK_REACHABILITY_NEW_WORKFLOWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_REACHABILITY_NEW_WORKFLOWS" + } + }, + "TASK_REACHABILITY_EXISTING_WORKFLOWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_REACHABILITY_EXISTING_WORKFLOWS" + } + }, + "TASK_REACHABILITY_OPEN_WORKFLOWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_REACHABILITY_OPEN_WORKFLOWS" + } + }, + "TASK_REACHABILITY_CLOSED_WORKFLOWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_REACHABILITY_CLOSED_WORKFLOWS" + } + } + }, + "traits": {} + }, + "com.temporal.api#GetWorkerTaskReachabilityRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "buildIds": { + "target": "com.temporal.api#GetWorkerTaskReachabilityRequestBuildIdsList", + "traits": { + "smithy.api#httpQuery": "buildIds", + "smithy.api#documentation": "Build ids to retrieve reachability for. An empty string will be interpreted as an unversioned worker.\n The number of build ids that can be queried in a single API call is limited.\n Open source users can adjust this limit by setting the server's dynamic config value for\n `limit.reachabilityQueryBuildIds` with the caveat that this call can strain the visibility store." + } + }, + "taskQueues": { + "target": "com.temporal.api#GetWorkerTaskReachabilityRequestTaskQueuesList", + "traits": { + "smithy.api#httpQuery": "taskQueues", + "smithy.api#documentation": "Task queues to retrieve reachability for. Leave this empty to query for all task queues associated with given\n build ids in the namespace.\n Must specify at least one task queue if querying for an unversioned worker.\n The number of task queues that the server will fetch reachability information for is limited.\n See the `GetWorkerTaskReachabilityResponse` documentation for more information." + } + }, + "reachability": { + "target": "com.temporal.api#GetWorkerTaskReachabilityRequestReachability", + "traits": { + "smithy.api#httpQuery": "reachability", + "smithy.api#documentation": "Type of reachability to query for.\n `TASK_REACHABILITY_NEW_WORKFLOWS` is always returned in the response.\n Use `TASK_REACHABILITY_EXISTING_WORKFLOWS` if your application needs to respond to queries on closed workflows.\n Otherwise, use `TASK_REACHABILITY_OPEN_WORKFLOWS`. Default is `TASK_REACHABILITY_EXISTING_WORKFLOWS` if left\n unspecified.\n See the TaskReachability docstring for information about each enum variant." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#GetWorkerTaskReachabilityResponse": { + "type": "structure", + "members": { + "buildIdReachability": { + "target": "com.temporal.api#GetWorkerTaskReachabilityResponseBuildIdReachabilityList", + "traits": { + "smithy.api#documentation": "Task reachability, broken down by build id and then task queue.\n When requesting a large number of task queues or all task queues associated with the given build ids in a\n namespace, all task queues will be listed in the response but some of them may not contain reachability\n information due to a server enforced limit. When reaching the limit, task queues that reachability information\n could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue\n another call to get the reachability for those task queues.\n\n Open source users can adjust this limit by setting the server's dynamic config value for\n `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store." + } + } + }, + "traits": { + "smithy.api#documentation": "[cleanup-wv-pre-release]\n Deprecated. Use `DescribeTaskQueue`." + } + }, + "com.temporal.api#BuildIdReachability": { + "type": "structure", + "members": { + "buildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A build id or empty if unversioned." + } + }, + "taskQueueReachability": { + "target": "com.temporal.api#BuildIdReachabilityTaskQueueReachabilityList", + "traits": { + "smithy.api#documentation": "Reachability per task queue." + } + } + }, + "traits": { + "smithy.api#documentation": "Reachability of tasks for a worker by build id, in one or more task queues." + } + }, + "com.temporal.api#TaskQueueReachability": { + "type": "structure", + "members": { + "taskQueue": { + "target": "smithy.api#String" + }, + "reachability": { + "target": "com.temporal.api#TaskQueueReachabilityReachabilityList", + "traits": { + "smithy.api#documentation": "Task reachability for a worker in a single task queue.\n See the TaskReachability docstring for information about each enum variant.\n If reachability is empty, this worker is considered unreachable in this task queue." + } + } + }, + "traits": { + "smithy.api#documentation": "Reachability of tasks for a worker on a single task queue." + } + }, + "com.temporal.api#TaskQueueReachabilityReachabilityItem": { + "type": "enum", + "members": { + "TASK_REACHABILITY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_REACHABILITY_UNSPECIFIED" + } + }, + "TASK_REACHABILITY_NEW_WORKFLOWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_REACHABILITY_NEW_WORKFLOWS" + } + }, + "TASK_REACHABILITY_EXISTING_WORKFLOWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_REACHABILITY_EXISTING_WORKFLOWS" + } + }, + "TASK_REACHABILITY_OPEN_WORKFLOWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_REACHABILITY_OPEN_WORKFLOWS" + } + }, + "TASK_REACHABILITY_CLOSED_WORKFLOWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TASK_REACHABILITY_CLOSED_WORKFLOWS" + } + } + }, + "traits": {} + }, + "com.temporal.api#TaskQueueReachabilityReachabilityList": { + "type": "list", + "member": { + "target": "com.temporal.api#TaskQueueReachabilityReachabilityItem" + }, + "traits": { + "smithy.api#documentation": "Task reachability for a worker in a single task queue.\n See the TaskReachability docstring for information about each enum variant.\n If reachability is empty, this worker is considered unreachable in this task queue." + } + }, + "com.temporal.api#BuildIdReachabilityTaskQueueReachabilityList": { + "type": "list", + "member": { + "target": "com.temporal.api#TaskQueueReachability" + }, + "traits": { + "smithy.api#documentation": "Reachability per task queue." + } + }, + "com.temporal.api#GetWorkerTaskReachabilityResponseBuildIdReachabilityList": { + "type": "list", + "member": { + "target": "com.temporal.api#BuildIdReachability" + }, + "traits": { + "smithy.api#documentation": "Task reachability, broken down by build id and then task queue.\n When requesting a large number of task queues or all task queues associated with the given build ids in a\n namespace, all task queues will be listed in the response but some of them may not contain reachability\n information due to a server enforced limit. When reaching the limit, task queues that reachability information\n could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue\n another call to get the reachability for those task queues.\n\n Open source users can adjust this limit by setting the server's dynamic config value for\n `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store." + } + }, + "com.temporal.api#GetWorkerTaskReachability": { + "type": "operation", + "input": { + "target": "com.temporal.api#GetWorkerTaskReachabilityRequest" + }, + "output": { + "target": "com.temporal.api#GetWorkerTaskReachabilityResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/worker-task-reachability", + "code": 200 + }, + "smithy.api#documentation": "Deprecated. Use `DescribeTaskQueue`.\n\n Fetches task reachability to determine whether a worker may be retired.\n The request may specify task queues to query for or let the server fetch all task queues mapped to the given\n build IDs.\n\n When requesting a large number of task queues or all task queues associated with the given build ids in a\n namespace, all task queues will be listed in the response but some of them may not contain reachability\n information due to a server enforced limit. When reaching the limit, task queues that reachability information\n could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue\n another call to get the reachability for those task queues.\n\n Open source users can adjust this limit by setting the server's dynamic config value for\n `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store." + } + }, + "com.temporal.api#ListWorkersRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "pageSize" + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken" + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#documentation": "`query` in ListWorkers is used to filter workers based on worker attributes.\n Supported attributes:\n* WorkerInstanceKey\n* WorkerIdentity\n* HostName\n* TaskQueue\n* DeploymentName\n* BuildId\n* SdkName\n* SdkVersion\n* StartTime\n* Status" + } + }, + "includeSystemWorkers": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "includeSystemWorkers", + "smithy.api#documentation": "When true, the response will include system workers that are created implicitly\n by the server and not by the user. By default, system workers are excluded." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListWorkersResponse": { + "type": "structure", + "members": { + "workersInfo": { + "target": "com.temporal.api#ListWorkersResponseWorkersInfoList", + "traits": { + "smithy.api#documentation": "Deprecated: Use workers instead. This field returns full WorkerInfo which\n includes expensive runtime metrics. We will stop populating this field in the future." + } + }, + "workers": { + "target": "com.temporal.api#ListWorkersResponseWorkersList", + "traits": { + "smithy.api#documentation": "Limited worker information." + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Next page token" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkerInfo": { + "type": "structure", + "members": { + "workerHeartbeat": { + "target": "com.temporal.api#WorkerHeartbeat" + } + }, + "traits": { + "smithy.api#documentation": "Detailed worker information." + } + }, + "com.temporal.api#WorkerHeartbeat": { + "type": "structure", + "members": { + "workerInstanceKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker identifier, should be unique for the namespace.\n It is distinct from worker identity, which is not necessarily namespace-unique." + } + }, + "workerIdentity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker identity, set by the client, may not be unique.\n Usually host_name+(user group name)+process_id, but can be overwritten by the user." + } + }, + "hostInfo": { + "target": "com.temporal.api#WorkerHostInfo", + "traits": { + "smithy.api#documentation": "Worker host information." + } + }, + "taskQueue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Task queue this worker is polling for tasks." + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion" + }, + "sdkName": { + "target": "smithy.api#String" + }, + "sdkVersion": { + "target": "smithy.api#String" + }, + "status": { + "target": "com.temporal.api#WorkerHeartbeatStatus", + "traits": { + "smithy.api#documentation": "Worker status. Defined by SDK." + } + }, + "startTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker start time.\n It can be used to determine worker uptime. (current time - start time)" + } + }, + "heartbeatTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timestamp of this heartbeat, coming from the worker. Worker should set it to \"now\".\n Note that this timestamp comes directly from the worker and is subject to workers' clock skew." + } + }, + "elapsedSinceLastHeartbeat": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Elapsed time since the last heartbeat from the worker." + } + }, + "workflowTaskSlotsInfo": { + "target": "com.temporal.api#WorkerSlotsInfo" + }, + "activityTaskSlotsInfo": { + "target": "com.temporal.api#WorkerSlotsInfo" + }, + "nexusTaskSlotsInfo": { + "target": "com.temporal.api#WorkerSlotsInfo" + }, + "localActivitySlotsInfo": { + "target": "com.temporal.api#WorkerSlotsInfo" + }, + "workflowPollerInfo": { + "target": "com.temporal.api#WorkerPollerInfo" + }, + "workflowStickyPollerInfo": { + "target": "com.temporal.api#WorkerPollerInfo" + }, + "activityPollerInfo": { + "target": "com.temporal.api#WorkerPollerInfo" + }, + "nexusPollerInfo": { + "target": "com.temporal.api#WorkerPollerInfo" + }, + "totalStickyCacheHit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "A Workflow Task found a cached Workflow Execution to run against." + } + }, + "totalStickyCacheMiss": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "A Workflow Task did not find a cached Workflow execution to run against." + } + }, + "currentStickyCacheSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Current cache size, expressed in number of Workflow Executions." + } + }, + "plugins": { + "target": "com.temporal.api#WorkerHeartbeatPluginsList", + "traits": { + "smithy.api#documentation": "Plugins currently in use by this SDK." + } + }, + "drivers": { + "target": "com.temporal.api#WorkerHeartbeatDriversList", + "traits": { + "smithy.api#documentation": "Storage drivers in use by this SDK." + } + } + }, + "traits": { + "smithy.api#documentation": "Worker info message, contains information about the worker and its current state.\n All information is provided by the worker itself.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: Removing those words make names less clear. --)" + } + }, + "com.temporal.api#WorkerHostInfo": { + "type": "structure", + "members": { + "hostName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker host identifier." + } + }, + "workerGroupingKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker grouping identifier. A key to group workers that share the same client+namespace+process.\n This will be used to build the worker command nexus task queue name:\n \"temporal-sys/worker-commands/{worker_grouping_key}\"" + } + }, + "processId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker process identifier. This id only needs to be unique\n within one host (so using e.g. a unix pid would be appropriate)." + } + }, + "currentHostCpuUsage": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "System used CPU as a float in the range [0.0, 1.0] where 1.0 is defined as all\n cores on the host pegged." + } + }, + "currentHostMemUsage": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "System used memory as a float in the range [0.0, 1.0] where 1.0 is defined as\n all available memory on the host is used." + } + } + }, + "traits": { + "smithy.api#documentation": "Holds everything needed to identify the worker host/process context" + } + }, + "com.temporal.api#WorkerHeartbeatStatus": { + "type": "enum", + "members": { + "WORKER_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_STATUS_UNSPECIFIED" + } + }, + "WORKER_STATUS_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_STATUS_RUNNING" + } + }, + "WORKER_STATUS_SHUTTING_DOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_STATUS_SHUTTING_DOWN" + } + }, + "WORKER_STATUS_SHUTDOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_STATUS_SHUTDOWN" + } + } + }, + "traits": { + "smithy.api#documentation": "Worker status. Defined by SDK." + } + }, + "com.temporal.api#WorkerSlotsInfo": { + "type": "structure", + "members": { + "currentAvailableSlots": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of slots available for the worker to specific tasks.\n May be -1 if the upper bound is not known." + } + }, + "currentUsedSlots": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of slots used by the worker for specific tasks." + } + }, + "slotSupplierKind": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Kind of the slot supplier, which is used to determine how the slots are allocated.\n Possible values: \"Fixed | ResourceBased | Custom String\"" + } + }, + "totalProcessedTasks": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of tasks processed (completed both successfully and unsuccesfully, or any other way)\n by the worker since the worker started. This is a cumulative counter." + } + }, + "totalFailedTasks": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of failed tasks processed by the worker so far." + } + }, + "lastIntervalProcessedTasks": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of tasks processed in since the last heartbeat from the worker.\n This is a cumulative counter, and it is reset to 0 each time the worker sends a heartbeat.\n Contains both successful and failed tasks." + } + }, + "lastIntervalFailureTasks": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of failed tasks processed since the last heartbeat from the worker." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkerPollerInfo": { + "type": "structure", + "members": { + "currentPollers": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of polling RPCs that are currently in flight." + } + }, + "lastSuccessfulPollTime": { + "target": "smithy.api#String" + }, + "isAutoscaling": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Set true if the number of concurrent pollers is auto-scaled" + } + } + }, + "traits": {} + }, + "com.temporal.api#PluginInfo": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the plugin, required." + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The version of the plugin, may be empty." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkerHeartbeatPluginsList": { + "type": "list", + "member": { + "target": "com.temporal.api#PluginInfo" + }, + "traits": { + "smithy.api#documentation": "Plugins currently in use by this SDK." + } + }, + "com.temporal.api#StorageDriverInfo": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the driver, required." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkerHeartbeatDriversList": { + "type": "list", + "member": { + "target": "com.temporal.api#StorageDriverInfo" + }, + "traits": { + "smithy.api#documentation": "Storage drivers in use by this SDK." + } + }, + "com.temporal.api#ListWorkersResponseWorkersInfoList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkerInfo" + }, + "traits": { + "smithy.api#documentation": "Deprecated: Use workers instead. This field returns full WorkerInfo which\n includes expensive runtime metrics. We will stop populating this field in the future." + } + }, + "com.temporal.api#WorkerListInfo": { + "type": "structure", + "members": { + "workerInstanceKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker identifier, should be unique for the namespace.\n It is distinct from worker identity, which is not necessarily namespace-unique." + } + }, + "workerIdentity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker identity, set by the client, may not be unique.\n Usually host_name+(user group name)+process_id, but can be overwritten by the user." + } + }, + "taskQueue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Task queue this worker is polling for tasks." + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion" + }, + "sdkName": { + "target": "smithy.api#String" + }, + "sdkVersion": { + "target": "smithy.api#String" + }, + "status": { + "target": "com.temporal.api#WorkerListInfoStatus", + "traits": { + "smithy.api#documentation": "Worker status. Defined by SDK." + } + }, + "startTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker start time.\n It can be used to determine worker uptime. (current time - start time)" + } + }, + "hostName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker host identifier." + } + }, + "workerGroupingKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker grouping identifier. A key to group workers that share the same client+namespace+process.\n This will be used to build the worker command nexus task queue name:\n \"temporal-sys/worker-commands/{worker_grouping_key}\"" + } + }, + "processId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker process identifier. This id only needs to be unique\n within one host (so using e.g. a unix pid would be appropriate)." + } + }, + "plugins": { + "target": "com.temporal.api#WorkerListInfoPluginsList", + "traits": { + "smithy.api#documentation": "Plugins currently in use by this SDK." + } + }, + "drivers": { + "target": "com.temporal.api#WorkerListInfoDriversList", + "traits": { + "smithy.api#documentation": "Storage drivers in use by this SDK." + } + } + }, + "traits": { + "smithy.api#documentation": "Limited worker information returned in the list response.\n When adding fields here, ensure that it is also added to WorkerInfo (as it carries the full worker information)." + } + }, + "com.temporal.api#WorkerListInfoStatus": { + "type": "enum", + "members": { + "WORKER_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_STATUS_UNSPECIFIED" + } + }, + "WORKER_STATUS_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_STATUS_RUNNING" + } + }, + "WORKER_STATUS_SHUTTING_DOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_STATUS_SHUTTING_DOWN" + } + }, + "WORKER_STATUS_SHUTDOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKER_STATUS_SHUTDOWN" + } + } + }, + "traits": { + "smithy.api#documentation": "Worker status. Defined by SDK." + } + }, + "com.temporal.api#WorkerListInfoPluginsList": { + "type": "list", + "member": { + "target": "com.temporal.api#PluginInfo" + }, + "traits": { + "smithy.api#documentation": "Plugins currently in use by this SDK." + } + }, + "com.temporal.api#WorkerListInfoDriversList": { + "type": "list", + "member": { + "target": "com.temporal.api#StorageDriverInfo" + }, + "traits": { + "smithy.api#documentation": "Storage drivers in use by this SDK." + } + }, + "com.temporal.api#ListWorkersResponseWorkersList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkerListInfo" + }, + "traits": { + "smithy.api#documentation": "Limited worker information." + } + }, + "com.temporal.api#ListWorkers": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListWorkersRequest" + }, + "output": { + "target": "com.temporal.api#ListWorkersResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/workers", + "code": 200 + }, + "smithy.api#documentation": "ListWorkers is a visibility API to list worker status information in a specific namespace." + } + }, + "com.temporal.api#DescribeWorkerRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace this worker belongs to." + } + }, + "workerInstanceKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Worker instance key to describe." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeWorkerResponse": { + "type": "structure", + "members": { + "workerInfo": { + "target": "com.temporal.api#WorkerInfo" + } + }, + "traits": {} + }, + "com.temporal.api#DescribeWorker": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeWorkerRequest" + }, + "output": { + "target": "com.temporal.api#DescribeWorkerResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/workers/describe/{workerInstanceKey}", + "code": 200 + }, + "smithy.api#documentation": "DescribeWorker returns information about the specified worker." + } + }, + "com.temporal.api#WorkerSelector": { + "type": "structure", + "members": { + "workerInstanceKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Worker instance key to which the command should be sent." + } + } + }, + "traits": { + "smithy.api#documentation": "This is used to send commands to a specific worker or a group of workers.\n Right now, it is used to send commands to a specific worker instance.\n Will be extended to be able to send command to multiple workers." + } + }, + "com.temporal.api#FetchWorkerConfigRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace this worker belongs to." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for sending worker command, can be used for audit purpose." + } + }, + "selector": { + "target": "com.temporal.api#WorkerSelector", + "traits": { + "smithy.api#documentation": "Defines which workers should receive this command.\n only single worker is supported at this time." + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains the worker grouping key." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#FetchWorkerConfigResponse": { + "type": "structure", + "members": { + "workerConfig": { + "target": "com.temporal.api#WorkerConfig", + "traits": { + "smithy.api#documentation": "The worker configuration." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkerConfig": { + "type": "structure", + "members": { + "workflowCacheSize": { + "target": "smithy.api#Integer" + }, + "simplePollerBehavior": { + "target": "com.temporal.api#WorkerConfigSimplePollerBehavior" + }, + "autoscalingPollerBehavior": { + "target": "com.temporal.api#WorkerConfigAutoscalingPollerBehavior" + } + }, + "traits": {} + }, + "com.temporal.api#WorkerConfigSimplePollerBehavior": { + "type": "structure", + "members": { + "maxPollers": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.temporal.api#WorkerConfigAutoscalingPollerBehavior": { + "type": "structure", + "members": { + "minPollers": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "At least this many poll calls will always be attempted (assuming slots are available).\n Cannot be zero." + } + }, + "maxPollers": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "At most this many poll calls will ever be open at once. Must be >= `minimum`." + } + }, + "initialPollers": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "This many polls will be attempted initially before scaling kicks in. Must be between\n `minimum` and `maximum`." + } + } + }, + "traits": {} + }, + "com.temporal.api#FetchWorkerConfig": { + "type": "operation", + "input": { + "target": "com.temporal.api#FetchWorkerConfigRequest" + }, + "output": { + "target": "com.temporal.api#FetchWorkerConfigResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workers/fetch-config", + "code": 200 + }, + "smithy.api#documentation": "FetchWorkerConfig returns the worker configuration for a specific worker." + } + }, + "com.temporal.api#RecordWorkerHeartbeatRequestWorkerHeartbeatList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkerHeartbeat" + }, + "traits": {} + }, + "com.temporal.api#RecordWorkerHeartbeatRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace this worker belongs to." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "workerHeartbeat": { + "target": "com.temporal.api#RecordWorkerHeartbeatRequestWorkerHeartbeatList" + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains the worker grouping key." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RecordWorkerHeartbeatResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#RecordWorkerHeartbeat": { + "type": "operation", + "input": { + "target": "com.temporal.api#RecordWorkerHeartbeatRequest" + }, + "output": { + "target": "com.temporal.api#RecordWorkerHeartbeatResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workers/heartbeat", + "code": 200 + }, + "smithy.api#documentation": "WorkerHeartbeat receive heartbeat request from the worker." + } + }, + "com.temporal.api#UpdateWorkerConfigRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace this worker belongs to." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for sending worker command, can be used for audit purpose." + } + }, + "workerConfig": { + "target": "com.temporal.api#WorkerConfig", + "traits": { + "smithy.api#documentation": "Partial updates are accepted and controlled by update_mask.\n The worker configuration to set." + } + }, + "updateMask": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Controls which fields from `worker_config` will be applied" + } + }, + "selector": { + "target": "com.temporal.api#WorkerSelector", + "traits": { + "smithy.api#documentation": "Defines which workers should receive this command." + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Resource ID for routing. Contains the worker grouping key." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateWorkerConfigResponse": { + "type": "structure", + "members": { + "workerConfig": { + "target": "com.temporal.api#WorkerConfig", + "traits": { + "smithy.api#documentation": "The worker configuration. Will be returned if the command was sent to a single worker." + } + } + }, + "traits": {} + }, + "com.temporal.api#UpdateWorkerConfig": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateWorkerConfigRequest" + }, + "output": { + "target": "com.temporal.api#UpdateWorkerConfigResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workers/update-config", + "code": 200 + }, + "smithy.api#documentation": "UpdateWorkerConfig updates the worker configuration of one or more workers.\n Can be used to partially update the worker configuration.\n Can be used to update the configuration of multiple workers." + } + }, + "com.temporal.api#CountWorkflowExecutionsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#CountWorkflowExecutionsResponse": { + "type": "structure", + "members": { + "count": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If `query` is not grouping by any field, the count is an approximate number\n of workflows that matches the query.\n If `query` is grouping by a field, the count is simply the sum of the counts\n of the groups returned in the response. This number can be smaller than the\n total number of workflows matching the query." + } + }, + "groups": { + "target": "com.temporal.api#CountWorkflowExecutionsResponseGroupsList", + "traits": { + "smithy.api#documentation": "`groups` contains the groups if the request is grouping by a field.\n The list might not be complete, and the counts of each group is approximate." + } + } + }, + "traits": {} + }, + "com.temporal.api#CountWorkflowExecutionsResponseAggregationGroup": { + "type": "structure", + "members": { + "groupValues": { + "target": "com.temporal.api#CountWorkflowExecutionsResponseAggregationGroupGroupValuesList" + }, + "count": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#CountWorkflowExecutionsResponseAggregationGroupGroupValuesList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.temporal.api#CountWorkflowExecutionsResponseGroupsList": { + "type": "list", + "member": { + "target": "com.temporal.api#CountWorkflowExecutionsResponseAggregationGroup" + }, + "traits": { + "smithy.api#documentation": "`groups` contains the groups if the request is grouping by a field.\n The list might not be complete, and the counts of each group is approximate." + } + }, + "com.temporal.api#CountWorkflowExecutions": { + "type": "operation", + "input": { + "target": "com.temporal.api#CountWorkflowExecutionsRequest" + }, + "output": { + "target": "com.temporal.api#CountWorkflowExecutionsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/workflow-count", + "code": 200 + }, + "smithy.api#documentation": "CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace." + } + }, + "com.temporal.api#ListWorkflowRulesRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListWorkflowRulesResponse": { + "type": "structure", + "members": { + "rules": { + "target": "com.temporal.api#ListWorkflowRulesResponseRulesList" + }, + "nextPageToken": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowRule": { + "type": "structure", + "members": { + "createTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Rule creation time." + } + }, + "spec": { + "target": "com.temporal.api#WorkflowRuleSpec", + "traits": { + "smithy.api#documentation": "Rule specification" + } + }, + "createdByIdentity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity of the actor that created the rule\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: It is better reflect the intent this way, we will also have updated_by. --)\n (-- api-linter: core::0142::time-field-names=disabled\n aip.dev/not-precedent: Same as above. All other options sounds clumsy --)" + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Rule description." + } + } + }, + "traits": { + "smithy.api#documentation": "WorkflowRule describes a rule that can be applied to any workflow in this namespace." + } + }, + "com.temporal.api#WorkflowRuleSpec": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the new workflow rule. Must be unique within the namespace.\n Can be set by the user, and can have business meaning." + } + }, + "activityStart": { + "target": "com.temporal.api#WorkflowRuleSpecActivityStartingTrigger" + }, + "visibilityQuery": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Restricted Visibility query.\n This query is used to filter workflows in this namespace to which this rule should apply.\n It is applied to any running workflow each time a triggering event occurs, before the trigger predicate is evaluated.\n The following workflow attributes are supported:\n - WorkflowType\n - WorkflowId\n - StartTime\n - ExecutionStatus" + } + }, + "actions": { + "target": "com.temporal.api#WorkflowRuleSpecActionsList", + "traits": { + "smithy.api#documentation": "WorkflowRuleAction to be taken when the rule is triggered and predicate is matched." + } + }, + "expirationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Expiration time of the rule. After this time, the rule will be deleted.\n Can be empty if the rule should never expire." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowRuleSpecActivityStartingTrigger": { + "type": "structure", + "members": { + "predicate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Activity predicate is a SQL-like string filter parameter.\n It is used to match against workflow data.\n The following activity attributes are supported as part of the predicate:\n - ActivityType: An Activity Type is the mapping of a name to an Activity Definition..\n - ActivityId: The ID of the activity.\n - ActivityAttempt: The number attempts of the activity.\n - BackoffInterval: The current amount of time between scheduled attempts of the activity.\n - ActivityStatus: The status of the activity. Can be one of \"Scheduled\", \"Started\", \"Paused\".\n - TaskQueue: The name of the task queue the workflow specified that the activity should run on.\n Activity predicate support the following operators:\n * =, !=, >, >=, <, <=\n * AND, OR, ()\n * BETWEEN ... AND\n STARTS_WITH" + } + } + }, + "traits": { + "smithy.api#documentation": "Activity trigger will be triggered when an activity is about to start." + } + }, + "com.temporal.api#WorkflowRuleAction": { + "type": "structure", + "members": { + "activityPause": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowRuleSpecActionsList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkflowRuleAction" + }, + "traits": { + "smithy.api#documentation": "WorkflowRuleAction to be taken when the rule is triggered and predicate is matched." + } + }, + "com.temporal.api#ListWorkflowRulesResponseRulesList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkflowRule" + }, + "traits": {} + }, + "com.temporal.api#ListWorkflowRules": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListWorkflowRulesRequest" + }, + "output": { + "target": "com.temporal.api#ListWorkflowRulesResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/workflow-rules", + "code": 200 + }, + "smithy.api#documentation": "Return all namespace workflow rules" + } + }, + "com.temporal.api#CreateWorkflowRuleRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "spec": { + "target": "com.temporal.api#WorkflowRuleSpec", + "traits": { + "smithy.api#documentation": "The rule specification ." + } + }, + "forceScan": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, the rule will be applied to the currently running workflows via batch job.\n If not set , the rule will only be applied when triggering condition is satisfied.\n visibility_query in the rule will be used to select the workflows to apply the rule to." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe requests. Typically should be UUID." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity of the actor who created the rule. Will be stored with the rule." + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Rule description.Will be stored with the rule." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#CreateWorkflowRuleResponse": { + "type": "structure", + "members": { + "rule": { + "target": "com.temporal.api#WorkflowRule", + "traits": { + "smithy.api#documentation": "Created rule." + } + }, + "jobId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Batch Job ID if force-scan flag was provided. Otherwise empty." + } + } + }, + "traits": {} + }, + "com.temporal.api#CreateWorkflowRule": { + "type": "operation", + "input": { + "target": "com.temporal.api#CreateWorkflowRuleRequest" + }, + "output": { + "target": "com.temporal.api#CreateWorkflowRuleResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflow-rules", + "code": 200 + }, + "smithy.api#documentation": "Create a new workflow rule. The rules are used to control the workflow execution.\n The rule will be applied to all running and new workflows in the namespace.\n If the rule with such ID already exist this call will fail\n Note: the rules are part of namespace configuration and will be stored in the namespace config.\n Namespace config is eventually consistent." + } + }, + "com.temporal.api#DescribeWorkflowRuleRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ruleId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "User-specified ID of the rule to read. Unique within the namespace." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeWorkflowRuleResponse": { + "type": "structure", + "members": { + "rule": { + "target": "com.temporal.api#WorkflowRule", + "traits": { + "smithy.api#documentation": "The rule that was read." + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeWorkflowRule": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeWorkflowRuleRequest" + }, + "output": { + "target": "com.temporal.api#DescribeWorkflowRuleResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/workflow-rules/{ruleId}", + "code": 200 + }, + "smithy.api#documentation": "DescribeWorkflowRule return the rule specification for existing rule id.\n If there is no rule with such id - NOT FOUND error will be returned." + } + }, + "com.temporal.api#DeleteWorkflowRuleRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ruleId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "ID of the rule to delete. Unique within the namespace." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DeleteWorkflowRuleResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#DeleteWorkflowRule": { + "type": "operation", + "input": { + "target": "com.temporal.api#DeleteWorkflowRuleRequest" + }, + "output": { + "target": "com.temporal.api#DeleteWorkflowRuleResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/v1/namespaces/{namespace}/workflow-rules/{ruleId}", + "code": 200 + }, + "smithy.api#documentation": "Delete rule by rule id" + } + }, + "com.temporal.api#ListWorkflowExecutionsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "pageSize" + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken" + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListWorkflowExecutionsResponse": { + "type": "structure", + "members": { + "executions": { + "target": "com.temporal.api#ListWorkflowExecutionsResponseExecutionsList" + }, + "nextPageToken": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#ListWorkflowExecutionsResponseExecutionsList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkflowExecutionInfo" + }, + "traits": {} + }, + "com.temporal.api#ListWorkflowExecutions": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListWorkflowExecutionsRequest" + }, + "output": { + "target": "com.temporal.api#ListWorkflowExecutionsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/workflows", + "code": 200 + }, + "smithy.api#documentation": "ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace." + } + }, + "com.temporal.api#DescribeWorkflowExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "execution_workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "execution.workflowId" + } + }, + "execution_runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "execution.runId" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DescribeWorkflowExecutionResponse": { + "type": "structure", + "members": { + "executionConfig": { + "target": "com.temporal.api#WorkflowExecutionConfig" + }, + "workflowExecutionInfo": { + "target": "com.temporal.api#WorkflowExecutionInfo" + }, + "pendingActivities": { + "target": "com.temporal.api#DescribeWorkflowExecutionResponsePendingActivitiesList" + }, + "pendingChildren": { + "target": "com.temporal.api#DescribeWorkflowExecutionResponsePendingChildrenList" + }, + "pendingWorkflowTask": { + "target": "com.temporal.api#PendingWorkflowTaskInfo" + }, + "callbacks": { + "target": "com.temporal.api#DescribeWorkflowExecutionResponseCallbacksList" + }, + "pendingNexusOperations": { + "target": "com.temporal.api#DescribeWorkflowExecutionResponsePendingNexusOperationsList" + }, + "workflowExtendedInfo": { + "target": "com.temporal.api#WorkflowExecutionExtendedInfo" + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionConfig": { + "type": "structure", + "members": { + "taskQueue": { + "target": "com.temporal.api#TaskQueue" + }, + "workflowExecutionTimeout": { + "target": "smithy.api#String" + }, + "workflowRunTimeout": { + "target": "smithy.api#String" + }, + "defaultWorkflowTaskTimeout": { + "target": "smithy.api#String" + }, + "userMetadata": { + "target": "com.temporal.api#UserMetadata", + "traits": { + "smithy.api#documentation": "User metadata provided on start workflow." + } + } + }, + "traits": {} + }, + "com.temporal.api#PendingActivityInfo": { + "type": "structure", + "members": { + "activityId": { + "target": "smithy.api#String" + }, + "activityType": { + "target": "com.temporal.api#ActivityType" + }, + "state": { + "target": "com.temporal.api#PendingActivityInfoState" + }, + "heartbeatDetails": { + "target": "com.temporal.api#Payloads" + }, + "lastHeartbeatTime": { + "target": "smithy.api#String" + }, + "lastStartedTime": { + "target": "smithy.api#String" + }, + "attempt": { + "target": "smithy.api#Integer" + }, + "maximumAttempts": { + "target": "smithy.api#Integer" + }, + "scheduledTime": { + "target": "smithy.api#String" + }, + "expirationTime": { + "target": "smithy.api#String" + }, + "lastFailure": { + "target": "com.temporal.api#Failure" + }, + "lastWorkerIdentity": { + "target": "smithy.api#String" + }, + "lastIndependentlyAssignedBuildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. This means the activity is independently versioned and not bound to the build ID of its workflow.\n The activity will use the build id in this field instead.\n If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning\n rules." + } + }, + "lastWorkerVersionStamp": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Deprecated. The version stamp of the worker to whom this activity was most recently dispatched\n This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + }, + "currentRetryInterval": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time activity will wait until the next retry.\n If activity is currently running it will be next retry interval if activity failed.\n If activity is currently waiting it will be current retry interval.\n If there will be no retry it will be null." + } + }, + "lastAttemptCompleteTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the last activity attempt was completed. If activity has not been completed yet then it will be null." + } + }, + "nextAttemptScheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Next time when activity will be scheduled.\n If activity is currently scheduled or started it will be null." + } + }, + "paused": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Indicates if activity is paused." + } + }, + "lastDeployment": { + "target": "com.temporal.api#Deployment", + "traits": { + "smithy.api#documentation": "The deployment this activity was dispatched to most recently. Present only if the activity\n was dispatched to a versioned worker.\n Deprecated. Use `last_deployment_version`." + } + }, + "lastWorkerDeploymentVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The Worker Deployment Version this activity was dispatched to most recently.\n Deprecated. Use `last_deployment_version`." + } + }, + "lastDeploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "The Worker Deployment Version this activity was dispatched to most recently.\n If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata. If this message is not present, or any fields are not\n present, they inherit the values from the workflow." + } + }, + "pauseInfo": { + "target": "com.temporal.api#PendingActivityInfoPauseInfo" + }, + "activityOptions": { + "target": "com.temporal.api#ActivityOptions", + "traits": { + "smithy.api#documentation": "Current activity options. May be different from the one used to start the activity." + } + } + }, + "traits": {} + }, + "com.temporal.api#PendingActivityInfoState": { + "type": "enum", + "members": { + "PENDING_ACTIVITY_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_UNSPECIFIED" + } + }, + "PENDING_ACTIVITY_STATE_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_SCHEDULED" + } + }, + "PENDING_ACTIVITY_STATE_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_STARTED" + } + }, + "PENDING_ACTIVITY_STATE_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_CANCEL_REQUESTED" + } + }, + "PENDING_ACTIVITY_STATE_PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_PAUSED" + } + }, + "PENDING_ACTIVITY_STATE_PAUSE_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_ACTIVITY_STATE_PAUSE_REQUESTED" + } + } + }, + "traits": {} + }, + "com.temporal.api#PendingActivityInfoPauseInfo": { + "type": "structure", + "members": { + "pauseTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the activity was paused." + } + }, + "manual": { + "target": "com.temporal.api#PauseInfoManual", + "traits": { + "smithy.api#documentation": "activity was paused by the manual intervention" + } + }, + "rule": { + "target": "com.temporal.api#PauseInfoRule", + "traits": { + "smithy.api#documentation": "activity was paused by the rule" + } + } + }, + "traits": {} + }, + "com.temporal.api#PauseInfoManual": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the actor that paused the activity." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for pausing the activity." + } + } + }, + "traits": {} + }, + "com.temporal.api#PauseInfoRule": { + "type": "structure", + "members": { + "ruleId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The rule that paused the activity." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the actor that created the rule." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason why rule was created. Populated from rule description." + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeWorkflowExecutionResponsePendingActivitiesList": { + "type": "list", + "member": { + "target": "com.temporal.api#PendingActivityInfo" + }, + "traits": {} + }, + "com.temporal.api#PendingChildExecutionInfo": { + "type": "structure", + "members": { + "workflowId": { + "target": "smithy.api#String" + }, + "runId": { + "target": "smithy.api#String" + }, + "workflowTypeName": { + "target": "smithy.api#String" + }, + "initiatedId": { + "target": "smithy.api#String" + }, + "parentClosePolicy": { + "target": "com.temporal.api#PendingChildExecutionInfoParentClosePolicy", + "traits": { + "smithy.api#documentation": "Default: PARENT_CLOSE_POLICY_TERMINATE." + } + } + }, + "traits": {} + }, + "com.temporal.api#PendingChildExecutionInfoParentClosePolicy": { + "type": "enum", + "members": { + "PARENT_CLOSE_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARENT_CLOSE_POLICY_UNSPECIFIED" + } + }, + "PARENT_CLOSE_POLICY_TERMINATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARENT_CLOSE_POLICY_TERMINATE" + } + }, + "PARENT_CLOSE_POLICY_ABANDON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARENT_CLOSE_POLICY_ABANDON" + } + }, + "PARENT_CLOSE_POLICY_REQUEST_CANCEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARENT_CLOSE_POLICY_REQUEST_CANCEL" + } + } + }, + "traits": { + "smithy.api#documentation": "Default: PARENT_CLOSE_POLICY_TERMINATE." + } + }, + "com.temporal.api#DescribeWorkflowExecutionResponsePendingChildrenList": { + "type": "list", + "member": { + "target": "com.temporal.api#PendingChildExecutionInfo" + }, + "traits": {} + }, + "com.temporal.api#PendingWorkflowTaskInfo": { + "type": "structure", + "members": { + "state": { + "target": "com.temporal.api#PendingWorkflowTaskInfoState" + }, + "scheduledTime": { + "target": "smithy.api#String" + }, + "originalScheduledTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat.\n Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command\n In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds\n some threshold, the workflow task will be forced timeout." + } + }, + "startedTime": { + "target": "smithy.api#String" + }, + "attempt": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.temporal.api#PendingWorkflowTaskInfoState": { + "type": "enum", + "members": { + "PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED" + } + }, + "PENDING_WORKFLOW_TASK_STATE_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_WORKFLOW_TASK_STATE_SCHEDULED" + } + }, + "PENDING_WORKFLOW_TASK_STATE_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_WORKFLOW_TASK_STATE_STARTED" + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeWorkflowExecutionResponseCallbacksList": { + "type": "list", + "member": { + "target": "com.temporal.api#CallbackInfo" + }, + "traits": {} + }, + "com.temporal.api#PendingNexusOperationInfo": { + "type": "structure", + "members": { + "endpoint": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Endpoint name.\n Resolved to a URL via the cluster's endpoint registry." + } + }, + "service": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Service name." + } + }, + "operation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation name." + } + }, + "operationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation ID. Only set for asynchronous operations after a successful StartOperation call.\n\n Deprecated. Renamed to operation_token." + } + }, + "scheduleToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Schedule-to-close timeout for this operation.\n This is the only timeout settable by a workflow.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "scheduledTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the operation was scheduled." + } + }, + "state": { + "target": "com.temporal.api#PendingNexusOperationInfoState" + }, + "attempt": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of attempts made to deliver the start operation request.\n This number is approximate, it is incremented when a task is added to the history queue.\n In practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task\n was never executed." + } + }, + "lastAttemptCompleteTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the last attempt completed." + } + }, + "lastAttemptFailure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "The last attempt's failure, if any." + } + }, + "nextAttemptScheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the next attempt is scheduled." + } + }, + "cancellationInfo": { + "target": "com.temporal.api#NexusOperationCancellationInfo" + }, + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the\n DescribeWorkflowExecution response with workflow history." + } + }, + "blockedReason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If the state is BLOCKED, blocked reason provides additional information." + } + }, + "operationToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation token. Only set for asynchronous operations after a successful StartOperation call." + } + }, + "scheduleToStartTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Schedule-to-start timeout for this operation.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "startToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Start-to-close timeout for this operation.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + } + }, + "traits": { + "smithy.api#documentation": "PendingNexusOperationInfo contains the state of a pending Nexus operation." + } + }, + "com.temporal.api#PendingNexusOperationInfoState": { + "type": "enum", + "members": { + "PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED" + } + }, + "PENDING_NEXUS_OPERATION_STATE_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_NEXUS_OPERATION_STATE_SCHEDULED" + } + }, + "PENDING_NEXUS_OPERATION_STATE_BACKING_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_NEXUS_OPERATION_STATE_BACKING_OFF" + } + }, + "PENDING_NEXUS_OPERATION_STATE_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_NEXUS_OPERATION_STATE_STARTED" + } + }, + "PENDING_NEXUS_OPERATION_STATE_BLOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_NEXUS_OPERATION_STATE_BLOCKED" + } + } + }, + "traits": {} + }, + "com.temporal.api#NexusOperationCancellationInfo": { + "type": "structure", + "members": { + "requestedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when cancellation was requested." + } + }, + "state": { + "target": "com.temporal.api#NexusOperationCancellationInfoState" + }, + "attempt": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of attempts made to deliver the cancel operation request.\n This number represents a minimum bound since the attempt is incremented after the request completes." + } + }, + "lastAttemptCompleteTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the last attempt completed." + } + }, + "lastAttemptFailure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "The last attempt's failure, if any." + } + }, + "nextAttemptScheduleTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the next attempt is scheduled." + } + }, + "blockedReason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If the state is BLOCKED, blocked reason provides additional information." + } + } + }, + "traits": { + "smithy.api#documentation": "NexusOperationCancellationInfo contains the state of a nexus operation cancellation." + } + }, + "com.temporal.api#NexusOperationCancellationInfoState": { + "type": "enum", + "members": { + "NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_FAILED" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT" + } + }, + "NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED" + } + } + }, + "traits": {} + }, + "com.temporal.api#DescribeWorkflowExecutionResponsePendingNexusOperationsList": { + "type": "list", + "member": { + "target": "com.temporal.api#PendingNexusOperationInfo" + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionExtendedInfo": { + "type": "structure", + "members": { + "executionExpirationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Workflow execution expiration time is defined as workflow start time plus expiration timeout.\n Workflow start time may change after workflow reset." + } + }, + "runExpirationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Workflow run expiration time is defined as current workflow run start time plus workflow run timeout." + } + }, + "cancelRequested": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "indicates if the workflow received a cancel request" + } + }, + "lastResetTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last workflow reset time. Nil if the workflow was never reset." + } + }, + "originalStartTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Original workflow start time." + } + }, + "resetRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run." + } + }, + "requestIdInfos": { + "target": "com.temporal.api#WorkflowExecutionExtendedInfoRequestIdInfosMap", + "traits": { + "smithy.api#documentation": "Request ID information (eg: history event information associated with the request ID).\n Note: It only contains request IDs from StartWorkflowExecution requests, including indirect\n calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is\n used in the StartWorkflowExecution request)." + } + }, + "pauseInfo": { + "target": "com.temporal.api#WorkflowExecutionPauseInfo", + "traits": { + "smithy.api#documentation": "Information about the workflow execution pause operation." + } + } + }, + "traits": { + "smithy.api#documentation": "Holds all the extra information about workflow execution that is not part of Visibility." + } + }, + "com.temporal.api#RequestIdInfo": { + "type": "structure", + "members": { + "eventType": { + "target": "com.temporal.api#RequestIdInfoEventType", + "traits": { + "smithy.api#documentation": "The event type of the history event generated by the request." + } + }, + "eventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The event id of the history event generated by the request. It's possible the event ID is not\n known (unflushed buffered event). In this case, the value will be zero or a negative value,\n representing an invalid ID." + } + }, + "buffered": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Indicate if the request is still buffered. If so, the event ID is not known and its value\n will be an invalid event ID." + } + } + }, + "traits": { + "smithy.api#documentation": "RequestIdInfo contains details of a request ID." + } + }, + "com.temporal.api#RequestIdInfoEventType": { + "type": "enum", + "members": { + "EVENT_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_UNSPECIFIED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_STARTED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_FAILED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_STARTED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_FAILED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_CANCELED" + } + }, + "EVENT_TYPE_TIMER_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_STARTED" + } + }, + "EVENT_TYPE_TIMER_FIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_FIRED" + } + }, + "EVENT_TYPE_TIMER_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_CANCELED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED" + } + }, + "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_MARKER_RECORDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_MARKER_RECORDED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW" + } + }, + "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED" + } + }, + "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED" + } + }, + "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY" + } + }, + "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY" + } + }, + "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_STARTED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_COMPLETED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_FAILED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCELED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED" + } + } + }, + "traits": { + "smithy.api#documentation": "The event type of the history event generated by the request." + } + }, + "com.temporal.api#WorkflowExecutionExtendedInfoRequestIdInfosMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#RequestIdInfo" + }, + "traits": { + "smithy.api#documentation": "Request ID information (eg: history event information associated with the request ID).\n Note: It only contains request IDs from StartWorkflowExecution requests, including indirect\n calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is\n used in the StartWorkflowExecution request)." + } + }, + "com.temporal.api#WorkflowExecutionPauseInfo": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who paused the workflow execution." + } + }, + "pausedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time when the workflow execution was paused." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for pausing the workflow execution." + } + } + }, + "traits": { + "smithy.api#documentation": "WorkflowExecutionPauseInfo contains the information about a workflow execution pause." + } + }, + "com.temporal.api#DescribeWorkflowExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#DescribeWorkflowExecutionRequest" + }, + "output": { + "target": "com.temporal.api#DescribeWorkflowExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/workflows/{execution_workflow_id}", + "code": 200 + }, + "smithy.api#documentation": "DescribeWorkflowExecution returns information about the specified workflow execution." + } + }, + "com.temporal.api#GetWorkflowExecutionHistoryRequestHistoryEventFilterType": { + "type": "enum", + "members": { + "HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED" + } + }, + "HISTORY_EVENT_FILTER_TYPE_ALL_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HISTORY_EVENT_FILTER_TYPE_ALL_EVENT" + } + }, + "HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT" + } + } + }, + "traits": {} + }, + "com.temporal.api#GetWorkflowExecutionHistoryRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "execution_workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "execution.workflowId" + } + }, + "execution_runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "execution.runId" + } + }, + "maximumPageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "maximumPageSize" + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken", + "smithy.api#documentation": "If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of\n these, it should be passed here to fetch the next page." + } + }, + "waitNewEvent": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "waitNewEvent", + "smithy.api#documentation": "If set to true, the RPC call will not resolve until there is a new event which matches\n the `history_event_filter_type`, or a timeout is hit." + } + }, + "historyEventFilterType": { + "target": "com.temporal.api#GetWorkflowExecutionHistoryRequestHistoryEventFilterType", + "traits": { + "smithy.api#httpQuery": "historyEventFilterType", + "smithy.api#documentation": "Filter returned events such that they match the specified filter type.\n Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT." + } + }, + "skipArchival": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skipArchival" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#GetWorkflowExecutionHistoryResponse": { + "type": "structure", + "members": { + "history": { + "target": "com.temporal.api#History" + }, + "rawHistory": { + "target": "com.temporal.api#GetWorkflowExecutionHistoryResponseRawHistoryList", + "traits": { + "smithy.api#documentation": "Raw history is an alternate representation of history that may be returned if configured on\n the frontend. This is not supported by all SDKs. Either this or `history` will be set." + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Will be set if there are more history events than were included in this response" + } + }, + "archived": { + "target": "smithy.api#Boolean" + } + }, + "traits": {} + }, + "com.temporal.api#History": { + "type": "structure", + "members": { + "events": { + "target": "com.temporal.api#HistoryEventsList" + } + }, + "traits": {} + }, + "com.temporal.api#HistoryEvent": { + "type": "structure", + "members": { + "eventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Monotonically increasing event number, starts at 1." + } + }, + "eventTime": { + "target": "smithy.api#String" + }, + "eventType": { + "target": "com.temporal.api#HistoryEventEventType" + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Failover version of the event, used by the server for multi-cluster replication and history\n versioning. SDKs generally ignore this field." + } + }, + "taskId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identifier used by the service to order replication and transfer tasks associated with this\n event. SDKs generally ignore this field." + } + }, + "workerMayIgnore": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Set to true when the SDK may ignore the event as it does not impact workflow state or\n information in any way that the SDK need be concerned with. If an SDK encounters an event\n type which it does not understand, it must error unless this is true. If it is true, it's\n acceptable for the event type and/or attributes to be uninterpretable." + } + }, + "userMetadata": { + "target": "com.temporal.api#UserMetadata", + "traits": { + "smithy.api#documentation": "Metadata on the event. This is often carried over from commands and client calls. Most events\n won't have this information, and how this information is used is dependent upon the interface\n that reads it.\n\n Current well-known uses:\n * workflow_execution_started_event_attributes - summary and details from start workflow.\n * timer_started_event_attributes - summary represents an identifier for the timer for use by\n user interfaces." + } + }, + "links": { + "target": "com.temporal.api#HistoryEventLinksList", + "traits": { + "smithy.api#documentation": "Links to related entities, such as the entity that started this event's workflow." + } + }, + "principal": { + "target": "com.temporal.api#Principal", + "traits": { + "smithy.api#documentation": "Server-computed authenticated caller identity associated with this event." + } + }, + "workflowExecutionStartedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionStartedEventAttributes" + }, + "workflowExecutionCompletedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionCompletedEventAttributes" + }, + "workflowExecutionFailedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionFailedEventAttributes" + }, + "workflowExecutionTimedOutEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionTimedOutEventAttributes" + }, + "workflowTaskScheduledEventAttributes": { + "target": "com.temporal.api#WorkflowTaskScheduledEventAttributes" + }, + "workflowTaskStartedEventAttributes": { + "target": "com.temporal.api#WorkflowTaskStartedEventAttributes" + }, + "workflowTaskCompletedEventAttributes": { + "target": "com.temporal.api#WorkflowTaskCompletedEventAttributes" + }, + "workflowTaskTimedOutEventAttributes": { + "target": "com.temporal.api#WorkflowTaskTimedOutEventAttributes" + }, + "workflowTaskFailedEventAttributes": { + "target": "com.temporal.api#WorkflowTaskFailedEventAttributes" + }, + "activityTaskScheduledEventAttributes": { + "target": "com.temporal.api#ActivityTaskScheduledEventAttributes" + }, + "activityTaskStartedEventAttributes": { + "target": "com.temporal.api#ActivityTaskStartedEventAttributes" + }, + "activityTaskCompletedEventAttributes": { + "target": "com.temporal.api#ActivityTaskCompletedEventAttributes" + }, + "activityTaskFailedEventAttributes": { + "target": "com.temporal.api#ActivityTaskFailedEventAttributes" + }, + "activityTaskTimedOutEventAttributes": { + "target": "com.temporal.api#ActivityTaskTimedOutEventAttributes" + }, + "timerStartedEventAttributes": { + "target": "com.temporal.api#TimerStartedEventAttributes" + }, + "timerFiredEventAttributes": { + "target": "com.temporal.api#TimerFiredEventAttributes" + }, + "activityTaskCancelRequestedEventAttributes": { + "target": "com.temporal.api#ActivityTaskCancelRequestedEventAttributes" + }, + "activityTaskCanceledEventAttributes": { + "target": "com.temporal.api#ActivityTaskCanceledEventAttributes" + }, + "timerCanceledEventAttributes": { + "target": "com.temporal.api#TimerCanceledEventAttributes" + }, + "markerRecordedEventAttributes": { + "target": "com.temporal.api#MarkerRecordedEventAttributes" + }, + "workflowExecutionSignaledEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionSignaledEventAttributes" + }, + "workflowExecutionTerminatedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionTerminatedEventAttributes" + }, + "workflowExecutionCancelRequestedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionCancelRequestedEventAttributes" + }, + "workflowExecutionCanceledEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionCanceledEventAttributes" + }, + "requestCancelExternalWorkflowExecutionInitiatedEventAttributes": { + "target": "com.temporal.api#RequestCancelExternalWorkflowExecutionInitiatedEventAttributes" + }, + "requestCancelExternalWorkflowExecutionFailedEventAttributes": { + "target": "com.temporal.api#RequestCancelExternalWorkflowExecutionFailedEventAttributes" + }, + "externalWorkflowExecutionCancelRequestedEventAttributes": { + "target": "com.temporal.api#ExternalWorkflowExecutionCancelRequestedEventAttributes" + }, + "workflowExecutionContinuedAsNewEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionContinuedAsNewEventAttributes" + }, + "startChildWorkflowExecutionInitiatedEventAttributes": { + "target": "com.temporal.api#StartChildWorkflowExecutionInitiatedEventAttributes" + }, + "startChildWorkflowExecutionFailedEventAttributes": { + "target": "com.temporal.api#StartChildWorkflowExecutionFailedEventAttributes" + }, + "childWorkflowExecutionStartedEventAttributes": { + "target": "com.temporal.api#ChildWorkflowExecutionStartedEventAttributes" + }, + "childWorkflowExecutionCompletedEventAttributes": { + "target": "com.temporal.api#ChildWorkflowExecutionCompletedEventAttributes" + }, + "childWorkflowExecutionFailedEventAttributes": { + "target": "com.temporal.api#ChildWorkflowExecutionFailedEventAttributes" + }, + "childWorkflowExecutionCanceledEventAttributes": { + "target": "com.temporal.api#ChildWorkflowExecutionCanceledEventAttributes" + }, + "childWorkflowExecutionTimedOutEventAttributes": { + "target": "com.temporal.api#ChildWorkflowExecutionTimedOutEventAttributes" + }, + "childWorkflowExecutionTerminatedEventAttributes": { + "target": "com.temporal.api#ChildWorkflowExecutionTerminatedEventAttributes" + }, + "signalExternalWorkflowExecutionInitiatedEventAttributes": { + "target": "com.temporal.api#SignalExternalWorkflowExecutionInitiatedEventAttributes" + }, + "signalExternalWorkflowExecutionFailedEventAttributes": { + "target": "com.temporal.api#SignalExternalWorkflowExecutionFailedEventAttributes" + }, + "externalWorkflowExecutionSignaledEventAttributes": { + "target": "com.temporal.api#ExternalWorkflowExecutionSignaledEventAttributes" + }, + "upsertWorkflowSearchAttributesEventAttributes": { + "target": "com.temporal.api#UpsertWorkflowSearchAttributesEventAttributes" + }, + "workflowExecutionUpdateAcceptedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionUpdateAcceptedEventAttributes" + }, + "workflowExecutionUpdateRejectedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionUpdateRejectedEventAttributes" + }, + "workflowExecutionUpdateCompletedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionUpdateCompletedEventAttributes" + }, + "workflowPropertiesModifiedExternallyEventAttributes": { + "target": "com.temporal.api#WorkflowPropertiesModifiedExternallyEventAttributes" + }, + "activityPropertiesModifiedExternallyEventAttributes": { + "target": "com.temporal.api#ActivityPropertiesModifiedExternallyEventAttributes" + }, + "workflowPropertiesModifiedEventAttributes": { + "target": "com.temporal.api#WorkflowPropertiesModifiedEventAttributes" + }, + "workflowExecutionUpdateAdmittedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionUpdateAdmittedEventAttributes" + }, + "nexusOperationScheduledEventAttributes": { + "target": "com.temporal.api#NexusOperationScheduledEventAttributes" + }, + "nexusOperationStartedEventAttributes": { + "target": "com.temporal.api#NexusOperationStartedEventAttributes" + }, + "nexusOperationCompletedEventAttributes": { + "target": "com.temporal.api#NexusOperationCompletedEventAttributes" + }, + "nexusOperationFailedEventAttributes": { + "target": "com.temporal.api#NexusOperationFailedEventAttributes" + }, + "nexusOperationCanceledEventAttributes": { + "target": "com.temporal.api#NexusOperationCanceledEventAttributes" + }, + "nexusOperationTimedOutEventAttributes": { + "target": "com.temporal.api#NexusOperationTimedOutEventAttributes" + }, + "nexusOperationCancelRequestedEventAttributes": { + "target": "com.temporal.api#NexusOperationCancelRequestedEventAttributes" + }, + "workflowExecutionOptionsUpdatedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionOptionsUpdatedEventAttributes" + }, + "nexusOperationCancelRequestCompletedEventAttributes": { + "target": "com.temporal.api#NexusOperationCancelRequestCompletedEventAttributes" + }, + "nexusOperationCancelRequestFailedEventAttributes": { + "target": "com.temporal.api#NexusOperationCancelRequestFailedEventAttributes" + }, + "workflowExecutionPausedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionPausedEventAttributes" + }, + "workflowExecutionUnpausedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionUnpausedEventAttributes" + }, + "workflowExecutionTimeSkippingTransitionedEventAttributes": { + "target": "com.temporal.api#WorkflowExecutionTimeSkippingTransitionedEventAttributes" + } + }, + "traits": { + "smithy.api#documentation": "History events are the method by which Temporal SDKs advance (or recreate) workflow state.\n See the `EventType` enum for more info about what each event is for." + } + }, + "com.temporal.api#HistoryEventEventType": { + "type": "enum", + "members": { + "EVENT_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_UNSPECIFIED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_STARTED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT" + } + }, + "EVENT_TYPE_WORKFLOW_TASK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_TASK_FAILED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_STARTED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_FAILED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_ACTIVITY_TASK_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_TASK_CANCELED" + } + }, + "EVENT_TYPE_TIMER_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_STARTED" + } + }, + "EVENT_TYPE_TIMER_FIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_FIRED" + } + }, + "EVENT_TYPE_TIMER_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_TIMER_CANCELED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED" + } + }, + "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_MARKER_RECORDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_MARKER_RECORDED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW" + } + }, + "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT" + } + }, + "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED" + } + }, + "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + } + }, + "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + } + }, + "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED" + } + }, + "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED" + } + }, + "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY" + } + }, + "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY" + } + }, + "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_STARTED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_COMPLETED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_FAILED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCELED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED" + } + }, + "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED" + } + }, + "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED" + } + } + }, + "traits": {} + }, + "com.temporal.api#HistoryEventLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links to related entities, such as the entity that started this event's workflow." + } + }, + "com.temporal.api#Principal": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Low-cardinality category of the principal (e.g., \"jwt\", \"users\")." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identifier within that category (e.g., sub JWT claim, email address)." + } + } + }, + "traits": { + "smithy.api#documentation": "Principal is an authenticated caller identity computed by the server from trusted\n authentication context." + } + }, + "com.temporal.api#WorkflowExecutionStartedEventAttributes": { + "type": "structure", + "members": { + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "parentWorkflowNamespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If this workflow is a child, the namespace our parent lives in.\n SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only." + } + }, + "parentWorkflowNamespaceId": { + "target": "smithy.api#String" + }, + "parentWorkflowExecution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "Contains information about parent workflow execution that initiated the child workflow these attributes belong to.\n If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated." + } + }, + "parentInitiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "EventID of the child execution initiated event in parent workflow" + } + }, + "taskQueue": { + "target": "com.temporal.api#TaskQueue" + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "SDK will deserialize this and provide it as arguments to the workflow function" + } + }, + "workflowExecutionTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Total workflow execution timeout including retries and continue as new." + } + }, + "workflowRunTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow run." + } + }, + "workflowTaskTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow task." + } + }, + "continuedExecutionRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Run id of the previous workflow which continued-as-new or retried or cron executed into this\n workflow." + } + }, + "initiator": { + "target": "com.temporal.api#WorkflowExecutionStartedEventAttributesInitiator" + }, + "continuedFailure": { + "target": "com.temporal.api#Failure" + }, + "lastCompletionResult": { + "target": "com.temporal.api#Payloads" + }, + "originalExecutionRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This is the run id when the WorkflowExecutionStarted event was written.\n A workflow reset changes the execution run_id, but preserves this field." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity of the client who requested this execution" + } + }, + "firstExecutionRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset.\n Used to identify a chain." + } + }, + "retryPolicy": { + "target": "com.temporal.api#RetryPolicy" + }, + "attempt": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Starting at 1, the number of times we have tried to execute this workflow" + } + }, + "workflowExecutionExpirationTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The absolute time at which the workflow will be timed out.\n This is passed without change to the next run/retry of a workflow." + } + }, + "cronSchedule": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If this workflow runs on a cron schedule, it will appear here" + } + }, + "firstWorkflowTaskBackoff": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "For a cron workflow, this contains the amount of time between when this iteration of\n the cron workflow was scheduled and when it should run next per its cron_schedule." + } + }, + "memo": { + "target": "com.temporal.api#Memo" + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "prevAutoResetPoints": { + "target": "com.temporal.api#ResetPoints" + }, + "header": { + "target": "com.temporal.api#Header" + }, + "parentInitiatedEventVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Version of the child execution initiated event in parent workflow\n It should be used together with parent_initiated_event_id to identify\n a child initiated event for global namespace" + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This field is new in 1.21." + } + }, + "sourceVersionStamp": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "If this workflow intends to use anything other than the current overall default version for\n the queue, then we include it here.\n Deprecated. [cleanup-experimental-wv]" + } + }, + "completionCallbacks": { + "target": "com.temporal.api#WorkflowExecutionStartedEventAttributesCompletionCallbacksList", + "traits": { + "smithy.api#documentation": "Completion callbacks attached when this workflow was started." + } + }, + "rootWorkflowExecution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "Contains information about the root workflow execution.\n The root workflow execution is defined as follows:\n 1. A workflow without parent workflow is its own root workflow.\n 2. A workflow that has a parent workflow has the same root workflow as its parent workflow.\n When the workflow is its own root workflow, then root_workflow_execution is nil.\n Note: workflows continued as new or reseted may or may not have parents, check examples below.\n\n Examples:\n Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3.\n - The root workflow of all three workflows is W1.\n - W1 has root_workflow_execution set to nil.\n - W2 and W3 have root_workflow_execution set to W1.\n Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3.\n - The root workflow of all three workflows is W1.\n - W1 has root_workflow_execution set to nil.\n - W2 and W3 have root_workflow_execution set to W1.\n Scenario 3: Workflow W1 continued as new W2.\n - The root workflow of W1 is W1 and the root workflow of W2 is W2.\n - W1 and W2 have root_workflow_execution set to nil.\n Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3\n - The root workflow of all three workflows is W1.\n - W1 has root_workflow_execution set to nil.\n - W2 and W3 have root_workflow_execution set to W1.\n Scenario 5: Workflow W1 is reseted, creating W2.\n - The root workflow of W1 is W1 and the root workflow of W2 is W2.\n - W1 and W2 have root_workflow_execution set to nil." + } + }, + "inheritedBuildId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "When present, this execution is assigned to the build ID of its parent or previous execution.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + }, + "versioningOverride": { + "target": "com.temporal.api#VersioningOverride", + "traits": { + "smithy.api#documentation": "Versioning override applied to this workflow when it was started.\n Children, crons, retries, and continue-as-new will inherit source run's override if pinned\n and if the new workflow's Task Queue belongs to the override version." + } + }, + "parentPinnedWorkerDeploymentVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "When present, it means this is a child workflow of a parent that is Pinned to this Worker\n Deployment Version. In this case, child workflow will start as Pinned to this Version instead\n of starting on the Current Version of its Task Queue.\n This is set only if the child workflow is starting on a Task Queue belonging to the same\n Worker Deployment Version.\n Deprecated. Use `parent_versioning_info`." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata" + } + }, + "inheritedPinnedVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "If present, the new workflow should start on this version with pinned base behavior.\n Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version.\n\n A new run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the\n new run's Task Queue belongs to that version.\n\n A new run initiated by workflow Cron will never inherit.\n\n A new run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time\n of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned\n parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version).\n\n Pinned override is inherited if Task Queue of new run is compatible with the override version.\n Override is inherited separately and takes precedence over inherited base version.\n\n Note: This field is mutually exclusive with inherited_auto_upgrade_info.\n Additionaly, versioning_override, if present, overrides this field during routing decisions." + } + }, + "inheritedAutoUpgradeInfo": { + "target": "com.temporal.api#InheritedAutoUpgradeInfo", + "traits": { + "smithy.api#documentation": "If present, the new workflow begins with AutoUpgrade behavior. Before dispatching the\n first workflow task, this field is set to the deployment version on which the parent/\n previous run was operating. This inheritance only happens when the task queues belong to\n the same deployment version. The first workflow task will then be dispatched to either\n this inherited deployment version, or the current deployment version of the task queue's\n Deployment. After the first workflow task, the effective behavior depends on worker-sent\n values in subsequent workflow tasks.\n\n Inheritance rules:\n - ContinueAsNew and child workflows: inherit AutoUpgrade behavior and deployment version\n - Cron: never inherits\n - Retry: inherits only if the retried run is effectively AutoUpgrade at the time of\n retry, and inherited AutoUpgrade behavior when it started (i.e. it is a child of an\n AutoUpgrade parent or ContinueAsNew of an AutoUpgrade run, running on the same\n deployment as the parent/previous run)\n\n Additional notes:\n - This field is mutually exclusive with `inherited_pinned_version`.\n - `versioning_override`, if present, overrides this field during routing decisions.\n - SDK implementations do not interact with this field and is only used internally by\n the server to ensure task routing correctness." + } + }, + "eagerExecutionAccepted": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and\n eager execution was accepted by the server.\n Only populated by server with version >= 1.29.0." + } + }, + "declinedTargetVersionUpgrade": { + "target": "com.temporal.api#DeclinedTargetVersionUpgrade", + "traits": { + "smithy.api#documentation": "During a previous run of this workflow, the server may have notified the SDK\n that the Target Worker Deployment Version changed, but the SDK declined to\n upgrade (e.g., by continuing-as-new with PINNED behavior). This field records\n the target version that was declined.\n\n This is a wrapper message to distinguish \"never declined\" (nil wrapper) from\n \"declined an unversioned target\" (non-nil wrapper with nil deployment_version).\n\n Used internally by the server during continue-as-new and retry.\n Should not be read or interpreted by SDKs." + } + }, + "timeSkippingConfig": { + "target": "com.temporal.api#TimeSkippingConfig", + "traits": { + "smithy.api#documentation": "Initial time-skipping configuration for this workflow execution, recorded at start time.\n This may have been set explicitly via the start workflow request, or propagated from a\n parent/previous execution.\n\n The configuration may be updated after start via UpdateWorkflowExecutionOptions, which\n will be reflected in the WorkflowExecutionOptionsUpdatedEvent." + } + }, + "initialSkippedDuration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The time skipped by the previous execution that started this workflow.\n It can happen in cases of child workflows and continue-as-new workflows." + } + } + }, + "traits": { + "smithy.api#documentation": "Always the first event in workflow history" + } + }, + "com.temporal.api#WorkflowExecutionStartedEventAttributesInitiator": { + "type": "enum", + "members": { + "CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED" + } + }, + "CONTINUE_AS_NEW_INITIATOR_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_INITIATOR_WORKFLOW" + } + }, + "CONTINUE_AS_NEW_INITIATOR_RETRY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_INITIATOR_RETRY" + } + }, + "CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionStartedEventAttributesCompletionCallbacksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Callback" + }, + "traits": { + "smithy.api#documentation": "Completion callbacks attached when this workflow was started." + } + }, + "com.temporal.api#InheritedAutoUpgradeInfo": { + "type": "structure", + "members": { + "sourceDeploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "The source deployment version of the parent/previous workflow." + } + }, + "sourceDeploymentRevisionNumber": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The revision number of the source deployment version of the parent/previous workflow." + } + }, + "continueAsNewInitialVersioningBehavior": { + "target": "com.temporal.api#InheritedAutoUpgradeInfoContinueAsNewInitialVersioningBehavior", + "traits": { + "smithy.api#documentation": "Experimental.\n If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\n specified in that command.\n Only used for the initial task of this run and the initial task of any retries of this run.\n Not passed to children or to future continue-as-new.\n\n Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade,\n a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility\n with history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade\n value if the InheritedAutoUpgradeInfo is non-empty." + } + } + }, + "traits": { + "smithy.api#documentation": "Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version\n to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior.\n Also used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion." + } + }, + "com.temporal.api#InheritedAutoUpgradeInfoContinueAsNewInitialVersioningBehavior": { + "type": "enum", + "members": { + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED" + } + }, + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE" + } + }, + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION" + } + } + }, + "traits": { + "smithy.api#documentation": "Experimental.\n If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior\n specified in that command.\n Only used for the initial task of this run and the initial task of any retries of this run.\n Not passed to children or to future continue-as-new.\n\n Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade,\n a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility\n with history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade\n value if the InheritedAutoUpgradeInfo is non-empty." + } + }, + "com.temporal.api#DeclinedTargetVersionUpgrade": { + "type": "structure", + "members": { + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion" + }, + "revisionNumber": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Revision number of the task queue routing config at the time the target\n was declined. If an incoming target's revision is <= this value, it is\n not newer and is not used for deciding whether or not to suppress the\n upgrade signal." + } + } + }, + "traits": { + "smithy.api#documentation": "Wrapper for a target deployment version that the SDK declined to upgrade to.\n See declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes." + } + }, + "com.temporal.api#WorkflowExecutionCompletedEventAttributes": { + "type": "structure", + "members": { + "result": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized result of workflow completion (ie: The return value of the workflow function)" + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "newExecutionRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If another run is started by cron, this contains the new run id." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionFailedEventAttributes": { + "type": "structure", + "members": { + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Serialized result of workflow failure (ex: An exception thrown, or error returned)" + } + }, + "retryState": { + "target": "com.temporal.api#WorkflowExecutionFailedEventAttributesRetryState" + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "newExecutionRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If another run is started by cron or retry, this contains the new run id." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionFailedEventAttributesRetryState": { + "type": "enum", + "members": { + "RETRY_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_UNSPECIFIED" + } + }, + "RETRY_STATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_IN_PROGRESS" + } + }, + "RETRY_STATE_NON_RETRYABLE_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_NON_RETRYABLE_FAILURE" + } + }, + "RETRY_STATE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_TIMEOUT" + } + }, + "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + } + }, + "RETRY_STATE_RETRY_POLICY_NOT_SET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_RETRY_POLICY_NOT_SET" + } + }, + "RETRY_STATE_INTERNAL_SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_INTERNAL_SERVER_ERROR" + } + }, + "RETRY_STATE_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_CANCEL_REQUESTED" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionTimedOutEventAttributes": { + "type": "structure", + "members": { + "retryState": { + "target": "com.temporal.api#WorkflowExecutionTimedOutEventAttributesRetryState" + }, + "newExecutionRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If another run is started by cron or retry, this contains the new run id." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionTimedOutEventAttributesRetryState": { + "type": "enum", + "members": { + "RETRY_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_UNSPECIFIED" + } + }, + "RETRY_STATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_IN_PROGRESS" + } + }, + "RETRY_STATE_NON_RETRYABLE_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_NON_RETRYABLE_FAILURE" + } + }, + "RETRY_STATE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_TIMEOUT" + } + }, + "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + } + }, + "RETRY_STATE_RETRY_POLICY_NOT_SET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_RETRY_POLICY_NOT_SET" + } + }, + "RETRY_STATE_INTERNAL_SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_INTERNAL_SERVER_ERROR" + } + }, + "RETRY_STATE_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_CANCEL_REQUESTED" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowTaskScheduledEventAttributes": { + "type": "structure", + "members": { + "taskQueue": { + "target": "com.temporal.api#TaskQueue", + "traits": { + "smithy.api#documentation": "The task queue this workflow task was enqueued in, which could be a normal or sticky queue" + } + }, + "startToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "How long the worker has to process this task once receiving it before it times out\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "attempt": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Starting at 1, how many attempts there have been to complete this task" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowTaskStartedEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity of the worker who picked up this task" + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would\n set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful\n in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response,\n so matching could retry and history service would return success if the request_id matches.\n In that case, matching will continue to deliver the task to worker. Without this field, history\n service would return AlreadyStarted error, and matching would drop the task." + } + }, + "suggestContinueAsNew": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why." + } + }, + "suggestContinueAsNewReasons": { + "target": "com.temporal.api#WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsList", + "traits": { + "smithy.api#documentation": "The reason(s) that suggest_continue_as_new is true, if it is.\n Unset if suggest_continue_as_new is false." + } + }, + "targetWorkerDeploymentVersionChanged": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if Workflow's Target Worker Deployment Version is different from its Pinned Version and\n the workflow is Pinned.\n Experimental." + } + }, + "historySizeBytes": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Total history size in bytes, which the workflow might use to decide when to\n continue-as-new regardless of the suggestion. Note that history event count is\n just the event id of this event, so we don't include it explicitly here." + } + }, + "workerVersion": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Version info of the worker to whom this task was dispatched.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + }, + "buildIdRedirectCounter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used by server internally to properly reapply build ID redirects to an execution\n when rebuilding it from events.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsItem": { + "type": "enum", + "members": { + "SUGGEST_CONTINUE_AS_NEW_REASON_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUGGEST_CONTINUE_AS_NEW_REASON_UNSPECIFIED" + } + }, + "SUGGEST_CONTINUE_AS_NEW_REASON_HISTORY_SIZE_TOO_LARGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUGGEST_CONTINUE_AS_NEW_REASON_HISTORY_SIZE_TOO_LARGE" + } + }, + "SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_HISTORY_EVENTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_HISTORY_EVENTS" + } + }, + "SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_UPDATES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_UPDATES" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsList": { + "type": "list", + "member": { + "target": "com.temporal.api#WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsItem" + }, + "traits": { + "smithy.api#documentation": "The reason(s) that suggest_continue_as_new is true, if it is.\n Unset if suggest_continue_as_new is false." + } + }, + "com.temporal.api#WorkflowTaskCompletedEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identity of the worker who completed this task" + } + }, + "binaryChecksum": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Binary ID of the worker who completed this task\n Deprecated. Replaced with `deployment_version`." + } + }, + "workerVersion": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Version info of the worker who processed this workflow task. If present, the `build_id` field\n within is also used as `binary_checksum`, which may be omitted in that case (it may also be\n populated to preserve compatibility).\n Deprecated. Use `deployment_version` and `versioning_behavior` instead." + } + }, + "sdkMetadata": { + "target": "com.temporal.api#WorkflowTaskCompletedMetadata", + "traits": { + "smithy.api#documentation": "Data the SDK wishes to record for itself, but server need not interpret, and does not\n directly impact workflow state." + } + }, + "meteringMetadata": { + "target": "com.temporal.api#MeteringMetadata", + "traits": { + "smithy.api#documentation": "Local usage data sent during workflow task completion and recorded here for posterity" + } + }, + "deployment": { + "target": "com.temporal.api#Deployment", + "traits": { + "smithy.api#documentation": "The deployment that completed this task. May or may not be set for unversioned workers,\n depending on whether a value is sent by the SDK. This value updates workflow execution's\n `versioning_info.deployment`.\n Deprecated. Replaced with `deployment_version`." + } + }, + "versioningBehavior": { + "target": "com.temporal.api#WorkflowTaskCompletedEventAttributesVersioningBehavior", + "traits": { + "smithy.api#documentation": "Versioning behavior sent by the worker that completed this task for this particular workflow\n execution. UNSPECIFIED means the task was completed by an unversioned worker. This value\n updates workflow execution's `versioning_info.behavior`." + } + }, + "workerDeploymentVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`\n is set. This value updates workflow execution's `versioning_info.version`.\n Deprecated. Replaced with `deployment_version`." + } + }, + "workerDeploymentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of Worker Deployment that completed this task. Must be set if `versioning_behavior`\n is set. This value updates workflow execution's `worker_deployment_name`." + } + }, + "deploymentVersion": { + "target": "com.temporal.api#WorkerDeploymentVersion", + "traits": { + "smithy.api#documentation": "The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`\n is set. This value updates workflow execution's `versioning_info.deployment_version`." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowTaskCompletedMetadata": { + "type": "structure", + "members": { + "coreUsedFlags": { + "target": "com.temporal.api#WorkflowTaskCompletedMetadataCoreUsedFlagsList", + "traits": { + "smithy.api#documentation": "Internal flags used by the core SDK. SDKs using flags must comply with the following behavior:\n\n During replay:\n * If a flag is not recognized (value is too high or not defined), it must fail the workflow\n task.\n * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for\n that flag during and after this WFT are allowed to assume that the flag is present.\n * If a code check for a flag does not find the flag in the set of used flags, it must take\n the branch corresponding to the absence of that flag.\n\n During non-replay execution of new WFTs:\n * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not\n previously recorded) flags when completing the WFT.\n\n SDKs which are too old to even know about this field at all are considered to produce\n undefined behavior if they replay workflows which used this mechanism.\n\n (-- api-linter: core::0141::forbidden-types=disabled\n aip.dev/not-precedent: These really shouldn't have negative values. --)" + } + }, + "langUsedFlags": { + "target": "com.temporal.api#WorkflowTaskCompletedMetadataLangUsedFlagsList", + "traits": { + "smithy.api#documentation": "Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages\n here as processing a workflow with a different language than the one which authored it is\n already undefined behavior. See `core_used_patches` for more.\n\n (-- api-linter: core::0141::forbidden-types=disabled\n aip.dev/not-precedent: These really shouldn't have negative values. --)" + } + }, + "sdkName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the SDK that processed the task. This is usually something like \"temporal-go\" and is\n usually the same as client-name gRPC header. This should only be set if its value changed\n since the last time recorded on the workflow (or be set on the first task).\n\n (-- api-linter: core::0122::name-suffix=disabled\n aip.dev/not-precedent: We're ok with a name suffix here. --)" + } + }, + "sdkVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Version of the SDK that processed the task. This is usually something like \"1.20.0\" and is\n usually the same as client-version gRPC header. This should only be set if its value changed\n since the last time recorded on the workflow (or be set on the first task)." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowTaskCompletedMetadataCoreUsedFlagsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#documentation": "Internal flags used by the core SDK. SDKs using flags must comply with the following behavior:\n\n During replay:\n * If a flag is not recognized (value is too high or not defined), it must fail the workflow\n task.\n * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for\n that flag during and after this WFT are allowed to assume that the flag is present.\n * If a code check for a flag does not find the flag in the set of used flags, it must take\n the branch corresponding to the absence of that flag.\n\n During non-replay execution of new WFTs:\n * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not\n previously recorded) flags when completing the WFT.\n\n SDKs which are too old to even know about this field at all are considered to produce\n undefined behavior if they replay workflows which used this mechanism.\n\n (-- api-linter: core::0141::forbidden-types=disabled\n aip.dev/not-precedent: These really shouldn't have negative values. --)" + } + }, + "com.temporal.api#WorkflowTaskCompletedMetadataLangUsedFlagsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#documentation": "Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages\n here as processing a workflow with a different language than the one which authored it is\n already undefined behavior. See `core_used_patches` for more.\n\n (-- api-linter: core::0141::forbidden-types=disabled\n aip.dev/not-precedent: These really shouldn't have negative values. --)" + } + }, + "com.temporal.api#MeteringMetadata": { + "type": "structure", + "members": { + "nonfirstLocalActivityExecutionAttempts": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Count of local activities which have begun an execution attempt during this workflow task,\n and whose first attempt occurred in some previous task. This is used for metering\n purposes, and does not affect workflow state.\n\n (-- api-linter: core::0141::forbidden-types=disabled\n aip.dev/not-precedent: Negative values make no sense to represent. --)" + } + } + }, + "traits": { + "smithy.api#documentation": "Metadata relevant for metering purposes" + } + }, + "com.temporal.api#WorkflowTaskCompletedEventAttributesVersioningBehavior": { + "type": "enum", + "members": { + "VERSIONING_BEHAVIOR_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSIONING_BEHAVIOR_UNSPECIFIED" + } + }, + "VERSIONING_BEHAVIOR_PINNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSIONING_BEHAVIOR_PINNED" + } + }, + "VERSIONING_BEHAVIOR_AUTO_UPGRADE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VERSIONING_BEHAVIOR_AUTO_UPGRADE" + } + } + }, + "traits": { + "smithy.api#documentation": "Versioning behavior sent by the worker that completed this task for this particular workflow\n execution. UNSPECIFIED means the task was completed by an unversioned worker. This value\n updates workflow execution's `versioning_info.behavior`." + } + }, + "com.temporal.api#WorkflowTaskTimedOutEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to" + } + }, + "timeoutType": { + "target": "com.temporal.api#WorkflowTaskTimedOutEventAttributesTimeoutType" + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowTaskTimedOutEventAttributesTimeoutType": { + "type": "enum", + "members": { + "TIMEOUT_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT_TYPE_UNSPECIFIED" + } + }, + "TIMEOUT_TYPE_START_TO_CLOSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT_TYPE_START_TO_CLOSE" + } + }, + "TIMEOUT_TYPE_SCHEDULE_TO_START": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT_TYPE_SCHEDULE_TO_START" + } + }, + "TIMEOUT_TYPE_SCHEDULE_TO_CLOSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT_TYPE_SCHEDULE_TO_CLOSE" + } + }, + "TIMEOUT_TYPE_HEARTBEAT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT_TYPE_HEARTBEAT" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowTaskFailedEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to" + } + }, + "cause": { + "target": "com.temporal.api#WorkflowTaskFailedEventAttributesCause" + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "The failure details" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If a worker explicitly failed this task, this field contains the worker's identity.\n When the server generates the failure internally this field is set as 'history-service'." + } + }, + "baseRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The original run id of the workflow. For reset workflow." + } + }, + "newRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If the workflow is being reset, the new run id." + } + }, + "forkEventVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Version of the event where the history branch was forked. Used by multi-cluster replication\n during resets to identify the correct history branch." + } + }, + "binaryChecksum": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]\n If a worker explicitly failed this task, its binary id" + } + }, + "workerVersion": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Version info of the worker who processed this workflow task. If present, the `build_id` field\n within is also used as `binary_checksum`, which may be omitted in that case (it may also be\n populated to preserve compatibility).\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowTaskFailedEventAttributesCause": { + "type": "enum", + "members": { + "WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_COMMAND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_COMMAND" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_COMMAND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_COMMAND" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_MODIFY_WORKFLOW_PROPERTIES_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_MODIFY_WORKFLOW_PROPERTIES_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_PENDING_CHILD_WORKFLOWS_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_PENDING_CHILD_WORKFLOWS_LIMIT_EXCEEDED" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_UPDATE" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_NEXUS_OPERATION_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_NEXUS_OPERATION_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_PENDING_NEXUS_OPERATIONS_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_PENDING_NEXUS_OPERATIONS_LIMIT_EXCEEDED" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_NEXUS_OPERATION_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_NEXUS_OPERATION_ATTRIBUTES" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_FEATURE_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_FEATURE_DISABLED" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE" + } + }, + "WORKFLOW_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE" + } + } + }, + "traits": {} + }, + "com.temporal.api#ActivityTaskScheduledEventAttributes": { + "type": "structure", + "members": { + "activityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The worker/user assigned identifier for the activity" + } + }, + "activityType": { + "target": "com.temporal.api#ActivityType" + }, + "taskQueue": { + "target": "com.temporal.api#TaskQueue" + }, + "header": { + "target": "com.temporal.api#Header" + }, + "input": { + "target": "com.temporal.api#Payloads" + }, + "scheduleToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Indicates how long the caller is willing to wait for an activity completion. Limits how long\n retries will be attempted. Either this or `start_to_close_timeout` must be specified.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "scheduleToStartTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Limits time an activity task can stay in a task queue before a worker picks it up. This\n timeout is always non retryable, as all a retry would achieve is to put it back into the same\n queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not\n specified.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "startToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum time an activity is allowed to execute after being picked up by a worker. This\n timeout is always retryable. Either this or `schedule_to_close_timeout` must be\n specified.\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "heartbeatTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum permitted time between successful worker heartbeats." + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "retryPolicy": { + "target": "com.temporal.api#RetryPolicy", + "traits": { + "smithy.api#documentation": "Activities are assigned a default retry policy controlled by the service's dynamic\n configuration. Retries will happen up to `schedule_to_close_timeout`. To disable retries set\n retry_policy.maximum_attempts to 1." + } + }, + "useWorkflowBuildId": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise,\n Assignment rules of the activity's Task Queue will be used to determine the Build ID.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata. If this message is not present, or any fields are not\n present, they inherit the values from the workflow." + } + } + }, + "traits": {} + }, + "com.temporal.api#ActivityTaskStartedEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_SCHEDULED` event this task corresponds to" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the worker that picked up this task" + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This field is populated from the RecordActivityTaskStartedRequest. Matching service would\n set the request_id on the RecordActivityTaskStartedRequest to a new UUID. This is useful\n in case a RecordActivityTaskStarted call succeed but matching doesn't get that response,\n so matching could retry and history service would return success if the request_id matches.\n In that case, matching will continue to deliver the task to worker. Without this field, history\n service would return AlreadyStarted error, and matching would drop the task." + } + }, + "attempt": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Starting at 1, the number of times this task has been attempted" + } + }, + "lastFailure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Will be set to the most recent failure details, if this task has previously failed and then\n been retried." + } + }, + "workerVersion": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Version info of the worker to whom this task was dispatched.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + }, + "buildIdRedirectCounter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used by server internally to properly reapply build ID redirects to an execution\n when rebuilding it from events.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + } + }, + "traits": {} + }, + "com.temporal.api#ActivityTaskCompletedEventAttributes": { + "type": "structure", + "members": { + "result": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized results of the activity. IE: The return value of the activity function" + } + }, + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_SCHEDULED` event this completion corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_STARTED` event this completion corresponds to" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the worker that completed this task" + } + }, + "workerVersion": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Version info of the worker who processed this workflow task.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + } + }, + "traits": {} + }, + "com.temporal.api#ActivityTaskFailedEventAttributes": { + "type": "structure", + "members": { + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Failure details" + } + }, + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_SCHEDULED` event this failure corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_STARTED` event this failure corresponds to" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the worker that failed this task" + } + }, + "retryState": { + "target": "com.temporal.api#ActivityTaskFailedEventAttributesRetryState" + }, + "workerVersion": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Version info of the worker who processed this workflow task.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + } + }, + "traits": {} + }, + "com.temporal.api#ActivityTaskFailedEventAttributesRetryState": { + "type": "enum", + "members": { + "RETRY_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_UNSPECIFIED" + } + }, + "RETRY_STATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_IN_PROGRESS" + } + }, + "RETRY_STATE_NON_RETRYABLE_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_NON_RETRYABLE_FAILURE" + } + }, + "RETRY_STATE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_TIMEOUT" + } + }, + "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + } + }, + "RETRY_STATE_RETRY_POLICY_NOT_SET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_RETRY_POLICY_NOT_SET" + } + }, + "RETRY_STATE_INTERNAL_SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_INTERNAL_SERVER_ERROR" + } + }, + "RETRY_STATE_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_CANCEL_REQUESTED" + } + } + }, + "traits": {} + }, + "com.temporal.api#ActivityTaskTimedOutEventAttributes": { + "type": "structure", + "members": { + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "If this activity had failed, was retried, and then timed out, that failure is stored as the\n `cause` in here." + } + }, + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_SCHEDULED` event this timeout corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_STARTED` event this timeout corresponds to" + } + }, + "retryState": { + "target": "com.temporal.api#ActivityTaskTimedOutEventAttributesRetryState" + } + }, + "traits": {} + }, + "com.temporal.api#ActivityTaskTimedOutEventAttributesRetryState": { + "type": "enum", + "members": { + "RETRY_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_UNSPECIFIED" + } + }, + "RETRY_STATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_IN_PROGRESS" + } + }, + "RETRY_STATE_NON_RETRYABLE_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_NON_RETRYABLE_FAILURE" + } + }, + "RETRY_STATE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_TIMEOUT" + } + }, + "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + } + }, + "RETRY_STATE_RETRY_POLICY_NOT_SET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_RETRY_POLICY_NOT_SET" + } + }, + "RETRY_STATE_INTERNAL_SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_INTERNAL_SERVER_ERROR" + } + }, + "RETRY_STATE_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_CANCEL_REQUESTED" + } + } + }, + "traits": {} + }, + "com.temporal.api#TimerStartedEventAttributes": { + "type": "structure", + "members": { + "timerId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The worker/user assigned id for this timer" + } + }, + "startToFireTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "How long until this timer fires\n\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + } + }, + "traits": {} + }, + "com.temporal.api#TimerFiredEventAttributes": { + "type": "structure", + "members": { + "timerId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Will match the `timer_id` from `TIMER_STARTED` event for this timer" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `TIMER_STARTED` event itself" + } + } + }, + "traits": {} + }, + "com.temporal.api#ActivityTaskCancelRequestedEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel request corresponds to" + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + } + }, + "traits": {} + }, + "com.temporal.api#ActivityTaskCanceledEventAttributes": { + "type": "structure", + "members": { + "details": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Additional information that the activity reported upon confirming cancellation" + } + }, + "latestCancelRequestedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the most recent `ACTIVITY_TASK_CANCEL_REQUESTED` event which refers to the same\n activity" + } + }, + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel confirmation corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_STARTED` event this cancel confirmation corresponds to" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the worker who canceled this activity" + } + }, + "workerVersion": { + "target": "com.temporal.api#WorkerVersionStamp", + "traits": { + "smithy.api#documentation": "Version info of the worker who processed this workflow task.\n Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]" + } + } + }, + "traits": {} + }, + "com.temporal.api#TimerCanceledEventAttributes": { + "type": "structure", + "members": { + "timerId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Will match the `timer_id` from `TIMER_STARTED` event for this timer" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `TIMER_STARTED` event itself" + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the worker who requested this cancel" + } + } + }, + "traits": {} + }, + "com.temporal.api#MarkerRecordedEventAttributes": { + "type": "structure", + "members": { + "markerName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Workers use this to identify the \"types\" of various markers. Ex: Local activity, side effect." + } + }, + "details": { + "target": "com.temporal.api#MarkerRecordedEventAttributesDetailsMap", + "traits": { + "smithy.api#documentation": "Serialized information recorded in the marker" + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "header": { + "target": "com.temporal.api#Header" + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Some uses of markers, like a local activity, could \"fail\". If they did that is recorded here." + } + } + }, + "traits": {} + }, + "com.temporal.api#MarkerRecordedEventAttributesDetailsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#Payloads" + }, + "traits": { + "smithy.api#documentation": "Serialized information recorded in the marker" + } + }, + "com.temporal.api#WorkflowExecutionSignaledEventAttributes": { + "type": "structure", + "members": { + "signalName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name/type of the signal to fire" + } + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Will be deserialized and provided as argument(s) to the signal handler" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the worker/client who sent this signal" + } + }, + "header": { + "target": "com.temporal.api#Header", + "traits": { + "smithy.api#documentation": "Headers that were passed by the sender of the signal and copied by temporal\n server into the workflow task." + } + }, + "skipGenerateWorkflowTask": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Deprecated. This field is never respected and should always be set to false." + } + }, + "externalWorkflowExecution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "When signal origin is a workflow execution, this field is set." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request ID of the Signal request, used by the server to attach this to\n the correct Event ID when generating link." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionTerminatedEventAttributes": { + "type": "structure", + "members": { + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "User/client provided reason for termination" + } + }, + "details": { + "target": "com.temporal.api#Payloads" + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the client who requested termination" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionCancelRequestedEventAttributes": { + "type": "structure", + "members": { + "cause": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "User provided reason for requesting cancellation" + } + }, + "externalInitiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event in the external\n workflow history when the cancellation was requested by another workflow." + } + }, + "externalWorkflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the worker or client who requested this cancel" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionCanceledEventAttributes": { + "type": "structure", + "members": { + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "details": { + "target": "com.temporal.api#Payloads" + } + }, + "traits": {} + }, + "com.temporal.api#RequestCancelExternalWorkflowExecutionInitiatedEventAttributes": { + "type": "structure", + "members": { + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The namespace the workflow to be cancelled lives in.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "control": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated." + } + }, + "childWorkflowOnly": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Workers are expected to set this to true if the workflow they are requesting to cancel is\n a child of the workflow which issued the request" + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for requesting the cancellation" + } + } + }, + "traits": {} + }, + "com.temporal.api#RequestCancelExternalWorkflowExecutionFailedEventAttributes": { + "type": "structure", + "members": { + "cause": { + "target": "com.temporal.api#RequestCancelExternalWorkflowExecutionFailedEventAttributesCause" + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the workflow which failed to cancel.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "initiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure\n corresponds to" + } + }, + "control": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated." + } + } + }, + "traits": {} + }, + "com.temporal.api#RequestCancelExternalWorkflowExecutionFailedEventAttributesCause": { + "type": "enum", + "members": { + "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED" + } + }, + "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND" + } + }, + "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND" + } + } + }, + "traits": {} + }, + "com.temporal.api#ExternalWorkflowExecutionCancelRequestedEventAttributes": { + "type": "structure", + "members": { + "initiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds\n to" + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the to-be-cancelled workflow.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionContinuedAsNewEventAttributes": { + "type": "structure", + "members": { + "newExecutionRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run ID of the new workflow started by this continue-as-new" + } + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "taskQueue": { + "target": "com.temporal.api#TaskQueue" + }, + "input": { + "target": "com.temporal.api#Payloads" + }, + "workflowRunTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow run." + } + }, + "workflowTaskTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow task." + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "backoffStartInterval": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "How long the server will wait before scheduling the first workflow task for the new run.\n Used for cron, retry, and other continue-as-new cases that server may enforce some minimal\n delay between new runs for system protection purpose." + } + }, + "initiator": { + "target": "com.temporal.api#WorkflowExecutionContinuedAsNewEventAttributesInitiator" + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Deprecated. If a workflow's retry policy would cause a new run to start when the current one\n has failed, this field would be populated with that failure. Now (when supported by server\n and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set." + } + }, + "lastCompletionResult": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "The result from the most recent completed run of this workflow. The SDK surfaces this to the\n new run via APIs such as `GetLastCompletionResult`." + } + }, + "header": { + "target": "com.temporal.api#Header" + }, + "memo": { + "target": "com.temporal.api#Memo" + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "inheritBuildId": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If this is set, the new execution inherits the Build ID of the current execution. Otherwise,\n the assignment rules will be used to independently assign a Build ID to the new execution.\n Deprecated. Only considered for versioning v0.2." + } + }, + "initialVersioningBehavior": { + "target": "com.temporal.api#WorkflowExecutionContinuedAsNewEventAttributesInitialVersioningBehavior", + "traits": { + "smithy.api#documentation": "Experimental. Optionally decide the versioning behavior that the first task of the new run should use.\n For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version\n of the previous run." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionContinuedAsNewEventAttributesInitiator": { + "type": "enum", + "members": { + "CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED" + } + }, + "CONTINUE_AS_NEW_INITIATOR_WORKFLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_INITIATOR_WORKFLOW" + } + }, + "CONTINUE_AS_NEW_INITIATOR_RETRY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_INITIATOR_RETRY" + } + }, + "CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE" + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionContinuedAsNewEventAttributesInitialVersioningBehavior": { + "type": "enum", + "members": { + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED" + } + }, + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE" + } + }, + "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION" + } + } + }, + "traits": { + "smithy.api#documentation": "Experimental. Optionally decide the versioning behavior that the first task of the new run should use.\n For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version\n of the previous run." + } + }, + "com.temporal.api#StartChildWorkflowExecutionInitiatedEventAttributes": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the child workflow.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowId": { + "target": "smithy.api#String" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "taskQueue": { + "target": "com.temporal.api#TaskQueue" + }, + "input": { + "target": "com.temporal.api#Payloads" + }, + "workflowExecutionTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Total workflow execution timeout including retries and continue as new." + } + }, + "workflowRunTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow run." + } + }, + "workflowTaskTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow task." + } + }, + "parentClosePolicy": { + "target": "com.temporal.api#StartChildWorkflowExecutionInitiatedEventAttributesParentClosePolicy", + "traits": { + "smithy.api#documentation": "Default: PARENT_CLOSE_POLICY_TERMINATE." + } + }, + "control": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated." + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "workflowIdReusePolicy": { + "target": "com.temporal.api#StartChildWorkflowExecutionInitiatedEventAttributesWorkflowIdReusePolicy", + "traits": { + "smithy.api#documentation": "Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE." + } + }, + "retryPolicy": { + "target": "com.temporal.api#RetryPolicy" + }, + "cronSchedule": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If this child runs on a cron schedule, it will appear here" + } + }, + "header": { + "target": "com.temporal.api#Header" + }, + "memo": { + "target": "com.temporal.api#Memo" + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "inheritBuildId": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment\n rules of the child's Task Queue will be used to independently assign a Build ID to it.\n Deprecated. Only considered for versioning v0.2." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata" + } + }, + "timeSkippingConfig": { + "target": "com.temporal.api#TimeSkippingConfig", + "traits": { + "smithy.api#documentation": "The propagated time-skipping configuration for the child workflow." + } + }, + "initialSkippedDuration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Propagate the duration skipped to the child workflow." + } + } + }, + "traits": {} + }, + "com.temporal.api#StartChildWorkflowExecutionInitiatedEventAttributesParentClosePolicy": { + "type": "enum", + "members": { + "PARENT_CLOSE_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARENT_CLOSE_POLICY_UNSPECIFIED" + } + }, + "PARENT_CLOSE_POLICY_TERMINATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARENT_CLOSE_POLICY_TERMINATE" + } + }, + "PARENT_CLOSE_POLICY_ABANDON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARENT_CLOSE_POLICY_ABANDON" + } + }, + "PARENT_CLOSE_POLICY_REQUEST_CANCEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARENT_CLOSE_POLICY_REQUEST_CANCEL" + } + } + }, + "traits": { + "smithy.api#documentation": "Default: PARENT_CLOSE_POLICY_TERMINATE." + } + }, + "com.temporal.api#StartChildWorkflowExecutionInitiatedEventAttributesWorkflowIdReusePolicy": { + "type": "enum", + "members": { + "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED" + } + }, + "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE" + } + }, + "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + } + }, + "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE" + } + }, + "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING" + } + } + }, + "traits": { + "smithy.api#documentation": "Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE." + } + }, + "com.temporal.api#StartChildWorkflowExecutionFailedEventAttributes": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the child workflow.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowId": { + "target": "smithy.api#String" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "cause": { + "target": "com.temporal.api#StartChildWorkflowExecutionFailedEventAttributesCause" + }, + "control": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated." + } + }, + "initiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to" + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + } + }, + "traits": {} + }, + "com.temporal.api#StartChildWorkflowExecutionFailedEventAttributesCause": { + "type": "enum", + "members": { + "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED" + } + }, + "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS" + } + }, + "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND" + } + } + }, + "traits": {} + }, + "com.temporal.api#ChildWorkflowExecutionStartedEventAttributes": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the child workflow.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "initiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to" + } + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "header": { + "target": "com.temporal.api#Header" + } + }, + "traits": {} + }, + "com.temporal.api#ChildWorkflowExecutionCompletedEventAttributes": { + "type": "structure", + "members": { + "result": { + "target": "com.temporal.api#Payloads" + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the child workflow.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "initiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to" + } + } + }, + "traits": {} + }, + "com.temporal.api#ChildWorkflowExecutionFailedEventAttributes": { + "type": "structure", + "members": { + "failure": { + "target": "com.temporal.api#Failure" + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the child workflow.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "initiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to" + } + }, + "retryState": { + "target": "com.temporal.api#ChildWorkflowExecutionFailedEventAttributesRetryState" + } + }, + "traits": {} + }, + "com.temporal.api#ChildWorkflowExecutionFailedEventAttributesRetryState": { + "type": "enum", + "members": { + "RETRY_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_UNSPECIFIED" + } + }, + "RETRY_STATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_IN_PROGRESS" + } + }, + "RETRY_STATE_NON_RETRYABLE_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_NON_RETRYABLE_FAILURE" + } + }, + "RETRY_STATE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_TIMEOUT" + } + }, + "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + } + }, + "RETRY_STATE_RETRY_POLICY_NOT_SET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_RETRY_POLICY_NOT_SET" + } + }, + "RETRY_STATE_INTERNAL_SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_INTERNAL_SERVER_ERROR" + } + }, + "RETRY_STATE_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_CANCEL_REQUESTED" + } + } + }, + "traits": {} + }, + "com.temporal.api#ChildWorkflowExecutionCanceledEventAttributes": { + "type": "structure", + "members": { + "details": { + "target": "com.temporal.api#Payloads" + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the child workflow.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "initiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to" + } + } + }, + "traits": {} + }, + "com.temporal.api#ChildWorkflowExecutionTimedOutEventAttributes": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the child workflow.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "initiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to" + } + }, + "retryState": { + "target": "com.temporal.api#ChildWorkflowExecutionTimedOutEventAttributesRetryState" + } + }, + "traits": {} + }, + "com.temporal.api#ChildWorkflowExecutionTimedOutEventAttributesRetryState": { + "type": "enum", + "members": { + "RETRY_STATE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_UNSPECIFIED" + } + }, + "RETRY_STATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_IN_PROGRESS" + } + }, + "RETRY_STATE_NON_RETRYABLE_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_NON_RETRYABLE_FAILURE" + } + }, + "RETRY_STATE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_TIMEOUT" + } + }, + "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + } + }, + "RETRY_STATE_RETRY_POLICY_NOT_SET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_RETRY_POLICY_NOT_SET" + } + }, + "RETRY_STATE_INTERNAL_SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_INTERNAL_SERVER_ERROR" + } + }, + "RETRY_STATE_CANCEL_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_STATE_CANCEL_REQUESTED" + } + } + }, + "traits": {} + }, + "com.temporal.api#ChildWorkflowExecutionTerminatedEventAttributes": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the child workflow.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "initiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to" + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to" + } + } + }, + "traits": {} + }, + "com.temporal.api#SignalExternalWorkflowExecutionInitiatedEventAttributes": { + "type": "structure", + "members": { + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the to-be-signalled workflow.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "signalName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "name/type of the signal to fire in the external workflow" + } + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized arguments to provide to the signal handler" + } + }, + "control": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated." + } + }, + "childWorkflowOnly": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Workers are expected to set this to true if the workflow they are requesting to cancel is\n a child of the workflow which issued the request" + } + }, + "header": { + "target": "com.temporal.api#Header" + } + }, + "traits": {} + }, + "com.temporal.api#SignalExternalWorkflowExecutionFailedEventAttributes": { + "type": "structure", + "members": { + "cause": { + "target": "com.temporal.api#SignalExternalWorkflowExecutionFailedEventAttributesCause" + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the workflow which failed the signal.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "initiatedEventId": { + "target": "smithy.api#String" + }, + "control": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated." + } + } + }, + "traits": {} + }, + "com.temporal.api#SignalExternalWorkflowExecutionFailedEventAttributesCause": { + "type": "enum", + "members": { + "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED" + } + }, + "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND" + } + }, + "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND" + } + }, + "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_SIGNAL_COUNT_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_SIGNAL_COUNT_LIMIT_EXCEEDED" + } + } + }, + "traits": {} + }, + "com.temporal.api#ExternalWorkflowExecutionSignaledEventAttributes": { + "type": "structure", + "members": { + "initiatedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "id of the `SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to" + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace of the workflow which was signaled.\n SDKs and UI tools should use `namespace` field but server must use `namespace_id` only." + } + }, + "namespaceId": { + "target": "smithy.api#String" + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "control": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated." + } + } + }, + "traits": {} + }, + "com.temporal.api#UpsertWorkflowSearchAttributesEventAttributes": { + "type": "structure", + "members": { + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionUpdateAcceptedEventAttributes": { + "type": "structure", + "members": { + "protocolInstanceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The instance ID of the update protocol that generated this event." + } + }, + "acceptedRequestMessageId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The message ID of the original request message that initiated this\n update. Needed so that the worker can recreate and deliver that same\n message as part of replay." + } + }, + "acceptedRequestSequencingEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The event ID used to sequence the original request message." + } + }, + "acceptedRequest": { + "target": "com.temporal.api#Request", + "traits": { + "smithy.api#documentation": "The message payload of the original request message that initiated this\n update." + } + } + }, + "traits": {} + }, + "com.temporal.api#Request": { + "type": "structure", + "members": { + "meta": { + "target": "com.temporal.api#Meta" + }, + "input": { + "target": "com.temporal.api#Input" + } + }, + "traits": { + "smithy.api#documentation": "The client request that triggers a Workflow Update." + } + }, + "com.temporal.api#Meta": { + "type": "structure", + "members": { + "updateId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An ID with workflow-scoped uniqueness for this Update." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A string identifying the agent that requested this Update." + } + } + }, + "traits": { + "smithy.api#documentation": "Metadata about a Workflow Update." + } + }, + "com.temporal.api#Input": { + "type": "structure", + "members": { + "header": { + "target": "com.temporal.api#Header", + "traits": { + "smithy.api#documentation": "Headers that are passed with the Update from the requesting entity.\n These can include things like auth or tracing tokens." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the Update handler to invoke on the target Workflow." + } + }, + "args": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "The arguments to pass to the named Update handler." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionUpdateRejectedEventAttributes": { + "type": "structure", + "members": { + "protocolInstanceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The instance ID of the update protocol that generated this event." + } + }, + "rejectedRequestMessageId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The message ID of the original request message that initiated this\n update. Needed so that the worker can recreate and deliver that same\n message as part of replay." + } + }, + "rejectedRequestSequencingEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The event ID used to sequence the original request message." + } + }, + "rejectedRequest": { + "target": "com.temporal.api#Request", + "traits": { + "smithy.api#documentation": "The message payload of the original request message that initiated this\n update." + } + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "The cause of rejection." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionUpdateCompletedEventAttributes": { + "type": "structure", + "members": { + "meta": { + "target": "com.temporal.api#Meta", + "traits": { + "smithy.api#documentation": "The metadata about this update." + } + }, + "acceptedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The event ID indicating the acceptance of this update." + } + }, + "outcome": { + "target": "com.temporal.api#Outcome", + "traits": { + "smithy.api#documentation": "The outcome of executing the workflow update function." + } + } + }, + "traits": {} + }, + "com.temporal.api#Outcome": { + "type": "structure", + "members": { + "success": { + "target": "com.temporal.api#Payloads" + }, + "failure": { + "target": "com.temporal.api#Failure" + } + }, + "traits": { + "smithy.api#documentation": "The outcome of a Workflow Update: success or failure." + } + }, + "com.temporal.api#WorkflowPropertiesModifiedExternallyEventAttributes": { + "type": "structure", + "members": { + "newTaskQueue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Not used." + } + }, + "newWorkflowTaskTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Not used." + } + }, + "newWorkflowRunTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Not used." + } + }, + "newWorkflowExecutionTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Not used." + } + }, + "upsertedMemo": { + "target": "com.temporal.api#Memo", + "traits": { + "smithy.api#documentation": "Not used." + } + } + }, + "traits": { + "smithy.api#documentation": "Not used anywhere. Use case is replaced by WorkflowExecutionOptionsUpdatedEventAttributes" + } + }, + "com.temporal.api#ActivityPropertiesModifiedExternallyEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `ACTIVITY_TASK_SCHEDULED` event this modification corresponds to." + } + }, + "newRetryPolicy": { + "target": "com.temporal.api#RetryPolicy", + "traits": { + "smithy.api#documentation": "If set, update the retry policy of the activity, replacing it with the specified one.\n The number of attempts at the activity is preserved." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowPropertiesModifiedEventAttributes": { + "type": "structure", + "members": { + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event which this command was reported with" + } + }, + "upsertedMemo": { + "target": "com.temporal.api#Memo", + "traits": { + "smithy.api#documentation": "If set, update the workflow memo with the provided values. The values will be merged with\n the existing memo. If the user wants to delete values, a default/empty Payload should be\n used as the value for the key being deleted." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionUpdateAdmittedEventAttributes": { + "type": "structure", + "members": { + "request": { + "target": "com.temporal.api#Request", + "traits": { + "smithy.api#documentation": "The update request associated with this event." + } + }, + "origin": { + "target": "com.temporal.api#WorkflowExecutionUpdateAdmittedEventAttributesOrigin", + "traits": { + "smithy.api#documentation": "An explanation of why this event was written to history." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionUpdateAdmittedEventAttributesOrigin": { + "type": "enum", + "members": { + "UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED" + } + }, + "UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY" + } + } + }, + "traits": { + "smithy.api#documentation": "An explanation of why this event was written to history." + } + }, + "com.temporal.api#NexusOperationScheduledEventAttributes": { + "type": "structure", + "members": { + "endpoint": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Endpoint name, must exist in the endpoint registry." + } + }, + "service": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Service name." + } + }, + "operation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Operation name." + } + }, + "input": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Input for the operation. The server converts this into Nexus request content and the appropriate content headers\n internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the\n content is transformed back to the original Payload stored in this event." + } + }, + "scheduleToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Schedule-to-close timeout for this operation.\n Indicates how long the caller is willing to wait for operation completion.\n Calls are retried internally by the server.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)\n (-- api-linter: core::0142::time-field-names=disabled\n aip.dev/not-precedent: \"timeout\" is an acceptable suffix for duration fields in this API. --)" + } + }, + "nexusHeader": { + "target": "com.temporal.api#NexusOperationScheduledEventAttributesNexusHeaderMap", + "traits": { + "smithy.api#documentation": "Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal\n activities and child workflows, these are transmitted to Nexus operations that may be external and are not\n traditional payloads." + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique ID generated by the history service upon creation of this event.\n The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key." + } + }, + "endpointId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Endpoint ID as resolved in the endpoint registry at the time this event was generated.\n This is stored on the event and used internally by the server in case the endpoint is renamed from the time the\n event was originally scheduled." + } + }, + "scheduleToStartTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Schedule-to-start timeout for this operation.\n See ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + }, + "startToCloseTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Start-to-close timeout for this operation.\n See ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"to\" is used to indicate interval. --)" + } + } + }, + "traits": { + "smithy.api#documentation": "Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command." + } + }, + "com.temporal.api#NexusOperationScheduledEventAttributesNexusHeaderMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal\n activities and child workflows, these are transmitted to Nexus operations that may be external and are not\n traditional payloads." + } + }, + "com.temporal.api#NexusOperationStartedEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the `NEXUS_OPERATION_SCHEDULED` event this task corresponds to." + } + }, + "operationId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The operation ID returned by the Nexus handler in the response to the StartOperation request.\n This ID is used when canceling the operation.\n\n Deprecated: Renamed to operation_token." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request ID allocated at schedule time." + } + }, + "operationToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The operation token returned by the Nexus handler in the response to the StartOperation request.\n This token is used when canceling the operation." + } + } + }, + "traits": { + "smithy.api#documentation": "Event marking an asynchronous operation was started by the responding Nexus handler.\n If the operation completes synchronously, this event is not generated.\n In rare situations, such as request timeouts, the service may fail to record the actual start time and will fabricate\n this event upon receiving the operation completion via callback." + } + }, + "com.temporal.api#NexusOperationCompletedEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation." + } + }, + "result": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Serialized result of the Nexus operation. The response of the Nexus handler.\n Delivered either via a completion callback or as a response to a synchronous operation." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request ID allocated at schedule time." + } + } + }, + "traits": { + "smithy.api#documentation": "Nexus operation completed successfully." + } + }, + "com.temporal.api#NexusOperationFailedEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation." + } + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request ID allocated at schedule time." + } + } + }, + "traits": { + "smithy.api#documentation": "Nexus operation failed." + } + }, + "com.temporal.api#NexusOperationCanceledEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation." + } + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Cancellation details." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request ID allocated at schedule time." + } + } + }, + "traits": { + "smithy.api#documentation": "Nexus operation completed as canceled. May or may not have been due to a cancellation request by the workflow." + } + }, + "com.temporal.api#NexusOperationTimedOutEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation." + } + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request ID allocated at schedule time." + } + } + }, + "traits": { + "smithy.api#documentation": "Nexus operation timed out." + } + }, + "com.temporal.api#NexusOperationCancelRequestedEventAttributes": { + "type": "structure", + "members": { + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to." + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported\n with." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionOptionsUpdatedEventAttributes": { + "type": "structure", + "members": { + "versioningOverride": { + "target": "com.temporal.api#VersioningOverride", + "traits": { + "smithy.api#documentation": "Versioning override upserted in this event.\n Ignored if nil or if unset_versioning_override is true." + } + }, + "unsetVersioningOverride": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Versioning override removed in this event." + } + }, + "attachedRequestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Request ID attached to the running workflow execution so that subsequent requests with same\n request ID will be deduped." + } + }, + "attachedCompletionCallbacks": { + "target": "com.temporal.api#WorkflowExecutionOptionsUpdatedEventAttributesAttachedCompletionCallbacksList", + "traits": { + "smithy.api#documentation": "Completion callbacks attached to the running workflow execution." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. The identity of the client who initiated the request that created this event." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority override upserted in this event. Represents the full priority; not just partial fields.\n Ignored if nil." + } + }, + "timeSkippingConfig": { + "target": "com.temporal.api#TimeSkippingConfig", + "traits": { + "smithy.api#documentation": "If set, the time-skipping configuration was changed. Contains the full updated configuration." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionOptionsUpdatedEventAttributesAttachedCompletionCallbacksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Callback" + }, + "traits": { + "smithy.api#documentation": "Completion callbacks attached to the running workflow execution." + } + }, + "com.temporal.api#NexusOperationCancelRequestCompletedEventAttributes": { + "type": "structure", + "members": { + "requestedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the `NEXUS_OPERATION_CANCEL_REQUESTED` event." + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported\n with." + } + }, + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to." + } + } + }, + "traits": {} + }, + "com.temporal.api#NexusOperationCancelRequestFailedEventAttributes": { + "type": "structure", + "members": { + "requestedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the `NEXUS_OPERATION_CANCEL_REQUESTED` event." + } + }, + "workflowTaskCompletedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported\n with." + } + }, + "failure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo." + } + }, + "scheduledEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to." + } + } + }, + "traits": {} + }, + "com.temporal.api#WorkflowExecutionPausedEventAttributes": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who paused the workflow execution." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for pausing the workflow execution." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request ID of the request that paused the workflow execution." + } + } + }, + "traits": { + "smithy.api#documentation": "Attributes for an event marking that a workflow execution was paused." + } + }, + "com.temporal.api#WorkflowExecutionUnpausedEventAttributes": { + "type": "structure", + "members": { + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who unpaused the workflow execution." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The reason for unpausing the workflow execution." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The request ID of the request that unpaused the workflow execution." + } + } + }, + "traits": { + "smithy.api#documentation": "Attributes for an event marking that a workflow execution was unpaused." + } + }, + "com.temporal.api#WorkflowExecutionTimeSkippingTransitionedEventAttributes": { + "type": "structure", + "members": { + "targetTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The virtual time after time skipping was applied." + } + }, + "disabledAfterBound": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "when true, time skipping was disabled automatically due to a bound being reached.\n (-- api-linter: core::0140::prepositions=disabled\n aip.dev/not-precedent: \"after\" is used to indicate temporal ordering. --)" + } + }, + "wallClockTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The wall-clock time when the time-skipping state changed event was generated." + } + } + }, + "traits": { + "smithy.api#documentation": "Attributes for an event indicating that time skipping state changed for a workflow execution,\n either time was advanced or time skipping was disabled automatically due to a bound being reached.\n The worker_may_ignore field in HistoryEvent should always be set true for this event." + } + }, + "com.temporal.api#HistoryEventsList": { + "type": "list", + "member": { + "target": "com.temporal.api#HistoryEvent" + }, + "traits": {} + }, + "com.temporal.api#DataBlob": { + "type": "structure", + "members": { + "encodingType": { + "target": "com.temporal.api#DataBlobEncodingType" + }, + "data": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#DataBlobEncodingType": { + "type": "enum", + "members": { + "ENCODING_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENCODING_TYPE_UNSPECIFIED" + } + }, + "ENCODING_TYPE_PROTO3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENCODING_TYPE_PROTO3" + } + }, + "ENCODING_TYPE_JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENCODING_TYPE_JSON" + } + } + }, + "traits": {} + }, + "com.temporal.api#GetWorkflowExecutionHistoryResponseRawHistoryList": { + "type": "list", + "member": { + "target": "com.temporal.api#DataBlob" + }, + "traits": { + "smithy.api#documentation": "Raw history is an alternate representation of history that may be returned if configured on\n the frontend. This is not supported by all SDKs. Either this or `history` will be set." + } + }, + "com.temporal.api#GetWorkflowExecutionHistory": { + "type": "operation", + "input": { + "target": "com.temporal.api#GetWorkflowExecutionHistoryRequest" + }, + "output": { + "target": "com.temporal.api#GetWorkflowExecutionHistoryResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/workflows/{execution_workflow_id}/history", + "code": 200 + }, + "smithy.api#documentation": "GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with\n `NotFound` if the specified workflow execution is unknown to the service." + } + }, + "com.temporal.api#GetWorkflowExecutionHistoryReverseRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "execution_workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "execution.workflowId" + } + }, + "execution_runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "execution.runId" + } + }, + "maximumPageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "maximumPageSize" + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#GetWorkflowExecutionHistoryReverseResponse": { + "type": "structure", + "members": { + "history": { + "target": "com.temporal.api#History" + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Will be set if there are more history events than were included in this response" + } + } + }, + "traits": {} + }, + "com.temporal.api#GetWorkflowExecutionHistoryReverse": { + "type": "operation", + "input": { + "target": "com.temporal.api#GetWorkflowExecutionHistoryReverseRequest" + }, + "output": { + "target": "com.temporal.api#GetWorkflowExecutionHistoryReverseResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/namespaces/{namespace}/workflows/{execution_workflow_id}/history-reverse", + "code": 200 + }, + "smithy.api#documentation": "GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse\n order (starting from last event). Fails with`NotFound` if the specified workflow execution is\n unknown to the service." + } + }, + "com.temporal.api#WorkflowQuery": { + "type": "structure", + "members": { + "queryType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The workflow-author-defined identifier of the query. Typically a function name." + } + }, + "queryArgs": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized arguments that will be provided to the query handler." + } + }, + "header": { + "target": "com.temporal.api#Header", + "traits": { + "smithy.api#documentation": "Headers that were passed by the caller of the query and copied by temporal\n server into the workflow task." + } + } + }, + "traits": { + "smithy.api#documentation": "See https://docs.temporal.io/docs/concepts/queries/" + } + }, + "com.temporal.api#QueryWorkflowRequestQueryRejectCondition": { + "type": "enum", + "members": { + "QUERY_REJECT_CONDITION_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUERY_REJECT_CONDITION_UNSPECIFIED" + } + }, + "QUERY_REJECT_CONDITION_NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUERY_REJECT_CONDITION_NONE" + } + }, + "QUERY_REJECT_CONDITION_NOT_OPEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUERY_REJECT_CONDITION_NOT_OPEN" + } + }, + "QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY" + } + } + }, + "traits": { + "smithy.api#documentation": "QueryRejectCondition can used to reject the query if workflow state does not satisfy condition.\n Default: QUERY_REJECT_CONDITION_NONE." + } + }, + "com.temporal.api#QueryWorkflowRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "query_query_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "execution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "query": { + "target": "com.temporal.api#WorkflowQuery" + }, + "queryRejectCondition": { + "target": "com.temporal.api#QueryWorkflowRequestQueryRejectCondition", + "traits": { + "smithy.api#documentation": "QueryRejectCondition can used to reject the query if workflow state does not satisfy condition.\n Default: QUERY_REJECT_CONDITION_NONE." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#QueryWorkflowResponse": { + "type": "structure", + "members": { + "queryResult": { + "target": "com.temporal.api#Payloads" + }, + "queryRejected": { + "target": "com.temporal.api#QueryRejected" + } + }, + "traits": {} + }, + "com.temporal.api#QueryRejected": { + "type": "structure", + "members": { + "status": { + "target": "com.temporal.api#QueryRejectedStatus" + } + }, + "traits": {} + }, + "com.temporal.api#QueryRejectedStatus": { + "type": "enum", + "members": { + "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED" + } + }, + "WORKFLOW_EXECUTION_STATUS_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_RUNNING" + } + }, + "WORKFLOW_EXECUTION_STATUS_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_COMPLETED" + } + }, + "WORKFLOW_EXECUTION_STATUS_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_FAILED" + } + }, + "WORKFLOW_EXECUTION_STATUS_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_CANCELED" + } + }, + "WORKFLOW_EXECUTION_STATUS_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_TERMINATED" + } + }, + "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW" + } + }, + "WORKFLOW_EXECUTION_STATUS_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_TIMED_OUT" + } + }, + "WORKFLOW_EXECUTION_STATUS_PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_PAUSED" + } + } + }, + "traits": {} + }, + "com.temporal.api#QueryWorkflow": { + "type": "operation", + "input": { + "target": "com.temporal.api#QueryWorkflowRequest" + }, + "output": { + "target": "com.temporal.api#QueryWorkflowResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{execution_workflow_id}/query/{query_query_type}", + "code": 200 + }, + "smithy.api#documentation": "QueryWorkflow requests a query be executed for a specified workflow execution." + } + }, + "com.temporal.api#TriggerWorkflowRuleRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "execution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "Execution info of the workflow which scheduled this activity" + } + }, + "id": { + "target": "smithy.api#String" + }, + "spec": { + "target": "com.temporal.api#WorkflowRuleSpec", + "traits": { + "smithy.api#documentation": "Note: Rule ID and expiration date are not used in the trigger request." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#TriggerWorkflowRuleResponse": { + "type": "structure", + "members": { + "applied": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True is the rule was applied, based on the rule conditions (predicate/visibility_query)." + } + } + }, + "traits": {} + }, + "com.temporal.api#TriggerWorkflowRule": { + "type": "operation", + "input": { + "target": "com.temporal.api#TriggerWorkflowRuleRequest" + }, + "output": { + "target": "com.temporal.api#TriggerWorkflowRuleResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{execution_workflow_id}/trigger-rule", + "code": 200 + }, + "smithy.api#documentation": "TriggerWorkflowRule allows to:\n * trigger existing rule for a specific workflow execution;\n * trigger rule for a specific workflow execution without creating a rule;\n This is useful for one-off operations." + } + }, + "com.temporal.api#StartWorkflowExecutionRequestWorkflowIdReusePolicy": { + "type": "enum", + "members": { + "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED" + } + }, + "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE" + } + }, + "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + } + }, + "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE" + } + }, + "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING" + } + } + }, + "traits": { + "smithy.api#documentation": "Defines whether to allow re-using the workflow id from a previously *closed* workflow.\n The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.\n\n See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow." + } + }, + "com.temporal.api#StartWorkflowExecutionRequestWorkflowIdConflictPolicy": { + "type": "enum", + "members": { + "WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED" + } + }, + "WORKFLOW_ID_CONFLICT_POLICY_FAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_CONFLICT_POLICY_FAIL" + } + }, + "WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING" + } + }, + "WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING" + } + } + }, + "traits": { + "smithy.api#documentation": "Defines how to resolve a workflow id conflict with a *running* workflow.\n The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL.\n\n See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow." + } + }, + "com.temporal.api#StartWorkflowExecutionRequestCompletionCallbacksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Callback" + }, + "traits": { + "smithy.api#documentation": "Callbacks to be called by the server when this workflow reaches a terminal state.\n If the workflow continues-as-new, these callbacks will be carried over to the new execution.\n Callback addresses must be whitelisted in the server's dynamic configuration." + } + }, + "com.temporal.api#StartWorkflowExecutionRequestLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links to be associated with the workflow." + } + }, + "com.temporal.api#StartWorkflowExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "taskQueue": { + "target": "com.temporal.api#TaskQueue" + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized arguments to the workflow. These are passed as arguments to the workflow function." + } + }, + "workflowExecutionTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Total workflow execution timeout including retries and continue as new." + } + }, + "workflowRunTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow run." + } + }, + "workflowTaskTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow task." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request" + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this start request. Typically UUIDv4." + } + }, + "workflowIdReusePolicy": { + "target": "com.temporal.api#StartWorkflowExecutionRequestWorkflowIdReusePolicy", + "traits": { + "smithy.api#documentation": "Defines whether to allow re-using the workflow id from a previously *closed* workflow.\n The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.\n\n See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow." + } + }, + "workflowIdConflictPolicy": { + "target": "com.temporal.api#StartWorkflowExecutionRequestWorkflowIdConflictPolicy", + "traits": { + "smithy.api#documentation": "Defines how to resolve a workflow id conflict with a *running* workflow.\n The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL.\n\n See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow." + } + }, + "retryPolicy": { + "target": "com.temporal.api#RetryPolicy", + "traits": { + "smithy.api#documentation": "The retry policy for the workflow. Will never exceed `workflow_execution_timeout`." + } + }, + "cronSchedule": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/" + } + }, + "memo": { + "target": "com.temporal.api#Memo" + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "header": { + "target": "com.temporal.api#Header" + }, + "requestEagerExecution": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Request to get the first workflow task inline in the response bypassing matching service and worker polling.\n If set to `true` the caller is expected to have a worker available and capable of processing the task.\n The returned task will be marked as started and is expected to be completed by the specified\n `workflow_task_timeout`." + } + }, + "continuedFailure": { + "target": "com.temporal.api#Failure", + "traits": { + "smithy.api#documentation": "These values will be available as ContinuedFailure and LastCompletionResult in the\n WorkflowExecutionStarted event and through SDKs. The are currently only used by the\n server itself (for the schedules feature) and are not intended to be exposed in\n StartWorkflowExecution." + } + }, + "lastCompletionResult": { + "target": "com.temporal.api#Payloads" + }, + "workflowStartDelay": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`.\n If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest\n of the delay will be ignored." + } + }, + "completionCallbacks": { + "target": "com.temporal.api#StartWorkflowExecutionRequestCompletionCallbacksList", + "traits": { + "smithy.api#documentation": "Callbacks to be called by the server when this workflow reaches a terminal state.\n If the workflow continues-as-new, these callbacks will be carried over to the new execution.\n Callback addresses must be whitelisted in the server's dynamic configuration." + } + }, + "userMetadata": { + "target": "com.temporal.api#UserMetadata", + "traits": { + "smithy.api#documentation": "Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo\n for use by user interfaces to display the fixed as-of-start summary and details of the\n workflow." + } + }, + "links": { + "target": "com.temporal.api#StartWorkflowExecutionRequestLinksList", + "traits": { + "smithy.api#documentation": "Links to be associated with the workflow." + } + }, + "versioningOverride": { + "target": "com.temporal.api#VersioningOverride", + "traits": { + "smithy.api#documentation": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\n To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions." + } + }, + "onConflictOptions": { + "target": "com.temporal.api#OnConflictOptions", + "traits": { + "smithy.api#documentation": "Defines actions to be done to the existing running workflow when the conflict policy\n WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set (ie., nil value) or set to a\n empty object (ie., all options with default value), it won't do anything to the existing\n running workflow. If set, it will add a history event to the running workflow." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata" + } + }, + "eagerWorkerDeploymentOptions": { + "target": "com.temporal.api#WorkerDeploymentOptions", + "traits": { + "smithy.api#documentation": "Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`." + } + }, + "timeSkippingConfig": { + "target": "com.temporal.api#TimeSkippingConfig", + "traits": { + "smithy.api#documentation": "Time-skipping configuration. If not set, time skipping is disabled." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#StartWorkflowExecutionResponse": { + "type": "structure", + "members": { + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING)." + } + }, + "started": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, a new workflow was started." + } + }, + "status": { + "target": "com.temporal.api#StartWorkflowExecutionResponseStatus", + "traits": { + "smithy.api#documentation": "Current execution status of the workflow. Typically remains WORKFLOW_EXECUTION_STATUS_RUNNING\n unless a de-dupe occurs or in specific scenarios handled within the ExecuteMultiOperation (refer to its docs)." + } + }, + "eagerWorkflowTask": { + "target": "com.temporal.api#PollWorkflowTaskQueueResponse", + "traits": { + "smithy.api#documentation": "When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will\n return the first workflow task to be eagerly executed.\n The caller is expected to have a worker available to process the task." + } + }, + "link": { + "target": "com.temporal.api#Link", + "traits": { + "smithy.api#documentation": "Link to the workflow event." + } + } + }, + "traits": {} + }, + "com.temporal.api#StartWorkflowExecutionResponseStatus": { + "type": "enum", + "members": { + "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED" + } + }, + "WORKFLOW_EXECUTION_STATUS_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_RUNNING" + } + }, + "WORKFLOW_EXECUTION_STATUS_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_COMPLETED" + } + }, + "WORKFLOW_EXECUTION_STATUS_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_FAILED" + } + }, + "WORKFLOW_EXECUTION_STATUS_CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_CANCELED" + } + }, + "WORKFLOW_EXECUTION_STATUS_TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_TERMINATED" + } + }, + "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW" + } + }, + "WORKFLOW_EXECUTION_STATUS_TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_TIMED_OUT" + } + }, + "WORKFLOW_EXECUTION_STATUS_PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_EXECUTION_STATUS_PAUSED" + } + } + }, + "traits": { + "smithy.api#documentation": "Current execution status of the workflow. Typically remains WORKFLOW_EXECUTION_STATUS_RUNNING\n unless a de-dupe occurs or in specific scenarios handled within the ExecuteMultiOperation (refer to its docs)." + } + }, + "com.temporal.api#PollWorkflowTaskQueueResponse": { + "type": "structure", + "members": { + "taskToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this task" + } + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "previousStartedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The last workflow task started event which was processed by some worker for this execution.\n Will be zero if no task has ever started." + } + }, + "startedEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of the most recent workflow task started event, which will have been generated as a\n result of this poll request being served. Will be zero if the task\n does not contain any events which would advance history (no new WFT started).\n Currently this can happen for queries." + } + }, + "attempt": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Starting at 1, the number of attempts to complete this task by any worker." + } + }, + "backlogCountHint": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A hint that there are more tasks already present in this task queue\n partition. Can be used to prioritize draining a sticky queue.\n\n Specifically, the returned number is the number of tasks remaining in\n the in-memory buffer for this partition, which is currently capped at\n 1000. Because sticky queues only have one partition, this number is\n more useful when draining them. Normal queues, typically having more than one\n partition, will return a number representing only some portion of the\n overall backlog. Subsequent RPCs may not hit the same partition as\n this call." + } + }, + "history": { + "target": "com.temporal.api#History", + "traits": { + "smithy.api#documentation": "The history for this workflow, which will either be complete or partial. Partial histories\n are sent to workers who have signaled that they are using a sticky queue when completing\n a workflow task." + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Will be set if there are more history events than were included in this response. Such events\n should be fetched via `GetWorkflowExecutionHistory`." + } + }, + "query": { + "target": "com.temporal.api#WorkflowQuery", + "traits": { + "smithy.api#documentation": "Legacy queries appear in this field. The query must be responded to via\n `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on\n closed workflows) then the `history` field will be populated with the entire history. It\n may also be populated if this task originates on a non-sticky queue." + } + }, + "workflowExecutionTaskQueue": { + "target": "com.temporal.api#TaskQueue", + "traits": { + "smithy.api#documentation": "The task queue this task originated from, which will always be the original non-sticky name\n for the queue, even if this response came from polling a sticky queue." + } + }, + "scheduledTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "When this task was scheduled by the server" + } + }, + "startedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "When the current workflow task started event was generated, meaning the current attempt." + } + }, + "queries": { + "target": "com.temporal.api#PollWorkflowTaskQueueResponseQueriesMap", + "traits": { + "smithy.api#documentation": "Queries that should be executed after applying the history in this task. Responses should be\n attached to `RespondWorkflowTaskCompletedRequest::query_results`" + } + }, + "messages": { + "target": "com.temporal.api#PollWorkflowTaskQueueResponseMessagesList", + "traits": { + "smithy.api#documentation": "Protocol messages piggybacking on a WFT as a transport" + } + }, + "pollerScalingDecision": { + "target": "com.temporal.api#PollerScalingDecision", + "traits": { + "smithy.api#documentation": "Server-advised information the SDK may use to adjust its poller count." + } + }, + "pollerGroupId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This poller group ID identifies the owner of the workflow task awaiting for query response.\n Corresponding RespondQueryTaskCompleted should pass this value for proper routing." + } + }, + "pollerGroupInfos": { + "target": "com.temporal.api#PollWorkflowTaskQueueResponsePollerGroupInfosList", + "traits": { + "smithy.api#documentation": "The weighted list of poller groups IDs that client should use for future polls to this task\n queue. Client is expected to:\n 1. Maintain minimum number of pollers no less than the number of groups.\n 2. Try to assign the next poll to a group without any pending polls,\n 3. If every group has some pending polls, assign the next poll to a group randomly\n according to the weights." + } + } + }, + "traits": {} + }, + "com.temporal.api#PollWorkflowTaskQueueResponseQueriesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.temporal.api#WorkflowQuery" + }, + "traits": { + "smithy.api#documentation": "Queries that should be executed after applying the history in this task. Responses should be\n attached to `RespondWorkflowTaskCompletedRequest::query_results`" + } + }, + "com.temporal.api#Message": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An ID for this specific message." + } + }, + "protocolInstanceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Identifies the specific instance of a protocol to which this message\n belongs." + } + }, + "eventId": { + "target": "smithy.api#String" + }, + "commandIndex": { + "target": "smithy.api#String" + }, + "body": { + "target": "com.temporal.api#GoogleProtobufAny", + "traits": { + "smithy.api#documentation": "The opaque data carried by this message. The protocol type can be\n extracted from the package name of the message carried inside the Any." + } + } + }, + "traits": { + "smithy.api#documentation": "(-- api-linter: core::0146::any=disabled\n aip.dev/not-precedent: We want runtime extensibility for the body field --)" + } + }, + "com.temporal.api#GoogleProtobufAny": { + "type": "structure", + "members": { + "_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the serialized message.", + "smithy.api#jsonName": "@type" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains an arbitrary serialized message along with a @type that describes the type of the serialized message." + } + }, + "com.temporal.api#PollWorkflowTaskQueueResponseMessagesList": { + "type": "list", + "member": { + "target": "com.temporal.api#Message" + }, + "traits": { + "smithy.api#documentation": "Protocol messages piggybacking on a WFT as a transport" + } + }, + "com.temporal.api#PollerScalingDecision": { + "type": "structure", + "members": { + "pollRequestDeltaSuggestion": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "How many poll requests to suggest should be added or removed, if any. As of now, server only\n scales up or down by 1. However, SDKs should allow for other values (while staying within\n defined min/max).\n\n The SDK is free to ignore this suggestion, EX: making more polls would not make sense because\n all slots are already occupied." + } + } + }, + "traits": { + "smithy.api#documentation": "Attached to task responses to give hints to the SDK about how it may adjust its number of\n pollers." + } + }, + "com.temporal.api#PollerGroupInfo": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String" + }, + "weight": { + "target": "smithy.api#Double" + } + }, + "traits": {} + }, + "com.temporal.api#PollWorkflowTaskQueueResponsePollerGroupInfosList": { + "type": "list", + "member": { + "target": "com.temporal.api#PollerGroupInfo" + }, + "traits": { + "smithy.api#documentation": "The weighted list of poller groups IDs that client should use for future polls to this task\n queue. Client is expected to:\n 1. Maintain minimum number of pollers no less than the number of groups.\n 2. Try to assign the next poll to a group without any pending polls,\n 3. If every group has some pending polls, assign the next poll to a group randomly\n according to the weights." + } + }, + "com.temporal.api#StartWorkflowExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#StartWorkflowExecutionRequest" + }, + "output": { + "target": "com.temporal.api#StartWorkflowExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{workflowId}", + "code": 200 + }, + "smithy.api#documentation": "StartWorkflowExecution starts a new workflow execution.\n\n It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and\n also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an\n instance already exists with same workflow id." + } + }, + "com.temporal.api#PauseWorkflowExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow to pause." + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "ID of the workflow execution to be paused. Required." + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason to pause the workflow execution." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this pause request for idempotence. Typically UUIDv4." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#PauseWorkflowExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#PauseWorkflowExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#PauseWorkflowExecutionRequest" + }, + "output": { + "target": "com.temporal.api#PauseWorkflowExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{workflowId}/pause", + "code": 200 + }, + "smithy.api#documentation": "Note: This is an experimental API and the behavior may change in a future release.\n PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in\n - The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history\n - No new workflow tasks or activity tasks are dispatched.\n - Any workflow task currently executing on the worker will be allowed to complete.\n - Any activity task currently executing will be paused.\n - All server-side events will continue to be processed by the server.\n - Queries & Updates on a paused workflow will be rejected." + } + }, + "com.temporal.api#SignalWithStartWorkflowExecutionRequestWorkflowIdReusePolicy": { + "type": "enum", + "members": { + "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED" + } + }, + "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE" + } + }, + "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + } + }, + "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE" + } + }, + "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING" + } + } + }, + "traits": { + "smithy.api#documentation": "Defines whether to allow re-using the workflow id from a previously *closed* workflow.\n The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.\n\n See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow." + } + }, + "com.temporal.api#SignalWithStartWorkflowExecutionRequestWorkflowIdConflictPolicy": { + "type": "enum", + "members": { + "WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED" + } + }, + "WORKFLOW_ID_CONFLICT_POLICY_FAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_CONFLICT_POLICY_FAIL" + } + }, + "WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING" + } + }, + "WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING" + } + } + }, + "traits": { + "smithy.api#documentation": "Defines how to resolve a workflow id conflict with a *running* workflow.\n The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING.\n Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option.\n\n See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow." + } + }, + "com.temporal.api#SignalWithStartWorkflowExecutionRequestLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events." + } + }, + "com.temporal.api#SignalWithStartWorkflowExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "signalName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The workflow author-defined name of the signal to send to the workflow" + } + }, + "workflowType": { + "target": "com.temporal.api#WorkflowType" + }, + "taskQueue": { + "target": "com.temporal.api#TaskQueue", + "traits": { + "smithy.api#documentation": "The task queue to start this workflow on, if it will be started" + } + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized arguments to the workflow. These are passed as arguments to the workflow function." + } + }, + "workflowExecutionTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Total workflow execution timeout including retries and continue as new" + } + }, + "workflowRunTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow run" + } + }, + "workflowTaskTimeout": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Timeout of a single workflow task" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe signal w/ start requests" + } + }, + "workflowIdReusePolicy": { + "target": "com.temporal.api#SignalWithStartWorkflowExecutionRequestWorkflowIdReusePolicy", + "traits": { + "smithy.api#documentation": "Defines whether to allow re-using the workflow id from a previously *closed* workflow.\n The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.\n\n See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow." + } + }, + "workflowIdConflictPolicy": { + "target": "com.temporal.api#SignalWithStartWorkflowExecutionRequestWorkflowIdConflictPolicy", + "traits": { + "smithy.api#documentation": "Defines how to resolve a workflow id conflict with a *running* workflow.\n The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING.\n Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option.\n\n See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow." + } + }, + "signalInput": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized value(s) to provide with the signal" + } + }, + "control": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated." + } + }, + "retryPolicy": { + "target": "com.temporal.api#RetryPolicy", + "traits": { + "smithy.api#documentation": "Retry policy for the workflow" + } + }, + "cronSchedule": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/" + } + }, + "memo": { + "target": "com.temporal.api#Memo" + }, + "searchAttributes": { + "target": "com.temporal.api#SearchAttributes" + }, + "header": { + "target": "com.temporal.api#Header" + }, + "workflowStartDelay": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`.\n Note that the signal will be delivered with the first workflow task. If the workflow gets\n another SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately\n and the rest of the delay period will be ignored, even if that request also had a delay.\n Signal via SignalWorkflowExecution will not unblock the workflow." + } + }, + "userMetadata": { + "target": "com.temporal.api#UserMetadata", + "traits": { + "smithy.api#documentation": "Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo\n for use by user interfaces to display the fixed as-of-start summary and details of the\n workflow." + } + }, + "links": { + "target": "com.temporal.api#SignalWithStartWorkflowExecutionRequestLinksList", + "traits": { + "smithy.api#documentation": "Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events." + } + }, + "versioningOverride": { + "target": "com.temporal.api#VersioningOverride", + "traits": { + "smithy.api#documentation": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\n To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions." + } + }, + "priority": { + "target": "com.temporal.api#Priority", + "traits": { + "smithy.api#documentation": "Priority metadata" + } + }, + "timeSkippingConfig": { + "target": "com.temporal.api#TimeSkippingConfig", + "traits": { + "smithy.api#documentation": "Time-skipping configuration. If not set, time skipping is disabled." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#SignalWithStartWorkflowExecutionResponse": { + "type": "structure", + "members": { + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The run id of the workflow that was started - or just signaled, if it was already running." + } + }, + "started": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, a new workflow was started." + } + }, + "signalLink": { + "target": "com.temporal.api#Link", + "traits": { + "smithy.api#documentation": "Link to be associated with the WorkflowExecutionSignaled event.\n Added on the response to propagate the backlink.\n Available from Temporal server 1.31 and up." + } + } + }, + "traits": {} + }, + "com.temporal.api#SignalWithStartWorkflowExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#SignalWithStartWorkflowExecutionRequest" + }, + "output": { + "target": "com.temporal.api#SignalWithStartWorkflowExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}", + "code": 200 + }, + "smithy.api#documentation": "SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if\n it isn't yet started.\n\n If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history\n and a workflow task is generated.\n\n If the workflow is not running or not found, then the workflow is created with\n `WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a\n workflow task is generated.\n\n (-- api-linter: core::0136::prepositions=disabled\n aip.dev/not-precedent: \"With\" is used to indicate combined operation. --)" + } + }, + "com.temporal.api#UnpauseWorkflowExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Namespace of the workflow to unpause." + } + }, + "workflowId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "ID of the workflow execution to be paused. Required." + } + }, + "runId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the client who initiated this request." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason to unpause the workflow execution." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this unpause request for idempotence. Typically UUIDv4." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UnpauseWorkflowExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#UnpauseWorkflowExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#UnpauseWorkflowExecutionRequest" + }, + "output": { + "target": "com.temporal.api#UnpauseWorkflowExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{workflowId}/unpause", + "code": 200 + }, + "smithy.api#documentation": "Note: This is an experimental API and the behavior may change in a future release.\n UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request.\n Unpausing a workflow execution results in\n - The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history\n - Workflow tasks and activity tasks are resumed." + } + }, + "com.temporal.api#RequestCancelWorkflowExecutionRequestLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links to be associated with the WorkflowExecutionCanceled event." + } + }, + "com.temporal.api#RequestCancelWorkflowExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflow_execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe cancellation requests" + } + }, + "firstExecutionRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If set, this call will error if the most recent (if no run id is set on\n `workflow_execution`), or specified (if it is) workflow execution is not part of the same\n execution chain as this id." + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Reason for requesting the cancellation" + } + }, + "links": { + "target": "com.temporal.api#RequestCancelWorkflowExecutionRequestLinksList", + "traits": { + "smithy.api#documentation": "Links to be associated with the WorkflowExecutionCanceled event." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#RequestCancelWorkflowExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#RequestCancelWorkflowExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#RequestCancelWorkflowExecutionRequest" + }, + "output": { + "target": "com.temporal.api#RequestCancelWorkflowExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/cancel", + "code": 200 + }, + "smithy.api#documentation": "RequestCancelWorkflowExecution is called by workers when they want to request cancellation of\n a workflow execution.\n\n This results in a new `WORKFLOW_EXECUTION_CANCEL_REQUESTED` event being written to the\n workflow history and a new workflow task created for the workflow. It returns success if the requested\n workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist." + } + }, + "com.temporal.api#ResetWorkflowExecutionRequestResetReapplyType": { + "type": "enum", + "members": { + "RESET_REAPPLY_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_UNSPECIFIED" + } + }, + "RESET_REAPPLY_TYPE_SIGNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_SIGNAL" + } + }, + "RESET_REAPPLY_TYPE_NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_NONE" + } + }, + "RESET_REAPPLY_TYPE_ALL_ELIGIBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_TYPE_ALL_ELIGIBLE" + } + } + }, + "traits": { + "smithy.api#documentation": "Deprecated. Use `options`.\n Default: RESET_REAPPLY_TYPE_SIGNAL" + } + }, + "com.temporal.api#ResetWorkflowExecutionRequestResetReapplyExcludeTypesItem": { + "type": "enum", + "members": { + "RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED" + } + }, + "RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL" + } + }, + "RESET_REAPPLY_EXCLUDE_TYPE_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_EXCLUDE_TYPE_UPDATE" + } + }, + "RESET_REAPPLY_EXCLUDE_TYPE_NEXUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_EXCLUDE_TYPE_NEXUS" + } + }, + "RESET_REAPPLY_EXCLUDE_TYPE_CANCEL_REQUEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET_REAPPLY_EXCLUDE_TYPE_CANCEL_REQUEST" + } + } + }, + "traits": {} + }, + "com.temporal.api#ResetWorkflowExecutionRequestResetReapplyExcludeTypesList": { + "type": "list", + "member": { + "target": "com.temporal.api#ResetWorkflowExecutionRequestResetReapplyExcludeTypesItem" + }, + "traits": { + "smithy.api#documentation": "Event types not to be reapplied" + } + }, + "com.temporal.api#ResetWorkflowExecutionRequestPostResetOperationsList": { + "type": "list", + "member": { + "target": "com.temporal.api#PostResetOperation" + }, + "traits": { + "smithy.api#documentation": "Operations to perform after the workflow has been reset. These operations will be applied\n to the *new* run of the workflow execution in the order they are provided.\n All operations are applied to the workflow before the first new workflow task is generated" + } + }, + "com.temporal.api#ResetWorkflowExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflow_execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "The workflow to reset. If this contains a run ID then the workflow will be reset back to the\n provided event ID in that run. Otherwise it will be reset to the provided event ID in the\n current run. In all cases the current run will be terminated and a new run started." + } + }, + "reason": { + "target": "smithy.api#String" + }, + "workflowTaskFinishEventId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or\n `WORKFLOW_TASK_STARTED` event to reset to." + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe reset requests" + } + }, + "resetReapplyType": { + "target": "com.temporal.api#ResetWorkflowExecutionRequestResetReapplyType", + "traits": { + "smithy.api#documentation": "Deprecated. Use `options`.\n Default: RESET_REAPPLY_TYPE_SIGNAL" + } + }, + "resetReapplyExcludeTypes": { + "target": "com.temporal.api#ResetWorkflowExecutionRequestResetReapplyExcludeTypesList", + "traits": { + "smithy.api#documentation": "Event types not to be reapplied" + } + }, + "postResetOperations": { + "target": "com.temporal.api#ResetWorkflowExecutionRequestPostResetOperationsList", + "traits": { + "smithy.api#documentation": "Operations to perform after the workflow has been reset. These operations will be applied\n to the *new* run of the workflow execution in the order they are provided.\n All operations are applied to the workflow before the first new workflow task is generated" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ResetWorkflowExecutionResponse": { + "type": "structure", + "members": { + "runId": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.temporal.api#ResetWorkflowExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#ResetWorkflowExecutionRequest" + }, + "output": { + "target": "com.temporal.api#ResetWorkflowExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/reset", + "code": 200 + }, + "smithy.api#documentation": "ResetWorkflowExecution will reset an existing workflow execution to a specified\n `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current\n execution instance. \"Exclusive\" means the identified completed event itself is not replayed\n in the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed\n immediately, and a new workflow task will be scheduled to retry it." + } + }, + "com.temporal.api#SignalWorkflowExecutionRequestLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links to be associated with the WorkflowExecutionSignaled event." + } + }, + "com.temporal.api#SignalWorkflowExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflow_execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "signalName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The workflow author-defined name of the signal to send to the workflow" + } + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "input": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized value(s) to provide with the signal" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "requestId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Used to de-dupe sent signals" + } + }, + "control": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deprecated." + } + }, + "header": { + "target": "com.temporal.api#Header", + "traits": { + "smithy.api#documentation": "Headers that are passed with the signal to the processing workflow.\n These can include things like auth or tracing tokens." + } + }, + "links": { + "target": "com.temporal.api#SignalWorkflowExecutionRequestLinksList", + "traits": { + "smithy.api#documentation": "Links to be associated with the WorkflowExecutionSignaled event." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#SignalWorkflowExecutionResponse": { + "type": "structure", + "members": { + "link": { + "target": "com.temporal.api#Link", + "traits": { + "smithy.api#documentation": "Link to be associated with the WorkflowExecutionSignaled event.\n Added on the response to propagate the backlink.\n Available from Temporal server 1.31 and up." + } + } + }, + "traits": {} + }, + "com.temporal.api#SignalWorkflowExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#SignalWorkflowExecutionRequest" + }, + "output": { + "target": "com.temporal.api#SignalWorkflowExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/signal/{signalName}", + "code": 200 + }, + "smithy.api#documentation": "SignalWorkflowExecution is used to send a signal to a running workflow execution.\n\n This results in a `WORKFLOW_EXECUTION_SIGNALED` event recorded in the history and a workflow\n task being created for the execution." + } + }, + "com.temporal.api#TerminateWorkflowExecutionRequestLinksList": { + "type": "list", + "member": { + "target": "com.temporal.api#Link" + }, + "traits": { + "smithy.api#documentation": "Links to be associated with the WorkflowExecutionTerminated event." + } + }, + "com.temporal.api#TerminateWorkflowExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflow_execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "reason": { + "target": "smithy.api#String" + }, + "details": { + "target": "com.temporal.api#Payloads", + "traits": { + "smithy.api#documentation": "Serialized additional information to attach to the termination event" + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identity of the worker/client" + } + }, + "firstExecutionRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If set, this call will error if the most recent (if no run id is set on\n `workflow_execution`), or specified (if it is) workflow execution is not part of the same\n execution chain as this id." + } + }, + "links": { + "target": "com.temporal.api#TerminateWorkflowExecutionRequestLinksList", + "traits": { + "smithy.api#documentation": "Links to be associated with the WorkflowExecutionTerminated event." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#TerminateWorkflowExecutionResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#TerminateWorkflowExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#TerminateWorkflowExecutionRequest" + }, + "output": { + "target": "com.temporal.api#TerminateWorkflowExecutionResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/terminate", + "code": 200 + }, + "smithy.api#documentation": "TerminateWorkflowExecution terminates an existing workflow execution by recording a\n `WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the\n execution instance." + } + }, + "com.temporal.api#UpdateWorkflowExecutionOptionsRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The namespace name of the target Workflow." + } + }, + "workflow_execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "The target Workflow Id and (optionally) a specific Run Id thereof.\n (-- api-linter: core::0203::optional=disabled\n aip.dev/not-precedent: false positive triggered by the word \"optional\" --)" + } + }, + "workflowExecutionOptions": { + "target": "com.temporal.api#WorkflowExecutionOptions", + "traits": { + "smithy.api#documentation": "Workflow Execution options. Partial updates are accepted and controlled by update_mask." + } + }, + "updateMask": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Controls which fields from `workflow_execution_options` will be applied.\n To unset a field, set it to null and use the update mask to indicate that it should be mutated." + } + }, + "identity": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Optional. The identity of the client who initiated this request." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateWorkflowExecutionOptionsResponse": { + "type": "structure", + "members": { + "workflowExecutionOptions": { + "target": "com.temporal.api#WorkflowExecutionOptions", + "traits": { + "smithy.api#documentation": "Workflow Execution options after update." + } + } + }, + "traits": {} + }, + "com.temporal.api#UpdateWorkflowExecutionOptions": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateWorkflowExecutionOptionsRequest" + }, + "output": { + "target": "com.temporal.api#UpdateWorkflowExecutionOptionsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/update-options", + "code": 200 + }, + "smithy.api#documentation": "UpdateWorkflowExecutionOptions partially updates the WorkflowExecutionOptions of an existing workflow execution." + } + }, + "com.temporal.api#WaitPolicy": { + "type": "structure", + "members": { + "lifecycleStage": { + "target": "com.temporal.api#WaitPolicyLifecycleStage", + "traits": { + "smithy.api#documentation": "Indicates the Update lifecycle stage that the Update must reach before\n API call is returned.\n NOTE: This field works together with API call timeout which is limited by\n server timeout (maximum wait time). If server timeout is expired before\n user specified timeout, API call returns even if specified stage is not reached." + } + } + }, + "traits": { + "smithy.api#documentation": "Specifies client's intent to wait for Update results." + } + }, + "com.temporal.api#WaitPolicyLifecycleStage": { + "type": "enum", + "members": { + "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED" + } + }, + "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED" + } + }, + "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED" + } + }, + "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED" + } + } + }, + "traits": { + "smithy.api#documentation": "Indicates the Update lifecycle stage that the Update must reach before\n API call is returned.\n NOTE: This field works together with API call timeout which is limited by\n server timeout (maximum wait time). If server timeout is expired before\n user specified timeout, API call returns even if specified stage is not reached." + } + }, + "com.temporal.api#UpdateWorkflowExecutionRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The namespace name of the target Workflow." + } + }, + "workflow_execution_workflow_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "request_input_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution", + "traits": { + "smithy.api#documentation": "The target Workflow Id and (optionally) a specific Run Id thereof.\n (-- api-linter: core::0203::optional=disabled\n aip.dev/not-precedent: false positive triggered by the word \"optional\" --)" + } + }, + "firstExecutionRunId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If set, this call will error if the most recent (if no Run Id is set on\n `workflow_execution`), or specified (if it is) Workflow Execution is not\n part of the same execution chain as this Id." + } + }, + "waitPolicy": { + "target": "com.temporal.api#WaitPolicy", + "traits": { + "smithy.api#documentation": "Specifies client's intent to wait for Update results.\n NOTE: This field works together with API call timeout which is limited by\n server timeout (maximum wait time). If server timeout is expired before\n user specified timeout, API call returns even if specified stage is not reached.\n Actual reached stage will be included in the response." + } + }, + "request": { + "target": "com.temporal.api#Request", + "traits": { + "smithy.api#documentation": "The request information that will be delivered all the way down to the\n Workflow Execution." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateWorkflowExecutionResponse": { + "type": "structure", + "members": { + "updateRef": { + "target": "com.temporal.api#UpdateRef", + "traits": { + "smithy.api#documentation": "Enough information for subsequent poll calls if needed. Never null." + } + }, + "outcome": { + "target": "com.temporal.api#Outcome", + "traits": { + "smithy.api#documentation": "The outcome of the Update if and only if the Workflow Update\n has completed. If this response is being returned before the Update has\n completed then this field will not be set." + } + }, + "stage": { + "target": "com.temporal.api#UpdateWorkflowExecutionResponseStage", + "traits": { + "smithy.api#documentation": "The most advanced lifecycle stage that the Update is known to have\n reached, where lifecycle stages are ordered\n UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED <\n UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED <\n UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED <\n UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED.\n UNSPECIFIED will be returned if and only if the server's maximum wait\n time was reached before the Update reached the stage specified in the\n request WaitPolicy, and before the context deadline expired; clients may\n may then retry the call as needed." + } + } + }, + "traits": {} + }, + "com.temporal.api#UpdateRef": { + "type": "structure", + "members": { + "workflowExecution": { + "target": "com.temporal.api#WorkflowExecution" + }, + "updateId": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "The data needed by a client to refer to a previously invoked Workflow Update." + } + }, + "com.temporal.api#UpdateWorkflowExecutionResponseStage": { + "type": "enum", + "members": { + "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED" + } + }, + "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED" + } + }, + "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED" + } + }, + "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED" + } + } + }, + "traits": { + "smithy.api#documentation": "The most advanced lifecycle stage that the Update is known to have\n reached, where lifecycle stages are ordered\n UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED <\n UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED <\n UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED <\n UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED.\n UNSPECIFIED will be returned if and only if the server's maximum wait\n time was reached before the Update reached the stage specified in the\n request WaitPolicy, and before the context deadline expired; clients may\n may then retry the call as needed." + } + }, + "com.temporal.api#UpdateWorkflowExecution": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateWorkflowExecutionRequest" + }, + "output": { + "target": "com.temporal.api#UpdateWorkflowExecutionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/update/{request_input_name}", + "code": 200 + }, + "smithy.api#documentation": "Invokes the specified Update function on user Workflow code." + } + }, + "com.temporal.api#ListNexusEndpointsRequest": { + "type": "structure", + "members": { + "pageSize": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "pageSize" + } + }, + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "nextPageToken", + "smithy.api#documentation": "To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's\n response, the token will be empty if there's no other page.\n Note: the last page may be empty if the total number of endpoints registered is a multiple of the page size." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "name", + "smithy.api#documentation": "Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results.\n (-- api-linter: core::203::field-behavior-required=disabled\n aip.dev/not-precedent: Not following linter rules. --)" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#ListNexusEndpointsResponse": { + "type": "structure", + "members": { + "nextPageToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Token for getting the next page." + } + }, + "endpoints": { + "target": "com.temporal.api#ListNexusEndpointsResponseEndpointsList" + } + }, + "traits": {} + }, + "com.temporal.api#Endpoint": { + "type": "structure", + "members": { + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Data version for this endpoint, incremented for every update issued via the UpdateNexusEndpoint API." + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique server-generated endpoint ID." + } + }, + "spec": { + "target": "com.temporal.api#EndpointSpec", + "traits": { + "smithy.api#documentation": "Spec for the endpoint." + } + }, + "createdTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date and time when the endpoint was created.\n (-- api-linter: core::0142::time-field-names=disabled\n aip.dev/not-precedent: Not following linter rules. --)" + } + }, + "lastModifiedTime": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date and time when the endpoint was last modified.\n Will not be set if the endpoint has never been modified.\n (-- api-linter: core::0142::time-field-names=disabled\n aip.dev/not-precedent: Not following linter rules. --)" + } + }, + "urlPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Server exposed URL prefix for invocation of operations on this endpoint.\n This doesn't include the protocol, hostname or port as the server does not know how it should be accessed\n publicly. The URL is stable in the face of endpoint renames." + } + } + }, + "traits": { + "smithy.api#documentation": "A cluster-global binding from an endpoint ID to a target for dispatching incoming Nexus requests." + } + }, + "com.temporal.api#EndpointSpec": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Endpoint name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`.\n Renaming an endpoint breaks all workflow callers that reference this endpoint, causing operations to fail." + } + }, + "description": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Markdown description serialized as a single JSON string.\n If the Payload is encrypted, the UI and CLI may decrypt with the configured codec server endpoint.\n By default, the server enforces a limit of 20,000 bytes for this entire payload." + } + }, + "target": { + "target": "com.temporal.api#EndpointTarget", + "traits": { + "smithy.api#documentation": "Target to route requests to." + } + } + }, + "traits": { + "smithy.api#documentation": "Contains mutable fields for an Endpoint." + } + }, + "com.temporal.api#EndpointTarget": { + "type": "structure", + "members": { + "worker": { + "target": "com.temporal.api#EndpointTargetWorker" + }, + "external": { + "target": "com.temporal.api#EndpointTargetExternal" + } + }, + "traits": { + "smithy.api#documentation": "Target to route requests to." + } + }, + "com.temporal.api#EndpointTargetWorker": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Namespace to route requests to." + } + }, + "taskQueue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Nexus task queue to route requests to." + } + } + }, + "traits": { + "smithy.api#documentation": "Target a worker polling on a Nexus task queue in a specific namespace." + } + }, + "com.temporal.api#EndpointTargetExternal": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL to call." + } + } + }, + "traits": { + "smithy.api#documentation": "Target an external server by URL.\n At a later point, this will support providing credentials, in the meantime, an http.RoundTripper can be injected\n into the server to modify the request." + } + }, + "com.temporal.api#ListNexusEndpointsResponseEndpointsList": { + "type": "list", + "member": { + "target": "com.temporal.api#Endpoint" + }, + "traits": {} + }, + "com.temporal.api#ListNexusEndpoints": { + "type": "operation", + "input": { + "target": "com.temporal.api#ListNexusEndpointsRequest" + }, + "output": { + "target": "com.temporal.api#ListNexusEndpointsResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/nexus/endpoints", + "code": 200 + }, + "smithy.api#documentation": "List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the\n next_page_token field of the previous response to get the next page of results. An empty next_page_token\n indicates that there are no more results. During pagination, a newly added service with an ID lexicographically\n earlier than the previous page's last endpoint's ID may be missed." + } + }, + "com.temporal.api#CreateNexusEndpointRequest": { + "type": "structure", + "members": { + "spec": { + "target": "com.temporal.api#EndpointSpec", + "traits": { + "smithy.api#documentation": "Endpoint definition to create." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#CreateNexusEndpointResponse": { + "type": "structure", + "members": { + "endpoint": { + "target": "com.temporal.api#Endpoint", + "traits": { + "smithy.api#documentation": "Data post acceptance. Can be used to issue additional updates to this record." + } + } + }, + "traits": {} + }, + "com.temporal.api#CreateNexusEndpoint": { + "type": "operation", + "input": { + "target": "com.temporal.api#CreateNexusEndpointRequest" + }, + "output": { + "target": "com.temporal.api#CreateNexusEndpointResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/nexus/endpoints", + "code": 200 + }, + "smithy.api#documentation": "Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of\n ALREADY_EXISTS.\n Returns the created endpoint with its initial version. You may use this version for subsequent updates." + } + }, + "com.temporal.api#GetNexusEndpointRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Server-generated unique endpoint ID." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#GetNexusEndpointResponse": { + "type": "structure", + "members": { + "endpoint": { + "target": "com.temporal.api#Endpoint" + } + }, + "traits": {} + }, + "com.temporal.api#GetNexusEndpoint": { + "type": "operation", + "input": { + "target": "com.temporal.api#GetNexusEndpointRequest" + }, + "output": { + "target": "com.temporal.api#GetNexusEndpointResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/nexus/endpoints/{id}", + "code": 200 + }, + "smithy.api#documentation": "Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates." + } + }, + "com.temporal.api#DeleteNexusEndpointRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Server-generated unique endpoint ID." + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "version", + "smithy.api#documentation": "Data version for this endpoint. Must match current version." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#DeleteNexusEndpointResponse2": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.temporal.api#DeleteNexusEndpoint": { + "type": "operation", + "input": { + "target": "com.temporal.api#DeleteNexusEndpointRequest" + }, + "output": { + "target": "com.temporal.api#DeleteNexusEndpointResponse2" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/v1/nexus/endpoints/{id}", + "code": 200 + }, + "smithy.api#documentation": "Delete an incoming Nexus service by ID." + } + }, + "com.temporal.api#UpdateNexusEndpointRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Server-generated unique endpoint ID." + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Data version for this endpoint. Must match current version." + } + }, + "spec": { + "target": "com.temporal.api#EndpointSpec" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.temporal.api#UpdateNexusEndpointResponse": { + "type": "structure", + "members": { + "endpoint": { + "target": "com.temporal.api#Endpoint", + "traits": { + "smithy.api#documentation": "Data post acceptance. Can be used to issue additional updates to this record." + } + } + }, + "traits": {} + }, + "com.temporal.api#UpdateNexusEndpoint": { + "type": "operation", + "input": { + "target": "com.temporal.api#UpdateNexusEndpointRequest" + }, + "output": { + "target": "com.temporal.api#UpdateNexusEndpointResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/v1/nexus/endpoints/{id}/update", + "code": 200 + }, + "smithy.api#documentation": "Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or\n `ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not\n match.\n Returns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't\n need to increment the version yourself. The server will increment the version for you after each update." + } + }, + "com.temporal.api#GetSystemInfoResponse": { + "type": "structure", + "members": { + "serverVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Version of the server." + } + }, + "capabilities": { + "target": "com.temporal.api#GetSystemInfoResponseCapabilities", + "traits": { + "smithy.api#documentation": "All capabilities the system supports." + } + } + }, + "traits": {} + }, + "com.temporal.api#GetSystemInfoResponseCapabilities": { + "type": "structure", + "members": { + "signalAndQueryHeader": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if signal and query headers are supported." + } + }, + "internalErrorDifferentiation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if internal errors are differentiated from other types of errors for purposes of\n retrying non-internal errors.\n\n When unset/false, clients retry all failures. When true, clients should only retry\n non-internal errors." + } + }, + "activityFailureIncludeHeartbeat": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if RespondActivityTaskFailed API supports including heartbeat details" + } + }, + "supportsSchedules": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Supports scheduled workflow features." + } + }, + "encodedFailureAttributes": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if server uses protos that include temporal.api.failure.v1.Failure.encoded_attributes" + } + }, + "buildIdBasedVersioning": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if server supports dispatching Workflow and Activity tasks based on a worker's build_id\n (see:\n https://github.com/temporalio/proposals/blob/a123af3b559f43db16ea6dd31870bfb754c4dc5e/versioning/worker-versions.md)" + } + }, + "upsertMemo": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if server supports upserting workflow memo" + } + }, + "eagerWorkflowStart": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if server supports eager workflow task dispatching for the StartWorkflowExecution API" + } + }, + "sdkMetadata": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the server knows about the sdk metadata field on WFT completions and will record\n it in history" + } + }, + "countGroupByExecutionStatus": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the server supports count group by execution status" + } + }, + "nexus": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the server supports Nexus operations.\n This flag is dependent both on server version and for Nexus to be enabled via server configuration." + } + }, + "serverScaledDeployments": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "True if the server supports server-scaled deployments.\n This flag is dependent both on server version and for server-scaled deployments\n to be enabled via server configuration." + } + } + }, + "traits": { + "smithy.api#documentation": "System capability details." + } + }, + "com.temporal.api#GetSystemInfo": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.temporal.api#GetSystemInfoResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/v1/system-info", + "code": 200 + }, + "smithy.api#documentation": "GetSystemInfo returns information about the system." + } + }, + "com.temporal.api#Temporal": { + "type": "service", + "version": "0.0.1", + "operations": [ + { + "target": "com.temporal.api#GetClusterInfo" + }, + { + "target": "com.temporal.api#ListNamespaces" + }, + { + "target": "com.temporal.api#RegisterNamespace" + }, + { + "target": "com.temporal.api#DescribeNamespace" + }, + { + "target": "com.temporal.api#ListActivityExecutions" + }, + { + "target": "com.temporal.api#PauseActivity" + }, + { + "target": "com.temporal.api#ResetActivity" + }, + { + "target": "com.temporal.api#UnpauseActivity" + }, + { + "target": "com.temporal.api#UpdateActivityOptions" + }, + { + "target": "com.temporal.api#DescribeActivityExecution" + }, + { + "target": "com.temporal.api#StartActivityExecution" + }, + { + "target": "com.temporal.api#RequestCancelActivityExecution" + }, + { + "target": "com.temporal.api#RespondActivityTaskCompletedById" + }, + { + "target": "com.temporal.api#RespondActivityTaskFailedById" + }, + { + "target": "com.temporal.api#RecordActivityTaskHeartbeatById" + }, + { + "target": "com.temporal.api#PollActivityExecution" + }, + { + "target": "com.temporal.api#PauseActivityExecution" + }, + { + "target": "com.temporal.api#ResetActivityExecution" + }, + { + "target": "com.temporal.api#RespondActivityTaskCanceledById" + }, + { + "target": "com.temporal.api#TerminateActivityExecution" + }, + { + "target": "com.temporal.api#UnpauseActivityExecution" + }, + { + "target": "com.temporal.api#UpdateActivityExecutionOptions" + }, + { + "target": "com.temporal.api#RespondActivityTaskCompleted" + }, + { + "target": "com.temporal.api#CountActivityExecutions" + }, + { + "target": "com.temporal.api#RespondActivityTaskFailed" + }, + { + "target": "com.temporal.api#RecordActivityTaskHeartbeat" + }, + { + "target": "com.temporal.api#RespondActivityTaskCanceled" + }, + { + "target": "com.temporal.api#ListArchivedWorkflowExecutions" + }, + { + "target": "com.temporal.api#ListBatchOperations" + }, + { + "target": "com.temporal.api#DescribeBatchOperation" + }, + { + "target": "com.temporal.api#StartBatchOperation" + }, + { + "target": "com.temporal.api#StopBatchOperation" + }, + { + "target": "com.temporal.api#SetCurrentDeployment" + }, + { + "target": "com.temporal.api#GetCurrentDeployment" + }, + { + "target": "com.temporal.api#ListDeployments" + }, + { + "target": "com.temporal.api#DescribeDeployment" + }, + { + "target": "com.temporal.api#GetDeploymentReachability" + }, + { + "target": "com.temporal.api#CountNexusOperationExecutions" + }, + { + "target": "com.temporal.api#ListNexusOperationExecutions" + }, + { + "target": "com.temporal.api#DescribeNexusOperationExecution" + }, + { + "target": "com.temporal.api#StartNexusOperationExecution" + }, + { + "target": "com.temporal.api#RequestCancelNexusOperationExecution" + }, + { + "target": "com.temporal.api#PollNexusOperationExecution" + }, + { + "target": "com.temporal.api#TerminateNexusOperationExecution" + }, + { + "target": "com.temporal.api#CountSchedules" + }, + { + "target": "com.temporal.api#ListSchedules" + }, + { + "target": "com.temporal.api#DescribeSchedule" + }, + { + "target": "com.temporal.api#CreateSchedule" + }, + { + "target": "com.temporal.api#DeleteSchedule" + }, + { + "target": "com.temporal.api#ListScheduleMatchingTimes" + }, + { + "target": "com.temporal.api#PatchSchedule" + }, + { + "target": "com.temporal.api#UpdateSchedule" + }, + { + "target": "com.temporal.api#ListSearchAttributes" + }, + { + "target": "com.temporal.api#UpdateTaskQueueConfig" + }, + { + "target": "com.temporal.api#GetWorkerBuildIdCompatibility" + }, + { + "target": "com.temporal.api#GetWorkerVersioningRules" + }, + { + "target": "com.temporal.api#DescribeTaskQueue" + }, + { + "target": "com.temporal.api#UpdateNamespace" + }, + { + "target": "com.temporal.api#CreateWorkerDeploymentVersion" + }, + { + "target": "com.temporal.api#DescribeWorkerDeploymentVersion" + }, + { + "target": "com.temporal.api#DeleteWorkerDeploymentVersion" + }, + { + "target": "com.temporal.api#UpdateWorkerDeploymentVersionComputeConfig" + }, + { + "target": "com.temporal.api#UpdateWorkerDeploymentVersionMetadata" + }, + { + "target": "com.temporal.api#ValidateWorkerDeploymentVersionComputeConfig" + }, + { + "target": "com.temporal.api#ListWorkerDeployments" + }, + { + "target": "com.temporal.api#DescribeWorkerDeployment" + }, + { + "target": "com.temporal.api#CreateWorkerDeployment" + }, + { + "target": "com.temporal.api#DeleteWorkerDeployment" + }, + { + "target": "com.temporal.api#SetWorkerDeploymentCurrentVersion" + }, + { + "target": "com.temporal.api#SetWorkerDeploymentManager" + }, + { + "target": "com.temporal.api#SetWorkerDeploymentRampingVersion" + }, + { + "target": "com.temporal.api#GetWorkerTaskReachability" + }, + { + "target": "com.temporal.api#ListWorkers" + }, + { + "target": "com.temporal.api#DescribeWorker" + }, + { + "target": "com.temporal.api#FetchWorkerConfig" + }, + { + "target": "com.temporal.api#RecordWorkerHeartbeat" + }, + { + "target": "com.temporal.api#UpdateWorkerConfig" + }, + { + "target": "com.temporal.api#CountWorkflowExecutions" + }, + { + "target": "com.temporal.api#ListWorkflowRules" + }, + { + "target": "com.temporal.api#CreateWorkflowRule" + }, + { + "target": "com.temporal.api#DescribeWorkflowRule" + }, + { + "target": "com.temporal.api#DeleteWorkflowRule" + }, + { + "target": "com.temporal.api#ListWorkflowExecutions" + }, + { + "target": "com.temporal.api#DescribeWorkflowExecution" + }, + { + "target": "com.temporal.api#GetWorkflowExecutionHistory" + }, + { + "target": "com.temporal.api#GetWorkflowExecutionHistoryReverse" + }, + { + "target": "com.temporal.api#QueryWorkflow" + }, + { + "target": "com.temporal.api#TriggerWorkflowRule" + }, + { + "target": "com.temporal.api#StartWorkflowExecution" + }, + { + "target": "com.temporal.api#PauseWorkflowExecution" + }, + { + "target": "com.temporal.api#SignalWithStartWorkflowExecution" + }, + { + "target": "com.temporal.api#UnpauseWorkflowExecution" + }, + { + "target": "com.temporal.api#RequestCancelWorkflowExecution" + }, + { + "target": "com.temporal.api#ResetWorkflowExecution" + }, + { + "target": "com.temporal.api#SignalWorkflowExecution" + }, + { + "target": "com.temporal.api#TerminateWorkflowExecution" + }, + { + "target": "com.temporal.api#UpdateWorkflowExecutionOptions" + }, + { + "target": "com.temporal.api#UpdateWorkflowExecution" + }, + { + "target": "com.temporal.api#ListNexusEndpoints" + }, + { + "target": "com.temporal.api#CreateNexusEndpoint" + }, + { + "target": "com.temporal.api#GetNexusEndpoint" + }, + { + "target": "com.temporal.api#DeleteNexusEndpoint" + }, + { + "target": "com.temporal.api#UpdateNexusEndpoint" + }, + { + "target": "com.temporal.api#GetSystemInfo" + } + ], + "traits": { + "smithy.api#title": "" + } + } + } +} diff --git a/packages/temporal/package.json b/packages/temporal/package.json new file mode 100644 index 000000000..3cc0d2b52 --- /dev/null +++ b/packages/temporal/package.json @@ -0,0 +1,85 @@ +{ + "name": "@distilled.cloud/temporal", + "version": "1.0.0-rc.8", + "repository": { + "type": "git", + "url": "https://github.com/alchemy-run/distilled", + "directory": "packages/temporal" + }, + "license": "Apache-2.0", + "type": "module", + "sideEffects": false, + "files": [ + "lib", + "src" + ], + "exports": { + ".": { + "types": "./lib/index.d.ts", + "bun": "./src/index.ts", + "worker": "./src/index.ts", + "default": "./lib/index.js" + }, + "./Credentials": { + "types": "./lib/credentials.d.ts", + "bun": "./src/credentials.ts", + "worker": "./src/credentials.ts", + "default": "./lib/credentials.js" + }, + "./Errors": { + "types": "./lib/errors.d.ts", + "bun": "./src/errors.ts", + "worker": "./src/errors.ts", + "default": "./lib/errors.js" + }, + "./Traits": { + "types": "./lib/traits.d.ts", + "bun": "./src/traits.ts", + "worker": "./src/traits.ts", + "default": "./lib/traits.js" + }, + "./Pagination": { + "types": "./lib/pagination.d.ts", + "bun": "./src/pagination.ts", + "worker": "./src/pagination.ts", + "default": "./lib/pagination.js" + }, + "./Protocol": { + "types": "./lib/protocol.d.ts", + "bun": "./src/protocol.ts", + "worker": "./src/protocol.ts", + "default": "./lib/protocol.js" + }, + "./Retry": { + "types": "./lib/retry.d.ts", + "bun": "./src/retry.ts", + "worker": "./src/retry.ts", + "default": "./lib/retry.js" + }, + "./*": { + "types": "./lib/services/*.d.ts", + "bun": "./src/services/*.ts", + "worker": "./src/services/*.ts", + "default": "./lib/services/*.js" + } + }, + "scripts": { + "build": "tsc -b", + "convert": "bun scripts/convert.ts", + "generate": "bun scripts/convert.ts && bun scripts/generate.ts", + "typecheck": "tsc -p tsconfig.json", + "specs:fetch": "git submodule update --force --init --depth=1 specs/spec-mirror-temporal", + "specs:update": "git submodule update --remote --force --depth=1 specs/spec-mirror-temporal" + }, + "dependencies": { + "@distilled.cloud/core": "workspace:*" + }, + "devDependencies": { + "@types/bun": "catalog:tooling", + "@types/node": "catalog:tooling", + "@effect/platform-bun": "catalog:effect" + }, + "peerDependencies": { + "effect": "catalog:effect" + } +} diff --git a/packages/temporal/scripts/convert.ts b/packages/temporal/scripts/convert.ts new file mode 100644 index 000000000..a1ddbd81c --- /dev/null +++ b/packages/temporal/scripts/convert.ts @@ -0,0 +1,73 @@ +#!/usr/bin/env bun +/** + * convert — turn the Temporal OpenAPI spec into a Smithy 2.0 JSON model. + * + * Input: specs/spec-mirror-temporal/specs/openapi.json (spec submodule) + * patches/*.patch.json (RFC-6902 patches to the OpenAPI document) + * Output: .generated-specs/temporal.json + * + * The OpenAPI→Smithy converter lives in + * `@distilled.cloud/core/codegen/openapi`; this script is Temporal's pipeline + * config. `scripts/generate.ts` compiles the model into src/services. + */ +import * as path from "node:path"; +import { runOpenApiConvert } from "@distilled.cloud/core/codegen/openapi-cli"; + +const HTTP_METHODS = ["get", "post", "put", "patch", "delete"] as const; + +/** + * gnostic emits each WorkflowService RPC twice — once under `/api/v1/…` + * and once at the unprefixed google.api.http path. Keep the `/api/v1` + * mapping when both exist so convert does not mint `listNamespaces2`. + */ +const dropDuplicateHttpBindings = (spec: { + paths?: Record>; +}) => { + const paths = spec.paths ?? {}; + const byId = new Map>(); + for (const [p, item] of Object.entries(paths)) { + for (const method of HTTP_METHODS) { + const op = item?.[method] as { operationId?: unknown } | undefined; + if (typeof op?.operationId !== "string") continue; + const list = byId.get(op.operationId) ?? []; + list.push({ path: p, method }); + byId.set(op.operationId, list); + } + } + for (const locs of byId.values()) { + if (locs.length < 2) continue; + const preferred = + locs.find((l) => l.path.startsWith("/api/v1/")) ?? locs[0]!; + for (const loc of locs) { + if (loc.path === preferred.path && loc.method === preferred.method) { + continue; + } + delete paths[loc.path]?.[loc.method]; + } + } + for (const p of Object.keys(paths)) { + const item = paths[p]!; + if (!HTTP_METHODS.some((m) => item[m] !== undefined)) { + delete paths[p]; + } + } +}; + +await runOpenApiConvert({ + root: path.resolve(import.meta.dir, ".."), + specs: [ + { + name: "temporal", + specPath: "specs/spec-mirror-temporal/specs/openapi.json", + preprocess: dropDuplicateHttpBindings, + }, + ], + // OpenAPI-document patches (v0 layout: flat patches/*.patch.json). The + // smithy-model patch chain in generate.ts is disabled (`patchesDir: false`). + patchesDir: "patches", + options: { + namespace: "com.temporal.api", + serviceName: "Temporal", + skipDeprecated: true, + }, +}); diff --git a/packages/temporal/scripts/generate.ts b/packages/temporal/scripts/generate.ts new file mode 100644 index 000000000..9d38874cd --- /dev/null +++ b/packages/temporal/scripts/generate.ts @@ -0,0 +1,93 @@ +#!/usr/bin/env bun +/** + * generate — turn the Smithy JSON model in .generated-specs into the Temporal + * Effect SDK. + * + * Input: .generated-specs/temporal.json (written by scripts/convert.ts) + * Output: src/services/temporal.ts + src/services/index.ts + * + * The smithy→SDK compiler and CLI pipeline live in + * `@distilled.cloud/core/codegen`; this script is Temporal's provider spec. + * Temporal keeps the wire's camelCase member names on the TS surface, so no + * member renaming or wire dictionaries appear here. + */ +import type { SdkSpec } from "@distilled.cloud/core/codegen/generator"; +import { runGeneratorCli } from "@distilled.cloud/core/codegen/cli"; + +const NULLABLE_TRAIT = "com.distilled.openapi#nullable"; +const ERROR_MATCHERS_TRAIT = "com.distilled.openapi#errorMatchers"; +const RAW_RESPONSE_TRAIT = "com.distilled.openapi#rawResponse"; +const SENSITIVE_TRAIT = "smithy.api#sensitive"; + +/** Temporal's provider spec for the shared smithy→SDK compiler. */ +const temporalSpec: SdkSpec = { + nullableTrait: NULLABLE_TRAIT, + errorMatchersTrait: ERROR_MATCHERS_TRAIT, + + extraBindings: [ + { + // Sole member of a synthesized wrapper for bare array/scalar response + // bodies; as the response's only member, the response IS the payload. + trait: RAW_RESPONSE_TRAIT, + binding: "rawResponse", + pipe: "T.RawResponse()", + rootPipe: "T.RawResponseRoot()", + }, + ], + + // Sensitive strings (connection URIs, passwords, API keys): the schema + // member carries T.SensitiveValue; the REST protocol delivers Redacted + // values and accepts string | Redacted on input. + memberTraitPipes: { + [SENSITIVE_TRAIT]: "T.SensitiveValue", + }, + memberTsType: (m) => + SENSITIVE_TRAIT in m.traits + ? `string | Redacted.Redacted${m.nullable ? " | null" : ""}` + : undefined, + + // Unions surface as TS type unions over an opaque schema — the REST + // protocol passes union content through verbatim (wire names ARE the TS + // names for Temporal), so no runtime case discrimination is needed. + union: ({ name, caseTargets, tsRef }) => [ + `export type ${name} = ${caseTargets.map(tsRef).join(" | ") || "unknown"};`, + `export const ${name} = /*@__PURE__*/ S.Unknown as any as S.Schema<${name}>;\n`, + ], + + // One pagination profile: cursor mode (inputToken `nextPageToken`), + // traversed by core's paginateCursor. + paginationProfiles: { + cursor: { + strategy: "paginateCursor", + itemsFallback: "items", + }, + }, + + operationDecl: { + contextType: "TemporalOpContext", + commonErrorType: "TemporalOpError", + commonErrorClasses: ["UnknownTemporalError"], + protocol: "TemporalProtocol", + retry: "Retry.Retry", + }, + + sourceNote: ".generated-specs (specs/spec-mirror-temporal)", + + // Sensitive member types reference Redacted; pull the import in when used. + postProcess: (code) => + code.includes("Redacted.Redacted<") + ? code.replace( + `import * as S from "@distilled.cloud/core/schema";\n`, + `import * as S from "@distilled.cloud/core/schema";\nimport * as Redacted from "effect/Redacted";\n`, + ) + : code, +}; + +runGeneratorCli({ + description: "Generate the Temporal Effect SDK from the Smithy model", + root: `${import.meta.dir}/..`, + // patches/ holds OpenAPI-document patches consumed by scripts/convert.ts; + // there is no smithy-model patch chain. + patchesDir: false, + spec: () => temporalSpec, +}); diff --git a/packages/temporal/src/credentials.ts b/packages/temporal/src/credentials.ts new file mode 100644 index 000000000..ddaecb584 --- /dev/null +++ b/packages/temporal/src/credentials.ts @@ -0,0 +1,63 @@ +/** + * Temporal credentials — hand-written. + * + * API-compatible port of the distilled v0 credentials module: the + * `Credentials` service holds an *effect* that resolves the current + * credentials on every request (the protocol layer resolves it per request + * on the calling fiber). + * + * Temporal Cloud and JWT-configured self-hosted servers accept + * `Authorization: Bearer `. Paths in the published OpenAPI document + * already include `/api/v1`, so `apiBaseUrl` is the frontend HTTP origin + * (default `http://localhost:7243`). + */ +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import * as Redacted from "effect/Redacted"; +import { ConfigError } from "@distilled.cloud/core/errors"; + +/** Default Temporal frontend HTTP listen address (`grpcPort + 10`). */ +export const DEFAULT_API_BASE_URL = "http://localhost:7243"; + +export interface Config { + readonly apiKey: Redacted.Redacted; + readonly apiBaseUrl: string; +} + +export class Credentials extends Context.Service< + Credentials, + Effect.Effect +>()("TemporalCredentials") {} + +/** Layer from a plain API key + optional base URL. */ +export const fromApiKey = (config: { + readonly apiKey: string; + readonly apiBaseUrl?: string; +}): Layer.Layer => + Layer.succeed( + Credentials, + Effect.succeed({ + apiKey: Redacted.make(config.apiKey), + apiBaseUrl: config.apiBaseUrl ?? DEFAULT_API_BASE_URL, + }), + ); + +/** Reads TEMPORAL_API_KEY (required) and TEMPORAL_API_BASE_URL (optional). */ +export const CredentialsFromEnv: Layer.Layer = Layer.succeed( + Credentials, + Effect.gen(function* () { + const apiKey = process.env.TEMPORAL_API_KEY; + + if (!apiKey) { + return yield* new ConfigError({ + message: "TEMPORAL_API_KEY environment variable is required", + }); + } + + return { + apiKey: Redacted.make(apiKey), + apiBaseUrl: process.env.TEMPORAL_API_BASE_URL ?? DEFAULT_API_BASE_URL, + }; + }).pipe(Effect.orDie), +); diff --git a/packages/temporal/src/errors.ts b/packages/temporal/src/errors.ts new file mode 100644 index 000000000..b8dd84c09 --- /dev/null +++ b/packages/temporal/src/errors.ts @@ -0,0 +1,50 @@ +/** + * Temporal-specific error types. + * + * Re-exports the common HTTP errors from core and adds the Temporal fallback + * errors. Note the generated service module additionally defines its own + * per-status matcher classes (BadRequest/NotFound/…) for the statuses each + * operation declares — those share `_tag`s with the core classes here, so + * `catchTag` works against either. + */ +export { + BadGateway, + BadRequest, + Conflict, + ConfigError, + Forbidden, + GatewayTimeout, + InternalServerError, + Locked, + NotFound, + ServiceUnavailable, + TooManyRequests, + Unauthorized, + UnprocessableEntity, + HTTP_STATUS_MAP, + DEFAULT_ERRORS, + API_ERRORS, +} from "@distilled.cloud/core/errors"; +export type { DefaultErrors } from "@distilled.cloud/core/errors"; + +import * as Schema from "effect/Schema"; +import * as Category from "@distilled.cloud/core/category"; + +/** Unknown Temporal error — returned when nothing else matches the failure. */ +export class UnknownTemporalError extends Schema.TaggedError()( + "UnknownTemporalError", + { + code: Schema.optional(Schema.String), + message: Schema.optional(Schema.String), + body: Schema.Unknown, + }, +).pipe(Category.withServerError) {} + +/** Schema parse error wrapper (kept for v0 surface parity). */ +export class TemporalParseError extends Schema.TaggedError()( + "TemporalParseError", + { + body: Schema.Unknown, + cause: Schema.Unknown, + }, +).pipe(Category.withParseError) {} diff --git a/packages/temporal/src/index.ts b/packages/temporal/src/index.ts new file mode 100644 index 000000000..cde8a87eb --- /dev/null +++ b/packages/temporal/src/index.ts @@ -0,0 +1,30 @@ +/** + * @distilled.cloud/temporal — Temporal WorkflowService HTTP SDK for Effect. + * + * `./services` is generated by `scripts/generate.ts` from the Smithy model + * in `.generated-specs` (written by `scripts/convert.ts` from the OpenAPI + * spec). Everything else in this folder is hand-written. + * + * @example + * ```ts + * import * as Temporal from "@distilled.cloud/temporal"; + * + * const ns = yield* Temporal.Services.temporal.listNamespaces({}); + * ``` + */ +export * from "./credentials.ts"; +export * from "./errors.ts"; +export * as T from "./traits.ts"; +export { + TemporalProtocol, + type TemporalOpError, + type TemporalOpContext, +} from "./protocol.ts"; +export { paginateCursor } from "./pagination.ts"; +export * as Retry from "./retry.ts"; +export * as Services from "./services/index.ts"; +// Operations (and their request/response types) are importable straight off +// the package root. The service-local typed error classes shadow the +// same-named shared ones from ./errors.ts — the ops actually raise the +// service-local classes. +export * from "./services/temporal.ts"; diff --git a/packages/temporal/src/pagination.ts b/packages/temporal/src/pagination.ts new file mode 100644 index 000000000..4d117f7de --- /dev/null +++ b/packages/temporal/src/pagination.ts @@ -0,0 +1,8 @@ +/** + * Temporal pagination — hand-written. + * + * Temporal's paginated list operations are cursor-mode (`nextPageToken` in + * and out); generated operations pass core's {@link paginateCursor} strategy + * to `API.makePaginated`. + */ +export { paginateCursor } from "@distilled.cloud/core/pagination"; diff --git a/packages/temporal/src/protocol.ts b/packages/temporal/src/protocol.ts new file mode 100644 index 000000000..d1113147c --- /dev/null +++ b/packages/temporal/src/protocol.ts @@ -0,0 +1,69 @@ +/** + * TemporalProtocol — hand-written. + * + * Temporal's frontend HTTP API speaks bearer-authenticated JSON REST (gRPC + * transcoding, no response envelope), so the whole protocol is one + * `makeRestProtocol` call from `core/protocol-rest`: + * + * request: credentials → `Authorization: Bearer ` + base URL + * (default http://localhost:7243), resolved from the + * calling fiber on every request. Spec paths already include + * `/api/v1`. + * + * response: 2xx JSON is the payload (sensitive members delivered as + * `Redacted`); non-2xx `{ code?, message }` bodies map to the + * operation's typed error classes by status, then the shared + * HTTP-status classes, then {@link UnknownTemporalError}. + */ +import * as Effect from "effect/Effect"; +import type * as Layer from "effect/Layer"; +import * as Redacted from "effect/Redacted"; +import type * as HttpClient from "effect/unstable/http/HttpClient"; +import type * as HttpClientError from "effect/unstable/http/HttpClientError"; +import type * as API from "@distilled.cloud/core/api"; +import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest"; +import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors"; +import { Credentials, type Config } from "./credentials.ts"; +import { UnknownTemporalError } from "./errors.ts"; + +/** + * Error channel shared by every generated Temporal operation. Generated + * service files annotate operations with `API.OperationMethod` explicitly so the compiler never + * infers these back out of the schema generics. + */ +export type TemporalOpError = + | InstanceType<(typeof API_ERRORS)[number]> + | UnknownTemporalError + | ConfigError + | HttpClientError.HttpClientError; + +/** Context (requirements) shared by every generated Temporal operation. */ +export type TemporalOpContext = Credentials | HttpClient.HttpClient; + +export const TemporalProtocol: Layer.Layer = + makeRestProtocol({ + // The Credentials service holds an effect — resolving it here (per + // request, on the calling fiber) picks up context-provided credentials. + credentials: Effect.gen(function* () { + const resolve = yield* Credentials; + return yield* resolve; + }), + baseUrl: (creds) => creds.apiBaseUrl, + headers: (creds) => ({ + Authorization: `Bearer ${Redacted.value(creds.apiKey)}`, + }), + // Temporal's google.rpc.Status error body is `{ code?, message, details? }` + // — the factory's default lenient envelope covers it. + unknownError: ({ code, message, body }) => + new UnknownTemporalError({ + code: + typeof code === "string" + ? code + : code !== undefined + ? String(code) + : undefined, + message, + body, + }), + }); diff --git a/packages/temporal/src/retry.ts b/packages/temporal/src/retry.ts new file mode 100644 index 000000000..a8f96af00 --- /dev/null +++ b/packages/temporal/src/retry.ts @@ -0,0 +1,54 @@ +/** + * Temporal retry configuration. + * + * Defines the per-SDK `Retry` Context.Service tag that generated operations + * wire into `API.make`. Callers can install a blanket retry policy at the + * layer level and have every Temporal API call below it pick it up: + * + * @example + * ```ts + * import * as Temporal from "@distilled.cloud/temporal"; + * + * myEffect.pipe(Temporal.Retry.transient); + * Effect.provide(myEffect, Layer.succeed(Temporal.Retry.Retry, customPolicy)); + * ``` + */ +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import { + type Policy, + throttlingFactory, + transientFactory, +} from "@distilled.cloud/core/retry"; + +export { + type Options, + type Factory, + type Policy, + makeDefault, + jittered, + capped, + throttlingOptions, + transientOptions, + throttlingFactory, + transientFactory, +} from "@distilled.cloud/core/retry"; + +/** Context tag for configuring retry behavior of Temporal API calls. */ +export class Retry extends Context.Service()("TemporalRetry") {} + +/** Provides a custom retry policy to every Temporal API call below it. */ +export const policy = (optionsOrFactory: Policy) => + Effect.provide(Layer.succeed(Retry, optionsOrFactory)); + +/** Disables all automatic retries. */ +export const none = Effect.provide( + Layer.succeed(Retry, { while: () => false }), +); + +/** Apply the throttling retry policy (retries throttling errors indefinitely). */ +export const throttling = policy(throttlingFactory); + +/** Apply the transient retry policy (retries all transient errors indefinitely). */ +export const transient = policy(transientFactory); diff --git a/packages/temporal/src/services/index.ts b/packages/temporal/src/services/index.ts new file mode 100644 index 000000000..919415dee --- /dev/null +++ b/packages/temporal/src/services/index.ts @@ -0,0 +1,2 @@ +// AUTO-GENERATED by scripts/generate.ts. Do not edit. +export * as temporal from "./temporal.ts"; diff --git a/packages/temporal/src/services/temporal.ts b/packages/temporal/src/services/temporal.ts new file mode 100644 index 000000000..4beeeebf2 --- /dev/null +++ b/packages/temporal/src/services/temporal.ts @@ -0,0 +1,14732 @@ +// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-temporal). Do not edit. +import * as S from "@distilled.cloud/core/schema"; +import * as API from "@distilled.cloud/core/api"; +import * as T from "../traits.ts"; +import { + TemporalProtocol, + type TemporalOpError, + type TemporalOpContext, +} from "../protocol.ts"; +import { UnknownTemporalError } from "../errors.ts"; +import * as Retry from "../retry.ts"; + +export type { TemporalOpError, TemporalOpContext }; + +export interface CountActivityExecutionsRequest { + namespace: string; + /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. */ + query?: string; +} +export const CountActivityExecutionsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + query: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/activity-count", + code: 200, + }), + ), +).annotate({ + identifier: "CountActivityExecutionsRequest", +}) as any as S.Schema; + +export type CountActivityExecutionsResponseAggregationGroupGroupValuesList = + Array; +export const CountActivityExecutionsResponseAggregationGroupGroupValuesList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +export interface CountActivityExecutionsResponseAggregationGroup { + groupValues?: CountActivityExecutionsResponseAggregationGroupGroupValuesList; + count?: string; +} +export const CountActivityExecutionsResponseAggregationGroup = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + groupValues: S.optional( + CountActivityExecutionsResponseAggregationGroupGroupValuesList, + ), + count: S.optional(S.String), + }), + ).annotate({ + identifier: "CountActivityExecutionsResponseAggregationGroup", + }) as any as S.Schema; + +/** Contains the groups if the request is grouping by a field. The list might not be complete, and the counts of each group is approximate. */ +export type CountActivityExecutionsResponseGroupsList = + Array; +export const CountActivityExecutionsResponseGroupsList = /*@__PURE__*/ S.Array( + CountActivityExecutionsResponseAggregationGroup, +) as any as S.Schema; + +export interface CountActivityExecutionsResponse { + /** If `query` is not grouping by any field, the count is an approximate number of activities that match the query. If `query` is grouping by a field, the count is simply the sum of the counts of the groups returned in the response. This number can be smaller than the total number of activities matching the query. */ + count?: string; + /** Contains the groups if the request is grouping by a field. The list might not be complete, and the counts of each group is approximate. */ + groups?: CountActivityExecutionsResponseGroupsList; +} +export const CountActivityExecutionsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + count: S.optional(S.String), + groups: S.optional(CountActivityExecutionsResponseGroupsList), + }), +).annotate({ + identifier: "CountActivityExecutionsResponse", +}) as any as S.Schema; + +export interface CountNexusOperationExecutionsRequest { + namespace: string; + /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. See also ListNexusOperationExecutionsRequest for search attributes available for Nexus operations. */ + query?: string; +} +export const CountNexusOperationExecutionsRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + query: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/nexus-operation-count", + code: 200, + }), + ), +).annotate({ + identifier: "CountNexusOperationExecutionsRequest", +}) as any as S.Schema; + +export type CountNexusOperationExecutionsResponseAggregationGroupGroupValuesList = + Array; +export const CountNexusOperationExecutionsResponseAggregationGroupGroupValuesList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +export interface CountNexusOperationExecutionsResponseAggregationGroup { + groupValues?: CountNexusOperationExecutionsResponseAggregationGroupGroupValuesList; + count?: string; +} +export const CountNexusOperationExecutionsResponseAggregationGroup = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + groupValues: S.optional( + CountNexusOperationExecutionsResponseAggregationGroupGroupValuesList, + ), + count: S.optional(S.String), + }), + ).annotate({ + identifier: "CountNexusOperationExecutionsResponseAggregationGroup", + }) as any as S.Schema; + +/** Contains the groups if the request is grouping by a field. The list might not be complete, and the counts of each group is approximate. */ +export type CountNexusOperationExecutionsResponseGroupsList = + Array; +export const CountNexusOperationExecutionsResponseGroupsList = + /*@__PURE__*/ S.Array( + CountNexusOperationExecutionsResponseAggregationGroup, + ) as any as S.Schema; + +export interface CountNexusOperationExecutionsResponse { + /** If `query` is not grouping by any field, the count is an approximate number of operations that match the query. If `query` is grouping by a field, the count is simply the sum of the counts of the groups returned in the response. This number can be smaller than the total number of operations matching the query. */ + count?: string; + /** Contains the groups if the request is grouping by a field. The list might not be complete, and the counts of each group is approximate. */ + groups?: CountNexusOperationExecutionsResponseGroupsList; +} +export const CountNexusOperationExecutionsResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + count: S.optional(S.String), + groups: S.optional(CountNexusOperationExecutionsResponseGroupsList), + }), +).annotate({ + identifier: "CountNexusOperationExecutionsResponse", +}) as any as S.Schema; + +export interface CountSchedulesRequest { + namespace: string; + /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. */ + query?: string; +} +export const CountSchedulesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + query: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/schedule-count", + code: 200, + }), + ), +).annotate({ + identifier: "CountSchedulesRequest", +}) as any as S.Schema; + +export type CountSchedulesResponseAggregationGroupGroupValuesList = + Array; +export const CountSchedulesResponseAggregationGroupGroupValuesList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +export interface CountSchedulesResponseAggregationGroup { + groupValues?: CountSchedulesResponseAggregationGroupGroupValuesList; + count?: string; +} +export const CountSchedulesResponseAggregationGroup = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + groupValues: S.optional( + CountSchedulesResponseAggregationGroupGroupValuesList, + ), + count: S.optional(S.String), + }), +).annotate({ + identifier: "CountSchedulesResponseAggregationGroup", +}) as any as S.Schema; + +/** Contains the groups if the request is grouping by a field. The list might not be complete, and the counts of each group is approximate. */ +export type CountSchedulesResponseGroupsList = + Array; +export const CountSchedulesResponseGroupsList = /*@__PURE__*/ S.Array( + CountSchedulesResponseAggregationGroup, +) as any as S.Schema; + +export interface CountSchedulesResponse { + /** If `query` is not grouping by any field, the count is an approximate number of schedules that match the query. If `query` is grouping by a field, the count is simply the sum of the counts of the groups returned in the response. This number can be smaller than the total number of schedules matching the query. */ + count?: string; + /** Contains the groups if the request is grouping by a field. The list might not be complete, and the counts of each group is approximate. */ + groups?: CountSchedulesResponseGroupsList; +} +export const CountSchedulesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + count: S.optional(S.String), + groups: S.optional(CountSchedulesResponseGroupsList), + }), +).annotate({ + identifier: "CountSchedulesResponse", +}) as any as S.Schema; + +export interface CountWorkflowExecutionsRequest { + namespace: string; + query?: string; +} +export const CountWorkflowExecutionsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + query: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/workflow-count", + code: 200, + }), + ), +).annotate({ + identifier: "CountWorkflowExecutionsRequest", +}) as any as S.Schema; + +export type CountWorkflowExecutionsResponseAggregationGroupGroupValuesList = + Array; +export const CountWorkflowExecutionsResponseAggregationGroupGroupValuesList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +export interface CountWorkflowExecutionsResponseAggregationGroup { + groupValues?: CountWorkflowExecutionsResponseAggregationGroupGroupValuesList; + count?: string; +} +export const CountWorkflowExecutionsResponseAggregationGroup = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + groupValues: S.optional( + CountWorkflowExecutionsResponseAggregationGroupGroupValuesList, + ), + count: S.optional(S.String), + }), + ).annotate({ + identifier: "CountWorkflowExecutionsResponseAggregationGroup", + }) as any as S.Schema; + +/** `groups` contains the groups if the request is grouping by a field. The list might not be complete, and the counts of each group is approximate. */ +export type CountWorkflowExecutionsResponseGroupsList = + Array; +export const CountWorkflowExecutionsResponseGroupsList = /*@__PURE__*/ S.Array( + CountWorkflowExecutionsResponseAggregationGroup, +) as any as S.Schema; + +export interface CountWorkflowExecutionsResponse { + /** If `query` is not grouping by any field, the count is an approximate number of workflows that matches the query. If `query` is grouping by a field, the count is simply the sum of the counts of the groups returned in the response. This number can be smaller than the total number of workflows matching the query. */ + count?: string; + /** `groups` contains the groups if the request is grouping by a field. The list might not be complete, and the counts of each group is approximate. */ + groups?: CountWorkflowExecutionsResponseGroupsList; +} +export const CountWorkflowExecutionsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + count: S.optional(S.String), + groups: S.optional(CountWorkflowExecutionsResponseGroupsList), + }), +).annotate({ + identifier: "CountWorkflowExecutionsResponse", +}) as any as S.Schema; + +/** Target a worker polling on a Nexus task queue in a specific namespace. */ +export interface EndpointTargetWorker { + /** Namespace to route requests to. */ + namespace?: string; + /** Nexus task queue to route requests to. */ + taskQueue?: string; +} +export const EndpointTargetWorker = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + taskQueue: S.optional(S.String), + }), +).annotate({ + identifier: "EndpointTargetWorker", +}) as any as S.Schema; + +/** Target an external server by URL. At a later point, this will support providing credentials, in the meantime, an http.RoundTripper can be injected into the server to modify the request. */ +export interface EndpointTargetExternal { + /** URL to call. */ + url?: string; +} +export const EndpointTargetExternal = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.optional(S.String), + }), +).annotate({ + identifier: "EndpointTargetExternal", +}) as any as S.Schema; + +/** Target to route requests to. */ +export interface EndpointTarget { + worker?: EndpointTargetWorker; + external?: EndpointTargetExternal; +} +export const EndpointTarget = /*@__PURE__*/ S.suspend(() => + S.Struct({ + worker: S.optional(EndpointTargetWorker), + external: S.optional(EndpointTargetExternal), + }), +).annotate({ identifier: "EndpointTarget" }) as any as S.Schema; + +/** Contains mutable fields for an Endpoint. */ +export interface EndpointSpec { + /** Endpoint name, unique for this cluster. Must match `[a-zA-Z_][a-zA-Z0-9_]*`. Renaming an endpoint breaks all workflow callers that reference this endpoint, causing operations to fail. */ + name?: string; + /** Markdown description serialized as a single JSON string. If the Payload is encrypted, the UI and CLI may decrypt with the configured codec server endpoint. By default, the server enforces a limit of 20,000 bytes for this entire payload. */ + description?: unknown; + /** Target to route requests to. */ + target?: EndpointTarget; +} +export const EndpointSpec = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + description: S.optional(S.Unknown), + target: S.optional(EndpointTarget), + }), +).annotate({ identifier: "EndpointSpec" }) as any as S.Schema; + +export interface CreateNexusEndpointRequest { + /** Endpoint definition to create. */ + spec?: EndpointSpec; +} +export const CreateNexusEndpointRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + spec: S.optional(EndpointSpec), + }).pipe( + T.Http({ method: "POST", uri: "/api/v1/nexus/endpoints", code: 200 }), + ), +).annotate({ + identifier: "CreateNexusEndpointRequest", +}) as any as S.Schema; + +/** A cluster-global binding from an endpoint ID to a target for dispatching incoming Nexus requests. */ +export interface Endpoint { + /** Data version for this endpoint, incremented for every update issued via the UpdateNexusEndpoint API. */ + version?: string; + /** Unique server-generated endpoint ID. */ + id?: string; + /** Spec for the endpoint. */ + spec?: EndpointSpec; + /** The date and time when the endpoint was created. (-- api-linter: core::0142::time-field-names=disabled aip.dev/not-precedent: Not following linter rules. --) */ + createdTime?: string; + /** The date and time when the endpoint was last modified. Will not be set if the endpoint has never been modified. (-- api-linter: core::0142::time-field-names=disabled aip.dev/not-precedent: Not following linter rules. --) */ + lastModifiedTime?: string; + /** Server exposed URL prefix for invocation of operations on this endpoint. This doesn't include the protocol, hostname or port as the server does not know how it should be accessed publicly. The URL is stable in the face of endpoint renames. */ + urlPrefix?: string; +} +export const Endpoint = /*@__PURE__*/ S.suspend(() => + S.Struct({ + version: S.optional(S.String), + id: S.optional(S.String), + spec: S.optional(EndpointSpec), + createdTime: S.optional(S.String), + lastModifiedTime: S.optional(S.String), + urlPrefix: S.optional(S.String), + }), +).annotate({ identifier: "Endpoint" }) as any as S.Schema; + +export interface CreateNexusEndpointResponse { + /** Data post acceptance. Can be used to issue additional updates to this record. */ + endpoint?: Endpoint; +} +export const CreateNexusEndpointResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + endpoint: S.optional(Endpoint), + }), +).annotate({ + identifier: "CreateNexusEndpointResponse", +}) as any as S.Schema; + +/** Range represents a set of integer values, used to match fields of a calendar time in StructuredCalendarSpec. If end < start, then end is interpreted as equal to start. This means you can use a Range with start set to a value, and end and step unset (defaulting to 0) to represent a single value. */ +export interface Range { + /** Start of range (inclusive). */ + start?: number; + /** End of range (inclusive). */ + end?: number; + /** Step (optional, default 1). */ + step?: number; +} +export const Range = /*@__PURE__*/ S.suspend(() => + S.Struct({ + start: S.optional(S.Number), + end: S.optional(S.Number), + step: S.optional(S.Number), + }), +).annotate({ identifier: "Range" }) as any as S.Schema; + +/** Match seconds (0-59) */ +export type StructuredCalendarSpecSecondList = Array; +export const StructuredCalendarSpecSecondList = /*@__PURE__*/ S.Array( + Range, +) as any as S.Schema; + +/** Match minutes (0-59) */ +export type StructuredCalendarSpecMinuteList = Array; +export const StructuredCalendarSpecMinuteList = /*@__PURE__*/ S.Array( + Range, +) as any as S.Schema; + +/** Match hours (0-23) */ +export type StructuredCalendarSpecHourList = Array; +export const StructuredCalendarSpecHourList = /*@__PURE__*/ S.Array( + Range, +) as any as S.Schema; + +/** Match days of the month (1-31) (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: standard name of field --) */ +export type StructuredCalendarSpecDayOfMonthList = Array; +export const StructuredCalendarSpecDayOfMonthList = /*@__PURE__*/ S.Array( + Range, +) as any as S.Schema; + +/** Match months (1-12) */ +export type StructuredCalendarSpecMonthList = Array; +export const StructuredCalendarSpecMonthList = /*@__PURE__*/ S.Array( + Range, +) as any as S.Schema; + +/** Match years. */ +export type StructuredCalendarSpecYearList = Array; +export const StructuredCalendarSpecYearList = /*@__PURE__*/ S.Array( + Range, +) as any as S.Schema; + +/** Match days of the week (0-6; 0 is Sunday). */ +export type StructuredCalendarSpecDayOfWeekList = Array; +export const StructuredCalendarSpecDayOfWeekList = /*@__PURE__*/ S.Array( + Range, +) as any as S.Schema; + +/** StructuredCalendarSpec describes an event specification relative to the calendar, in a form that's easy to work with programmatically. Each field can be one or more ranges. A timestamp matches if at least one range of each field matches the corresponding fields of the timestamp, except for year: if year is missing, that means all years match. For all fields besides year, at least one Range must be present to match anything. Relative expressions such as "last day of the month" or "third Monday" are not currently representable; callers must enumerate the concrete days they require. */ +export interface StructuredCalendarSpec { + /** Match seconds (0-59) */ + second?: StructuredCalendarSpecSecondList; + /** Match minutes (0-59) */ + minute?: StructuredCalendarSpecMinuteList; + /** Match hours (0-23) */ + hour?: StructuredCalendarSpecHourList; + /** Match days of the month (1-31) (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: standard name of field --) */ + dayOfMonth?: StructuredCalendarSpecDayOfMonthList; + /** Match months (1-12) */ + month?: StructuredCalendarSpecMonthList; + /** Match years. */ + year?: StructuredCalendarSpecYearList; + /** Match days of the week (0-6; 0 is Sunday). */ + dayOfWeek?: StructuredCalendarSpecDayOfWeekList; + /** Free-form comment describing the intention of this spec. */ + comment?: string; +} +export const StructuredCalendarSpec = /*@__PURE__*/ S.suspend(() => + S.Struct({ + second: S.optional(StructuredCalendarSpecSecondList), + minute: S.optional(StructuredCalendarSpecMinuteList), + hour: S.optional(StructuredCalendarSpecHourList), + dayOfMonth: S.optional(StructuredCalendarSpecDayOfMonthList), + month: S.optional(StructuredCalendarSpecMonthList), + year: S.optional(StructuredCalendarSpecYearList), + dayOfWeek: S.optional(StructuredCalendarSpecDayOfWeekList), + comment: S.optional(S.String), + }), +).annotate({ + identifier: "StructuredCalendarSpec", +}) as any as S.Schema; + +/** Calendar-based specifications of times. */ +export type ScheduleSpecStructuredCalendarList = Array; +export const ScheduleSpecStructuredCalendarList = /*@__PURE__*/ S.Array( + StructuredCalendarSpec, +) as any as S.Schema; + +/** cron_string holds a traditional cron specification as a string. It accepts 5, 6, or 7 fields, separated by spaces, and interprets them the same way as CalendarSpec. 5 fields: minute, hour, day_of_month, month, day_of_week 6 fields: minute, hour, day_of_month, month, day_of_week, year 7 fields: second, minute, hour, day_of_month, month, day_of_week, year If year is not given, it defaults to *. If second is not given, it defaults to 0. Shorthands @yearly, @monthly, @weekly, @daily, and @hourly are also accepted instead of the 5-7 time fields. Optionally, the string can be preceded by CRON_TZ= or TZ=, which will get copied to timezone_name. (There must not also be a timezone_name present.) Optionally "#" followed by a comment can appear at the end of the string. Note that the special case that some cron implementations have for treating day_of_month and day_of_week as "or" instead of "and" when both are set is not implemented. @every [/] is accepted and gets compiled into an IntervalSpec instead. and should be a decimal integer with a unit suffix s, m, h, or d. */ +export type ScheduleSpecCronStringList = Array; +export const ScheduleSpecCronStringList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** CalendarSpec describes an event specification relative to the calendar, similar to a traditional cron specification, but with labeled fields. Each field can be one of: *: matches always x: matches when the field equals x x/y : matches when the field equals x+n*y where n is an integer x-z: matches when the field is between x and z inclusive w,x,y,...: matches when the field is one of the listed values Each x, y, z, ... is either a decimal integer, or a month or day of week name or abbreviation (in the appropriate fields). A timestamp matches if all fields match. Note that fields have different default values, for convenience. Note that the special case that some cron implementations have for treating day_of_month and day_of_week as "or" instead of "and" when both are set is not implemented. day_of_week can accept 0 or 7 as Sunday CalendarSpec gets compiled into StructuredCalendarSpec, which is what will be returned if you describe the schedule. */ +export interface CalendarSpec { + /** Expression to match seconds. Default: 0 */ + second?: string; + /** Expression to match minutes. Default: 0 */ + minute?: string; + /** Expression to match hours. Default: 0 */ + hour?: string; + /** Expression to match days of the month. Default: * (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: standard name of field --) */ + dayOfMonth?: string; + /** Expression to match months. Default: * */ + month?: string; + /** Expression to match years. Default: * */ + year?: string; + /** Expression to match days of the week. Default: * */ + dayOfWeek?: string; + /** Free-form comment describing the intention of this spec. */ + comment?: string; +} +export const CalendarSpec = /*@__PURE__*/ S.suspend(() => + S.Struct({ + second: S.optional(S.String), + minute: S.optional(S.String), + hour: S.optional(S.String), + dayOfMonth: S.optional(S.String), + month: S.optional(S.String), + year: S.optional(S.String), + dayOfWeek: S.optional(S.String), + comment: S.optional(S.String), + }), +).annotate({ identifier: "CalendarSpec" }) as any as S.Schema; + +/** Calendar-based specifications of times. */ +export type ScheduleSpecCalendarList = Array; +export const ScheduleSpecCalendarList = /*@__PURE__*/ S.Array( + CalendarSpec, +) as any as S.Schema; + +/** IntervalSpec matches times that can be expressed as: epoch + n * interval + phase where n is an integer. phase defaults to zero if missing. interval is required. Both interval and phase must be non-negative and are truncated to the nearest second before any calculations. For example, an interval of 1 hour with phase of zero would match every hour, on the hour. The same interval but a phase of 19 minutes would match every xx:19:00. An interval of 28 days with phase zero would match 2022-02-17T00:00:00Z (among other times). The same interval with a phase of 3 days, 5 hours, and 23 minutes would match 2022-02-20T05:23:00Z instead. */ +export interface IntervalSpec { + interval?: string; + phase?: string; +} +export const IntervalSpec = /*@__PURE__*/ S.suspend(() => + S.Struct({ + interval: S.optional(S.String), + phase: S.optional(S.String), + }), +).annotate({ identifier: "IntervalSpec" }) as any as S.Schema; + +/** Interval-based specifications of times. */ +export type ScheduleSpecIntervalList = Array; +export const ScheduleSpecIntervalList = /*@__PURE__*/ S.Array( + IntervalSpec, +) as any as S.Schema; + +/** Any timestamps matching any of exclude_* will be skipped. Deprecated. Use exclude_structured_calendar. */ +export type ScheduleSpecExcludeCalendarList = Array; +export const ScheduleSpecExcludeCalendarList = /*@__PURE__*/ S.Array( + CalendarSpec, +) as any as S.Schema; + +export type ScheduleSpecExcludeStructuredCalendarList = + Array; +export const ScheduleSpecExcludeStructuredCalendarList = /*@__PURE__*/ S.Array( + StructuredCalendarSpec, +) as any as S.Schema; + +/** ScheduleSpec is a complete description of a set of absolute timestamps (possibly infinite) that an action should occur at. The meaning of a ScheduleSpec depends only on its contents and never changes, except that the definition of a time zone can change over time (most commonly, when daylight saving time policy changes for an area). To create a totally self-contained ScheduleSpec, use UTC or include timezone_data. For input, you can provide zero or more of: structured_calendar, calendar, cron_string, interval, and exclude_structured_calendar, and all of them will be used (the schedule will take action at the union of all of their times, minus the ones that match exclude_structured_calendar). On input, calendar and cron_string fields will be compiled into structured_calendar (and maybe interval and timezone_name), so if you Describe a schedule, you'll see only structured_calendar, interval, etc. If a spec has no matching times after the current time, then the schedule will be subject to automatic deletion (after several days). */ +export interface ScheduleSpec { + /** Calendar-based specifications of times. */ + structuredCalendar?: ScheduleSpecStructuredCalendarList; + /** cron_string holds a traditional cron specification as a string. It accepts 5, 6, or 7 fields, separated by spaces, and interprets them the same way as CalendarSpec. 5 fields: minute, hour, day_of_month, month, day_of_week 6 fields: minute, hour, day_of_month, month, day_of_week, year 7 fields: second, minute, hour, day_of_month, month, day_of_week, year If year is not given, it defaults to *. If second is not given, it defaults to 0. Shorthands @yearly, @monthly, @weekly, @daily, and @hourly are also accepted instead of the 5-7 time fields. Optionally, the string can be preceded by CRON_TZ= or TZ=, which will get copied to timezone_name. (There must not also be a timezone_name present.) Optionally "#" followed by a comment can appear at the end of the string. Note that the special case that some cron implementations have for treating day_of_month and day_of_week as "or" instead of "and" when both are set is not implemented. @every [/] is accepted and gets compiled into an IntervalSpec instead. and should be a decimal integer with a unit suffix s, m, h, or d. */ + cronString?: ScheduleSpecCronStringList; + /** Calendar-based specifications of times. */ + calendar?: ScheduleSpecCalendarList; + /** Interval-based specifications of times. */ + interval?: ScheduleSpecIntervalList; + /** Any timestamps matching any of exclude_* will be skipped. Deprecated. Use exclude_structured_calendar. */ + excludeCalendar?: ScheduleSpecExcludeCalendarList; + excludeStructuredCalendar?: ScheduleSpecExcludeStructuredCalendarList; + /** If start_time is set, any timestamps before start_time will be skipped. (Together, start_time and end_time make an inclusive interval.) */ + startTime?: string; + /** If end_time is set, any timestamps after end_time will be skipped. */ + endTime?: string; + /** All timestamps will be incremented by a random value from 0 to this amount of jitter. Default: 0 */ + jitter?: string; + /** Time zone to interpret all calendar-based specs in. If unset, defaults to UTC. We recommend using UTC for your application if at all possible, to avoid various surprising properties of time zones. Time zones may be provided by name, corresponding to names in the IANA time zone database (see https://www.iana.org/time-zones). The definition will be loaded by the Temporal server from the environment it runs in. If your application requires more control over the time zone definition used, it may pass in a complete definition in the form of a TZif file from the time zone database. If present, this will be used instead of loading anything from the environment. You are then responsible for updating timezone_data when the definition changes. Calendar spec matching is based on literal matching of the clock time with no special handling of DST: if you write a calendar spec that fires at 2:30am and specify a time zone that follows DST, that action will not be triggered on the day that has no 2:30am. Similarly, an action that fires at 1:30am will be triggered twice on the day that has two 1:30s. Also note that no actions are taken on leap-seconds (e.g. 23:59:60 UTC). */ + timezoneName?: string; + timezoneData?: string; +} +export const ScheduleSpec = /*@__PURE__*/ S.suspend(() => + S.Struct({ + structuredCalendar: S.optional(ScheduleSpecStructuredCalendarList), + cronString: S.optional(ScheduleSpecCronStringList), + calendar: S.optional(ScheduleSpecCalendarList), + interval: S.optional(ScheduleSpecIntervalList), + excludeCalendar: S.optional(ScheduleSpecExcludeCalendarList), + excludeStructuredCalendar: S.optional( + ScheduleSpecExcludeStructuredCalendarList, + ), + startTime: S.optional(S.String), + endTime: S.optional(S.String), + jitter: S.optional(S.String), + timezoneName: S.optional(S.String), + timezoneData: S.optional(S.String), + }), +).annotate({ identifier: "ScheduleSpec" }) as any as S.Schema; + +/** Represents the identifier used by a workflow author to define the workflow. Typically, the name of a function. This is sometimes referred to as the workflow's "name" */ +export interface WorkflowType { + name?: string; +} +export const WorkflowType = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + }), +).annotate({ identifier: "WorkflowType" }) as any as S.Schema; + +/** Default: TASK_QUEUE_KIND_NORMAL. */ +export type TaskQueueKind = + | "TASK_QUEUE_KIND_UNSPECIFIED" + | "TASK_QUEUE_KIND_NORMAL" + | "TASK_QUEUE_KIND_STICKY" + | "TASK_QUEUE_KIND_WORKER_COMMANDS"; +export const TaskQueueKind = /*@__PURE__*/ S.String; + +/** See https://docs.temporal.io/docs/concepts/task-queues/ */ +export interface TaskQueue { + name?: string; + /** Default: TASK_QUEUE_KIND_NORMAL. */ + kind?: TaskQueueKind | (string & {}); + /** Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of the normal task queue that the sticky worker is running on. */ + normalName?: string; +} +export const TaskQueue = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + kind: S.optional(TaskQueueKind), + normalName: S.optional(S.String), + }), +).annotate({ identifier: "TaskQueue" }) as any as S.Schema; + +export type PayloadsPayloadsList = Array; +export const PayloadsPayloadsList = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +/** See `Payload` */ +export interface Payloads { + payloads?: PayloadsPayloadsList; +} +export const Payloads = /*@__PURE__*/ S.suspend(() => + S.Struct({ + payloads: S.optional(PayloadsPayloadsList), + }), +).annotate({ identifier: "Payloads" }) as any as S.Schema; + +/** Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ +export type NewWorkflowExecutionInfoWorkflowIdReusePolicy = + | "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED" + | "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE" + | "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + | "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE" + | "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING"; +export const NewWorkflowExecutionInfoWorkflowIdReusePolicy = + /*@__PURE__*/ S.String; + +/** Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that this is not a substring match, the error *type* (not message) must match exactly. */ +export type RetryPolicyNonRetryableErrorTypesList = Array; +export const RetryPolicyNonRetryableErrorTypesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** How retries ought to be handled, usable by both workflows and activities */ +export interface RetryPolicy { + /** Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries. */ + initialInterval?: string; + /** Coefficient used to calculate the next retry interval. The next retry interval is previous interval multiplied by the coefficient. Must be 1 or larger. */ + backoffCoefficient?: number; + /** Maximum interval between retries. Exponential backoff leads to interval increase. This value is the cap of the increase. Default is 100x of the initial interval. */ + maximumInterval?: string; + /** Maximum number of attempts. When exceeded the retries stop even if not expired yet. 1 disables retries. 0 means unlimited (up to the timeouts) */ + maximumAttempts?: number; + /** Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that this is not a substring match, the error *type* (not message) must match exactly. */ + nonRetryableErrorTypes?: RetryPolicyNonRetryableErrorTypesList; +} +export const RetryPolicy = /*@__PURE__*/ S.suspend(() => + S.Struct({ + initialInterval: S.optional(S.String), + backoffCoefficient: S.optional(S.Number), + maximumInterval: S.optional(S.String), + maximumAttempts: S.optional(S.Number), + nonRetryableErrorTypes: S.optional(RetryPolicyNonRetryableErrorTypesList), + }), +).annotate({ identifier: "RetryPolicy" }) as any as S.Schema; + +export type MemoFieldsMap = { [key: string]: unknown | undefined }; +export const MemoFieldsMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** A user-defined set of *unindexed* fields that are exposed when listing/searching workflows */ +export interface Memo { + fields?: MemoFieldsMap; +} +export const Memo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + fields: S.optional(MemoFieldsMap), + }), +).annotate({ identifier: "Memo" }) as any as S.Schema; + +export type SearchAttributesIndexedFieldsMap = { + [key: string]: unknown | undefined; +}; +export const SearchAttributesIndexedFieldsMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** A user-defined set of *indexed* fields that are used/exposed when listing/searching workflows. The payload is not serialized in a user-defined way. */ +export interface SearchAttributes { + indexedFields?: SearchAttributesIndexedFieldsMap; +} +export const SearchAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + indexedFields: S.optional(SearchAttributesIndexedFieldsMap), + }), +).annotate({ + identifier: "SearchAttributes", +}) as any as S.Schema; + +export type HeaderFieldsMap = { [key: string]: unknown | undefined }; +export const HeaderFieldsMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Contains metadata that can be attached to a variety of requests, like starting a workflow, and can be propagated between, for example, workflows and activities. */ +export interface Header { + fields?: HeaderFieldsMap; +} +export const Header = /*@__PURE__*/ S.suspend(() => + S.Struct({ + fields: S.optional(HeaderFieldsMap), + }), +).annotate({ identifier: "Header" }) as any as S.Schema
; + +/** Information a user can set, often for use by user interfaces. */ +export interface UserMetadata { + /** Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload that is a single JSON string for use in user interfaces. User interface formatting may not apply to this text when used in "title" situations. The payload data section is limited to 400 bytes by default. */ + summary?: unknown; + /** Long-form text that provides details. This payload should be a "json/plain"-encoded payload that is a single JSON string for use in user interfaces. User interface formatting may apply to this text in common use. The payload data section is limited to 20000 bytes by default. */ + details?: unknown; +} +export const UserMetadata = /*@__PURE__*/ S.suspend(() => + S.Struct({ + summary: S.optional(S.Unknown), + details: S.optional(S.Unknown), + }), +).annotate({ identifier: "UserMetadata" }) as any as S.Schema; + +/** Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED. See `PinnedOverrideBehavior` for details. */ +export type VersioningOverridePinnedOverrideBehavior = + | "PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED" + | "PINNED_OVERRIDE_BEHAVIOR_PINNED"; +export const VersioningOverridePinnedOverrideBehavior = /*@__PURE__*/ S.String; + +/** A Worker Deployment Version (Version, for short) represents a version of workers within a Worker Deployment. (see documentation of WorkerDeploymentVersionInfo) Version records are created in Temporal server automatically when their first poller arrives to the server. Experimental. Worker Deployment Versions are experimental and might significantly change in the future. */ +export interface WorkerDeploymentVersion { + /** A unique identifier for this Version within the Deployment it is a part of. Not necessarily unique within the namespace. The combination of `deployment_name` and `build_id` uniquely identifies this Version within the namespace, because Deployment names are unique within a namespace. */ + buildId?: string; + /** Identifies the Worker Deployment this Version is part of. */ + deploymentName?: string; +} +export const WorkerDeploymentVersion = /*@__PURE__*/ S.suspend(() => + S.Struct({ + buildId: S.optional(S.String), + deploymentName: S.optional(S.String), + }), +).annotate({ + identifier: "WorkerDeploymentVersion", +}) as any as S.Schema; + +export interface VersioningOverridePinnedOverride { + /** Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED. See `PinnedOverrideBehavior` for details. */ + behavior?: VersioningOverridePinnedOverrideBehavior | (string & {}); + /** Specifies the Worker Deployment Version to pin this workflow to. Required if the target workflow is not already pinned to a version. If omitted and the target workflow is already pinned, the effective pinned version will be the existing pinned version. If omitted and the target workflow is not pinned, the override request will be rejected with a PreconditionFailed error. */ + version?: WorkerDeploymentVersion; +} +export const VersioningOverridePinnedOverride = /*@__PURE__*/ S.suspend(() => + S.Struct({ + behavior: S.optional(VersioningOverridePinnedOverrideBehavior), + version: S.optional(WorkerDeploymentVersion), + }), +).annotate({ + identifier: "VersioningOverridePinnedOverride", +}) as any as S.Schema; + +/** Required. Deprecated. Use `override`. */ +export type VersioningOverrideBehavior = + | "VERSIONING_BEHAVIOR_UNSPECIFIED" + | "VERSIONING_BEHAVIOR_PINNED" + | "VERSIONING_BEHAVIOR_AUTO_UPGRADE"; +export const VersioningOverrideBehavior = /*@__PURE__*/ S.String; + +/** `Deployment` identifies a deployment of Temporal workers. The combination of deployment series name + build ID serves as the identifier. User can use `WorkerDeploymentOptions` in their worker programs to specify these values. Deprecated. */ +export interface Deployment { + /** Different versions of the same worker service/application are related together by having a shared series name. Out of all deployments of a series, one can be designated as the current deployment, which receives new workflow executions and new tasks of workflows with `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior. */ + seriesName?: string; + /** Build ID changes with each version of the worker when the worker program code and/or config changes. */ + buildId?: string; +} +export const Deployment = /*@__PURE__*/ S.suspend(() => + S.Struct({ + seriesName: S.optional(S.String), + buildId: S.optional(S.String), + }), +).annotate({ identifier: "Deployment" }) as any as S.Schema; + +/** Used to override the versioning behavior (and pinned deployment version, if applicable) of a specific workflow execution. If set, this override takes precedence over worker-sent values. See `WorkflowExecutionInfo.VersioningInfo` for more information. To remove the override, call `UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask` to indicate that it should be mutated. Pinned behavior overrides are automatically inherited by child workflows, workflow retries, continue-as-new workflows, and cron workflows. */ +export interface VersioningOverride { + /** Override the workflow to have Pinned behavior. */ + pinned?: VersioningOverridePinnedOverride; + /** Override the workflow to have AutoUpgrade behavior. */ + autoUpgrade?: boolean; + /** Required. Deprecated. Use `override`. */ + behavior?: VersioningOverrideBehavior | (string & {}); + /** Required if behavior is `PINNED`. Must be null if behavior is `AUTO_UPGRADE`. Identifies the worker deployment to pin the workflow to. Deprecated. Use `override.pinned.version`. */ + deployment?: Deployment; + /** Required if behavior is `PINNED`. Must be absent if behavior is not `PINNED`. Identifies the worker deployment version to pin the workflow to, in the format ".". Deprecated. Use `override.pinned.version`. */ + pinnedVersion?: string; +} +export const VersioningOverride = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pinned: S.optional(VersioningOverridePinnedOverride), + autoUpgrade: S.optional(S.Boolean), + behavior: S.optional(VersioningOverrideBehavior), + deployment: S.optional(Deployment), + pinnedVersion: S.optional(S.String), + }), +).annotate({ + identifier: "VersioningOverride", +}) as any as S.Schema; + +/** Priority contains metadata that controls relative ordering of task processing when tasks are backed up in a queue. Initially, Priority will be used in matching (workflow and activity) task queues. Later it may be used in history task queues and in rate limiting decisions. Priority is attached to workflows and activities. By default, activities inherit Priority from the workflow that created them, but may override fields when an activity is started or modified. Despite being named "Priority", this message also contains fields that control "fairness" mechanisms. For all fields, the field not present or equal to zero/empty string means to inherit the value from the calling workflow, or if there is no calling workflow, then use the default value. For all fields other than fairness_key, the zero value isn't meaningful so there's no confusion between inherit/default and a meaningful value. For fairness_key, the empty string will be interpreted as "inherit". This means that if a workflow has a non-empty fairness key, you can't override the fairness key of its activity to the empty string. The overall semantics of Priority are: 1. First, consider "priority": higher priority (lower number) goes first. 2. Then, consider fairness: try to dispatch tasks for different fairness keys in proportion to their weight. Applications may use any subset of mechanisms that are useful to them and leave the other fields to use default values. Not all queues in the system may support the "full" semantics of all priority fields. (Currently only support in matching task queues is planned.) */ +export interface Priority { + /** Priority key is a positive integer from 1 to n, where smaller integers correspond to higher priorities (tasks run sooner). In general, tasks in a queue should be processed in close to priority order, although small deviations are possible. The maximum priority value (minimum priority) is determined by server configuration, and defaults to 5. If priority is not present (or zero), then the effective priority will be the default priority, which is calculated by (min+max)/2. With the default max of 5, and min of 1, that comes out to 3. */ + priorityKey?: number; + /** Fairness key is a short string that's used as a key for a fairness balancing mechanism. It may correspond to a tenant id, or to a fixed string like "high" or "low". The default is the empty string. The fairness mechanism attempts to dispatch tasks for a given key in proportion to its weight. For example, using a thousand distinct tenant ids, each with a weight of 1.0 (the default) will result in each tenant getting a roughly equal share of task dispatch throughput. (Note: this does not imply equal share of worker capacity! Fairness decisions are made based on queue statistics, not current worker load.) As another example, using keys "high" and "low" with weight 9.0 and 1.0 respectively will prefer dispatching "high" tasks over "low" tasks at a 9:1 ratio, while allowing either key to use all worker capacity if the other is not present. All fairness mechanisms, including rate limits, are best-effort and probabilistic. The results may not match what a "perfect" algorithm with infinite resources would produce. The more unique keys are used, the less accurate the results will be. Fairness keys are limited to 64 bytes. */ + fairnessKey?: string; + /** Fairness weight for a task can come from multiple sources for flexibility. From highest to lowest precedence: 1. Weights for a small set of keys can be overridden in task queue configuration with an API. 2. It can be attached to the workflow/activity in this field. 3. The default weight of 1.0 will be used. Weight values are clamped to the range [0.001, 1000]. */ + fairnessWeight?: number; +} +export const Priority = /*@__PURE__*/ S.suspend(() => + S.Struct({ + priorityKey: S.optional(S.Number), + fairnessKey: S.optional(S.String), + fairnessWeight: S.optional(S.Number), + }), +).annotate({ identifier: "Priority" }) as any as S.Schema; + +/** NewWorkflowExecutionInfo is a shared message that encapsulates all the required arguments to starting a workflow in different contexts. */ +export interface NewWorkflowExecutionInfo { + workflowId?: string; + workflowType?: WorkflowType; + taskQueue?: TaskQueue; + /** Serialized arguments to the workflow. */ + input?: Payloads; + /** Total workflow execution timeout including retries and continue as new. */ + workflowExecutionTimeout?: string; + /** Timeout of a single workflow run. */ + workflowRunTimeout?: string; + /** Timeout of a single workflow task. */ + workflowTaskTimeout?: string; + /** Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ + workflowIdReusePolicy?: + | NewWorkflowExecutionInfoWorkflowIdReusePolicy + | (string & {}); + /** The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. */ + retryPolicy?: RetryPolicy; + /** See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ */ + cronSchedule?: string; + memo?: Memo; + searchAttributes?: SearchAttributes; + header?: Header; + /** Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig for use by user interfaces to display the fixed as-of-start summary and details of the workflow. */ + userMetadata?: UserMetadata; + /** If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. */ + versioningOverride?: VersioningOverride; + /** Priority metadata */ + priority?: Priority; +} +export const NewWorkflowExecutionInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowId: S.optional(S.String), + workflowType: S.optional(WorkflowType), + taskQueue: S.optional(TaskQueue), + input: S.optional(Payloads), + workflowExecutionTimeout: S.optional(S.String), + workflowRunTimeout: S.optional(S.String), + workflowTaskTimeout: S.optional(S.String), + workflowIdReusePolicy: S.optional( + NewWorkflowExecutionInfoWorkflowIdReusePolicy, + ), + retryPolicy: S.optional(RetryPolicy), + cronSchedule: S.optional(S.String), + memo: S.optional(Memo), + searchAttributes: S.optional(SearchAttributes), + header: S.optional(Header), + userMetadata: S.optional(UserMetadata), + versioningOverride: S.optional(VersioningOverride), + priority: S.optional(Priority), + }), +).annotate({ + identifier: "NewWorkflowExecutionInfo", +}) as any as S.Schema; + +export interface ScheduleAction { + /** All fields of NewWorkflowExecutionInfo are valid except for: - workflow_id_reuse_policy - cron_schedule The workflow id of the started workflow may not match this exactly, it may have a timestamp appended for uniqueness. */ + startWorkflow?: NewWorkflowExecutionInfo; +} +export const ScheduleAction = /*@__PURE__*/ S.suspend(() => + S.Struct({ + startWorkflow: S.optional(NewWorkflowExecutionInfo), + }), +).annotate({ identifier: "ScheduleAction" }) as any as S.Schema; + +/** Policy for overlaps. Note that this can be changed after a schedule has taken some actions, and some changes might produce unintuitive results. In general, the later policy overrides the earlier policy. */ +export type SchedulePoliciesOverlapPolicy = + | "SCHEDULE_OVERLAP_POLICY_UNSPECIFIED" + | "SCHEDULE_OVERLAP_POLICY_SKIP" + | "SCHEDULE_OVERLAP_POLICY_BUFFER_ONE" + | "SCHEDULE_OVERLAP_POLICY_BUFFER_ALL" + | "SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER" + | "SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER" + | "SCHEDULE_OVERLAP_POLICY_ALLOW_ALL"; +export const SchedulePoliciesOverlapPolicy = /*@__PURE__*/ S.String; + +export interface SchedulePolicies { + /** Policy for overlaps. Note that this can be changed after a schedule has taken some actions, and some changes might produce unintuitive results. In general, the later policy overrides the earlier policy. */ + overlapPolicy?: SchedulePoliciesOverlapPolicy | (string & {}); + /** Policy for catchups: If the Temporal server misses an action due to one or more components being down, and comes back up, the action will be run if the scheduled time is within this window from the current time. This value defaults to one year, and can't be less than 10 seconds. */ + catchupWindow?: string; + /** If true, and a workflow run fails or times out, turn on "paused". This applies after retry policies: the full chain of retries must fail to trigger a pause here. */ + pauseOnFailure?: boolean; + /** If true, and the action would start a workflow, a timestamp will not be appended to the scheduled workflow id. */ + keepOriginalWorkflowId?: boolean; +} +export const SchedulePolicies = /*@__PURE__*/ S.suspend(() => + S.Struct({ + overlapPolicy: S.optional(SchedulePoliciesOverlapPolicy), + catchupWindow: S.optional(S.String), + pauseOnFailure: S.optional(S.Boolean), + keepOriginalWorkflowId: S.optional(S.Boolean), + }), +).annotate({ + identifier: "SchedulePolicies", +}) as any as S.Schema; + +export interface ScheduleState { + /** Informative human-readable message with contextual notes, e.g. the reason a schedule is paused. The system may overwrite this message on certain conditions, e.g. when pause-on-failure happens. */ + notes?: string; + /** If true, do not take any actions based on the schedule spec. */ + paused?: boolean; + /** If limited_actions is true, decrement remaining_actions after each action, and do not take any more scheduled actions if remaining_actions is zero. Actions may still be taken by explicit request (i.e. trigger immediately or backfill). Skipped actions (due to overlap policy) do not count against remaining actions. If a schedule has no more remaining actions, then the schedule will be subject to automatic deletion (after several days). */ + limitedActions?: boolean; + remainingActions?: string; +} +export const ScheduleState = /*@__PURE__*/ S.suspend(() => + S.Struct({ + notes: S.optional(S.String), + paused: S.optional(S.Boolean), + limitedActions: S.optional(S.Boolean), + remainingActions: S.optional(S.String), + }), +).annotate({ identifier: "ScheduleState" }) as any as S.Schema; + +export interface Schedule { + spec?: ScheduleSpec; + action?: ScheduleAction; + policies?: SchedulePolicies; + state?: ScheduleState; +} +export const Schedule = /*@__PURE__*/ S.suspend(() => + S.Struct({ + spec: S.optional(ScheduleSpec), + action: S.optional(ScheduleAction), + policies: S.optional(SchedulePolicies), + state: S.optional(ScheduleState), + }), +).annotate({ identifier: "Schedule" }) as any as S.Schema; + +/** If set, override overlap policy for this one request. */ +export type TriggerImmediatelyRequestOverlapPolicy = + | "SCHEDULE_OVERLAP_POLICY_UNSPECIFIED" + | "SCHEDULE_OVERLAP_POLICY_SKIP" + | "SCHEDULE_OVERLAP_POLICY_BUFFER_ONE" + | "SCHEDULE_OVERLAP_POLICY_BUFFER_ALL" + | "SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER" + | "SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER" + | "SCHEDULE_OVERLAP_POLICY_ALLOW_ALL"; +export const TriggerImmediatelyRequestOverlapPolicy = /*@__PURE__*/ S.String; + +export interface TriggerImmediatelyRequest { + /** If set, override overlap policy for this one request. */ + overlapPolicy?: TriggerImmediatelyRequestOverlapPolicy | (string & {}); + /** Timestamp used for the identity of the target workflow. If not set the default value is the current time. */ + scheduledTime?: string; +} +export const TriggerImmediatelyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + overlapPolicy: S.optional(TriggerImmediatelyRequestOverlapPolicy), + scheduledTime: S.optional(S.String), + }), +).annotate({ + identifier: "TriggerImmediatelyRequest", +}) as any as S.Schema; + +/** If set, override overlap policy for this request. */ +export type BackfillRequestOverlapPolicy = + | "SCHEDULE_OVERLAP_POLICY_UNSPECIFIED" + | "SCHEDULE_OVERLAP_POLICY_SKIP" + | "SCHEDULE_OVERLAP_POLICY_BUFFER_ONE" + | "SCHEDULE_OVERLAP_POLICY_BUFFER_ALL" + | "SCHEDULE_OVERLAP_POLICY_CANCEL_OTHER" + | "SCHEDULE_OVERLAP_POLICY_TERMINATE_OTHER" + | "SCHEDULE_OVERLAP_POLICY_ALLOW_ALL"; +export const BackfillRequestOverlapPolicy = /*@__PURE__*/ S.String; + +export interface BackfillRequest { + /** Time range to evaluate schedule in. Currently, this time range is exclusive on start_time and inclusive on end_time. (This is admittedly counterintuitive and it may change in the future, so to be safe, use a start time strictly before a scheduled time.) Also note that an action nominally scheduled in the interval but with jitter that pushes it after end_time will not be included. */ + startTime?: string; + endTime?: string; + /** If set, override overlap policy for this request. */ + overlapPolicy?: BackfillRequestOverlapPolicy | (string & {}); +} +export const BackfillRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + startTime: S.optional(S.String), + endTime: S.optional(S.String), + overlapPolicy: S.optional(BackfillRequestOverlapPolicy), + }), +).annotate({ + identifier: "BackfillRequest", +}) as any as S.Schema; + +/** If set, runs though the specified time period(s) and takes actions as if that time passed by right now, all at once. The overlap policy can be overridden for the scope of the backfill. */ +export type SchedulePatchBackfillRequestList = Array; +export const SchedulePatchBackfillRequestList = /*@__PURE__*/ S.Array( + BackfillRequest, +) as any as S.Schema; + +export interface SchedulePatch { + /** If set, trigger one action immediately. */ + triggerImmediately?: TriggerImmediatelyRequest; + /** If set, runs though the specified time period(s) and takes actions as if that time passed by right now, all at once. The overlap policy can be overridden for the scope of the backfill. */ + backfillRequest?: SchedulePatchBackfillRequestList; + /** If set, change the state to paused or unpaused (respectively) and set the notes field to the value of the string. */ + pause?: string; + unpause?: string; +} +export const SchedulePatch = /*@__PURE__*/ S.suspend(() => + S.Struct({ + triggerImmediately: S.optional(TriggerImmediatelyRequest), + backfillRequest: S.optional(SchedulePatchBackfillRequestList), + pause: S.optional(S.String), + unpause: S.optional(S.String), + }), +).annotate({ identifier: "SchedulePatch" }) as any as S.Schema; + +export interface CreateScheduleRequest { + /** The namespace the schedule should be created in. */ + namespace: string; + /** The id of the new schedule. */ + scheduleId: string; + /** The schedule spec, policies, action, and initial state. */ + schedule?: Schedule; + /** Optional initial patch (e.g. to run the action once immediately). */ + initialPatch?: SchedulePatch; + /** The identity of the client who initiated this request. */ + identity?: string; + /** A unique identifier for this create request for idempotence. Typically UUIDv4. */ + requestId?: string; + /** Memo and search attributes to attach to the schedule itself. */ + memo?: Memo; + searchAttributes?: SearchAttributes; +} +export const CreateScheduleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + scheduleId: S.String.pipe(T.Label()), + schedule: S.optional(Schedule), + initialPatch: S.optional(SchedulePatch), + identity: S.optional(S.String), + requestId: S.optional(S.String), + memo: S.optional(Memo), + searchAttributes: S.optional(SearchAttributes), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/schedules/{scheduleId}", + code: 200, + }), + ), +).annotate({ + identifier: "CreateScheduleRequest", +}) as any as S.Schema; + +export interface CreateScheduleResponse { + conflictToken?: string; +} +export const CreateScheduleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + conflictToken: S.optional(S.String), + }), +).annotate({ + identifier: "CreateScheduleResponse", +}) as any as S.Schema; + +export interface CreateWorkerDeploymentRequest { + namespace: string; + /** The name of the Worker Deployment to create. If a Worker Deployment with this name already exists, an error will be returned. */ + deploymentName: string; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; + /** A unique identifier for this create request for idempotence. Typically UUIDv4. */ + requestId?: string; +} +export const CreateWorkerDeploymentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deploymentName: S.String.pipe(T.Label()), + identity: S.optional(S.String), + requestId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}", + code: 200, + }), + ), +).annotate({ + identifier: "CreateWorkerDeploymentRequest", +}) as any as S.Schema; + +export interface CreateWorkerDeploymentResponse { + /** This value is returned so that it can be optionally passed to APIs that write to the WorkerDeployment state to ensure that the state did not change between this API call and a future write. */ + conflictToken?: string; +} +export const CreateWorkerDeploymentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + conflictToken: S.optional(S.String), + }), +).annotate({ + identifier: "CreateWorkerDeploymentResponse", +}) as any as S.Schema; + +export type ComputeConfigScalingGroupTaskQueueTypesItem = + | "TASK_QUEUE_TYPE_UNSPECIFIED" + | "TASK_QUEUE_TYPE_WORKFLOW" + | "TASK_QUEUE_TYPE_ACTIVITY" + | "TASK_QUEUE_TYPE_NEXUS"; +export const ComputeConfigScalingGroupTaskQueueTypesItem = + /*@__PURE__*/ S.String; + +/** Optional. The set of task queue types this scaling group serves. If not provided, this scaling group serves all not otherwise defined task types. */ +export type ComputeConfigScalingGroupTaskQueueTypesList = Array< + ComputeConfigScalingGroupTaskQueueTypesItem | (string & {}) +>; +export const ComputeConfigScalingGroupTaskQueueTypesList = + /*@__PURE__*/ S.Array( + ComputeConfigScalingGroupTaskQueueTypesItem, + ) as any as S.Schema; + +/** ComputeProvider stores information used by a worker control plane controller to respond to worker lifecycle events. For example, when a Task is received on a TaskQueue that has no active pollers, a serverless worker lifecycle controller might need to invoke an AWS Lambda Function that itself ends up calling the SDK's worker.New() function. */ +export interface ComputeProvider { + /** Type of the compute provider. This string is implementation-specific and can be used by implementations to understand how to interpret the contents of the provider_details field. */ + type?: string; + /** Contains provider-specific instructions and configuration. For server-implemented providers, use the SDK's default content converter to ensure the server can understand it. For remote-implemented providers, you might use your own content converters according to what the remote endpoints understand. */ + details?: unknown; + /** Optional. If the compute provider is a Nexus service, this should point there. */ + nexusEndpoint?: string; +} +export const ComputeProvider = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.optional(S.String), + details: S.optional(S.Unknown), + nexusEndpoint: S.optional(S.String), + }), +).annotate({ + identifier: "ComputeProvider", +}) as any as S.Schema; + +/** ComputeScaler instructs the Temporal Service when to scale up or down the number of Workers that comprise a WorkerDeployment. */ +export interface ComputeScaler { + /** Type of the compute scaler. this string is implementation-specific and can be used by implementations to understand how to interpret the contents of the scaler_details field. */ + type?: string; + /** Contains scaler-specific instructions and configuration. For server-implemented scalers, use the SDK's default data converter to ensure the server can understand it. For remote-implemented scalers, you might use your own data converters according to what the remote endpoints understand. */ + details?: unknown; +} +export const ComputeScaler = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.optional(S.String), + details: S.optional(S.Unknown), + }), +).annotate({ identifier: "ComputeScaler" }) as any as S.Schema; + +export interface ComputeConfigScalingGroup { + /** Optional. The set of task queue types this scaling group serves. If not provided, this scaling group serves all not otherwise defined task types. */ + taskQueueTypes?: ComputeConfigScalingGroupTaskQueueTypesList; + /** Stores instructions for a worker control plane controller how to respond to worker lifeycle events. */ + provider?: ComputeProvider; + /** Informs a worker lifecycle controller *when* and *how often* to perform certain worker lifecycle actions like starting a serverless worker. */ + scaler?: ComputeScaler; +} +export const ComputeConfigScalingGroup = /*@__PURE__*/ S.suspend(() => + S.Struct({ + taskQueueTypes: S.optional(ComputeConfigScalingGroupTaskQueueTypesList), + provider: S.optional(ComputeProvider), + scaler: S.optional(ComputeScaler), + }), +).annotate({ + identifier: "ComputeConfigScalingGroup", +}) as any as S.Schema; + +/** Each scaling group describes a compute config for a specific subset of the worker deployment version: covering a specific set of task types and/or regions. Having different configurations for different task types, allows independent tuning of activity and workflow task processing (for example). The key of the map is the ID of the scaling group used to reference it in subsequent update calls. */ +export type ComputeConfigScalingGroupsMap = { + [key: string]: ComputeConfigScalingGroup | undefined; +}; +export const ComputeConfigScalingGroupsMap = /*@__PURE__*/ S.Record( + S.String, + ComputeConfigScalingGroup, +) as any as S.Schema; + +/** ComputeConfig stores configuration that helps a worker control plane controller understand *when* and *how* to respond to worker lifecycle events. */ +export interface ComputeConfig { + /** Each scaling group describes a compute config for a specific subset of the worker deployment version: covering a specific set of task types and/or regions. Having different configurations for different task types, allows independent tuning of activity and workflow task processing (for example). The key of the map is the ID of the scaling group used to reference it in subsequent update calls. */ + scalingGroups?: ComputeConfigScalingGroupsMap; +} +export const ComputeConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scalingGroups: S.optional(ComputeConfigScalingGroupsMap), + }), +).annotate({ identifier: "ComputeConfig" }) as any as S.Schema; + +export interface CreateWorkerDeploymentVersionRequest { + namespace: string; + deployment_version_deployment_name: string; + /** Required. */ + deploymentVersion?: WorkerDeploymentVersion; + /** Optional. Contains the new worker compute configuration for the Worker Deployment. Used for worker scale management. */ + computeConfig?: ComputeConfig; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; + /** A unique identifier for this create request for idempotence. Typically UUIDv4. If a second request with the same ID is recieved, it is considered a successful no-op. Retrying with a different request ID for the same deployment name + build ID is an error. */ + requestId?: string; +} +export const CreateWorkerDeploymentVersionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deployment_version_deployment_name: S.String.pipe(T.Label()), + deploymentVersion: S.optional(WorkerDeploymentVersion), + computeConfig: S.optional(ComputeConfig), + identity: S.optional(S.String), + requestId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}", + code: 200, + }), + ), +).annotate({ + identifier: "CreateWorkerDeploymentVersionRequest", +}) as any as S.Schema; + +export type CreateWorkerDeploymentVersionResponse2 = unknown; +export const CreateWorkerDeploymentVersionResponse2 = /*@__PURE__*/ S.suspend( + () => S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "CreateWorkerDeploymentVersionResponse2", +}) as any as S.Schema; + +/** Activity trigger will be triggered when an activity is about to start. */ +export interface WorkflowRuleSpecActivityStartingTrigger { + /** Activity predicate is a SQL-like string filter parameter. It is used to match against workflow data. The following activity attributes are supported as part of the predicate: - ActivityType: An Activity Type is the mapping of a name to an Activity Definition.. - ActivityId: The ID of the activity. - ActivityAttempt: The number attempts of the activity. - BackoffInterval: The current amount of time between scheduled attempts of the activity. - ActivityStatus: The status of the activity. Can be one of "Scheduled", "Started", "Paused". - TaskQueue: The name of the task queue the workflow specified that the activity should run on. Activity predicate support the following operators: * =, !=, >, >=, <, <= * AND, OR, () * BETWEEN ... AND STARTS_WITH */ + predicate?: string; +} +export const WorkflowRuleSpecActivityStartingTrigger = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + predicate: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowRuleSpecActivityStartingTrigger", +}) as any as S.Schema; + +export interface WorkflowRuleAction { + activityPause?: unknown; +} +export const WorkflowRuleAction = /*@__PURE__*/ S.suspend(() => + S.Struct({ + activityPause: S.optional(S.Unknown), + }), +).annotate({ + identifier: "WorkflowRuleAction", +}) as any as S.Schema; + +/** WorkflowRuleAction to be taken when the rule is triggered and predicate is matched. */ +export type WorkflowRuleSpecActionsList = Array; +export const WorkflowRuleSpecActionsList = /*@__PURE__*/ S.Array( + WorkflowRuleAction, +) as any as S.Schema; + +export interface WorkflowRuleSpec { + /** The id of the new workflow rule. Must be unique within the namespace. Can be set by the user, and can have business meaning. */ + id?: string; + activityStart?: WorkflowRuleSpecActivityStartingTrigger; + /** Restricted Visibility query. This query is used to filter workflows in this namespace to which this rule should apply. It is applied to any running workflow each time a triggering event occurs, before the trigger predicate is evaluated. The following workflow attributes are supported: - WorkflowType - WorkflowId - StartTime - ExecutionStatus */ + visibilityQuery?: string; + /** WorkflowRuleAction to be taken when the rule is triggered and predicate is matched. */ + actions?: WorkflowRuleSpecActionsList; + /** Expiration time of the rule. After this time, the rule will be deleted. Can be empty if the rule should never expire. */ + expirationTime?: string; +} +export const WorkflowRuleSpec = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.optional(S.String), + activityStart: S.optional(WorkflowRuleSpecActivityStartingTrigger), + visibilityQuery: S.optional(S.String), + actions: S.optional(WorkflowRuleSpecActionsList), + expirationTime: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowRuleSpec", +}) as any as S.Schema; + +export interface CreateWorkflowRuleRequest { + namespace: string; + /** The rule specification . */ + spec?: WorkflowRuleSpec; + /** If true, the rule will be applied to the currently running workflows via batch job. If not set , the rule will only be applied when triggering condition is satisfied. visibility_query in the rule will be used to select the workflows to apply the rule to. */ + forceScan?: boolean; + /** Used to de-dupe requests. Typically should be UUID. */ + requestId?: string; + /** Identity of the actor who created the rule. Will be stored with the rule. */ + identity?: string; + /** Rule description.Will be stored with the rule. */ + description?: string; +} +export const CreateWorkflowRuleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + spec: S.optional(WorkflowRuleSpec), + forceScan: S.optional(S.Boolean), + requestId: S.optional(S.String), + identity: S.optional(S.String), + description: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflow-rules", + code: 200, + }), + ), +).annotate({ + identifier: "CreateWorkflowRuleRequest", +}) as any as S.Schema; + +/** WorkflowRule describes a rule that can be applied to any workflow in this namespace. */ +export interface WorkflowRule { + /** Rule creation time. */ + createTime?: string; + /** Rule specification */ + spec?: WorkflowRuleSpec; + /** Identity of the actor that created the rule (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: It is better reflect the intent this way, we will also have updated_by. --) (-- api-linter: core::0142::time-field-names=disabled aip.dev/not-precedent: Same as above. All other options sounds clumsy --) */ + createdByIdentity?: string; + /** Rule description. */ + description?: string; +} +export const WorkflowRule = /*@__PURE__*/ S.suspend(() => + S.Struct({ + createTime: S.optional(S.String), + spec: S.optional(WorkflowRuleSpec), + createdByIdentity: S.optional(S.String), + description: S.optional(S.String), + }), +).annotate({ identifier: "WorkflowRule" }) as any as S.Schema; + +export interface CreateWorkflowRuleResponse { + /** Created rule. */ + rule?: WorkflowRule; + /** Batch Job ID if force-scan flag was provided. Otherwise empty. */ + jobId?: string; +} +export const CreateWorkflowRuleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + rule: S.optional(WorkflowRule), + jobId: S.optional(S.String), + }), +).annotate({ + identifier: "CreateWorkflowRuleResponse", +}) as any as S.Schema; + +export interface DeleteNexusEndpointRequest { + /** Server-generated unique endpoint ID. */ + id: string; + /** Data version for this endpoint. Must match current version. */ + version?: string; +} +export const DeleteNexusEndpointRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + version: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/v1/nexus/endpoints/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteNexusEndpointRequest", +}) as any as S.Schema; + +export type DeleteNexusEndpointResponse2 = unknown; +export const DeleteNexusEndpointResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "DeleteNexusEndpointResponse2", +}) as any as S.Schema; + +export interface DeleteScheduleRequest { + /** The namespace of the schedule to delete. */ + namespace: string; + /** The id of the schedule to delete. */ + scheduleId: string; + /** The identity of the client who initiated this request. */ + identity?: string; +} +export const DeleteScheduleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + scheduleId: S.String.pipe(T.Label()), + identity: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/v1/namespaces/{namespace}/schedules/{scheduleId}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteScheduleRequest", +}) as any as S.Schema; + +export type DeleteScheduleResponse2 = unknown; +export const DeleteScheduleResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "DeleteScheduleResponse2", +}) as any as S.Schema; + +export interface DeleteWorkerDeploymentRequest { + namespace: string; + deploymentName: string; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; +} +export const DeleteWorkerDeploymentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deploymentName: S.String.pipe(T.Label()), + identity: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteWorkerDeploymentRequest", +}) as any as S.Schema; + +export type DeleteWorkerDeploymentResponse2 = unknown; +export const DeleteWorkerDeploymentResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "DeleteWorkerDeploymentResponse2", +}) as any as S.Schema; + +export interface DeleteWorkerDeploymentVersionRequest { + namespace: string; + deployment_version_deployment_name: string; + deployment_version_build_id: string; + /** Deprecated. Use `deployment_version`. */ + version?: string; + /** A unique identifier for this Version within the Deployment it is a part of. Not necessarily unique within the namespace. The combination of `deployment_name` and `build_id` uniquely identifies this Version within the namespace, because Deployment names are unique within a namespace. */ + deploymentVersion_buildId?: string; + /** Identifies the Worker Deployment this Version is part of. */ + deploymentVersion_deploymentName?: string; + /** Pass to force deletion even if the Version is draining. In this case the open pinned workflows will be stuck until manually moved to another version by UpdateWorkflowExecutionOptions. */ + skipDrainage?: boolean; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; +} +export const DeleteWorkerDeploymentVersionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deployment_version_deployment_name: S.String.pipe(T.Label()), + deployment_version_build_id: S.String.pipe(T.Label()), + version: S.optional(S.String.pipe(T.Query())), + deploymentVersion_buildId: S.optional( + S.String.pipe(T.Query("deploymentVersion.buildId")), + ), + deploymentVersion_deploymentName: S.optional( + S.String.pipe(T.Query("deploymentVersion.deploymentName")), + ), + skipDrainage: S.optional(S.Boolean.pipe(T.Query())), + identity: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}/{deployment_version_build_id}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteWorkerDeploymentVersionRequest", +}) as any as S.Schema; + +export type DeleteWorkerDeploymentVersionResponse2 = unknown; +export const DeleteWorkerDeploymentVersionResponse2 = /*@__PURE__*/ S.suspend( + () => S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "DeleteWorkerDeploymentVersionResponse2", +}) as any as S.Schema; + +export interface DeleteWorkflowRuleRequest { + namespace: string; + /** ID of the rule to delete. Unique within the namespace. */ + ruleId: string; +} +export const DeleteWorkflowRuleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + ruleId: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/v1/namespaces/{namespace}/workflow-rules/{ruleId}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteWorkflowRuleRequest", +}) as any as S.Schema; + +export type DeleteWorkflowRuleResponse2 = unknown; +export const DeleteWorkflowRuleResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "DeleteWorkflowRuleResponse2", +}) as any as S.Schema; + +export interface DescribeActivityExecutionRequest { + namespace: string; + activityId: string; + /** Activity run ID. If empty the request targets the latest run. */ + runId?: string; + /** Include the input field in the response. */ + includeInput?: boolean; + /** Include the outcome (result/failure) in the response if the activity has completed. */ + includeOutcome?: boolean; + /** Token from a previous DescribeActivityExecutionResponse. If present, long-poll until activity state changes from the state encoded in this token. If absent, return current state immediately. If present, run_id must also be present. Note that activity state may change multiple times between requests, therefore it is not guaranteed that a client making a sequence of long-poll requests will see a complete sequence of state changes. */ + longPollToken?: string; +} +export const DescribeActivityExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + runId: S.optional(S.String.pipe(T.Query())), + includeInput: S.optional(S.Boolean.pipe(T.Query())), + includeOutcome: S.optional(S.Boolean.pipe(T.Query())), + longPollToken: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeActivityExecutionRequest", +}) as any as S.Schema; + +/** Represents the identifier used by a activity author to define the activity. Typically, the name of a function. This is sometimes referred to as the activity's "name" */ +export type ActivityType = WorkflowType; +export const ActivityType = WorkflowType; + +/** A general status for this activity, indicates whether it is currently running or in one of the terminal statuses. */ +export type ActivityExecutionInfoStatus = + | "ACTIVITY_EXECUTION_STATUS_UNSPECIFIED" + | "ACTIVITY_EXECUTION_STATUS_RUNNING" + | "ACTIVITY_EXECUTION_STATUS_COMPLETED" + | "ACTIVITY_EXECUTION_STATUS_FAILED" + | "ACTIVITY_EXECUTION_STATUS_CANCELED" + | "ACTIVITY_EXECUTION_STATUS_TERMINATED" + | "ACTIVITY_EXECUTION_STATUS_TIMED_OUT"; +export const ActivityExecutionInfoStatus = /*@__PURE__*/ S.String; + +/** More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING. */ +export type ActivityExecutionInfoRunState = + | "PENDING_ACTIVITY_STATE_UNSPECIFIED" + | "PENDING_ACTIVITY_STATE_SCHEDULED" + | "PENDING_ACTIVITY_STATE_STARTED" + | "PENDING_ACTIVITY_STATE_CANCEL_REQUESTED" + | "PENDING_ACTIVITY_STATE_PAUSED" + | "PENDING_ACTIVITY_STATE_PAUSE_REQUESTED"; +export const ActivityExecutionInfoRunState = /*@__PURE__*/ S.String; + +export type ApplicationFailureInfoCategory = + | "APPLICATION_ERROR_CATEGORY_UNSPECIFIED" + | "APPLICATION_ERROR_CATEGORY_BENIGN"; +export const ApplicationFailureInfoCategory = /*@__PURE__*/ S.String; + +export interface ApplicationFailureInfo { + type?: string; + nonRetryable?: boolean; + details?: Payloads; + /** next_retry_delay can be used by the client to override the activity retry interval calculated by the retry policy. Retry attempts will still be subject to the maximum retries limit and total time limit defined by the policy. */ + nextRetryDelay?: string; + category?: ApplicationFailureInfoCategory | (string & {}); +} +export const ApplicationFailureInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.optional(S.String), + nonRetryable: S.optional(S.Boolean), + details: S.optional(Payloads), + nextRetryDelay: S.optional(S.String), + category: S.optional(ApplicationFailureInfoCategory), + }), +).annotate({ + identifier: "ApplicationFailureInfo", +}) as any as S.Schema; + +export type TimeoutFailureInfoTimeoutType = + | "TIMEOUT_TYPE_UNSPECIFIED" + | "TIMEOUT_TYPE_START_TO_CLOSE" + | "TIMEOUT_TYPE_SCHEDULE_TO_START" + | "TIMEOUT_TYPE_SCHEDULE_TO_CLOSE" + | "TIMEOUT_TYPE_HEARTBEAT"; +export const TimeoutFailureInfoTimeoutType = /*@__PURE__*/ S.String; + +export interface TimeoutFailureInfo { + timeoutType?: TimeoutFailureInfoTimeoutType | (string & {}); + lastHeartbeatDetails?: Payloads; +} +export const TimeoutFailureInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timeoutType: S.optional(TimeoutFailureInfoTimeoutType), + lastHeartbeatDetails: S.optional(Payloads), + }), +).annotate({ + identifier: "TimeoutFailureInfo", +}) as any as S.Schema; + +export interface CanceledFailureInfo { + details?: Payloads; + /** The identity of the worker or client that requested the cancellation. */ + identity?: string; +} +export const CanceledFailureInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.optional(Payloads), + identity: S.optional(S.String), + }), +).annotate({ + identifier: "CanceledFailureInfo", +}) as any as S.Schema; + +export interface TerminatedFailureInfo { + /** The identity of the worker or client that requested the termination. */ + identity?: string; +} +export const TerminatedFailureInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + identity: S.optional(S.String), + }), +).annotate({ + identifier: "TerminatedFailureInfo", +}) as any as S.Schema; + +export interface ServerFailureInfo { + nonRetryable?: boolean; +} +export const ServerFailureInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + nonRetryable: S.optional(S.Boolean), + }), +).annotate({ + identifier: "ServerFailureInfo", +}) as any as S.Schema; + +export interface ResetWorkflowFailureInfo { + lastHeartbeatDetails?: Payloads; +} +export const ResetWorkflowFailureInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + lastHeartbeatDetails: S.optional(Payloads), + }), +).annotate({ + identifier: "ResetWorkflowFailureInfo", +}) as any as S.Schema; + +export type ActivityFailureInfoRetryState = + | "RETRY_STATE_UNSPECIFIED" + | "RETRY_STATE_IN_PROGRESS" + | "RETRY_STATE_NON_RETRYABLE_FAILURE" + | "RETRY_STATE_TIMEOUT" + | "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + | "RETRY_STATE_RETRY_POLICY_NOT_SET" + | "RETRY_STATE_INTERNAL_SERVER_ERROR" + | "RETRY_STATE_CANCEL_REQUESTED"; +export const ActivityFailureInfoRetryState = /*@__PURE__*/ S.String; + +export interface ActivityFailureInfo { + scheduledEventId?: string; + startedEventId?: string; + identity?: string; + activityType?: WorkflowType; + activityId?: string; + retryState?: ActivityFailureInfoRetryState | (string & {}); +} +export const ActivityFailureInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduledEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + identity: S.optional(S.String), + activityType: S.optional(WorkflowType), + activityId: S.optional(S.String), + retryState: S.optional(ActivityFailureInfoRetryState), + }), +).annotate({ + identifier: "ActivityFailureInfo", +}) as any as S.Schema; + +/** Identifies a specific workflow within a namespace. Practically speaking, because run_id is a uuid, a workflow execution is globally unique. Note that many commands allow specifying an empty run id as a way of saying "target the latest run of the workflow". */ +export interface WorkflowExecution { + workflowId?: string; + runId?: string; +} +export const WorkflowExecution = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowId: S.optional(S.String), + runId: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowExecution", +}) as any as S.Schema; + +export type ChildWorkflowExecutionFailureInfoRetryState = + | "RETRY_STATE_UNSPECIFIED" + | "RETRY_STATE_IN_PROGRESS" + | "RETRY_STATE_NON_RETRYABLE_FAILURE" + | "RETRY_STATE_TIMEOUT" + | "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + | "RETRY_STATE_RETRY_POLICY_NOT_SET" + | "RETRY_STATE_INTERNAL_SERVER_ERROR" + | "RETRY_STATE_CANCEL_REQUESTED"; +export const ChildWorkflowExecutionFailureInfoRetryState = + /*@__PURE__*/ S.String; + +export interface ChildWorkflowExecutionFailureInfo { + namespace?: string; + workflowExecution?: WorkflowExecution; + workflowType?: WorkflowType; + initiatedEventId?: string; + startedEventId?: string; + retryState?: ChildWorkflowExecutionFailureInfoRetryState | (string & {}); +} +export const ChildWorkflowExecutionFailureInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + workflowType: S.optional(WorkflowType), + initiatedEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + retryState: S.optional(ChildWorkflowExecutionFailureInfoRetryState), + }), +).annotate({ + identifier: "ChildWorkflowExecutionFailureInfo", +}) as any as S.Schema; + +/** Representation of the Temporal SDK NexusOperationError object that is returned to workflow callers. */ +export interface NexusOperationFailureInfo { + /** The NexusOperationScheduled event ID. */ + scheduledEventId?: string; + /** Endpoint name. */ + endpoint?: string; + /** Service name. */ + service?: string; + /** Operation name. */ + operation?: string; + /** Operation ID - may be empty if the operation completed synchronously. Deprecated. Renamed to operation_token. */ + operationId?: string; + /** Operation token - may be empty if the operation completed synchronously. */ + operationToken?: string; +} +export const NexusOperationFailureInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduledEventId: S.optional(S.String), + endpoint: S.optional(S.String), + service: S.optional(S.String), + operation: S.optional(S.String), + operationId: S.optional(S.String), + operationToken: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationFailureInfo", +}) as any as S.Schema; + +/** Retry behavior, defaults to the retry behavior of the error type as defined in the spec. */ +export type NexusHandlerFailureInfoRetryBehavior = + | "NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_UNSPECIFIED" + | "NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_RETRYABLE" + | "NEXUS_HANDLER_ERROR_RETRY_BEHAVIOR_NON_RETRYABLE"; +export const NexusHandlerFailureInfoRetryBehavior = /*@__PURE__*/ S.String; + +export interface NexusHandlerFailureInfo { + /** The Nexus error type as defined in the spec: https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors. */ + type?: string; + /** Retry behavior, defaults to the retry behavior of the error type as defined in the spec. */ + retryBehavior?: NexusHandlerFailureInfoRetryBehavior | (string & {}); +} +export const NexusHandlerFailureInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.optional(S.String), + retryBehavior: S.optional(NexusHandlerFailureInfoRetryBehavior), + }), +).annotate({ + identifier: "NexusHandlerFailureInfo", +}) as any as S.Schema; + +export interface Failure { + message?: string; + /** The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK In some SDKs this is used to rehydrate the stack trace into an exception object. */ + source?: string; + stackTrace?: string; + /** Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of errors originating in user code which might contain sensitive information. The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto message. SDK authors: - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that: - Uses a JSON object to represent `{ message, stack_trace }`. - Overwrites the original message with "Encoded failure" to indicate that more information could be extracted. - Overwrites the original stack_trace with an empty string. - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed by the user-provided PayloadCodec - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes. */ + encodedAttributes?: unknown; + cause?: Failure; + applicationFailureInfo?: ApplicationFailureInfo; + timeoutFailureInfo?: TimeoutFailureInfo; + canceledFailureInfo?: CanceledFailureInfo; + terminatedFailureInfo?: TerminatedFailureInfo; + serverFailureInfo?: ServerFailureInfo; + resetWorkflowFailureInfo?: ResetWorkflowFailureInfo; + activityFailureInfo?: ActivityFailureInfo; + childWorkflowExecutionFailureInfo?: ChildWorkflowExecutionFailureInfo; + nexusOperationExecutionFailureInfo?: NexusOperationFailureInfo; + nexusHandlerFailureInfo?: NexusHandlerFailureInfo; +} +export const Failure = /*@__PURE__*/ S.suspend(() => + S.Struct({ + message: S.optional(S.String), + source: S.optional(S.String), + stackTrace: S.optional(S.String), + encodedAttributes: S.optional(S.Unknown), + cause: S.optional(Failure), + applicationFailureInfo: S.optional(ApplicationFailureInfo), + timeoutFailureInfo: S.optional(TimeoutFailureInfo), + canceledFailureInfo: S.optional(CanceledFailureInfo), + terminatedFailureInfo: S.optional(TerminatedFailureInfo), + serverFailureInfo: S.optional(ServerFailureInfo), + resetWorkflowFailureInfo: S.optional(ResetWorkflowFailureInfo), + activityFailureInfo: S.optional(ActivityFailureInfo), + childWorkflowExecutionFailureInfo: S.optional( + ChildWorkflowExecutionFailureInfo, + ), + nexusOperationExecutionFailureInfo: S.optional(NexusOperationFailureInfo), + nexusHandlerFailureInfo: S.optional(NexusHandlerFailureInfo), + }), +).annotate({ identifier: "Failure" }) as any as S.Schema; + +export type WorkflowEventEventReferenceEventType = + | "EVENT_TYPE_UNSPECIFIED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT" + | "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED" + | "EVENT_TYPE_WORKFLOW_TASK_STARTED" + | "EVENT_TYPE_WORKFLOW_TASK_COMPLETED" + | "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT" + | "EVENT_TYPE_WORKFLOW_TASK_FAILED" + | "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED" + | "EVENT_TYPE_ACTIVITY_TASK_STARTED" + | "EVENT_TYPE_ACTIVITY_TASK_COMPLETED" + | "EVENT_TYPE_ACTIVITY_TASK_FAILED" + | "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT" + | "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED" + | "EVENT_TYPE_ACTIVITY_TASK_CANCELED" + | "EVENT_TYPE_TIMER_STARTED" + | "EVENT_TYPE_TIMER_FIRED" + | "EVENT_TYPE_TIMER_CANCELED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED" + | "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + | "EVENT_TYPE_MARKER_RECORDED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW" + | "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED" + | "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED" + | "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED" + | "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY" + | "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY" + | "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED" + | "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED" + | "EVENT_TYPE_NEXUS_OPERATION_STARTED" + | "EVENT_TYPE_NEXUS_OPERATION_COMPLETED" + | "EVENT_TYPE_NEXUS_OPERATION_FAILED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCELED" + | "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED"; +export const WorkflowEventEventReferenceEventType = /*@__PURE__*/ S.String; + +/** EventReference is a direct reference to a history event through the event ID. */ +export interface WorkflowEventEventReference { + eventId?: string; + eventType?: WorkflowEventEventReferenceEventType | (string & {}); +} +export const WorkflowEventEventReference = /*@__PURE__*/ S.suspend(() => + S.Struct({ + eventId: S.optional(S.String), + eventType: S.optional(WorkflowEventEventReferenceEventType), + }), +).annotate({ + identifier: "WorkflowEventEventReference", +}) as any as S.Schema; + +export type WorkflowEventRequestIdReferenceEventType = + | "EVENT_TYPE_UNSPECIFIED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT" + | "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED" + | "EVENT_TYPE_WORKFLOW_TASK_STARTED" + | "EVENT_TYPE_WORKFLOW_TASK_COMPLETED" + | "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT" + | "EVENT_TYPE_WORKFLOW_TASK_FAILED" + | "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED" + | "EVENT_TYPE_ACTIVITY_TASK_STARTED" + | "EVENT_TYPE_ACTIVITY_TASK_COMPLETED" + | "EVENT_TYPE_ACTIVITY_TASK_FAILED" + | "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT" + | "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED" + | "EVENT_TYPE_ACTIVITY_TASK_CANCELED" + | "EVENT_TYPE_TIMER_STARTED" + | "EVENT_TYPE_TIMER_FIRED" + | "EVENT_TYPE_TIMER_CANCELED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED" + | "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + | "EVENT_TYPE_MARKER_RECORDED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW" + | "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED" + | "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED" + | "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED" + | "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY" + | "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY" + | "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED" + | "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED" + | "EVENT_TYPE_NEXUS_OPERATION_STARTED" + | "EVENT_TYPE_NEXUS_OPERATION_COMPLETED" + | "EVENT_TYPE_NEXUS_OPERATION_FAILED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCELED" + | "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED"; +export const WorkflowEventRequestIdReferenceEventType = /*@__PURE__*/ S.String; + +/** RequestIdReference is a indirect reference to a history event through the request ID. */ +export interface WorkflowEventRequestIdReference { + requestId?: string; + eventType?: WorkflowEventRequestIdReferenceEventType | (string & {}); +} +export const WorkflowEventRequestIdReference = /*@__PURE__*/ S.suspend(() => + S.Struct({ + requestId: S.optional(S.String), + eventType: S.optional(WorkflowEventRequestIdReferenceEventType), + }), +).annotate({ + identifier: "WorkflowEventRequestIdReference", +}) as any as S.Schema; + +export interface LinkWorkflowEvent { + namespace?: string; + workflowId?: string; + runId?: string; + eventRef?: WorkflowEventEventReference; + requestIdRef?: WorkflowEventRequestIdReference; +} +export const LinkWorkflowEvent = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + workflowId: S.optional(S.String), + runId: S.optional(S.String), + eventRef: S.optional(WorkflowEventEventReference), + requestIdRef: S.optional(WorkflowEventRequestIdReference), + }), +).annotate({ + identifier: "LinkWorkflowEvent", +}) as any as S.Schema; + +/** A link to a built-in batch job. Batch jobs can be used to perform operations on a set of workflows (e.g. terminate, signal, cancel, etc). This link can be put on workflow history events generated by actions taken by a batch job. */ +export interface LinkBatchJob { + jobId?: string; +} +export const LinkBatchJob = /*@__PURE__*/ S.suspend(() => + S.Struct({ + jobId: S.optional(S.String), + }), +).annotate({ identifier: "LinkBatchJob" }) as any as S.Schema; + +/** A link to an activity. */ +export interface LinkActivity { + namespace?: string; + activityId?: string; + runId?: string; +} +export const LinkActivity = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + activityId: S.optional(S.String), + runId: S.optional(S.String), + }), +).annotate({ identifier: "LinkActivity" }) as any as S.Schema; + +/** A link to a standalone Nexus operation. */ +export interface LinkNexusOperation { + namespace?: string; + operationId?: string; + runId?: string; +} +export const LinkNexusOperation = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + operationId: S.optional(S.String), + runId: S.optional(S.String), + }), +).annotate({ + identifier: "LinkNexusOperation", +}) as any as S.Schema; + +/** Link can be associated with history events. It might contain information about an external entity related to the history event. For example, workflow A makes a Nexus call that starts workflow B: in this case, a history event in workflow A could contain a Link to the workflow started event in workflow B, and vice-versa. */ +export interface Link { + workflowEvent?: LinkWorkflowEvent; + batchJob?: LinkBatchJob; + activity?: LinkActivity; + nexusOperation?: LinkNexusOperation; +} +export const Link = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowEvent: S.optional(LinkWorkflowEvent), + batchJob: S.optional(LinkBatchJob), + activity: S.optional(LinkActivity), + nexusOperation: S.optional(LinkNexusOperation), + }), +).annotate({ identifier: "Link" }) as any as S.Schema; + +/** Links to related entities, such as the entity that started this activity. */ +export type ActivityExecutionInfoLinksList = Array; +export const ActivityExecutionInfoLinksList = /*@__PURE__*/ S.Array( + Link, +) as any as S.Schema; + +/** Information about a standalone activity. */ +export interface ActivityExecutionInfo { + /** Unique identifier of this activity within its namespace along with run ID (below). */ + activityId?: string; + runId?: string; + /** The type of the activity, a string that maps to a registered activity on a worker. */ + activityType?: WorkflowType; + /** A general status for this activity, indicates whether it is currently running or in one of the terminal statuses. */ + status?: ActivityExecutionInfoStatus; + /** More detailed breakdown of ACTIVITY_EXECUTION_STATUS_RUNNING. */ + runState?: ActivityExecutionInfoRunState; + taskQueue?: string; + /** Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToCloseTimeout?: string; + /** Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is to put it back into the same queue. Defaults to `schedule_to_close_timeout`. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToStartTimeout?: string; + /** Maximum time a single activity attempt is allowed to execute after being picked up by a worker. This timeout is always retryable. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + startToCloseTimeout?: string; + /** Maximum permitted time between successful worker heartbeats. */ + heartbeatTimeout?: string; + /** The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. */ + retryPolicy?: RetryPolicy; + /** Details provided in the last recorded activity heartbeat. */ + heartbeatDetails?: Payloads; + /** Time the last heartbeat was recorded. */ + lastHeartbeatTime?: string; + /** Time the last attempt was started. */ + lastStartedTime?: string; + /** The attempt this activity is currently on. Incremented each time a new attempt is scheduled. */ + attempt?: number; + /** How long this activity has been running for, including all attempts and backoff between attempts. */ + executionDuration?: string; + /** Time the activity was originally scheduled via a StartActivityExecution request. */ + scheduleTime?: string; + /** Scheduled time + schedule to close timeout. */ + expirationTime?: string; + /** Time when the activity transitioned to a closed state. */ + closeTime?: string; + /** Failure details from the last failed attempt. */ + lastFailure?: Failure; + lastWorkerIdentity?: string; + /** Time from the last attempt failure to the next activity retry. If the activity is currently running, this represents the next retry interval in case the attempt fails. If activity is currently backing off between attempt, this represents the current retry interval. If there is no next retry allowed, this field will be null. This interval is typically calculated from the specified retry policy, but may be modified if an activity fails with a retryable application failure specifying a retry delay. */ + currentRetryInterval?: string; + /** The time when the last activity attempt completed. If activity has not been completed yet, it will be null. */ + lastAttemptCompleteTime?: string; + /** The time when the next activity attempt will be scheduled. If activity is currently scheduled or started, this field will be null. */ + nextAttemptScheduleTime?: string; + /** The Worker Deployment Version this activity was dispatched to most recently. If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. */ + lastDeploymentVersion?: WorkerDeploymentVersion; + /** Priority metadata. */ + priority?: Priority; + /** Incremented each time the activity's state is mutated in persistence. */ + stateTransitionCount?: string; + /** Updated once on scheduled and once on terminal status. */ + stateSizeBytes?: string; + searchAttributes?: SearchAttributes; + header?: Header; + /** Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. */ + userMetadata?: UserMetadata; + /** Set if activity cancelation was requested. */ + canceledReason?: string; + /** Links to related entities, such as the entity that started this activity. */ + links?: ActivityExecutionInfoLinksList; + /** Total number of heartbeats recorded across all attempts of this activity, including retries. */ + totalHeartbeatCount?: string; +} +export const ActivityExecutionInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + activityId: S.optional(S.String), + runId: S.optional(S.String), + activityType: S.optional(WorkflowType), + status: S.optional(ActivityExecutionInfoStatus), + runState: S.optional(ActivityExecutionInfoRunState), + taskQueue: S.optional(S.String), + scheduleToCloseTimeout: S.optional(S.String), + scheduleToStartTimeout: S.optional(S.String), + startToCloseTimeout: S.optional(S.String), + heartbeatTimeout: S.optional(S.String), + retryPolicy: S.optional(RetryPolicy), + heartbeatDetails: S.optional(Payloads), + lastHeartbeatTime: S.optional(S.String), + lastStartedTime: S.optional(S.String), + attempt: S.optional(S.Number), + executionDuration: S.optional(S.String), + scheduleTime: S.optional(S.String), + expirationTime: S.optional(S.String), + closeTime: S.optional(S.String), + lastFailure: S.optional(Failure), + lastWorkerIdentity: S.optional(S.String), + currentRetryInterval: S.optional(S.String), + lastAttemptCompleteTime: S.optional(S.String), + nextAttemptScheduleTime: S.optional(S.String), + lastDeploymentVersion: S.optional(WorkerDeploymentVersion), + priority: S.optional(Priority), + stateTransitionCount: S.optional(S.String), + stateSizeBytes: S.optional(S.String), + searchAttributes: S.optional(SearchAttributes), + header: S.optional(Header), + userMetadata: S.optional(UserMetadata), + canceledReason: S.optional(S.String), + links: S.optional(ActivityExecutionInfoLinksList), + totalHeartbeatCount: S.optional(S.String), + }), +).annotate({ + identifier: "ActivityExecutionInfo", +}) as any as S.Schema; + +/** The outcome of a completed activity execution: either a successful result or a failure. */ +export interface ActivityExecutionOutcome { + /** The result if the activity completed successfully. */ + result?: Payloads; + /** The failure if the activity completed unsuccessfully. */ + failure?: Failure; +} +export const ActivityExecutionOutcome = /*@__PURE__*/ S.suspend(() => + S.Struct({ + result: S.optional(Payloads), + failure: S.optional(Failure), + }), +).annotate({ + identifier: "ActivityExecutionOutcome", +}) as any as S.Schema; + +/** Header to attach to callback request. */ +export type CallbackNexusHeaderMap = { [key: string]: string | undefined }; +export const CallbackNexusHeaderMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +export interface CallbackNexus { + /** Callback URL. */ + url?: string; + /** Header to attach to callback request. */ + header?: CallbackNexusHeaderMap; +} +export const CallbackNexus = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.optional(S.String), + header: S.optional(CallbackNexusHeaderMap), + }), +).annotate({ identifier: "CallbackNexus" }) as any as S.Schema; + +/** Callbacks to be delivered internally within the system. This variant is not settable in the API and will be rejected by the service with an INVALID_ARGUMENT error. The only reason that this is exposed is because callbacks are replicated across clusters via the WorkflowExecutionStarted event, which is defined in the public API. */ +export interface CallbackInternal { + /** Opaque internal data. */ + data?: string; +} +export const CallbackInternal = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.optional(S.String), + }), +).annotate({ + identifier: "CallbackInternal", +}) as any as S.Schema; + +/** Links associated with the callback. It can be used to link to underlying resources of the callback. */ +export type CallbackLinksList = Array; +export const CallbackLinksList = /*@__PURE__*/ S.Array( + Link, +) as any as S.Schema; + +/** Callback to attach to various events in the system, e.g. workflow run completion. */ +export interface Callback { + nexus?: CallbackNexus; + internal?: CallbackInternal; + /** Links associated with the callback. It can be used to link to underlying resources of the callback. */ + links?: CallbackLinksList; +} +export const Callback = /*@__PURE__*/ S.suspend(() => + S.Struct({ + nexus: S.optional(CallbackNexus), + internal: S.optional(CallbackInternal), + links: S.optional(CallbackLinksList), + }), +).annotate({ identifier: "Callback" }) as any as S.Schema; + +/** The current state of the callback. */ +export type CallbackInfoState = + | "CALLBACK_STATE_UNSPECIFIED" + | "CALLBACK_STATE_STANDBY" + | "CALLBACK_STATE_SCHEDULED" + | "CALLBACK_STATE_BACKING_OFF" + | "CALLBACK_STATE_FAILED" + | "CALLBACK_STATE_SUCCEEDED" + | "CALLBACK_STATE_BLOCKED"; +export const CallbackInfoState = /*@__PURE__*/ S.String; + +/** Common callback information. Specific CallbackInfo messages should embed this and may include additional fields. */ +export interface CallbackInfo { + /** Information on how this callback should be invoked (e.g. its URL and type). */ + callback?: Callback; + /** The time when the callback was registered. */ + registrationTime?: string; + /** The current state of the callback. */ + state?: CallbackInfoState; + /** The number of attempts made to deliver the callback. This number represents a minimum bound since the attempt is incremented after the callback request completes. */ + attempt?: number; + /** The time when the last attempt completed. */ + lastAttemptCompleteTime?: string; + /** The last attempt's failure, if any. */ + lastAttemptFailure?: Failure; + /** The time when the next attempt is scheduled. */ + nextAttemptScheduleTime?: string; + /** If the state is BLOCKED, blocked reason provides additional information. */ + blockedReason?: string; +} +export const CallbackInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + callback: S.optional(Callback), + registrationTime: S.optional(S.String), + state: S.optional(CallbackInfoState), + attempt: S.optional(S.Number), + lastAttemptCompleteTime: S.optional(S.String), + lastAttemptFailure: S.optional(Failure), + nextAttemptScheduleTime: S.optional(S.String), + blockedReason: S.optional(S.String), + }), +).annotate({ identifier: "CallbackInfo" }) as any as S.Schema; + +/** Callbacks attached to this activity execution and their current state. */ +export type DescribeActivityExecutionResponseCallbacksList = + Array; +export const DescribeActivityExecutionResponseCallbacksList = + /*@__PURE__*/ S.Array( + CallbackInfo, + ) as any as S.Schema; + +export interface DescribeActivityExecutionResponse { + /** The run ID of the activity, useful when run_id was not specified in the request. */ + runId?: string; + /** Information about the activity execution. */ + info?: ActivityExecutionInfo; + /** Serialized activity input, passed as arguments to the activity function. Only set if include_input was true in the request. */ + input?: Payloads; + /** Only set if the activity is completed and include_outcome was true in the request. */ + outcome?: ActivityExecutionOutcome; + /** Token for follow-on long-poll requests. Absent only if the activity is complete. */ + longPollToken?: string; + /** Callbacks attached to this activity execution and their current state. */ + callbacks?: DescribeActivityExecutionResponseCallbacksList; +} +export const DescribeActivityExecutionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + runId: S.optional(S.String), + info: S.optional(ActivityExecutionInfo), + input: S.optional(Payloads), + outcome: S.optional(ActivityExecutionOutcome), + longPollToken: S.optional(S.String), + callbacks: S.optional(DescribeActivityExecutionResponseCallbacksList), + }), +).annotate({ + identifier: "DescribeActivityExecutionResponse", +}) as any as S.Schema; + +export interface DescribeBatchOperationRequest { + /** Namespace that contains the batch operation */ + namespace: string; + /** Batch job id */ + jobId: string; +} +export const DescribeBatchOperationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + jobId: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/batch-operations/{jobId}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeBatchOperationRequest", +}) as any as S.Schema; + +/** Batch operation type */ +export type DescribeBatchOperationResponseOperationType = + | "BATCH_OPERATION_TYPE_UNSPECIFIED" + | "BATCH_OPERATION_TYPE_TERMINATE" + | "BATCH_OPERATION_TYPE_CANCEL" + | "BATCH_OPERATION_TYPE_SIGNAL" + | "BATCH_OPERATION_TYPE_DELETE" + | "BATCH_OPERATION_TYPE_RESET" + | "BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS" + | "BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY" + | "BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS" + | "BATCH_OPERATION_TYPE_RESET_ACTIVITY"; +export const DescribeBatchOperationResponseOperationType = + /*@__PURE__*/ S.String; + +/** Batch operation state */ +export type DescribeBatchOperationResponseState = + | "BATCH_OPERATION_STATE_UNSPECIFIED" + | "BATCH_OPERATION_STATE_RUNNING" + | "BATCH_OPERATION_STATE_COMPLETED" + | "BATCH_OPERATION_STATE_FAILED"; +export const DescribeBatchOperationResponseState = /*@__PURE__*/ S.String; + +export interface DescribeBatchOperationResponse { + /** Batch operation type */ + operationType?: DescribeBatchOperationResponseOperationType; + /** Batch job ID */ + jobId?: string; + /** Batch operation state */ + state?: DescribeBatchOperationResponseState; + /** Batch operation start time */ + startTime?: string; + /** Batch operation close time */ + closeTime?: string; + /** Total operation count */ + totalOperationCount?: string; + /** Complete operation count */ + completeOperationCount?: string; + /** Failure operation count */ + failureOperationCount?: string; + /** Identity indicates the operator identity */ + identity?: string; + /** Reason indicates the reason to stop a operation */ + reason?: string; +} +export const DescribeBatchOperationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + operationType: S.optional(DescribeBatchOperationResponseOperationType), + jobId: S.optional(S.String), + state: S.optional(DescribeBatchOperationResponseState), + startTime: S.optional(S.String), + closeTime: S.optional(S.String), + totalOperationCount: S.optional(S.String), + completeOperationCount: S.optional(S.String), + failureOperationCount: S.optional(S.String), + identity: S.optional(S.String), + reason: S.optional(S.String), + }), +).annotate({ + identifier: "DescribeBatchOperationResponse", +}) as any as S.Schema; + +export interface DescribeDeploymentRequest { + namespace: string; + deployment_series_name: string; + deployment_build_id: string; + /** Different versions of the same worker service/application are related together by having a shared series name. Out of all deployments of a series, one can be designated as the current deployment, which receives new workflow executions and new tasks of workflows with `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior. */ + deployment_seriesName?: string; + /** Build ID changes with each version of the worker when the worker program code and/or config changes. */ + deployment_buildId?: string; +} +export const DescribeDeploymentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deployment_series_name: S.String.pipe(T.Label()), + deployment_build_id: S.String.pipe(T.Label()), + deployment_seriesName: S.optional( + S.String.pipe(T.Query("deployment.seriesName")), + ), + deployment_buildId: S.optional( + S.String.pipe(T.Query("deployment.buildId")), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/deployments/{deployment_series_name}/{deployment_build_id}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeDeploymentRequest", +}) as any as S.Schema; + +export type DeploymentInfoTaskQueueInfoType = + | "TASK_QUEUE_TYPE_UNSPECIFIED" + | "TASK_QUEUE_TYPE_WORKFLOW" + | "TASK_QUEUE_TYPE_ACTIVITY" + | "TASK_QUEUE_TYPE_NEXUS"; +export const DeploymentInfoTaskQueueInfoType = /*@__PURE__*/ S.String; + +export interface DeploymentInfoTaskQueueInfo { + name?: string; + type?: DeploymentInfoTaskQueueInfoType; + /** When server saw the first poller for this task queue in this deployment. */ + firstPollerTime?: string; +} +export const DeploymentInfoTaskQueueInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + type: S.optional(DeploymentInfoTaskQueueInfoType), + firstPollerTime: S.optional(S.String), + }), +).annotate({ + identifier: "DeploymentInfoTaskQueueInfo", +}) as any as S.Schema; + +export type DeploymentInfoTaskQueueInfosList = + Array; +export const DeploymentInfoTaskQueueInfosList = /*@__PURE__*/ S.Array( + DeploymentInfoTaskQueueInfo, +) as any as S.Schema; + +/** A user-defined set of key-values. Can be updated as part of write operations to the deployment, such as `SetCurrentDeployment`. */ +export type DeploymentInfoMetadataMap = { [key: string]: unknown | undefined }; +export const DeploymentInfoMetadataMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** `DeploymentInfo` holds information about a deployment. Deployment information is tracked automatically by server as soon as the first poll from that deployment reaches the server. There can be multiple task queue workers in a single deployment which are listed in this message. Deprecated. */ +export interface DeploymentInfo { + deployment?: Deployment; + createTime?: string; + taskQueueInfos?: DeploymentInfoTaskQueueInfosList; + /** A user-defined set of key-values. Can be updated as part of write operations to the deployment, such as `SetCurrentDeployment`. */ + metadata?: DeploymentInfoMetadataMap; + /** If this deployment is the current deployment of its deployment series. */ + isCurrent?: boolean; +} +export const DeploymentInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + deployment: S.optional(Deployment), + createTime: S.optional(S.String), + taskQueueInfos: S.optional(DeploymentInfoTaskQueueInfosList), + metadata: S.optional(DeploymentInfoMetadataMap), + isCurrent: S.optional(S.Boolean), + }), +).annotate({ identifier: "DeploymentInfo" }) as any as S.Schema; + +/** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ +export interface DescribeDeploymentResponse { + deploymentInfo?: DeploymentInfo; +} +export const DescribeDeploymentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + deploymentInfo: S.optional(DeploymentInfo), + }), +).annotate({ + identifier: "DescribeDeploymentResponse", +}) as any as S.Schema; + +export interface DescribeNamespaceRequest { + namespace: string; + id?: string; + /** If true, the server may serve the response from an eventually-consistent source instead of reading through to persistence. Defaults to false, which preserves read-after-write consistency. SDKs should set this when fetching namespace capabilities on worker/client startup. */ + weakConsistency?: boolean; +} +export const DescribeNamespaceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + id: S.optional(S.String.pipe(T.Query())), + weakConsistency: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/v1/namespaces/{namespace}", code: 200 }), + ), +).annotate({ + identifier: "DescribeNamespaceRequest", +}) as any as S.Schema; + +export type NamespaceInfoState = + | "NAMESPACE_STATE_UNSPECIFIED" + | "NAMESPACE_STATE_REGISTERED" + | "NAMESPACE_STATE_DEPRECATED" + | "NAMESPACE_STATE_DELETED"; +export const NamespaceInfoState = /*@__PURE__*/ S.String; + +/** A key-value map for any customized purpose. */ +export type NamespaceInfoDataMap = { [key: string]: string | undefined }; +export const NamespaceInfoDataMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +/** Namespace capability details. Should contain what features are enabled in a namespace. */ +export interface NamespaceInfoCapabilities { + /** True if the namespace supports eager workflow start. */ + eagerWorkflowStart?: boolean; + /** True if the namespace supports sync update */ + syncUpdate?: boolean; + /** True if the namespace supports async update */ + asyncUpdate?: boolean; + /** True if the namespace supports worker heartbeats */ + workerHeartbeats?: boolean; + /** True if the namespace supports reported problems search attribute */ + reportedProblemsSearchAttribute?: boolean; + /** True if the namespace supports pausing workflows */ + workflowPause?: boolean; + /** True if the namespace supports standalone activities */ + standaloneActivities?: boolean; + /** True if the namespace supports server-side completion of outstanding worker polls on shutdown. When enabled, the server will complete polls for workers that send WorkerInstanceKey in their poll requests and call ShutdownWorker with the same WorkerInstanceKey. The poll will return an empty response. When this flag is true, workers should allow polls to return gracefully rather than terminating any open polls on shutdown. */ + workerPollCompleteOnShutdown?: boolean; + /** True if the namespace supports poller autoscaling */ + pollerAutoscaling?: boolean; + /** True if the namespace supports worker commands (server-to-worker communication via control queues). */ + workerCommands?: boolean; +} +export const NamespaceInfoCapabilities = /*@__PURE__*/ S.suspend(() => + S.Struct({ + eagerWorkflowStart: S.optional(S.Boolean), + syncUpdate: S.optional(S.Boolean), + asyncUpdate: S.optional(S.Boolean), + workerHeartbeats: S.optional(S.Boolean), + reportedProblemsSearchAttribute: S.optional(S.Boolean), + workflowPause: S.optional(S.Boolean), + standaloneActivities: S.optional(S.Boolean), + workerPollCompleteOnShutdown: S.optional(S.Boolean), + pollerAutoscaling: S.optional(S.Boolean), + workerCommands: S.optional(S.Boolean), + }), +).annotate({ + identifier: "NamespaceInfoCapabilities", +}) as any as S.Schema; + +export interface NamespaceInfoLimits { + /** Maximum size in bytes for payload fields in workflow history events (e.g., workflow/activity inputs and results, failure details, signal payloads). When exceeded, the server will reject the operation with an error. */ + blobSizeLimitError?: string; + /** Maximum total memo size in bytes per workflow execution. */ + memoSizeLimitError?: string; +} +export const NamespaceInfoLimits = /*@__PURE__*/ S.suspend(() => + S.Struct({ + blobSizeLimitError: S.optional(S.String), + memoSizeLimitError: S.optional(S.String), + }), +).annotate({ + identifier: "NamespaceInfoLimits", +}) as any as S.Schema; + +export interface NamespaceInfo { + name?: string; + state?: NamespaceInfoState; + description?: string; + ownerEmail?: string; + /** A key-value map for any customized purpose. */ + data?: NamespaceInfoDataMap; + id?: string; + /** All capabilities the namespace supports. */ + capabilities?: NamespaceInfoCapabilities; + /** Namespace configured limits */ + limits?: NamespaceInfoLimits; + /** Whether scheduled workflows are supported on this namespace. This is only needed temporarily while the feature is experimental, so we can give it a high tag. */ + supportsSchedules?: boolean; +} +export const NamespaceInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + state: S.optional(NamespaceInfoState), + description: S.optional(S.String), + ownerEmail: S.optional(S.String), + data: S.optional(NamespaceInfoDataMap), + id: S.optional(S.String), + capabilities: S.optional(NamespaceInfoCapabilities), + limits: S.optional(NamespaceInfoLimits), + supportsSchedules: S.optional(S.Boolean), + }), +).annotate({ identifier: "NamespaceInfo" }) as any as S.Schema; + +export interface BadBinaryInfo { + reason?: string; + operator?: string; + createTime?: string; +} +export const BadBinaryInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + reason: S.optional(S.String), + operator: S.optional(S.String), + createTime: S.optional(S.String), + }), +).annotate({ identifier: "BadBinaryInfo" }) as any as S.Schema; + +export type BadBinariesBinariesMap = { + [key: string]: BadBinaryInfo | undefined; +}; +export const BadBinariesBinariesMap = /*@__PURE__*/ S.Record( + S.String, + BadBinaryInfo, +) as any as S.Schema; + +export interface BadBinaries { + binaries?: BadBinariesBinariesMap; +} +export const BadBinaries = /*@__PURE__*/ S.suspend(() => + S.Struct({ + binaries: S.optional(BadBinariesBinariesMap), + }), +).annotate({ identifier: "BadBinaries" }) as any as S.Schema; + +/** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ +export type NamespaceConfigHistoryArchivalState = + | "ARCHIVAL_STATE_UNSPECIFIED" + | "ARCHIVAL_STATE_DISABLED" + | "ARCHIVAL_STATE_ENABLED"; +export const NamespaceConfigHistoryArchivalState = /*@__PURE__*/ S.String; + +/** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ +export type NamespaceConfigVisibilityArchivalState = + | "ARCHIVAL_STATE_UNSPECIFIED" + | "ARCHIVAL_STATE_DISABLED" + | "ARCHIVAL_STATE_ENABLED"; +export const NamespaceConfigVisibilityArchivalState = /*@__PURE__*/ S.String; + +/** Map from field name to alias. */ +export type NamespaceConfigCustomSearchAttributeAliasesMap = { + [key: string]: string | undefined; +}; +export const NamespaceConfigCustomSearchAttributeAliasesMap = + /*@__PURE__*/ S.Record( + S.String, + S.String, + ) as any as S.Schema; + +export interface NamespaceConfig { + workflowExecutionRetentionTtl?: string; + badBinaries?: BadBinaries; + /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ + historyArchivalState?: NamespaceConfigHistoryArchivalState | (string & {}); + historyArchivalUri?: string; + /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ + visibilityArchivalState?: + | NamespaceConfigVisibilityArchivalState + | (string & {}); + visibilityArchivalUri?: string; + /** Map from field name to alias. */ + customSearchAttributeAliases?: NamespaceConfigCustomSearchAttributeAliasesMap; +} +export const NamespaceConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowExecutionRetentionTtl: S.optional(S.String), + badBinaries: S.optional(BadBinaries), + historyArchivalState: S.optional(NamespaceConfigHistoryArchivalState), + historyArchivalUri: S.optional(S.String), + visibilityArchivalState: S.optional(NamespaceConfigVisibilityArchivalState), + visibilityArchivalUri: S.optional(S.String), + customSearchAttributeAliases: S.optional( + NamespaceConfigCustomSearchAttributeAliasesMap, + ), + }), +).annotate({ + identifier: "NamespaceConfig", +}) as any as S.Schema; + +export interface ClusterReplicationConfig { + clusterName?: string; +} +export const ClusterReplicationConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + clusterName: S.optional(S.String), + }), +).annotate({ + identifier: "ClusterReplicationConfig", +}) as any as S.Schema; + +export type NamespaceReplicationConfigClustersList = + Array; +export const NamespaceReplicationConfigClustersList = /*@__PURE__*/ S.Array( + ClusterReplicationConfig, +) as any as S.Schema; + +export type NamespaceReplicationConfigState = + | "REPLICATION_STATE_UNSPECIFIED" + | "REPLICATION_STATE_NORMAL" + | "REPLICATION_STATE_HANDOVER"; +export const NamespaceReplicationConfigState = /*@__PURE__*/ S.String; + +export interface NamespaceReplicationConfig { + activeClusterName?: string; + clusters?: NamespaceReplicationConfigClustersList; + state?: NamespaceReplicationConfigState | (string & {}); +} +export const NamespaceReplicationConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + activeClusterName: S.optional(S.String), + clusters: S.optional(NamespaceReplicationConfigClustersList), + state: S.optional(NamespaceReplicationConfigState), + }), +).annotate({ + identifier: "NamespaceReplicationConfig", +}) as any as S.Schema; + +/** Represents a historical replication status of a Namespace */ +export interface FailoverStatus { + /** Timestamp when the Cluster switched to the following failover_version */ + failoverTime?: string; + failoverVersion?: string; +} +export const FailoverStatus = /*@__PURE__*/ S.suspend(() => + S.Struct({ + failoverTime: S.optional(S.String), + failoverVersion: S.optional(S.String), + }), +).annotate({ identifier: "FailoverStatus" }) as any as S.Schema; + +/** Contains the historical state of failover_versions for the cluster, truncated to contain only the last N states to ensure that the list does not grow unbounded. */ +export type DescribeNamespaceResponseFailoverHistoryList = + Array; +export const DescribeNamespaceResponseFailoverHistoryList = + /*@__PURE__*/ S.Array( + FailoverStatus, + ) as any as S.Schema; + +export interface DescribeNamespaceResponse { + namespaceInfo?: NamespaceInfo; + config?: NamespaceConfig; + replicationConfig?: NamespaceReplicationConfig; + failoverVersion?: string; + isGlobalNamespace?: boolean; + /** Contains the historical state of failover_versions for the cluster, truncated to contain only the last N states to ensure that the list does not grow unbounded. */ + failoverHistory?: DescribeNamespaceResponseFailoverHistoryList; +} +export const DescribeNamespaceResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespaceInfo: S.optional(NamespaceInfo), + config: S.optional(NamespaceConfig), + replicationConfig: S.optional(NamespaceReplicationConfig), + failoverVersion: S.optional(S.String), + isGlobalNamespace: S.optional(S.Boolean), + failoverHistory: S.optional(DescribeNamespaceResponseFailoverHistoryList), + }), +).annotate({ + identifier: "DescribeNamespaceResponse", +}) as any as S.Schema; + +export interface DescribeNexusOperationExecutionRequest { + namespace: string; + operationId: string; + /** Operation run ID. If empty the request targets the latest run. */ + runId?: string; + /** Include the input field in the response. */ + includeInput?: boolean; + /** Include the outcome (result/failure) in the response if the operation has completed. */ + includeOutcome?: boolean; + /** Token from a previous DescribeNexusOperationExecutionResponse. If present, this RPC will long-poll until operation state changes from the state encoded in this token. If absent, return current state immediately. If present, run_id must also be present. Note that operation state may change multiple times between requests, therefore it is not guaranteed that a client making a sequence of long-poll requests will see a complete sequence of state changes. */ + longPollToken?: string; +} +export const DescribeNexusOperationExecutionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + operationId: S.String.pipe(T.Label()), + runId: S.optional(S.String.pipe(T.Query())), + includeInput: S.optional(S.Boolean.pipe(T.Query())), + includeOutcome: S.optional(S.Boolean.pipe(T.Query())), + longPollToken: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeNexusOperationExecutionRequest", +}) as any as S.Schema; + +/** A general status for this operation, indicates whether it is currently running or in one of the terminal statuses. Updated once when the operation is originally scheduled, and again when it reaches a terminal status. */ +export type NexusOperationExecutionInfoStatus = + | "NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED" + | "NEXUS_OPERATION_EXECUTION_STATUS_RUNNING" + | "NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED" + | "NEXUS_OPERATION_EXECUTION_STATUS_FAILED" + | "NEXUS_OPERATION_EXECUTION_STATUS_CANCELED" + | "NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED" + | "NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT"; +export const NexusOperationExecutionInfoStatus = /*@__PURE__*/ S.String; + +/** More detailed breakdown of NEXUS_OPERATION_EXECUTION_STATUS_RUNNING. */ +export type NexusOperationExecutionInfoState = + | "PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED" + | "PENDING_NEXUS_OPERATION_STATE_SCHEDULED" + | "PENDING_NEXUS_OPERATION_STATE_BACKING_OFF" + | "PENDING_NEXUS_OPERATION_STATE_STARTED" + | "PENDING_NEXUS_OPERATION_STATE_BLOCKED"; +export const NexusOperationExecutionInfoState = /*@__PURE__*/ S.String; + +export type NexusOperationExecutionCancellationInfoState = + | "NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED" + | "NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED" + | "NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF" + | "NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED" + | "NEXUS_OPERATION_CANCELLATION_STATE_FAILED" + | "NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT" + | "NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED"; +export const NexusOperationExecutionCancellationInfoState = + /*@__PURE__*/ S.String; + +/** NexusOperationExecutionCancellationInfo contains the state of a Nexus operation cancellation. */ +export interface NexusOperationExecutionCancellationInfo { + /** The time when cancellation was requested. */ + requestedTime?: string; + state?: NexusOperationExecutionCancellationInfoState; + /** The number of attempts made to deliver the cancel operation request. This number represents a minimum bound since the attempt is incremented after the request completes. */ + attempt?: number; + /** The time when the last attempt completed. */ + lastAttemptCompleteTime?: string; + /** The last attempt's failure, if any. */ + lastAttemptFailure?: Failure; + /** The time when the next attempt is scheduled. */ + nextAttemptScheduleTime?: string; + /** If the state is BLOCKED, blocked reason provides additional information. */ + blockedReason?: string; + /** A reason that may be specified in the CancelNexusOperationRequest. */ + reason?: string; +} +export const NexusOperationExecutionCancellationInfo = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + requestedTime: S.optional(S.String), + state: S.optional(NexusOperationExecutionCancellationInfoState), + attempt: S.optional(S.Number), + lastAttemptCompleteTime: S.optional(S.String), + lastAttemptFailure: S.optional(Failure), + nextAttemptScheduleTime: S.optional(S.String), + blockedReason: S.optional(S.String), + reason: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationExecutionCancellationInfo", +}) as any as S.Schema; + +/** Header for context propagation and tracing purposes. */ +export type NexusOperationExecutionInfoNexusHeaderMap = { + [key: string]: string | undefined; +}; +export const NexusOperationExecutionInfoNexusHeaderMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +/** Links attached by the handler of this operation on start or completion. */ +export type NexusOperationExecutionInfoLinksList = Array; +export const NexusOperationExecutionInfoLinksList = /*@__PURE__*/ S.Array( + Link, +) as any as S.Schema; + +/** Full current state of a standalone Nexus operation, as of the time of the request. */ +export interface NexusOperationExecutionInfo { + /** Unique identifier of this Nexus operation within its namespace along with run ID (below). */ + operationId?: string; + runId?: string; + /** Endpoint name, resolved to a URL via the cluster's endpoint registry. */ + endpoint?: string; + /** Service name. */ + service?: string; + /** Operation name. */ + operation?: string; + /** A general status for this operation, indicates whether it is currently running or in one of the terminal statuses. Updated once when the operation is originally scheduled, and again when it reaches a terminal status. */ + status?: NexusOperationExecutionInfoStatus; + /** More detailed breakdown of NEXUS_OPERATION_EXECUTION_STATUS_RUNNING. */ + state?: NexusOperationExecutionInfoState; + /** Schedule-to-close timeout for this operation. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToCloseTimeout?: string; + /** Schedule-to-start timeout for this operation. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToStartTimeout?: string; + /** Start-to-close timeout for this operation. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + startToCloseTimeout?: string; + /** The number of attempts made to deliver the start operation request. This number is approximate, it is incremented when a task is added to the history queue. In practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task was never executed. */ + attempt?: number; + /** Time the operation was originally scheduled via a StartNexusOperation request. */ + scheduleTime?: string; + /** Scheduled time + schedule to close timeout. */ + expirationTime?: string; + /** Time when the operation transitioned to a closed state. */ + closeTime?: string; + /** The time when the last attempt completed. */ + lastAttemptCompleteTime?: string; + /** The last attempt's failure, if any. */ + lastAttemptFailure?: Failure; + /** The time when the next attempt is scheduled. */ + nextAttemptScheduleTime?: string; + /** Elapsed time from schedule_time to now for running operations or to close_time for closed operations, including all attempts and backoff between attempts. */ + executionDuration?: string; + cancellationInfo?: NexusOperationExecutionCancellationInfo; + /** If the state is BLOCKED, blocked reason provides additional information. */ + blockedReason?: string; + /** Server-generated request ID used as an idempotency token when submitting start requests to the handler. Distinct from the request_id in StartNexusOperationRequest, which is the caller-side idempotency key for the StartNexusOperation RPC itself. */ + requestId?: string; + /** Operation token. Only set for asynchronous operations after a successful StartOperation call. */ + operationToken?: string; + /** Incremented each time the operation's state is mutated in persistence. */ + stateTransitionCount?: string; + searchAttributes?: SearchAttributes; + /** Header for context propagation and tracing purposes. */ + nexusHeader?: NexusOperationExecutionInfoNexusHeaderMap; + /** Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation. */ + userMetadata?: UserMetadata; + /** Links attached by the handler of this operation on start or completion. */ + links?: NexusOperationExecutionInfoLinksList; + /** The identity of the client who started this operation. */ + identity?: string; +} +export const NexusOperationExecutionInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + operationId: S.optional(S.String), + runId: S.optional(S.String), + endpoint: S.optional(S.String), + service: S.optional(S.String), + operation: S.optional(S.String), + status: S.optional(NexusOperationExecutionInfoStatus), + state: S.optional(NexusOperationExecutionInfoState), + scheduleToCloseTimeout: S.optional(S.String), + scheduleToStartTimeout: S.optional(S.String), + startToCloseTimeout: S.optional(S.String), + attempt: S.optional(S.Number), + scheduleTime: S.optional(S.String), + expirationTime: S.optional(S.String), + closeTime: S.optional(S.String), + lastAttemptCompleteTime: S.optional(S.String), + lastAttemptFailure: S.optional(Failure), + nextAttemptScheduleTime: S.optional(S.String), + executionDuration: S.optional(S.String), + cancellationInfo: S.optional(NexusOperationExecutionCancellationInfo), + blockedReason: S.optional(S.String), + requestId: S.optional(S.String), + operationToken: S.optional(S.String), + stateTransitionCount: S.optional(S.String), + searchAttributes: S.optional(SearchAttributes), + nexusHeader: S.optional(NexusOperationExecutionInfoNexusHeaderMap), + userMetadata: S.optional(UserMetadata), + links: S.optional(NexusOperationExecutionInfoLinksList), + identity: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationExecutionInfo", +}) as any as S.Schema; + +export interface DescribeNexusOperationExecutionResponse { + /** The run ID of the operation, useful when run_id was not specified in the request. */ + runId?: string; + /** Information about the operation. */ + info?: NexusOperationExecutionInfo; + /** Serialized operation input, passed as the request payload. Only set if include_input was true in the request. */ + input?: unknown; + /** The result if the operation completed successfully. */ + result?: unknown; + /** The failure if the operation completed unsuccessfully. */ + failure?: Failure; + /** Token for follow-on long-poll requests. Absent only if the operation is complete. */ + longPollToken?: string; +} +export const DescribeNexusOperationExecutionResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + runId: S.optional(S.String), + info: S.optional(NexusOperationExecutionInfo), + input: S.optional(S.Unknown), + result: S.optional(S.Unknown), + failure: S.optional(Failure), + longPollToken: S.optional(S.String), + }), +).annotate({ + identifier: "DescribeNexusOperationExecutionResponse", +}) as any as S.Schema; + +export interface DescribeScheduleRequest { + /** The namespace of the schedule to describe. */ + namespace: string; + /** The id of the schedule to describe. */ + scheduleId: string; +} +export const DescribeScheduleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + scheduleId: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/schedules/{scheduleId}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeScheduleRequest", +}) as any as S.Schema; + +/** Currently-running workflows started by this schedule. (There might be more than one if the overlap policy allows overlaps.) Note that the run_ids in here are the original execution run ids as started by the schedule. If the workflows retried, did continue-as-new, or were reset, they might still be running but with a different run_id. */ +export type ScheduleInfoRunningWorkflowsList = Array; +export const ScheduleInfoRunningWorkflowsList = /*@__PURE__*/ S.Array( + WorkflowExecution, +) as any as S.Schema; + +/** If the action was start_workflow, this field will reflect an eventually-consistent view of the started workflow's status. */ +export type ScheduleActionResultStartWorkflowStatus = + | "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED" + | "WORKFLOW_EXECUTION_STATUS_RUNNING" + | "WORKFLOW_EXECUTION_STATUS_COMPLETED" + | "WORKFLOW_EXECUTION_STATUS_FAILED" + | "WORKFLOW_EXECUTION_STATUS_CANCELED" + | "WORKFLOW_EXECUTION_STATUS_TERMINATED" + | "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW" + | "WORKFLOW_EXECUTION_STATUS_TIMED_OUT" + | "WORKFLOW_EXECUTION_STATUS_PAUSED"; +export const ScheduleActionResultStartWorkflowStatus = /*@__PURE__*/ S.String; + +export interface ScheduleActionResult { + /** Time that the action was taken (according to the schedule, including jitter). */ + scheduleTime?: string; + /** Time that the action was taken (real time). */ + actualTime?: string; + /** If action was start_workflow: */ + startWorkflowResult?: WorkflowExecution; + /** If the action was start_workflow, this field will reflect an eventually-consistent view of the started workflow's status. */ + startWorkflowStatus?: ScheduleActionResultStartWorkflowStatus; +} +export const ScheduleActionResult = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduleTime: S.optional(S.String), + actualTime: S.optional(S.String), + startWorkflowResult: S.optional(WorkflowExecution), + startWorkflowStatus: S.optional(ScheduleActionResultStartWorkflowStatus), + }), +).annotate({ + identifier: "ScheduleActionResult", +}) as any as S.Schema; + +/** Most recent ten actual action times (including manual triggers). */ +export type ScheduleInfoRecentActionsList = Array; +export const ScheduleInfoRecentActionsList = /*@__PURE__*/ S.Array( + ScheduleActionResult, +) as any as S.Schema; + +/** Next ten scheduled action times. */ +export type ScheduleInfoFutureActionTimesList = Array; +export const ScheduleInfoFutureActionTimesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface ScheduleInfo { + /** Number of actions taken so far. */ + actionCount?: string; + /** Number of times a scheduled action was skipped due to missing the catchup window. */ + missedCatchupWindow?: string; + /** Number of skipped actions due to overlap. */ + overlapSkipped?: string; + /** Number of dropped actions due to buffer limit. */ + bufferDropped?: string; + /** Number of actions in the buffer. The buffer holds the actions that cannot be immediately triggered (due to the overlap policy). These actions can be a result of the normal schedule or a backfill. */ + bufferSize?: string; + /** Currently-running workflows started by this schedule. (There might be more than one if the overlap policy allows overlaps.) Note that the run_ids in here are the original execution run ids as started by the schedule. If the workflows retried, did continue-as-new, or were reset, they might still be running but with a different run_id. */ + runningWorkflows?: ScheduleInfoRunningWorkflowsList; + /** Most recent ten actual action times (including manual triggers). */ + recentActions?: ScheduleInfoRecentActionsList; + /** Next ten scheduled action times. */ + futureActionTimes?: ScheduleInfoFutureActionTimesList; + /** Timestamps of schedule creation and last update. */ + createTime?: string; + updateTime?: string; + /** Deprecated. */ + invalidScheduleError?: string; +} +export const ScheduleInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + actionCount: S.optional(S.String), + missedCatchupWindow: S.optional(S.String), + overlapSkipped: S.optional(S.String), + bufferDropped: S.optional(S.String), + bufferSize: S.optional(S.String), + runningWorkflows: S.optional(ScheduleInfoRunningWorkflowsList), + recentActions: S.optional(ScheduleInfoRecentActionsList), + futureActionTimes: S.optional(ScheduleInfoFutureActionTimesList), + createTime: S.optional(S.String), + updateTime: S.optional(S.String), + invalidScheduleError: S.optional(S.String), + }), +).annotate({ identifier: "ScheduleInfo" }) as any as S.Schema; + +export interface DescribeScheduleResponse { + /** The complete current schedule details. This may not match the schedule as created because: - some types of schedule specs may get compiled into others (e.g. CronString into StructuredCalendarSpec) - some unspecified fields may be replaced by defaults - some fields in the state are modified automatically - the schedule may have been modified by UpdateSchedule or PatchSchedule */ + schedule?: Schedule; + /** Extra schedule state info. */ + info?: ScheduleInfo; + /** The memo and search attributes that the schedule was created with. */ + memo?: Memo; + searchAttributes?: SearchAttributes; + /** This value can be passed back to UpdateSchedule to ensure that the schedule was not modified between a Describe and an Update, which could lead to lost updates and other confusion. */ + conflictToken?: string; +} +export const DescribeScheduleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + schedule: S.optional(Schedule), + info: S.optional(ScheduleInfo), + memo: S.optional(Memo), + searchAttributes: S.optional(SearchAttributes), + conflictToken: S.optional(S.String), + }), +).annotate({ + identifier: "DescribeScheduleResponse", +}) as any as S.Schema; + +export type DescribeTaskQueueRequestTaskQueueKind = + | "TASK_QUEUE_KIND_UNSPECIFIED" + | "TASK_QUEUE_KIND_NORMAL" + | "TASK_QUEUE_KIND_STICKY" + | "TASK_QUEUE_KIND_WORKER_COMMANDS"; +export const DescribeTaskQueueRequestTaskQueueKind = /*@__PURE__*/ S.String; + +export type DescribeTaskQueueRequestTaskQueueType = + | "TASK_QUEUE_TYPE_UNSPECIFIED" + | "TASK_QUEUE_TYPE_WORKFLOW" + | "TASK_QUEUE_TYPE_ACTIVITY" + | "TASK_QUEUE_TYPE_NEXUS"; +export const DescribeTaskQueueRequestTaskQueueType = /*@__PURE__*/ S.String; + +export type DescribeTaskQueueRequestApiMode = + | "DESCRIBE_TASK_QUEUE_MODE_UNSPECIFIED" + | "DESCRIBE_TASK_QUEUE_MODE_ENHANCED"; +export const DescribeTaskQueueRequestApiMode = /*@__PURE__*/ S.String; + +export type DescribeTaskQueueRequestVersionsBuildIdsList = Array; +export const DescribeTaskQueueRequestVersionsBuildIdsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type DescribeTaskQueueRequestTaskQueueTypesItem = + | "TASK_QUEUE_TYPE_UNSPECIFIED" + | "TASK_QUEUE_TYPE_WORKFLOW" + | "TASK_QUEUE_TYPE_ACTIVITY" + | "TASK_QUEUE_TYPE_NEXUS"; +export const DescribeTaskQueueRequestTaskQueueTypesItem = + /*@__PURE__*/ S.String; + +export type DescribeTaskQueueRequestTaskQueueTypesList = Array< + DescribeTaskQueueRequestTaskQueueTypesItem | (string & {}) +>; +export const DescribeTaskQueueRequestTaskQueueTypesList = /*@__PURE__*/ S.Array( + DescribeTaskQueueRequestTaskQueueTypesItem, +) as any as S.Schema; + +export interface DescribeTaskQueueRequest { + namespace: string; + task_queue_name: string; + taskQueue_name?: string; + /** Default: TASK_QUEUE_KIND_NORMAL. */ + taskQueue_kind?: DescribeTaskQueueRequestTaskQueueKind | (string & {}); + /** Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of the normal task queue that the sticky worker is running on. */ + taskQueue_normalName?: string; + /** If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used. Only supported in default mode (use `task_queue_types` in ENHANCED mode instead). */ + taskQueueType?: DescribeTaskQueueRequestTaskQueueType | (string & {}); + /** Report stats for the requested task queue type(s). */ + reportStats?: boolean; + /** Report Task Queue Config */ + reportConfig?: boolean; + /** Deprecated, use `report_stats` instead. If true, the task queue status will be included in the response. */ + includeTaskQueueStatus?: boolean; + /** Deprecated. ENHANCED mode is also being deprecated. Select the API mode to use for this request: DEFAULT mode (if unset) or ENHANCED mode. Consult the documentation for each field to understand which mode it is supported in. */ + apiMode?: DescribeTaskQueueRequestApiMode | (string & {}); + /** Include specific Build IDs. */ + versions_buildIds?: DescribeTaskQueueRequestVersionsBuildIdsList; + /** Include the unversioned queue. */ + versions_unversioned?: boolean; + /** Include all active versions. A version is considered active if, in the last few minutes, it has had new tasks or polls, or it has been the subject of certain task queue API calls. */ + versions_allActive?: boolean; + /** Deprecated (as part of the ENHANCED mode deprecation). Task queue types to report info about. If not specified, all types are considered. */ + taskQueueTypes?: DescribeTaskQueueRequestTaskQueueTypesList; + /** Deprecated (as part of the ENHANCED mode deprecation). Report list of pollers for requested task queue types and versions. */ + reportPollers?: boolean; + /** Deprecated (as part of the ENHANCED mode deprecation). Report task reachability for the requested versions and all task types (task reachability is not reported per task type). */ + reportTaskReachability?: boolean; +} +export const DescribeTaskQueueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + task_queue_name: S.String.pipe(T.Label()), + taskQueue_name: S.optional(S.String.pipe(T.Query("taskQueue.name"))), + taskQueue_kind: S.optional( + DescribeTaskQueueRequestTaskQueueKind.pipe(T.Query("taskQueue.kind")), + ), + taskQueue_normalName: S.optional( + S.String.pipe(T.Query("taskQueue.normalName")), + ), + taskQueueType: S.optional( + DescribeTaskQueueRequestTaskQueueType.pipe(T.Query()), + ), + reportStats: S.optional(S.Boolean.pipe(T.Query())), + reportConfig: S.optional(S.Boolean.pipe(T.Query())), + includeTaskQueueStatus: S.optional(S.Boolean.pipe(T.Query())), + apiMode: S.optional(DescribeTaskQueueRequestApiMode.pipe(T.Query())), + versions_buildIds: S.optional( + DescribeTaskQueueRequestVersionsBuildIdsList.pipe( + T.Query("versions.buildIds"), + ), + ), + versions_unversioned: S.optional( + S.Boolean.pipe(T.Query("versions.unversioned")), + ), + versions_allActive: S.optional( + S.Boolean.pipe(T.Query("versions.allActive")), + ), + taskQueueTypes: S.optional( + DescribeTaskQueueRequestTaskQueueTypesList.pipe(T.Query()), + ), + reportPollers: S.optional(S.Boolean.pipe(T.Query())), + reportTaskReachability: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/task-queues/{task_queue_name}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeTaskQueueRequest", +}) as any as S.Schema; + +/** Identifies the version that a worker is compatible with when polling or identifying itself, and whether or not this worker is opting into the build-id based versioning feature. This is used by matching to determine which workers ought to receive what tasks. Deprecated. Use WorkerDeploymentOptions instead. */ +export interface WorkerVersionCapabilities { + /** An opaque whole-worker identifier */ + buildId?: string; + /** If set, the worker is opting in to worker versioning, and wishes to only receive appropriate tasks. */ + useVersioning?: boolean; + /** Must be sent if user has set a deployment series name (versioning-3). */ + deploymentSeriesName?: string; +} +export const WorkerVersionCapabilities = /*@__PURE__*/ S.suspend(() => + S.Struct({ + buildId: S.optional(S.String), + useVersioning: S.optional(S.Boolean), + deploymentSeriesName: S.optional(S.String), + }), +).annotate({ + identifier: "WorkerVersionCapabilities", +}) as any as S.Schema; + +/** Required. Versioning Mode for this worker. Must be the same for all workers with the same `deployment_name` and `build_id` combination, across all Task Queues. When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version. */ +export type WorkerDeploymentOptionsWorkerVersioningMode = + | "WORKER_VERSIONING_MODE_UNSPECIFIED" + | "WORKER_VERSIONING_MODE_UNVERSIONED" + | "WORKER_VERSIONING_MODE_VERSIONED"; +export const WorkerDeploymentOptionsWorkerVersioningMode = + /*@__PURE__*/ S.String; + +/** Worker Deployment options set in SDK that need to be sent to server in every poll. */ +export interface WorkerDeploymentOptions { + /** Required when `worker_versioning_mode==VERSIONED`. */ + deploymentName?: string; + /** The Build ID of the worker. Required when `worker_versioning_mode==VERSIONED`, in which case, the worker will be part of a Deployment Version. */ + buildId?: string; + /** Required. Versioning Mode for this worker. Must be the same for all workers with the same `deployment_name` and `build_id` combination, across all Task Queues. When `worker_versioning_mode==VERSIONED`, the worker will be part of a Deployment Version. */ + workerVersioningMode?: + | WorkerDeploymentOptionsWorkerVersioningMode + | (string & {}); +} +export const WorkerDeploymentOptions = /*@__PURE__*/ S.suspend(() => + S.Struct({ + deploymentName: S.optional(S.String), + buildId: S.optional(S.String), + workerVersioningMode: S.optional( + WorkerDeploymentOptionsWorkerVersioningMode, + ), + }), +).annotate({ + identifier: "WorkerDeploymentOptions", +}) as any as S.Schema; + +export interface PollerInfo { + lastAccessTime?: string; + identity?: string; + ratePerSecond?: number; + /** If a worker has opted into the worker versioning feature while polling, its capabilities will appear here. Deprecated. Replaced by deployment_options. */ + workerVersionCapabilities?: WorkerVersionCapabilities; + /** Worker deployment options that SDK sent to server. */ + deploymentOptions?: WorkerDeploymentOptions; +} +export const PollerInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + lastAccessTime: S.optional(S.String), + identity: S.optional(S.String), + ratePerSecond: S.optional(S.Number), + workerVersionCapabilities: S.optional(WorkerVersionCapabilities), + deploymentOptions: S.optional(WorkerDeploymentOptions), + }), +).annotate({ identifier: "PollerInfo" }) as any as S.Schema; + +export type DescribeTaskQueueResponsePollersList = Array; +export const DescribeTaskQueueResponsePollersList = /*@__PURE__*/ S.Array( + PollerInfo, +) as any as S.Schema; + +/** TaskQueueStats contains statistics about task queue backlog and activity. For workflow task queue type, this result is partial because tasks sent to sticky queues are not included. Read comments above each metric to understand the impact of sticky queue exclusion on that metric accuracy. */ +export interface TaskQueueStats { + /** The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges to the right value. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, the inaccuracy becomes less significant as the backlog size grows. */ + approximateBacklogCount?: string; + /** Approximate age of the oldest task in the backlog based on the creation time of the task at the head of the queue. Can be relied upon for scaling decisions. Special note for workflow task queue type: this metric does not count sticky queue tasks. However, because those tasks only remain valid for a few seconds, they should not affect the result when backlog is older than few seconds. */ + approximateBacklogAge?: string; + /** The approximate tasks per second added to the task queue, averaging the last 30 seconds. These includes tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going to the backlog (sync-matched). The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which backlog grows/shrinks. Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by tasks_add_rate, because: - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is enable for activities by default in the latest SDKs. - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific worker instance. */ + tasksAddRate?: number; + /** The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds. These includes tasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without going to the backlog (sync-matched). The difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which backlog grows/shrinks. Note: the actual tasks delivered to the workers may significantly be higher than the numbers reported by tasks_dispatch_rate, because: - Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is enable for activities by default in the latest SDKs. - Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific worker instance. */ + tasksDispatchRate?: number; +} +export const TaskQueueStats = /*@__PURE__*/ S.suspend(() => + S.Struct({ + approximateBacklogCount: S.optional(S.String), + approximateBacklogAge: S.optional(S.String), + tasksAddRate: S.optional(S.Number), + tasksDispatchRate: S.optional(S.Number), + }), +).annotate({ identifier: "TaskQueueStats" }) as any as S.Schema; + +/** Task queue stats breakdown by priority key. Only contains actively used priority keys. Only set if `report_stats` is set on the request. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "by" is used to clarify the keys and values. --) */ +export type DescribeTaskQueueResponseStatsByPriorityKeyMap = { + [key: string]: TaskQueueStats | undefined; +}; +export const DescribeTaskQueueResponseStatsByPriorityKeyMap = + /*@__PURE__*/ S.Record( + S.String, + TaskQueueStats, + ) as any as S.Schema; + +export interface TaskQueueVersioningInfo { + /** Specifies which Deployment Version should receive new workflow executions and tasks of existing unversioned or AutoUpgrade workflows. Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). */ + currentDeploymentVersion?: WorkerDeploymentVersion; + /** Deprecated. Use `current_deployment_version`. */ + currentVersion?: string; + /** When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. Must always be different from `current_deployment_version` unless both are nil. Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) Note that it is possible to ramp from one Version to another Version, or from unversioned workers to a particular Version, or from a particular Version to unversioned workers. */ + rampingDeploymentVersion?: WorkerDeploymentVersion; + /** Deprecated. Use `ramping_deployment_version`. */ + rampingVersion?: string; + /** Percentage of tasks that are routed to the Ramping Version instead of the Current Version. Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but not yet "promoted" to be the Current Version, likely due to pending validations. A 0% value means the Ramping Version is receiving no traffic. */ + rampingVersionPercentage?: number; + /** Last time versioning information of this Task Queue changed. */ + updateTime?: string; +} +export const TaskQueueVersioningInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + currentDeploymentVersion: S.optional(WorkerDeploymentVersion), + currentVersion: S.optional(S.String), + rampingDeploymentVersion: S.optional(WorkerDeploymentVersion), + rampingVersion: S.optional(S.String), + rampingVersionPercentage: S.optional(S.Number), + updateTime: S.optional(S.String), + }), +).annotate({ + identifier: "TaskQueueVersioningInfo", +}) as any as S.Schema; + +export interface RateLimit { + /** Zero is a valid rate limit. */ + requestsPerSecond?: number; +} +export const RateLimit = /*@__PURE__*/ S.suspend(() => + S.Struct({ + requestsPerSecond: S.optional(S.Number), + }), +).annotate({ identifier: "RateLimit" }) as any as S.Schema; + +export interface ConfigMetadata { + /** Reason for why the config was set. */ + reason?: string; + /** Identity of the last updater. Set by the request's identity field. */ + updateIdentity?: string; + /** Time of the last update. */ + updateTime?: string; +} +export const ConfigMetadata = /*@__PURE__*/ S.suspend(() => + S.Struct({ + reason: S.optional(S.String), + updateIdentity: S.optional(S.String), + updateTime: S.optional(S.String), + }), +).annotate({ identifier: "ConfigMetadata" }) as any as S.Schema; + +export interface RateLimitConfig { + rateLimit?: RateLimit; + metadata?: ConfigMetadata; +} +export const RateLimitConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + rateLimit: S.optional(RateLimit), + metadata: S.optional(ConfigMetadata), + }), +).annotate({ + identifier: "RateLimitConfig", +}) as any as S.Schema; + +/** If set, overrides the fairness weights for the corresponding fairness keys. */ +export type TaskQueueConfigFairnessWeightOverridesMap = { + [key: string]: number | undefined; +}; +export const TaskQueueConfigFairnessWeightOverridesMap = /*@__PURE__*/ S.Record( + S.String, + S.Number, +) as any as S.Schema; + +export interface TaskQueueConfig { + /** Unless modified, this is the system-defined rate limit. */ + queueRateLimit?: RateLimitConfig; + /** If set, each individual fairness key will be limited to this rate, scaled by the weight of the fairness key. */ + fairnessKeysRateLimitDefault?: RateLimitConfig; + /** If set, overrides the fairness weights for the corresponding fairness keys. */ + fairnessWeightOverrides?: TaskQueueConfigFairnessWeightOverridesMap; +} +export const TaskQueueConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + queueRateLimit: S.optional(RateLimitConfig), + fairnessKeysRateLimitDefault: S.optional(RateLimitConfig), + fairnessWeightOverrides: S.optional( + TaskQueueConfigFairnessWeightOverridesMap, + ), + }), +).annotate({ + identifier: "TaskQueueConfig", +}) as any as S.Schema; + +/** Source of the RateLimit Configuration,which can be one of the following values: - SOURCE_API: The rate limit that is set via the TaskQueueConfig api. - SOURCE_WORKER: The rate limit is the value set using the workerOptions in TaskQueueActivitiesPerSecond. - SOURCE_SYSTEM: The rate limit is the default value set by the system */ +export type DescribeTaskQueueResponseEffectiveRateLimitRateLimitSource = + | "RATE_LIMIT_SOURCE_UNSPECIFIED" + | "RATE_LIMIT_SOURCE_API" + | "RATE_LIMIT_SOURCE_WORKER" + | "RATE_LIMIT_SOURCE_SYSTEM"; +export const DescribeTaskQueueResponseEffectiveRateLimitRateLimitSource = + /*@__PURE__*/ S.String; + +export interface DescribeTaskQueueResponseEffectiveRateLimit { + /** The effective rate limit for the task queue. */ + requestsPerSecond?: number; + /** Source of the RateLimit Configuration,which can be one of the following values: - SOURCE_API: The rate limit that is set via the TaskQueueConfig api. - SOURCE_WORKER: The rate limit is the value set using the workerOptions in TaskQueueActivitiesPerSecond. - SOURCE_SYSTEM: The rate limit is the default value set by the system */ + rateLimitSource?: DescribeTaskQueueResponseEffectiveRateLimitRateLimitSource; +} +export const DescribeTaskQueueResponseEffectiveRateLimit = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + requestsPerSecond: S.optional(S.Number), + rateLimitSource: S.optional( + DescribeTaskQueueResponseEffectiveRateLimitRateLimitSource, + ), + }), + ).annotate({ + identifier: "DescribeTaskQueueResponseEffectiveRateLimit", + }) as any as S.Schema; + +export interface TaskIdBlock { + startId?: string; + endId?: string; +} +export const TaskIdBlock = /*@__PURE__*/ S.suspend(() => + S.Struct({ + startId: S.optional(S.String), + endId: S.optional(S.String), + }), +).annotate({ identifier: "TaskIdBlock" }) as any as S.Schema; + +/** Deprecated. Use `InternalTaskQueueStatus`. This is kept until `DescribeTaskQueue` supports legacy behavior. */ +export interface TaskQueueStatus { + backlogCountHint?: string; + readLevel?: string; + ackLevel?: string; + ratePerSecond?: number; + taskIdBlock?: TaskIdBlock; +} +export const TaskQueueStatus = /*@__PURE__*/ S.suspend(() => + S.Struct({ + backlogCountHint: S.optional(S.String), + readLevel: S.optional(S.String), + ackLevel: S.optional(S.String), + ratePerSecond: S.optional(S.Number), + taskIdBlock: S.optional(TaskIdBlock), + }), +).annotate({ + identifier: "TaskQueueStatus", +}) as any as S.Schema; + +/** Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID. */ +export type TaskQueueTypeInfoPollersList = Array; +export const TaskQueueTypeInfoPollersList = /*@__PURE__*/ S.Array( + PollerInfo, +) as any as S.Schema; + +export interface TaskQueueTypeInfo { + /** Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID. */ + pollers?: TaskQueueTypeInfoPollersList; + stats?: TaskQueueStats; +} +export const TaskQueueTypeInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pollers: S.optional(TaskQueueTypeInfoPollersList), + stats: S.optional(TaskQueueStats), + }), +).annotate({ + identifier: "TaskQueueTypeInfo", +}) as any as S.Schema; + +/** Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum. */ +export type TaskQueueVersionInfoTypesInfoMap = { + [key: string]: TaskQueueTypeInfo | undefined; +}; +export const TaskQueueVersionInfoTypesInfoMap = /*@__PURE__*/ S.Record( + S.String, + TaskQueueTypeInfo, +) as any as S.Schema; + +/** Task Reachability is eventually consistent; there may be a delay until it converges to the most accurate value but it is designed in a way to take the more conservative side until it converges. For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY. Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be accounted for reachability as server cannot know if they'll happen as they do not use assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make sure to query reachability for the parent/previous workflow's Task Queue as well. */ +export type TaskQueueVersionInfoTaskReachability = + | "BUILD_ID_TASK_REACHABILITY_UNSPECIFIED" + | "BUILD_ID_TASK_REACHABILITY_REACHABLE" + | "BUILD_ID_TASK_REACHABILITY_CLOSED_WORKFLOWS_ONLY" + | "BUILD_ID_TASK_REACHABILITY_UNREACHABLE"; +export const TaskQueueVersionInfoTaskReachability = /*@__PURE__*/ S.String; + +export interface TaskQueueVersionInfo { + /** Task Queue info per Task Type. Key is the numerical value of the temporal.api.enums.v1.TaskQueueType enum. */ + typesInfo?: TaskQueueVersionInfoTypesInfoMap; + /** Task Reachability is eventually consistent; there may be a delay until it converges to the most accurate value but it is designed in a way to take the more conservative side until it converges. For example REACHABLE is more conservative than CLOSED_WORKFLOWS_ONLY. Note: future activities who inherit their workflow's Build ID but not its Task Queue will not be accounted for reachability as server cannot know if they'll happen as they do not use assignment rules of their Task Queue. Same goes for Child Workflows or Continue-As-New Workflows who inherit the parent/previous workflow's Build ID but not its Task Queue. In those cases, make sure to query reachability for the parent/previous workflow's Task Queue as well. */ + taskReachability?: TaskQueueVersionInfoTaskReachability; +} +export const TaskQueueVersionInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + typesInfo: S.optional(TaskQueueVersionInfoTypesInfoMap), + taskReachability: S.optional(TaskQueueVersionInfoTaskReachability), + }), +).annotate({ + identifier: "TaskQueueVersionInfo", +}) as any as S.Schema; + +/** Deprecated. Only returned in ENHANCED mode. This map contains Task Queue information for each Build ID. Empty string as key value means unversioned. */ +export type DescribeTaskQueueResponseVersionsInfoMap = { + [key: string]: TaskQueueVersionInfo | undefined; +}; +export const DescribeTaskQueueResponseVersionsInfoMap = /*@__PURE__*/ S.Record( + S.String, + TaskQueueVersionInfo, +) as any as S.Schema; + +export interface DescribeTaskQueueResponse { + pollers?: DescribeTaskQueueResponsePollersList; + /** Statistics for the task queue. Only set if `report_stats` is set on the request. */ + stats?: TaskQueueStats; + /** Task queue stats breakdown by priority key. Only contains actively used priority keys. Only set if `report_stats` is set on the request. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "by" is used to clarify the keys and values. --) */ + statsByPriorityKey?: DescribeTaskQueueResponseStatsByPriorityKeyMap; + /** Specifies which Worker Deployment Version(s) Server routes this Task Queue's tasks to. When not present, it means the tasks are routed to Unversioned workers (workers with UNVERSIONED or unspecified WorkerVersioningMode.) Task Queue Versioning info is updated indirectly by calling SetWorkerDeploymentCurrentVersion and SetWorkerDeploymentRampingVersion on Worker Deployments. Note: This information is not relevant to Pinned workflow executions and their activities as they are always routed to their Pinned Deployment Version. However, new workflow executions are typically not Pinned until they complete their first task (unless they are started with a Pinned VersioningOverride or are Child Workflows of a Pinned parent). */ + versioningInfo?: TaskQueueVersioningInfo; + /** Only populated if report_task_queue_config is set to true. */ + config?: TaskQueueConfig; + effectiveRateLimit?: DescribeTaskQueueResponseEffectiveRateLimit; + /** Deprecated. Status of the task queue. Only populated when `include_task_queue_status` is set to true in the request. */ + taskQueueStatus?: TaskQueueStatus; + /** Deprecated. Only returned in ENHANCED mode. This map contains Task Queue information for each Build ID. Empty string as key value means unversioned. */ + versionsInfo?: DescribeTaskQueueResponseVersionsInfoMap; +} +export const DescribeTaskQueueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pollers: S.optional(DescribeTaskQueueResponsePollersList), + stats: S.optional(TaskQueueStats), + statsByPriorityKey: S.optional( + DescribeTaskQueueResponseStatsByPriorityKeyMap, + ), + versioningInfo: S.optional(TaskQueueVersioningInfo), + config: S.optional(TaskQueueConfig), + effectiveRateLimit: S.optional(DescribeTaskQueueResponseEffectiveRateLimit), + taskQueueStatus: S.optional(TaskQueueStatus), + versionsInfo: S.optional(DescribeTaskQueueResponseVersionsInfoMap), + }), +).annotate({ + identifier: "DescribeTaskQueueResponse", +}) as any as S.Schema; + +export interface DescribeWorkerRequest { + /** Namespace this worker belongs to. */ + namespace: string; + /** Worker instance key to describe. */ + workerInstanceKey: string; +} +export const DescribeWorkerRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workerInstanceKey: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/workers/describe/{workerInstanceKey}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeWorkerRequest", +}) as any as S.Schema; + +/** Holds everything needed to identify the worker host/process context */ +export interface WorkerHostInfo { + /** Worker host identifier. */ + hostName?: string; + /** Worker grouping identifier. A key to group workers that share the same client+namespace+process. This will be used to build the worker command nexus task queue name: "temporal-sys/worker-commands/{worker_grouping_key}" */ + workerGroupingKey?: string; + /** Worker process identifier. This id only needs to be unique within one host (so using e.g. a unix pid would be appropriate). */ + processId?: string; + /** System used CPU as a float in the range [0.0, 1.0] where 1.0 is defined as all cores on the host pegged. */ + currentHostCpuUsage?: number; + /** System used memory as a float in the range [0.0, 1.0] where 1.0 is defined as all available memory on the host is used. */ + currentHostMemUsage?: number; +} +export const WorkerHostInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + hostName: S.optional(S.String), + workerGroupingKey: S.optional(S.String), + processId: S.optional(S.String), + currentHostCpuUsage: S.optional(S.Number), + currentHostMemUsage: S.optional(S.Number), + }), +).annotate({ identifier: "WorkerHostInfo" }) as any as S.Schema; + +/** Worker status. Defined by SDK. */ +export type WorkerHeartbeatStatus = + | "WORKER_STATUS_UNSPECIFIED" + | "WORKER_STATUS_RUNNING" + | "WORKER_STATUS_SHUTTING_DOWN" + | "WORKER_STATUS_SHUTDOWN"; +export const WorkerHeartbeatStatus = /*@__PURE__*/ S.String; + +export interface WorkerSlotsInfo { + /** Number of slots available for the worker to specific tasks. May be -1 if the upper bound is not known. */ + currentAvailableSlots?: number; + /** Number of slots used by the worker for specific tasks. */ + currentUsedSlots?: number; + /** Kind of the slot supplier, which is used to determine how the slots are allocated. Possible values: "Fixed | ResourceBased | Custom String" */ + slotSupplierKind?: string; + /** Total number of tasks processed (completed both successfully and unsuccesfully, or any other way) by the worker since the worker started. This is a cumulative counter. */ + totalProcessedTasks?: number; + /** Total number of failed tasks processed by the worker so far. */ + totalFailedTasks?: number; + /** Number of tasks processed in since the last heartbeat from the worker. This is a cumulative counter, and it is reset to 0 each time the worker sends a heartbeat. Contains both successful and failed tasks. */ + lastIntervalProcessedTasks?: number; + /** Number of failed tasks processed since the last heartbeat from the worker. */ + lastIntervalFailureTasks?: number; +} +export const WorkerSlotsInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + currentAvailableSlots: S.optional(S.Number), + currentUsedSlots: S.optional(S.Number), + slotSupplierKind: S.optional(S.String), + totalProcessedTasks: S.optional(S.Number), + totalFailedTasks: S.optional(S.Number), + lastIntervalProcessedTasks: S.optional(S.Number), + lastIntervalFailureTasks: S.optional(S.Number), + }), +).annotate({ + identifier: "WorkerSlotsInfo", +}) as any as S.Schema; + +export interface WorkerPollerInfo { + /** Number of polling RPCs that are currently in flight. */ + currentPollers?: number; + lastSuccessfulPollTime?: string; + /** Set true if the number of concurrent pollers is auto-scaled */ + isAutoscaling?: boolean; +} +export const WorkerPollerInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + currentPollers: S.optional(S.Number), + lastSuccessfulPollTime: S.optional(S.String), + isAutoscaling: S.optional(S.Boolean), + }), +).annotate({ + identifier: "WorkerPollerInfo", +}) as any as S.Schema; + +export interface PluginInfo { + /** The name of the plugin, required. */ + name?: string; + /** The version of the plugin, may be empty. */ + version?: string; +} +export const PluginInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + version: S.optional(S.String), + }), +).annotate({ identifier: "PluginInfo" }) as any as S.Schema; + +/** Plugins currently in use by this SDK. */ +export type WorkerHeartbeatPluginsList = Array; +export const WorkerHeartbeatPluginsList = /*@__PURE__*/ S.Array( + PluginInfo, +) as any as S.Schema; + +export interface StorageDriverInfo { + /** The type of the driver, required. */ + type?: string; +} +export const StorageDriverInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.optional(S.String), + }), +).annotate({ + identifier: "StorageDriverInfo", +}) as any as S.Schema; + +/** Storage drivers in use by this SDK. */ +export type WorkerHeartbeatDriversList = Array; +export const WorkerHeartbeatDriversList = /*@__PURE__*/ S.Array( + StorageDriverInfo, +) as any as S.Schema; + +/** Worker info message, contains information about the worker and its current state. All information is provided by the worker itself. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: Removing those words make names less clear. --) */ +export interface WorkerHeartbeat { + /** Worker identifier, should be unique for the namespace. It is distinct from worker identity, which is not necessarily namespace-unique. */ + workerInstanceKey?: string; + /** Worker identity, set by the client, may not be unique. Usually host_name+(user group name)+process_id, but can be overwritten by the user. */ + workerIdentity?: string; + /** Worker host information. */ + hostInfo?: WorkerHostInfo; + /** Task queue this worker is polling for tasks. */ + taskQueue?: string; + deploymentVersion?: WorkerDeploymentVersion; + sdkName?: string; + sdkVersion?: string; + /** Worker status. Defined by SDK. */ + status?: WorkerHeartbeatStatus | (string & {}); + /** Worker start time. It can be used to determine worker uptime. (current time - start time) */ + startTime?: string; + /** Timestamp of this heartbeat, coming from the worker. Worker should set it to "now". Note that this timestamp comes directly from the worker and is subject to workers' clock skew. */ + heartbeatTime?: string; + /** Elapsed time since the last heartbeat from the worker. */ + elapsedSinceLastHeartbeat?: string; + workflowTaskSlotsInfo?: WorkerSlotsInfo; + activityTaskSlotsInfo?: WorkerSlotsInfo; + nexusTaskSlotsInfo?: WorkerSlotsInfo; + localActivitySlotsInfo?: WorkerSlotsInfo; + workflowPollerInfo?: WorkerPollerInfo; + workflowStickyPollerInfo?: WorkerPollerInfo; + activityPollerInfo?: WorkerPollerInfo; + nexusPollerInfo?: WorkerPollerInfo; + /** A Workflow Task found a cached Workflow Execution to run against. */ + totalStickyCacheHit?: number; + /** A Workflow Task did not find a cached Workflow execution to run against. */ + totalStickyCacheMiss?: number; + /** Current cache size, expressed in number of Workflow Executions. */ + currentStickyCacheSize?: number; + /** Plugins currently in use by this SDK. */ + plugins?: WorkerHeartbeatPluginsList; + /** Storage drivers in use by this SDK. */ + drivers?: WorkerHeartbeatDriversList; +} +export const WorkerHeartbeat = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workerInstanceKey: S.optional(S.String), + workerIdentity: S.optional(S.String), + hostInfo: S.optional(WorkerHostInfo), + taskQueue: S.optional(S.String), + deploymentVersion: S.optional(WorkerDeploymentVersion), + sdkName: S.optional(S.String), + sdkVersion: S.optional(S.String), + status: S.optional(WorkerHeartbeatStatus), + startTime: S.optional(S.String), + heartbeatTime: S.optional(S.String), + elapsedSinceLastHeartbeat: S.optional(S.String), + workflowTaskSlotsInfo: S.optional(WorkerSlotsInfo), + activityTaskSlotsInfo: S.optional(WorkerSlotsInfo), + nexusTaskSlotsInfo: S.optional(WorkerSlotsInfo), + localActivitySlotsInfo: S.optional(WorkerSlotsInfo), + workflowPollerInfo: S.optional(WorkerPollerInfo), + workflowStickyPollerInfo: S.optional(WorkerPollerInfo), + activityPollerInfo: S.optional(WorkerPollerInfo), + nexusPollerInfo: S.optional(WorkerPollerInfo), + totalStickyCacheHit: S.optional(S.Number), + totalStickyCacheMiss: S.optional(S.Number), + currentStickyCacheSize: S.optional(S.Number), + plugins: S.optional(WorkerHeartbeatPluginsList), + drivers: S.optional(WorkerHeartbeatDriversList), + }), +).annotate({ + identifier: "WorkerHeartbeat", +}) as any as S.Schema; + +/** Detailed worker information. */ +export interface WorkerInfo { + workerHeartbeat?: WorkerHeartbeat; +} +export const WorkerInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workerHeartbeat: S.optional(WorkerHeartbeat), + }), +).annotate({ identifier: "WorkerInfo" }) as any as S.Schema; + +export interface DescribeWorkerResponse { + workerInfo?: WorkerInfo; +} +export const DescribeWorkerResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workerInfo: S.optional(WorkerInfo), + }), +).annotate({ + identifier: "DescribeWorkerResponse", +}) as any as S.Schema; + +export interface DescribeWorkerDeploymentRequest { + namespace: string; + deploymentName: string; +} +export const DescribeWorkerDeploymentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deploymentName: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeWorkerDeploymentRequest", +}) as any as S.Schema; + +/** The status of the Worker Deployment Version. */ +export type WorkerDeploymentInfoWorkerDeploymentVersionSummaryStatus = + | "WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED" + | "WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE" + | "WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT" + | "WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING" + | "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING" + | "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED" + | "WORKER_DEPLOYMENT_VERSION_STATUS_CREATED"; +export const WorkerDeploymentInfoWorkerDeploymentVersionSummaryStatus = + /*@__PURE__*/ S.String; + +/** Deprecated. Use `drainage_info` instead. */ +export type WorkerDeploymentInfoWorkerDeploymentVersionSummaryDrainageStatus = + | "VERSION_DRAINAGE_STATUS_UNSPECIFIED" + | "VERSION_DRAINAGE_STATUS_DRAINING" + | "VERSION_DRAINAGE_STATUS_DRAINED"; +export const WorkerDeploymentInfoWorkerDeploymentVersionSummaryDrainageStatus = + /*@__PURE__*/ S.String; + +/** Set to DRAINING when the version first stops accepting new executions (is no longer current or ramping). Set to DRAINED when no more open pinned workflows exist on this version. */ +export type VersionDrainageInfoStatus = + | "VERSION_DRAINAGE_STATUS_UNSPECIFIED" + | "VERSION_DRAINAGE_STATUS_DRAINING" + | "VERSION_DRAINAGE_STATUS_DRAINED"; +export const VersionDrainageInfoStatus = /*@__PURE__*/ S.String; + +/** Information about workflow drainage to help the user determine when it is safe to decommission a Version. Not present while version is current or ramping. */ +export interface VersionDrainageInfo { + /** Set to DRAINING when the version first stops accepting new executions (is no longer current or ramping). Set to DRAINED when no more open pinned workflows exist on this version. */ + status?: VersionDrainageInfoStatus; + /** Last time the drainage status changed. */ + lastChangedTime?: string; + /** Last time the system checked for drainage of this version. */ + lastCheckedTime?: string; +} +export const VersionDrainageInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: S.optional(VersionDrainageInfoStatus), + lastChangedTime: S.optional(S.String), + lastCheckedTime: S.optional(S.String), + }), +).annotate({ + identifier: "VersionDrainageInfo", +}) as any as S.Schema; + +export type ComputeConfigScalingGroupSummaryTaskQueueTypesItem = + | "TASK_QUEUE_TYPE_UNSPECIFIED" + | "TASK_QUEUE_TYPE_WORKFLOW" + | "TASK_QUEUE_TYPE_ACTIVITY" + | "TASK_QUEUE_TYPE_NEXUS"; +export const ComputeConfigScalingGroupSummaryTaskQueueTypesItem = + /*@__PURE__*/ S.String; + +export type ComputeConfigScalingGroupSummaryTaskQueueTypesList = + Array; +export const ComputeConfigScalingGroupSummaryTaskQueueTypesList = + /*@__PURE__*/ S.Array( + ComputeConfigScalingGroupSummaryTaskQueueTypesItem, + ) as any as S.Schema; + +export interface ComputeConfigScalingGroupSummary { + taskQueueTypes?: ComputeConfigScalingGroupSummaryTaskQueueTypesList; + providerType?: string; +} +export const ComputeConfigScalingGroupSummary = /*@__PURE__*/ S.suspend(() => + S.Struct({ + taskQueueTypes: S.optional( + ComputeConfigScalingGroupSummaryTaskQueueTypesList, + ), + providerType: S.optional(S.String), + }), +).annotate({ + identifier: "ComputeConfigScalingGroupSummary", +}) as any as S.Schema; + +export type ComputeConfigSummaryScalingGroupsMap = { + [key: string]: ComputeConfigScalingGroupSummary | undefined; +}; +export const ComputeConfigSummaryScalingGroupsMap = /*@__PURE__*/ S.Record( + S.String, + ComputeConfigScalingGroupSummary, +) as any as S.Schema; + +/** A subset of information in ComputeConfig optimized for list views. */ +export interface ComputeConfigSummary { + scalingGroups?: ComputeConfigSummaryScalingGroupsMap; +} +export const ComputeConfigSummary = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scalingGroups: S.optional(ComputeConfigSummaryScalingGroupsMap), + }), +).annotate({ + identifier: "ComputeConfigSummary", +}) as any as S.Schema; + +export interface WorkerDeploymentInfoWorkerDeploymentVersionSummary { + /** Deprecated. Use `deployment_version`. */ + version?: string; + /** The status of the Worker Deployment Version. */ + status?: WorkerDeploymentInfoWorkerDeploymentVersionSummaryStatus; + /** Required. */ + deploymentVersion?: WorkerDeploymentVersion; + createTime?: string; + /** Deprecated. Use `drainage_info` instead. */ + drainageStatus?: WorkerDeploymentInfoWorkerDeploymentVersionSummaryDrainageStatus; + /** Information about workflow drainage to help the user determine when it is safe to decommission a Version. Not present while version is current or ramping */ + drainageInfo?: VersionDrainageInfo; + /** Unset if not current. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) */ + currentSinceTime?: string; + /** Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) */ + rampingSinceTime?: string; + /** Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed. */ + routingUpdateTime?: string; + /** Timestamp when this version first became current or ramping. */ + firstActivationTime?: string; + /** Timestamp when this version last became current. Can be used to determine whether a version has ever been Current. */ + lastCurrentTime?: string; + /** Timestamp when this version last stopped being current or ramping. Cleared if the version becomes current or ramping again. */ + lastDeactivationTime?: string; + computeConfig?: ComputeConfigSummary; +} +export const WorkerDeploymentInfoWorkerDeploymentVersionSummary = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + version: S.optional(S.String), + status: S.optional( + WorkerDeploymentInfoWorkerDeploymentVersionSummaryStatus, + ), + deploymentVersion: S.optional(WorkerDeploymentVersion), + createTime: S.optional(S.String), + drainageStatus: S.optional( + WorkerDeploymentInfoWorkerDeploymentVersionSummaryDrainageStatus, + ), + drainageInfo: S.optional(VersionDrainageInfo), + currentSinceTime: S.optional(S.String), + rampingSinceTime: S.optional(S.String), + routingUpdateTime: S.optional(S.String), + firstActivationTime: S.optional(S.String), + lastCurrentTime: S.optional(S.String), + lastDeactivationTime: S.optional(S.String), + computeConfig: S.optional(ComputeConfigSummary), + }), + ).annotate({ + identifier: "WorkerDeploymentInfoWorkerDeploymentVersionSummary", + }) as any as S.Schema; + +/** Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be cleaned up automatically if all the following conditions meet: - It does not receive new executions (is not current or ramping) - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status) - It is drained (see WorkerDeploymentVersionInfo.drainage_status) */ +export type WorkerDeploymentInfoVersionSummariesList = + Array; +export const WorkerDeploymentInfoVersionSummariesList = /*@__PURE__*/ S.Array( + WorkerDeploymentInfoWorkerDeploymentVersionSummary, +) as any as S.Schema; + +export interface RoutingConfig { + /** Specifies which Deployment Version should receive new workflow executions and tasks of existing unversioned or AutoUpgrade workflows. Nil value means no Version in this Deployment (except Ramping Version, if present) receives traffic other than tasks of previously Pinned workflows. In absence of a Current Version, remaining traffic after any ramp (if set) goes to unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.). Note: Current Version is overridden by the Ramping Version for a portion of traffic when ramp percentage is non-zero (see `ramping_deployment_version` and `ramping_version_percentage`). */ + currentDeploymentVersion?: WorkerDeploymentVersion; + /** Deprecated. Use `current_deployment_version`. */ + currentVersion?: string; + /** When ramp percentage is non-zero, that portion of traffic is shifted from the Current Version to the Ramping Version. Must always be different from `current_deployment_version` unless both are nil. Nil value represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) Note that it is possible to ramp from one Version to another Version, or from unversioned workers to a particular Version, or from a particular Version to unversioned workers. */ + rampingDeploymentVersion?: WorkerDeploymentVersion; + /** Deprecated. Use `ramping_deployment_version`. */ + rampingVersion?: string; + /** Percentage of tasks that are routed to the Ramping Version instead of the Current Version. Valid range: [0, 100]. A 100% value means the Ramping Version is receiving full traffic but not yet "promoted" to be the Current Version, likely due to pending validations. A 0% value means the Ramping Version is receiving no traffic. */ + rampingVersionPercentage?: number; + /** Last time current version was changed. */ + currentVersionChangedTime?: string; + /** Last time ramping version was changed. Not updated if only the ramp percentage changes. */ + rampingVersionChangedTime?: string; + /** Last time ramping version percentage was changed. If ramping version is changed, this is also updated, even if the percentage stays the same. */ + rampingVersionPercentageChangedTime?: string; + /** Monotonically increasing value which is incremented on every mutation to any field of this message to achieve eventual consistency between task queues and their partitions. */ + revisionNumber?: string; +} +export const RoutingConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + currentDeploymentVersion: S.optional(WorkerDeploymentVersion), + currentVersion: S.optional(S.String), + rampingDeploymentVersion: S.optional(WorkerDeploymentVersion), + rampingVersion: S.optional(S.String), + rampingVersionPercentage: S.optional(S.Number), + currentVersionChangedTime: S.optional(S.String), + rampingVersionChangedTime: S.optional(S.String), + rampingVersionPercentageChangedTime: S.optional(S.String), + revisionNumber: S.optional(S.String), + }), +).annotate({ identifier: "RoutingConfig" }) as any as S.Schema; + +/** Indicates whether the routing_config has been fully propagated to all relevant task queues and their partitions. */ +export type WorkerDeploymentInfoRoutingConfigUpdateState = + | "ROUTING_CONFIG_UPDATE_STATE_UNSPECIFIED" + | "ROUTING_CONFIG_UPDATE_STATE_IN_PROGRESS" + | "ROUTING_CONFIG_UPDATE_STATE_COMPLETED"; +export const WorkerDeploymentInfoRoutingConfigUpdateState = + /*@__PURE__*/ S.String; + +/** A Worker Deployment (Deployment, for short) represents all workers serving a shared set of Task Queues. Typically, a Deployment represents one service or application. A Deployment contains multiple Deployment Versions, each representing a different version of workers. (see documentation of WorkerDeploymentVersionInfo) Deployment records are created in Temporal server automatically when their first poller arrives to the server. */ +export interface WorkerDeploymentInfo { + /** Identifies a Worker Deployment. Must be unique within the namespace. */ + name?: string; + /** Deployment Versions that are currently tracked in this Deployment. A DeploymentVersion will be cleaned up automatically if all the following conditions meet: - It does not receive new executions (is not current or ramping) - It has no active pollers (see WorkerDeploymentVersionInfo.pollers_status) - It is drained (see WorkerDeploymentVersionInfo.drainage_status) */ + versionSummaries?: WorkerDeploymentInfoVersionSummariesList; + createTime?: string; + routingConfig?: RoutingConfig; + /** Identity of the last client who modified the configuration of this Deployment. Set to the `identity` value sent by APIs such as `SetWorkerDeploymentCurrentVersion` and `SetWorkerDeploymentRampingVersion`. */ + lastModifierIdentity?: string; + /** Identity of the client that has the exclusive right to make changes to this Worker Deployment. Empty by default. If this is set, clients whose identity does not match `manager_identity` will not be able to make changes to this Worker Deployment. They can either set their own identity as the manager or unset the field to proceed. */ + managerIdentity?: string; + /** Indicates whether the routing_config has been fully propagated to all relevant task queues and their partitions. */ + routingConfigUpdateState?: WorkerDeploymentInfoRoutingConfigUpdateState; +} +export const WorkerDeploymentInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + versionSummaries: S.optional(WorkerDeploymentInfoVersionSummariesList), + createTime: S.optional(S.String), + routingConfig: S.optional(RoutingConfig), + lastModifierIdentity: S.optional(S.String), + managerIdentity: S.optional(S.String), + routingConfigUpdateState: S.optional( + WorkerDeploymentInfoRoutingConfigUpdateState, + ), + }), +).annotate({ + identifier: "WorkerDeploymentInfo", +}) as any as S.Schema; + +export interface DescribeWorkerDeploymentResponse { + /** This value is returned so that it can be optionally passed to APIs that write to the Worker Deployment state to ensure that the state did not change between this read and a future write. */ + conflictToken?: string; + workerDeploymentInfo?: WorkerDeploymentInfo; +} +export const DescribeWorkerDeploymentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + conflictToken: S.optional(S.String), + workerDeploymentInfo: S.optional(WorkerDeploymentInfo), + }), +).annotate({ + identifier: "DescribeWorkerDeploymentResponse", +}) as any as S.Schema; + +export interface DescribeWorkerDeploymentVersionRequest { + namespace: string; + deployment_version_deployment_name: string; + deployment_version_build_id: string; + /** Deprecated. Use `deployment_version`. */ + version?: string; + /** A unique identifier for this Version within the Deployment it is a part of. Not necessarily unique within the namespace. The combination of `deployment_name` and `build_id` uniquely identifies this Version within the namespace, because Deployment names are unique within a namespace. */ + deploymentVersion_buildId?: string; + /** Identifies the Worker Deployment this Version is part of. */ + deploymentVersion_deploymentName?: string; + /** Report stats for task queues which have been polled by this version. */ + reportTaskQueueStats?: boolean; +} +export const DescribeWorkerDeploymentVersionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deployment_version_deployment_name: S.String.pipe(T.Label()), + deployment_version_build_id: S.String.pipe(T.Label()), + version: S.optional(S.String.pipe(T.Query())), + deploymentVersion_buildId: S.optional( + S.String.pipe(T.Query("deploymentVersion.buildId")), + ), + deploymentVersion_deploymentName: S.optional( + S.String.pipe(T.Query("deploymentVersion.deploymentName")), + ), + reportTaskQueueStats: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}/{deployment_version_build_id}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeWorkerDeploymentVersionRequest", +}) as any as S.Schema; + +/** The status of the Worker Deployment Version. */ +export type WorkerDeploymentVersionInfoStatus = + | "WORKER_DEPLOYMENT_VERSION_STATUS_UNSPECIFIED" + | "WORKER_DEPLOYMENT_VERSION_STATUS_INACTIVE" + | "WORKER_DEPLOYMENT_VERSION_STATUS_CURRENT" + | "WORKER_DEPLOYMENT_VERSION_STATUS_RAMPING" + | "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINING" + | "WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED" + | "WORKER_DEPLOYMENT_VERSION_STATUS_CREATED"; +export const WorkerDeploymentVersionInfoStatus = /*@__PURE__*/ S.String; + +export type WorkerDeploymentVersionInfoVersionTaskQueueInfoType = + | "TASK_QUEUE_TYPE_UNSPECIFIED" + | "TASK_QUEUE_TYPE_WORKFLOW" + | "TASK_QUEUE_TYPE_ACTIVITY" + | "TASK_QUEUE_TYPE_NEXUS"; +export const WorkerDeploymentVersionInfoVersionTaskQueueInfoType = + /*@__PURE__*/ S.String; + +export interface WorkerDeploymentVersionInfoVersionTaskQueueInfo { + name?: string; + type?: WorkerDeploymentVersionInfoVersionTaskQueueInfoType; +} +export const WorkerDeploymentVersionInfoVersionTaskQueueInfo = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + type: S.optional(WorkerDeploymentVersionInfoVersionTaskQueueInfoType), + }), + ).annotate({ + identifier: "WorkerDeploymentVersionInfoVersionTaskQueueInfo", + }) as any as S.Schema; + +/** All the Task Queues that have ever polled from this Deployment version. Deprecated. Use `version_task_queues` in DescribeWorkerDeploymentVersionResponse instead. */ +export type WorkerDeploymentVersionInfoTaskQueueInfosList = + Array; +export const WorkerDeploymentVersionInfoTaskQueueInfosList = + /*@__PURE__*/ S.Array( + WorkerDeploymentVersionInfoVersionTaskQueueInfo, + ) as any as S.Schema; + +/** Arbitrary key-values. */ +export type VersionMetadataEntriesMap = { [key: string]: unknown | undefined }; +export const VersionMetadataEntriesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export interface VersionMetadata { + /** Arbitrary key-values. */ + entries?: VersionMetadataEntriesMap; +} +export const VersionMetadata = /*@__PURE__*/ S.suspend(() => + S.Struct({ + entries: S.optional(VersionMetadataEntriesMap), + }), +).annotate({ + identifier: "VersionMetadata", +}) as any as S.Schema; + +/** A Worker Deployment Version (Version, for short) represents all workers of the same code and config within a Deployment. Workers of the same Version are expected to behave exactly the same so when executions move between them there are no non-determinism issues. Worker Deployment Versions are created in Temporal server automatically when their first poller arrives to the server. */ +export interface WorkerDeploymentVersionInfo { + /** Deprecated. Use `deployment_version`. */ + version?: string; + /** The status of the Worker Deployment Version. */ + status?: WorkerDeploymentVersionInfoStatus; + /** Required. */ + deploymentVersion?: WorkerDeploymentVersion; + /** Deprecated. User deployment_version.deployment_name. */ + deploymentName?: string; + createTime?: string; + /** Last time `current_since_time`, `ramping_since_time, or `ramp_percentage` of this version changed. */ + routingChangedTime?: string; + /** (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) Unset if not current. */ + currentSinceTime?: string; + /** (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: 'Since' captures the field semantics despite being a preposition. --) Unset if not ramping. Updated when the version first starts ramping, not on each ramp change. */ + rampingSinceTime?: string; + /** Timestamp when this version first became current or ramping. */ + firstActivationTime?: string; + /** Timestamp when this version last became current. Can be used to determine whether a version has ever been Current. */ + lastCurrentTime?: string; + /** Timestamp when this version last stopped being current or ramping. Cleared if the version becomes current or ramping again. */ + lastDeactivationTime?: string; + /** Range: [0, 100]. Must be zero if the version is not ramping (i.e. `ramping_since_time` is nil). Can be in the range [0, 100] if the version is ramping. */ + rampPercentage?: number; + /** All the Task Queues that have ever polled from this Deployment version. Deprecated. Use `version_task_queues` in DescribeWorkerDeploymentVersionResponse instead. */ + taskQueueInfos?: WorkerDeploymentVersionInfoTaskQueueInfosList; + /** Helps user determine when it is safe to decommission the workers of this Version. Not present when version is current or ramping. Current limitations: - Not supported for Unversioned mode. - Periodically refreshed, may have delays up to few minutes (consult the last_checked_time value). - Refreshed only when version is not current or ramping AND the status is not "drained" yet. - Once the status is changed to "drained", it is not changed until the Version becomes Current or Ramping again, at which time the drainage info is cleared. This means if the Version is "drained" but new workflows are sent to it via Pinned Versioning Override, the status does not account for those Pinned-override executions and remains "drained". */ + drainageInfo?: VersionDrainageInfo; + /** Arbitrary user-provided metadata attached to this version. */ + metadata?: VersionMetadata; + /** Optional. Contains the new worker compute configuration for the Worker Deployment. Used for worker scale management. */ + computeConfig?: ComputeConfig; + /** Identity of the last client who modified the configuration of this Version. As of now, this field only covers changes through the following APIs: - `CreateWorkerDeploymentVersion` - `UpdateWorkerDeploymentVersionComputeConfig` - `UpdateWorkerDeploymentVersionMetadata` */ + lastModifierIdentity?: string; +} +export const WorkerDeploymentVersionInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + version: S.optional(S.String), + status: S.optional(WorkerDeploymentVersionInfoStatus), + deploymentVersion: S.optional(WorkerDeploymentVersion), + deploymentName: S.optional(S.String), + createTime: S.optional(S.String), + routingChangedTime: S.optional(S.String), + currentSinceTime: S.optional(S.String), + rampingSinceTime: S.optional(S.String), + firstActivationTime: S.optional(S.String), + lastCurrentTime: S.optional(S.String), + lastDeactivationTime: S.optional(S.String), + rampPercentage: S.optional(S.Number), + taskQueueInfos: S.optional(WorkerDeploymentVersionInfoTaskQueueInfosList), + drainageInfo: S.optional(VersionDrainageInfo), + metadata: S.optional(VersionMetadata), + computeConfig: S.optional(ComputeConfig), + lastModifierIdentity: S.optional(S.String), + }), +).annotate({ + identifier: "WorkerDeploymentVersionInfo", +}) as any as S.Schema; + +export type DescribeWorkerDeploymentVersionResponseVersionTaskQueueType = + | "TASK_QUEUE_TYPE_UNSPECIFIED" + | "TASK_QUEUE_TYPE_WORKFLOW" + | "TASK_QUEUE_TYPE_ACTIVITY" + | "TASK_QUEUE_TYPE_NEXUS"; +export const DescribeWorkerDeploymentVersionResponseVersionTaskQueueType = + /*@__PURE__*/ S.String; + +/** Task queue stats breakdown by priority key. Only contains actively used priority keys. Only set if `report_task_queue_stats` is set to true in the request. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "by" is used to clarify the key. --) */ +export type DescribeWorkerDeploymentVersionResponseVersionTaskQueueStatsByPriorityKeyMap = + { [key: string]: TaskQueueStats | undefined }; +export const DescribeWorkerDeploymentVersionResponseVersionTaskQueueStatsByPriorityKeyMap = + /*@__PURE__*/ S.Record( + S.String, + TaskQueueStats, + ) as any as S.Schema; + +export interface DescribeWorkerDeploymentVersionResponseVersionTaskQueue { + name?: string; + type?: DescribeWorkerDeploymentVersionResponseVersionTaskQueueType; + /** Only set if `report_task_queue_stats` is set on the request. */ + stats?: TaskQueueStats; + /** Task queue stats breakdown by priority key. Only contains actively used priority keys. Only set if `report_task_queue_stats` is set to true in the request. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "by" is used to clarify the key. --) */ + statsByPriorityKey?: DescribeWorkerDeploymentVersionResponseVersionTaskQueueStatsByPriorityKeyMap; +} +export const DescribeWorkerDeploymentVersionResponseVersionTaskQueue = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + type: S.optional( + DescribeWorkerDeploymentVersionResponseVersionTaskQueueType, + ), + stats: S.optional(TaskQueueStats), + statsByPriorityKey: S.optional( + DescribeWorkerDeploymentVersionResponseVersionTaskQueueStatsByPriorityKeyMap, + ), + }), + ).annotate({ + identifier: "DescribeWorkerDeploymentVersionResponseVersionTaskQueue", + }) as any as S.Schema; + +/** All the Task Queues that have ever polled from this Deployment version. */ +export type DescribeWorkerDeploymentVersionResponseVersionTaskQueuesList = + Array; +export const DescribeWorkerDeploymentVersionResponseVersionTaskQueuesList = + /*@__PURE__*/ S.Array( + DescribeWorkerDeploymentVersionResponseVersionTaskQueue, + ) as any as S.Schema; + +export interface DescribeWorkerDeploymentVersionResponse { + workerDeploymentVersionInfo?: WorkerDeploymentVersionInfo; + /** All the Task Queues that have ever polled from this Deployment version. */ + versionTaskQueues?: DescribeWorkerDeploymentVersionResponseVersionTaskQueuesList; +} +export const DescribeWorkerDeploymentVersionResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + workerDeploymentVersionInfo: S.optional(WorkerDeploymentVersionInfo), + versionTaskQueues: S.optional( + DescribeWorkerDeploymentVersionResponseVersionTaskQueuesList, + ), + }), +).annotate({ + identifier: "DescribeWorkerDeploymentVersionResponse", +}) as any as S.Schema; + +export interface DescribeWorkflowExecutionRequest { + namespace: string; + execution_workflow_id: string; + execution_workflowId?: string; + execution_runId?: string; +} +export const DescribeWorkflowExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + execution_workflow_id: S.String.pipe(T.Label()), + execution_workflowId: S.optional( + S.String.pipe(T.Query("execution.workflowId")), + ), + execution_runId: S.optional(S.String.pipe(T.Query("execution.runId"))), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/workflows/{execution_workflow_id}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeWorkflowExecutionRequest", +}) as any as S.Schema; + +export interface WorkflowExecutionConfig { + taskQueue?: TaskQueue; + workflowExecutionTimeout?: string; + workflowRunTimeout?: string; + defaultWorkflowTaskTimeout?: string; + /** User metadata provided on start workflow. */ + userMetadata?: UserMetadata; +} +export const WorkflowExecutionConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + taskQueue: S.optional(TaskQueue), + workflowExecutionTimeout: S.optional(S.String), + workflowRunTimeout: S.optional(S.String), + defaultWorkflowTaskTimeout: S.optional(S.String), + userMetadata: S.optional(UserMetadata), + }), +).annotate({ + identifier: "WorkflowExecutionConfig", +}) as any as S.Schema; + +export type WorkflowExecutionInfoStatus = + | "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED" + | "WORKFLOW_EXECUTION_STATUS_RUNNING" + | "WORKFLOW_EXECUTION_STATUS_COMPLETED" + | "WORKFLOW_EXECUTION_STATUS_FAILED" + | "WORKFLOW_EXECUTION_STATUS_CANCELED" + | "WORKFLOW_EXECUTION_STATUS_TERMINATED" + | "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW" + | "WORKFLOW_EXECUTION_STATUS_TIMED_OUT" + | "WORKFLOW_EXECUTION_STATUS_PAUSED"; +export const WorkflowExecutionInfoStatus = /*@__PURE__*/ S.String; + +/** ResetPointInfo records the workflow event id that is the first one processed by a given build id or binary checksum. A new reset point will be created if either build id or binary checksum changes (although in general only one or the other will be used at a time). */ +export interface ResetPointInfo { + /** Worker build id. */ + buildId?: string; + /** Deprecated. A worker binary version identifier. */ + binaryChecksum?: string; + /** The first run ID in the execution chain that was touched by this worker build. */ + runId?: string; + /** Event ID of the first WorkflowTaskCompleted event processed by this worker build. */ + firstWorkflowTaskCompletedId?: string; + createTime?: string; + /** (-- api-linter: core::0214::resource-expiry=disabled aip.dev/not-precedent: TTL is not defined for ResetPointInfo. --) The time that the run is deleted due to retention. */ + expireTime?: string; + /** false if the reset point has pending childWFs/reqCancels/signalExternals. */ + resettable?: boolean; +} +export const ResetPointInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + buildId: S.optional(S.String), + binaryChecksum: S.optional(S.String), + runId: S.optional(S.String), + firstWorkflowTaskCompletedId: S.optional(S.String), + createTime: S.optional(S.String), + expireTime: S.optional(S.String), + resettable: S.optional(S.Boolean), + }), +).annotate({ identifier: "ResetPointInfo" }) as any as S.Schema; + +export type ResetPointsPointsList = Array; +export const ResetPointsPointsList = /*@__PURE__*/ S.Array( + ResetPointInfo, +) as any as S.Schema; + +export interface ResetPoints { + points?: ResetPointsPointsList; +} +export const ResetPoints = /*@__PURE__*/ S.suspend(() => + S.Struct({ + points: S.optional(ResetPointsPointsList), + }), +).annotate({ identifier: "ResetPoints" }) as any as S.Schema; + +/** Deprecated. This message is replaced with `Deployment` and `VersioningBehavior`. Identifies the version(s) of a worker that processed a task */ +export interface WorkerVersionStamp { + /** An opaque whole-worker identifier. Replaces the deprecated `binary_checksum` field when this message is included in requests which previously used that. */ + buildId?: string; + /** If set, the worker is opting in to worker versioning. Otherwise, this is used only as a marker for workflow reset points and the BuildIDs search attribute. */ + useVersioning?: boolean; +} +export const WorkerVersionStamp = /*@__PURE__*/ S.suspend(() => + S.Struct({ + buildId: S.optional(S.String), + useVersioning: S.optional(S.Boolean), + }), +).annotate({ + identifier: "WorkerVersionStamp", +}) as any as S.Schema; + +/** Versioning behavior determines how the server should treat this execution when workers are upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means unversioned. See the comments in `VersioningBehavior` enum for more info about different behaviors. Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning Behavior and Version (except when the new execution runs on a task queue not belonging to the same deployment version as the parent/previous run's task queue). The first workflow task will be dispatched according to the inherited behavior (or to the current version of the task-queue's deployment in the case of AutoUpgrade.) After completion of their first workflow task the Deployment Version and Behavior of the execution will update according to configuration on the worker. Note that `behavior` is overridden by `versioning_override` if the latter is present. */ +export type WorkflowExecutionVersioningInfoBehavior = + | "VERSIONING_BEHAVIOR_UNSPECIFIED" + | "VERSIONING_BEHAVIOR_PINNED" + | "VERSIONING_BEHAVIOR_AUTO_UPGRADE"; +export const WorkflowExecutionVersioningInfoBehavior = /*@__PURE__*/ S.String; + +/** Holds information about ongoing transition of a workflow execution from one deployment to another. Deprecated. Use DeploymentVersionTransition. */ +export interface DeploymentTransition { + /** The target deployment of the transition. Null means a so-far-versioned workflow is transitioning to unversioned workers. */ + deployment?: Deployment; +} +export const DeploymentTransition = /*@__PURE__*/ S.suspend(() => + S.Struct({ + deployment: S.optional(Deployment), + }), +).annotate({ + identifier: "DeploymentTransition", +}) as any as S.Schema; + +/** Holds information about ongoing transition of a workflow execution from one worker deployment version to another. Experimental. Might change in the future. */ +export interface DeploymentVersionTransition { + /** Deprecated. Use `deployment_version`. */ + version?: string; + /** The target Version of the transition. If nil, a so-far-versioned workflow is transitioning to unversioned workers. */ + deploymentVersion?: WorkerDeploymentVersion; +} +export const DeploymentVersionTransition = /*@__PURE__*/ S.suspend(() => + S.Struct({ + version: S.optional(S.String), + deploymentVersion: S.optional(WorkerDeploymentVersion), + }), +).annotate({ + identifier: "DeploymentVersionTransition", +}) as any as S.Schema; + +/** Experimental. If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior specified in that command. Only used for the initial task of this run and the initial task of any retries of this run. Not passed to children or to future continue-as-new. Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility with ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent to ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade. */ +export type WorkflowExecutionVersioningInfoContinueAsNewInitialVersioningBehavior = + | "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED" + | "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE" + | "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION"; +export const WorkflowExecutionVersioningInfoContinueAsNewInitialVersioningBehavior = + /*@__PURE__*/ S.String; + +/** Holds all the information about worker versioning for a particular workflow execution. Experimental. Versioning info is experimental and might change in the future. */ +export interface WorkflowExecutionVersioningInfo { + /** Versioning behavior determines how the server should treat this execution when workers are upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means unversioned. See the comments in `VersioningBehavior` enum for more info about different behaviors. Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning Behavior and Version (except when the new execution runs on a task queue not belonging to the same deployment version as the parent/previous run's task queue). The first workflow task will be dispatched according to the inherited behavior (or to the current version of the task-queue's deployment in the case of AutoUpgrade.) After completion of their first workflow task the Deployment Version and Behavior of the execution will update according to configuration on the worker. Note that `behavior` is overridden by `versioning_override` if the latter is present. */ + behavior?: WorkflowExecutionVersioningInfoBehavior; + /** The worker deployment that completed the last workflow task of this workflow execution. Must be present if `behavior` is set. Absent value means no workflow task is completed, or the last workflow task was completed by an unversioned worker. Unversioned workers may still send a deployment value which will be stored here, so the right way to check if an execution is versioned if an execution is versioned or not is via the `behavior` field. Note that `deployment` is overridden by `versioning_override` if the latter is present. Deprecated. Use `deployment_version`. */ + deployment?: Deployment; + /** Deprecated. Use `deployment_version`. */ + version?: string; + /** The Worker Deployment Version that completed the last workflow task of this workflow execution. An absent value means no workflow task is completed, or the workflow is unversioned. If present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed by a worker that is not using versioning but _is_ passing Deployment Name and Build ID. Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning Behavior and Version (except when the new execution runs on a task queue not belonging to the same deployment version as the parent/previous run's task queue). The first workflow task will be dispatched according to the inherited behavior (or to the current version of the task-queue's deployment in the case of AutoUpgrade.) After completion of their first workflow task the Deployment Version and Behavior of the execution will update according to configuration on the worker. Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version` will override this value. */ + deploymentVersion?: WorkerDeploymentVersion; + /** Present if user has set an execution-specific versioning override. This override takes precedence over SDK-sent `behavior` (and `version` when override is PINNED). An override can be set when starting a new execution, as well as afterwards by calling the `UpdateWorkflowExecutionOptions` API. Pinned overrides are automatically inherited by child workflows, continue-as-new workflows, workflow retries, and cron workflows. */ + versioningOverride?: VersioningOverride; + /** When present, indicates the workflow is transitioning to a different deployment. Can indicate one of the following transitions: unversioned -> versioned, versioned -> versioned on a different deployment, or versioned -> unversioned. Not applicable to workflows with PINNED behavior. When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically start a transition to the task queue's current deployment if the task queue's current deployment is different from the workflow's deployment. If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those tasks will be redirected to the task queue's current deployment. As soon as a poller from that deployment is available to receive the task, the workflow will automatically start a transition to that deployment and continue execution there. A deployment transition can only exist while there is a pending or started workflow task. Once the pending workflow task completes on the transition's target deployment, the transition completes and the workflow's `deployment` and `behavior` fields are updated per the worker's task completion response. Pending activities will not start new attempts during a transition. Once the transition is completed, pending activities will start their next attempt on the new deployment. Deprecated. Use version_transition. */ + deploymentTransition?: DeploymentTransition; + /** When present, indicates the workflow is transitioning to a different deployment version (which may belong to the same deployment name or another). Can indicate one of the following transitions: unversioned -> versioned, versioned -> versioned on a different deployment version, or versioned -> unversioned. Not applicable to workflows with PINNED behavior. When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically start a transition to the task queue's current version if the task queue's current version is different from the workflow's current deployment version. If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those tasks will be redirected to the task queue's current version. As soon as a poller from that deployment version is available to receive the task, the workflow will automatically start a transition to that version and continue execution there. A version transition can only exist while there is a pending or started workflow task. Once the pending workflow task completes on the transition's target version, the transition completes and the workflow's `behavior`, and `deployment_version` fields are updated per the worker's task completion response. Pending activities will not start new attempts during a transition. Once the transition is completed, pending activities will start their next attempt on the new version. */ + versionTransition?: DeploymentVersionTransition; + /** Monotonic counter reflecting the latest routing decision for this workflow execution. Used for staleness detection between history and matching when dispatching tasks to workers. Incremented when a workflow execution routes to a new deployment version, which happens when a worker of the new deployment version completes a workflow task. Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not face the problem of inconsistent dispatching that arises from eventual consistency between task queues and their partitions. */ + revisionNumber?: string; + /** Experimental. If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior specified in that command. Only used for the initial task of this run and the initial task of any retries of this run. Not passed to children or to future continue-as-new. Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility with ContinueAsNew history commands generated during that time, know that an UNSPECIFIED value here is equivalent to ContinueAsNewVersioningBehaviorAutoUpgrade if the behavior of the workflow is AutoUpgrade. */ + continueAsNewInitialVersioningBehavior?: WorkflowExecutionVersioningInfoContinueAsNewInitialVersioningBehavior; +} +export const WorkflowExecutionVersioningInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + behavior: S.optional(WorkflowExecutionVersioningInfoBehavior), + deployment: S.optional(Deployment), + version: S.optional(S.String), + deploymentVersion: S.optional(WorkerDeploymentVersion), + versioningOverride: S.optional(VersioningOverride), + deploymentTransition: S.optional(DeploymentTransition), + versionTransition: S.optional(DeploymentVersionTransition), + revisionNumber: S.optional(S.String), + continueAsNewInitialVersioningBehavior: S.optional( + WorkflowExecutionVersioningInfoContinueAsNewInitialVersioningBehavior, + ), + }), +).annotate({ + identifier: "WorkflowExecutionVersioningInfo", +}) as any as S.Schema; + +/** Hold basic information about a workflow execution. This structure is a part of visibility, and thus contain a limited subset of information. */ +export interface WorkflowExecutionInfo { + execution?: WorkflowExecution; + type?: WorkflowType; + startTime?: string; + closeTime?: string; + status?: WorkflowExecutionInfoStatus; + historyLength?: string; + parentNamespaceId?: string; + parentExecution?: WorkflowExecution; + executionTime?: string; + memo?: Memo; + searchAttributes?: SearchAttributes; + autoResetPoints?: ResetPoints; + taskQueue?: string; + stateTransitionCount?: string; + historySizeBytes?: string; + /** If set, the most recent worker version stamp that appeared in a workflow task completion Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + mostRecentWorkerVersionStamp?: WorkerVersionStamp; + /** Workflow execution duration is defined as difference between close time and execution time. This field is only populated if the workflow is closed. */ + executionDuration?: string; + /** Contains information about the root workflow execution. The root workflow execution is defined as follows: 1. A workflow without parent workflow is its own root workflow. 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. Note: workflows continued as new or reseted may or may not have parents, check examples below. Examples: Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. - The root workflow of all three workflows is W1. Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. - The root workflow of all three workflows is W1. Scenario 3: Workflow W1 continued as new W2. - The root workflow of W1 is W1 and the root workflow of W2 is W2. Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 - The root workflow of all three workflows is W1. Scenario 5: Workflow W1 is reseted, creating W2. - The root workflow of W1 is W1 and the root workflow of W2 is W2. */ + rootExecution?: WorkflowExecution; + /** The currently assigned build ID for this execution. Presence of this value means worker versioning is used for this execution. Assigned build ID is selected based on Worker Versioning Assignment Rules when the first workflow task of the execution is scheduled. If the first workflow task fails and is scheduled again, the assigned build ID may change according to the latest versioning rules. Assigned build ID can also change in the middle of a execution if Compatible Redirect Rules are applied to this execution. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + assignedBuildId?: string; + /** Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead of using the assignment rules. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + inheritedBuildId?: string; + /** The first run ID in the execution chain. Executions created via the following operations are considered to be in the same chain - ContinueAsNew - Workflow Retry - Workflow Reset - Cron Schedule */ + firstRunId?: string; + /** Absent value means the workflow execution is not versioned. When present, the execution might be versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`. Experimental. Versioning info is experimental and might change in the future. */ + versioningInfo?: WorkflowExecutionVersioningInfo; + /** The name of Worker Deployment that completed the most recent workflow task. */ + workerDeploymentName?: string; + /** Priority metadata */ + priority?: Priority; + /** Total size in bytes of all external payloads referenced in workflow history. */ + externalPayloadSizeBytes?: string; + /** Count of external payloads referenced in workflow history. */ + externalPayloadCount?: string; +} +export const WorkflowExecutionInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + execution: S.optional(WorkflowExecution), + type: S.optional(WorkflowType), + startTime: S.optional(S.String), + closeTime: S.optional(S.String), + status: S.optional(WorkflowExecutionInfoStatus), + historyLength: S.optional(S.String), + parentNamespaceId: S.optional(S.String), + parentExecution: S.optional(WorkflowExecution), + executionTime: S.optional(S.String), + memo: S.optional(Memo), + searchAttributes: S.optional(SearchAttributes), + autoResetPoints: S.optional(ResetPoints), + taskQueue: S.optional(S.String), + stateTransitionCount: S.optional(S.String), + historySizeBytes: S.optional(S.String), + mostRecentWorkerVersionStamp: S.optional(WorkerVersionStamp), + executionDuration: S.optional(S.String), + rootExecution: S.optional(WorkflowExecution), + assignedBuildId: S.optional(S.String), + inheritedBuildId: S.optional(S.String), + firstRunId: S.optional(S.String), + versioningInfo: S.optional(WorkflowExecutionVersioningInfo), + workerDeploymentName: S.optional(S.String), + priority: S.optional(Priority), + externalPayloadSizeBytes: S.optional(S.String), + externalPayloadCount: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowExecutionInfo", +}) as any as S.Schema; + +export type PendingActivityInfoState = + | "PENDING_ACTIVITY_STATE_UNSPECIFIED" + | "PENDING_ACTIVITY_STATE_SCHEDULED" + | "PENDING_ACTIVITY_STATE_STARTED" + | "PENDING_ACTIVITY_STATE_CANCEL_REQUESTED" + | "PENDING_ACTIVITY_STATE_PAUSED" + | "PENDING_ACTIVITY_STATE_PAUSE_REQUESTED"; +export const PendingActivityInfoState = /*@__PURE__*/ S.String; + +export interface PauseInfoManual { + /** The identity of the actor that paused the activity. */ + identity?: string; + /** Reason for pausing the activity. */ + reason?: string; +} +export const PauseInfoManual = /*@__PURE__*/ S.suspend(() => + S.Struct({ + identity: S.optional(S.String), + reason: S.optional(S.String), + }), +).annotate({ + identifier: "PauseInfoManual", +}) as any as S.Schema; + +export interface PauseInfoRule { + /** The rule that paused the activity. */ + ruleId?: string; + /** The identity of the actor that created the rule. */ + identity?: string; + /** Reason why rule was created. Populated from rule description. */ + reason?: string; +} +export const PauseInfoRule = /*@__PURE__*/ S.suspend(() => + S.Struct({ + ruleId: S.optional(S.String), + identity: S.optional(S.String), + reason: S.optional(S.String), + }), +).annotate({ identifier: "PauseInfoRule" }) as any as S.Schema; + +export interface PendingActivityInfoPauseInfo { + /** The time when the activity was paused. */ + pauseTime?: string; + /** activity was paused by the manual intervention */ + manual?: PauseInfoManual; + /** activity was paused by the rule */ + rule?: PauseInfoRule; +} +export const PendingActivityInfoPauseInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pauseTime: S.optional(S.String), + manual: S.optional(PauseInfoManual), + rule: S.optional(PauseInfoRule), + }), +).annotate({ + identifier: "PendingActivityInfoPauseInfo", +}) as any as S.Schema; + +export interface ActivityOptions { + taskQueue?: TaskQueue; + /** Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted. Either this or `start_to_close_timeout` must be specified. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToCloseTimeout?: string; + /** Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is to put it back into the same queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not specified. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToStartTimeout?: string; + /** Maximum time an activity is allowed to execute after being picked up by a worker. This timeout is always retryable. Either this or `schedule_to_close_timeout` must be specified. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + startToCloseTimeout?: string; + /** Maximum permitted time between successful worker heartbeats. */ + heartbeatTimeout?: string; + /** The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. */ + retryPolicy?: RetryPolicy; + /** Priority metadata. If this message is not present, or any fields are not present, they inherit the values from the workflow. */ + priority?: Priority; +} +export const ActivityOptions = /*@__PURE__*/ S.suspend(() => + S.Struct({ + taskQueue: S.optional(TaskQueue), + scheduleToCloseTimeout: S.optional(S.String), + scheduleToStartTimeout: S.optional(S.String), + startToCloseTimeout: S.optional(S.String), + heartbeatTimeout: S.optional(S.String), + retryPolicy: S.optional(RetryPolicy), + priority: S.optional(Priority), + }), +).annotate({ + identifier: "ActivityOptions", +}) as any as S.Schema; + +export interface PendingActivityInfo { + activityId?: string; + activityType?: WorkflowType; + state?: PendingActivityInfoState; + heartbeatDetails?: Payloads; + lastHeartbeatTime?: string; + lastStartedTime?: string; + attempt?: number; + maximumAttempts?: number; + scheduledTime?: string; + expirationTime?: string; + lastFailure?: Failure; + lastWorkerIdentity?: string; + /** Deprecated. This means the activity is independently versioned and not bound to the build ID of its workflow. The activity will use the build id in this field instead. If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning rules. */ + lastIndependentlyAssignedBuildId?: string; + /** Deprecated. The version stamp of the worker to whom this activity was most recently dispatched This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + lastWorkerVersionStamp?: WorkerVersionStamp; + /** The time activity will wait until the next retry. If activity is currently running it will be next retry interval if activity failed. If activity is currently waiting it will be current retry interval. If there will be no retry it will be null. */ + currentRetryInterval?: string; + /** The time when the last activity attempt was completed. If activity has not been completed yet then it will be null. */ + lastAttemptCompleteTime?: string; + /** Next time when activity will be scheduled. If activity is currently scheduled or started it will be null. */ + nextAttemptScheduleTime?: string; + /** Indicates if activity is paused. */ + paused?: boolean; + /** The deployment this activity was dispatched to most recently. Present only if the activity was dispatched to a versioned worker. Deprecated. Use `last_deployment_version`. */ + lastDeployment?: Deployment; + /** The Worker Deployment Version this activity was dispatched to most recently. Deprecated. Use `last_deployment_version`. */ + lastWorkerDeploymentVersion?: string; + /** The Worker Deployment Version this activity was dispatched to most recently. If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. */ + lastDeploymentVersion?: WorkerDeploymentVersion; + /** Priority metadata. If this message is not present, or any fields are not present, they inherit the values from the workflow. */ + priority?: Priority; + pauseInfo?: PendingActivityInfoPauseInfo; + /** Current activity options. May be different from the one used to start the activity. */ + activityOptions?: ActivityOptions; +} +export const PendingActivityInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + activityId: S.optional(S.String), + activityType: S.optional(WorkflowType), + state: S.optional(PendingActivityInfoState), + heartbeatDetails: S.optional(Payloads), + lastHeartbeatTime: S.optional(S.String), + lastStartedTime: S.optional(S.String), + attempt: S.optional(S.Number), + maximumAttempts: S.optional(S.Number), + scheduledTime: S.optional(S.String), + expirationTime: S.optional(S.String), + lastFailure: S.optional(Failure), + lastWorkerIdentity: S.optional(S.String), + lastIndependentlyAssignedBuildId: S.optional(S.String), + lastWorkerVersionStamp: S.optional(WorkerVersionStamp), + currentRetryInterval: S.optional(S.String), + lastAttemptCompleteTime: S.optional(S.String), + nextAttemptScheduleTime: S.optional(S.String), + paused: S.optional(S.Boolean), + lastDeployment: S.optional(Deployment), + lastWorkerDeploymentVersion: S.optional(S.String), + lastDeploymentVersion: S.optional(WorkerDeploymentVersion), + priority: S.optional(Priority), + pauseInfo: S.optional(PendingActivityInfoPauseInfo), + activityOptions: S.optional(ActivityOptions), + }), +).annotate({ + identifier: "PendingActivityInfo", +}) as any as S.Schema; + +export type DescribeWorkflowExecutionResponsePendingActivitiesList = + Array; +export const DescribeWorkflowExecutionResponsePendingActivitiesList = + /*@__PURE__*/ S.Array( + PendingActivityInfo, + ) as any as S.Schema; + +/** Default: PARENT_CLOSE_POLICY_TERMINATE. */ +export type PendingChildExecutionInfoParentClosePolicy = + | "PARENT_CLOSE_POLICY_UNSPECIFIED" + | "PARENT_CLOSE_POLICY_TERMINATE" + | "PARENT_CLOSE_POLICY_ABANDON" + | "PARENT_CLOSE_POLICY_REQUEST_CANCEL"; +export const PendingChildExecutionInfoParentClosePolicy = + /*@__PURE__*/ S.String; + +export interface PendingChildExecutionInfo { + workflowId?: string; + runId?: string; + workflowTypeName?: string; + initiatedId?: string; + /** Default: PARENT_CLOSE_POLICY_TERMINATE. */ + parentClosePolicy?: PendingChildExecutionInfoParentClosePolicy; +} +export const PendingChildExecutionInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowId: S.optional(S.String), + runId: S.optional(S.String), + workflowTypeName: S.optional(S.String), + initiatedId: S.optional(S.String), + parentClosePolicy: S.optional(PendingChildExecutionInfoParentClosePolicy), + }), +).annotate({ + identifier: "PendingChildExecutionInfo", +}) as any as S.Schema; + +export type DescribeWorkflowExecutionResponsePendingChildrenList = + Array; +export const DescribeWorkflowExecutionResponsePendingChildrenList = + /*@__PURE__*/ S.Array( + PendingChildExecutionInfo, + ) as any as S.Schema; + +export type PendingWorkflowTaskInfoState = + | "PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED" + | "PENDING_WORKFLOW_TASK_STATE_SCHEDULED" + | "PENDING_WORKFLOW_TASK_STATE_STARTED"; +export const PendingWorkflowTaskInfoState = /*@__PURE__*/ S.String; + +export interface PendingWorkflowTaskInfo { + state?: PendingWorkflowTaskInfoState; + scheduledTime?: string; + /** original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat. Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds some threshold, the workflow task will be forced timeout. */ + originalScheduledTime?: string; + startedTime?: string; + attempt?: number; +} +export const PendingWorkflowTaskInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + state: S.optional(PendingWorkflowTaskInfoState), + scheduledTime: S.optional(S.String), + originalScheduledTime: S.optional(S.String), + startedTime: S.optional(S.String), + attempt: S.optional(S.Number), + }), +).annotate({ + identifier: "PendingWorkflowTaskInfo", +}) as any as S.Schema; + +export type DescribeWorkflowExecutionResponseCallbacksList = + Array; +export const DescribeWorkflowExecutionResponseCallbacksList = + /*@__PURE__*/ S.Array( + CallbackInfo, + ) as any as S.Schema; + +export type PendingNexusOperationInfoState = + | "PENDING_NEXUS_OPERATION_STATE_UNSPECIFIED" + | "PENDING_NEXUS_OPERATION_STATE_SCHEDULED" + | "PENDING_NEXUS_OPERATION_STATE_BACKING_OFF" + | "PENDING_NEXUS_OPERATION_STATE_STARTED" + | "PENDING_NEXUS_OPERATION_STATE_BLOCKED"; +export const PendingNexusOperationInfoState = /*@__PURE__*/ S.String; + +export type NexusOperationCancellationInfoState = + | "NEXUS_OPERATION_CANCELLATION_STATE_UNSPECIFIED" + | "NEXUS_OPERATION_CANCELLATION_STATE_SCHEDULED" + | "NEXUS_OPERATION_CANCELLATION_STATE_BACKING_OFF" + | "NEXUS_OPERATION_CANCELLATION_STATE_SUCCEEDED" + | "NEXUS_OPERATION_CANCELLATION_STATE_FAILED" + | "NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT" + | "NEXUS_OPERATION_CANCELLATION_STATE_BLOCKED"; +export const NexusOperationCancellationInfoState = /*@__PURE__*/ S.String; + +/** NexusOperationCancellationInfo contains the state of a nexus operation cancellation. */ +export interface NexusOperationCancellationInfo { + /** The time when cancellation was requested. */ + requestedTime?: string; + state?: NexusOperationCancellationInfoState; + /** The number of attempts made to deliver the cancel operation request. This number represents a minimum bound since the attempt is incremented after the request completes. */ + attempt?: number; + /** The time when the last attempt completed. */ + lastAttemptCompleteTime?: string; + /** The last attempt's failure, if any. */ + lastAttemptFailure?: Failure; + /** The time when the next attempt is scheduled. */ + nextAttemptScheduleTime?: string; + /** If the state is BLOCKED, blocked reason provides additional information. */ + blockedReason?: string; +} +export const NexusOperationCancellationInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + requestedTime: S.optional(S.String), + state: S.optional(NexusOperationCancellationInfoState), + attempt: S.optional(S.Number), + lastAttemptCompleteTime: S.optional(S.String), + lastAttemptFailure: S.optional(Failure), + nextAttemptScheduleTime: S.optional(S.String), + blockedReason: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationCancellationInfo", +}) as any as S.Schema; + +/** PendingNexusOperationInfo contains the state of a pending Nexus operation. */ +export interface PendingNexusOperationInfo { + /** Endpoint name. Resolved to a URL via the cluster's endpoint registry. */ + endpoint?: string; + /** Service name. */ + service?: string; + /** Operation name. */ + operation?: string; + /** Operation ID. Only set for asynchronous operations after a successful StartOperation call. Deprecated. Renamed to operation_token. */ + operationId?: string; + /** Schedule-to-close timeout for this operation. This is the only timeout settable by a workflow. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToCloseTimeout?: string; + /** The time when the operation was scheduled. */ + scheduledTime?: string; + state?: PendingNexusOperationInfoState; + /** The number of attempts made to deliver the start operation request. This number is approximate, it is incremented when a task is added to the history queue. In practice, there could be more attempts if a task is executed but fails to commit, or less attempts if a task was never executed. */ + attempt?: number; + /** The time when the last attempt completed. */ + lastAttemptCompleteTime?: string; + /** The last attempt's failure, if any. */ + lastAttemptFailure?: Failure; + /** The time when the next attempt is scheduled. */ + nextAttemptScheduleTime?: string; + cancellationInfo?: NexusOperationCancellationInfo; + /** The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the DescribeWorkflowExecution response with workflow history. */ + scheduledEventId?: string; + /** If the state is BLOCKED, blocked reason provides additional information. */ + blockedReason?: string; + /** Operation token. Only set for asynchronous operations after a successful StartOperation call. */ + operationToken?: string; + /** Schedule-to-start timeout for this operation. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToStartTimeout?: string; + /** Start-to-close timeout for this operation. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + startToCloseTimeout?: string; +} +export const PendingNexusOperationInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + endpoint: S.optional(S.String), + service: S.optional(S.String), + operation: S.optional(S.String), + operationId: S.optional(S.String), + scheduleToCloseTimeout: S.optional(S.String), + scheduledTime: S.optional(S.String), + state: S.optional(PendingNexusOperationInfoState), + attempt: S.optional(S.Number), + lastAttemptCompleteTime: S.optional(S.String), + lastAttemptFailure: S.optional(Failure), + nextAttemptScheduleTime: S.optional(S.String), + cancellationInfo: S.optional(NexusOperationCancellationInfo), + scheduledEventId: S.optional(S.String), + blockedReason: S.optional(S.String), + operationToken: S.optional(S.String), + scheduleToStartTimeout: S.optional(S.String), + startToCloseTimeout: S.optional(S.String), + }), +).annotate({ + identifier: "PendingNexusOperationInfo", +}) as any as S.Schema; + +export type DescribeWorkflowExecutionResponsePendingNexusOperationsList = + Array; +export const DescribeWorkflowExecutionResponsePendingNexusOperationsList = + /*@__PURE__*/ S.Array( + PendingNexusOperationInfo, + ) as any as S.Schema; + +/** The event type of the history event generated by the request. */ +export type RequestIdInfoEventType = + | "EVENT_TYPE_UNSPECIFIED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT" + | "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED" + | "EVENT_TYPE_WORKFLOW_TASK_STARTED" + | "EVENT_TYPE_WORKFLOW_TASK_COMPLETED" + | "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT" + | "EVENT_TYPE_WORKFLOW_TASK_FAILED" + | "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED" + | "EVENT_TYPE_ACTIVITY_TASK_STARTED" + | "EVENT_TYPE_ACTIVITY_TASK_COMPLETED" + | "EVENT_TYPE_ACTIVITY_TASK_FAILED" + | "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT" + | "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED" + | "EVENT_TYPE_ACTIVITY_TASK_CANCELED" + | "EVENT_TYPE_TIMER_STARTED" + | "EVENT_TYPE_TIMER_FIRED" + | "EVENT_TYPE_TIMER_CANCELED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED" + | "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + | "EVENT_TYPE_MARKER_RECORDED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW" + | "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED" + | "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED" + | "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED" + | "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY" + | "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY" + | "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED" + | "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED" + | "EVENT_TYPE_NEXUS_OPERATION_STARTED" + | "EVENT_TYPE_NEXUS_OPERATION_COMPLETED" + | "EVENT_TYPE_NEXUS_OPERATION_FAILED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCELED" + | "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED"; +export const RequestIdInfoEventType = /*@__PURE__*/ S.String; + +/** RequestIdInfo contains details of a request ID. */ +export interface RequestIdInfo { + /** The event type of the history event generated by the request. */ + eventType?: RequestIdInfoEventType; + /** The event id of the history event generated by the request. It's possible the event ID is not known (unflushed buffered event). In this case, the value will be zero or a negative value, representing an invalid ID. */ + eventId?: string; + /** Indicate if the request is still buffered. If so, the event ID is not known and its value will be an invalid event ID. */ + buffered?: boolean; +} +export const RequestIdInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + eventType: S.optional(RequestIdInfoEventType), + eventId: S.optional(S.String), + buffered: S.optional(S.Boolean), + }), +).annotate({ identifier: "RequestIdInfo" }) as any as S.Schema; + +/** Request ID information (eg: history event information associated with the request ID). Note: It only contains request IDs from StartWorkflowExecution requests, including indirect calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is used in the StartWorkflowExecution request). */ +export type WorkflowExecutionExtendedInfoRequestIdInfosMap = { + [key: string]: RequestIdInfo | undefined; +}; +export const WorkflowExecutionExtendedInfoRequestIdInfosMap = + /*@__PURE__*/ S.Record( + S.String, + RequestIdInfo, + ) as any as S.Schema; + +/** WorkflowExecutionPauseInfo contains the information about a workflow execution pause. */ +export interface WorkflowExecutionPauseInfo { + /** The identity of the client who paused the workflow execution. */ + identity?: string; + /** The time when the workflow execution was paused. */ + pausedTime?: string; + /** The reason for pausing the workflow execution. */ + reason?: string; +} +export const WorkflowExecutionPauseInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + identity: S.optional(S.String), + pausedTime: S.optional(S.String), + reason: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowExecutionPauseInfo", +}) as any as S.Schema; + +/** Holds all the extra information about workflow execution that is not part of Visibility. */ +export interface WorkflowExecutionExtendedInfo { + /** Workflow execution expiration time is defined as workflow start time plus expiration timeout. Workflow start time may change after workflow reset. */ + executionExpirationTime?: string; + /** Workflow run expiration time is defined as current workflow run start time plus workflow run timeout. */ + runExpirationTime?: string; + /** indicates if the workflow received a cancel request */ + cancelRequested?: boolean; + /** Last workflow reset time. Nil if the workflow was never reset. */ + lastResetTime?: string; + /** Original workflow start time. */ + originalStartTime?: string; + /** Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run. */ + resetRunId?: string; + /** Request ID information (eg: history event information associated with the request ID). Note: It only contains request IDs from StartWorkflowExecution requests, including indirect calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is used in the StartWorkflowExecution request). */ + requestIdInfos?: WorkflowExecutionExtendedInfoRequestIdInfosMap; + /** Information about the workflow execution pause operation. */ + pauseInfo?: WorkflowExecutionPauseInfo; +} +export const WorkflowExecutionExtendedInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + executionExpirationTime: S.optional(S.String), + runExpirationTime: S.optional(S.String), + cancelRequested: S.optional(S.Boolean), + lastResetTime: S.optional(S.String), + originalStartTime: S.optional(S.String), + resetRunId: S.optional(S.String), + requestIdInfos: S.optional(WorkflowExecutionExtendedInfoRequestIdInfosMap), + pauseInfo: S.optional(WorkflowExecutionPauseInfo), + }), +).annotate({ + identifier: "WorkflowExecutionExtendedInfo", +}) as any as S.Schema; + +export interface DescribeWorkflowExecutionResponse { + executionConfig?: WorkflowExecutionConfig; + workflowExecutionInfo?: WorkflowExecutionInfo; + pendingActivities?: DescribeWorkflowExecutionResponsePendingActivitiesList; + pendingChildren?: DescribeWorkflowExecutionResponsePendingChildrenList; + pendingWorkflowTask?: PendingWorkflowTaskInfo; + callbacks?: DescribeWorkflowExecutionResponseCallbacksList; + pendingNexusOperations?: DescribeWorkflowExecutionResponsePendingNexusOperationsList; + workflowExtendedInfo?: WorkflowExecutionExtendedInfo; +} +export const DescribeWorkflowExecutionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + executionConfig: S.optional(WorkflowExecutionConfig), + workflowExecutionInfo: S.optional(WorkflowExecutionInfo), + pendingActivities: S.optional( + DescribeWorkflowExecutionResponsePendingActivitiesList, + ), + pendingChildren: S.optional( + DescribeWorkflowExecutionResponsePendingChildrenList, + ), + pendingWorkflowTask: S.optional(PendingWorkflowTaskInfo), + callbacks: S.optional(DescribeWorkflowExecutionResponseCallbacksList), + pendingNexusOperations: S.optional( + DescribeWorkflowExecutionResponsePendingNexusOperationsList, + ), + workflowExtendedInfo: S.optional(WorkflowExecutionExtendedInfo), + }), +).annotate({ + identifier: "DescribeWorkflowExecutionResponse", +}) as any as S.Schema; + +export interface DescribeWorkflowRuleRequest { + namespace: string; + /** User-specified ID of the rule to read. Unique within the namespace. */ + ruleId: string; +} +export const DescribeWorkflowRuleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + ruleId: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/workflow-rules/{ruleId}", + code: 200, + }), + ), +).annotate({ + identifier: "DescribeWorkflowRuleRequest", +}) as any as S.Schema; + +export interface DescribeWorkflowRuleResponse { + /** The rule that was read. */ + rule?: WorkflowRule; +} +export const DescribeWorkflowRuleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + rule: S.optional(WorkflowRule), + }), +).annotate({ + identifier: "DescribeWorkflowRuleResponse", +}) as any as S.Schema; + +/** This is used to send commands to a specific worker or a group of workers. Right now, it is used to send commands to a specific worker instance. Will be extended to be able to send command to multiple workers. */ +export interface WorkerSelector { + /** Worker instance key to which the command should be sent. */ + workerInstanceKey?: string; +} +export const WorkerSelector = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workerInstanceKey: S.optional(S.String), + }), +).annotate({ identifier: "WorkerSelector" }) as any as S.Schema; + +export interface FetchWorkerConfigRequest { + /** Namespace this worker belongs to. */ + namespace: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Reason for sending worker command, can be used for audit purpose. */ + reason?: string; + /** Defines which workers should receive this command. only single worker is supported at this time. */ + selector?: WorkerSelector; + /** Resource ID for routing. Contains the worker grouping key. */ + resourceId?: string; +} +export const FetchWorkerConfigRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + identity: S.optional(S.String), + reason: S.optional(S.String), + selector: S.optional(WorkerSelector), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workers/fetch-config", + code: 200, + }), + ), +).annotate({ + identifier: "FetchWorkerConfigRequest", +}) as any as S.Schema; + +export interface WorkerConfigSimplePollerBehavior { + maxPollers?: number; +} +export const WorkerConfigSimplePollerBehavior = /*@__PURE__*/ S.suspend(() => + S.Struct({ + maxPollers: S.optional(S.Number), + }), +).annotate({ + identifier: "WorkerConfigSimplePollerBehavior", +}) as any as S.Schema; + +export interface WorkerConfigAutoscalingPollerBehavior { + /** At least this many poll calls will always be attempted (assuming slots are available). Cannot be zero. */ + minPollers?: number; + /** At most this many poll calls will ever be open at once. Must be >= `minimum`. */ + maxPollers?: number; + /** This many polls will be attempted initially before scaling kicks in. Must be between `minimum` and `maximum`. */ + initialPollers?: number; +} +export const WorkerConfigAutoscalingPollerBehavior = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + minPollers: S.optional(S.Number), + maxPollers: S.optional(S.Number), + initialPollers: S.optional(S.Number), + }), +).annotate({ + identifier: "WorkerConfigAutoscalingPollerBehavior", +}) as any as S.Schema; + +export interface WorkerConfig { + workflowCacheSize?: number; + simplePollerBehavior?: WorkerConfigSimplePollerBehavior; + autoscalingPollerBehavior?: WorkerConfigAutoscalingPollerBehavior; +} +export const WorkerConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowCacheSize: S.optional(S.Number), + simplePollerBehavior: S.optional(WorkerConfigSimplePollerBehavior), + autoscalingPollerBehavior: S.optional( + WorkerConfigAutoscalingPollerBehavior, + ), + }), +).annotate({ identifier: "WorkerConfig" }) as any as S.Schema; + +export interface FetchWorkerConfigResponse { + /** The worker configuration. */ + workerConfig?: WorkerConfig; +} +export const FetchWorkerConfigResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workerConfig: S.optional(WorkerConfig), + }), +).annotate({ + identifier: "FetchWorkerConfigResponse", +}) as any as S.Schema; + +export interface GetClusterInfoRequest {} +export const GetClusterInfoRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/v1/cluster-info", code: 200 }), + ), +).annotate({ + identifier: "GetClusterInfoRequest", +}) as any as S.Schema; + +/** Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli". Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0". */ +export type GetClusterInfoResponseSupportedClientsMap = { + [key: string]: string | undefined; +}; +export const GetClusterInfoResponseSupportedClientsMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +/** ReleaseInfo contains information about specific version of temporal. */ +export interface ReleaseInfo { + version?: string; + releaseTime?: string; + notes?: string; +} +export const ReleaseInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + version: S.optional(S.String), + releaseTime: S.optional(S.String), + notes: S.optional(S.String), + }), +).annotate({ identifier: "ReleaseInfo" }) as any as S.Schema; + +export type AlertSeverity = + | "SEVERITY_UNSPECIFIED" + | "SEVERITY_HIGH" + | "SEVERITY_MEDIUM" + | "SEVERITY_LOW"; +export const AlertSeverity = /*@__PURE__*/ S.String; + +/** Alert contains notification and severity. */ +export interface Alert { + message?: string; + severity?: AlertSeverity; +} +export const Alert = /*@__PURE__*/ S.suspend(() => + S.Struct({ + message: S.optional(S.String), + severity: S.optional(AlertSeverity), + }), +).annotate({ identifier: "Alert" }) as any as S.Schema; + +export type VersionInfoAlertsList = Array; +export const VersionInfoAlertsList = /*@__PURE__*/ S.Array( + Alert, +) as any as S.Schema; + +/** VersionInfo contains details about current and recommended release versions as well as alerts and upgrade instructions. */ +export interface VersionInfo { + current?: ReleaseInfo; + recommended?: ReleaseInfo; + instructions?: string; + alerts?: VersionInfoAlertsList; + lastUpdateTime?: string; +} +export const VersionInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current: S.optional(ReleaseInfo), + recommended: S.optional(ReleaseInfo), + instructions: S.optional(S.String), + alerts: S.optional(VersionInfoAlertsList), + lastUpdateTime: S.optional(S.String), + }), +).annotate({ identifier: "VersionInfo" }) as any as S.Schema; + +/** GetClusterInfoResponse contains information about Temporal cluster. */ +export interface GetClusterInfoResponse { + /** Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli". Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0". */ + supportedClients?: GetClusterInfoResponseSupportedClientsMap; + serverVersion?: string; + clusterId?: string; + versionInfo?: VersionInfo; + clusterName?: string; + historyShardCount?: number; + persistenceStore?: string; + visibilityStore?: string; + initialFailoverVersion?: string; + failoverVersionIncrement?: string; +} +export const GetClusterInfoResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + supportedClients: S.optional(GetClusterInfoResponseSupportedClientsMap), + serverVersion: S.optional(S.String), + clusterId: S.optional(S.String), + versionInfo: S.optional(VersionInfo), + clusterName: S.optional(S.String), + historyShardCount: S.optional(S.Number), + persistenceStore: S.optional(S.String), + visibilityStore: S.optional(S.String), + initialFailoverVersion: S.optional(S.String), + failoverVersionIncrement: S.optional(S.String), + }), +).annotate({ + identifier: "GetClusterInfoResponse", +}) as any as S.Schema; + +export interface GetCurrentDeploymentRequest { + namespace: string; + seriesName: string; +} +export const GetCurrentDeploymentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + seriesName: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/current-deployment/{seriesName}", + code: 200, + }), + ), +).annotate({ + identifier: "GetCurrentDeploymentRequest", +}) as any as S.Schema; + +/** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ +export interface GetCurrentDeploymentResponse { + currentDeploymentInfo?: DeploymentInfo; +} +export const GetCurrentDeploymentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + currentDeploymentInfo: S.optional(DeploymentInfo), + }), +).annotate({ + identifier: "GetCurrentDeploymentResponse", +}) as any as S.Schema; + +export interface GetDeploymentReachabilityRequest { + namespace: string; + deployment_series_name: string; + deployment_build_id: string; + /** Different versions of the same worker service/application are related together by having a shared series name. Out of all deployments of a series, one can be designated as the current deployment, which receives new workflow executions and new tasks of workflows with `VERSIONING_BEHAVIOR_AUTO_UPGRADE` versioning behavior. */ + deployment_seriesName?: string; + /** Build ID changes with each version of the worker when the worker program code and/or config changes. */ + deployment_buildId?: string; +} +export const GetDeploymentReachabilityRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deployment_series_name: S.String.pipe(T.Label()), + deployment_build_id: S.String.pipe(T.Label()), + deployment_seriesName: S.optional( + S.String.pipe(T.Query("deployment.seriesName")), + ), + deployment_buildId: S.optional( + S.String.pipe(T.Query("deployment.buildId")), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/deployments/{deployment_series_name}/{deployment_build_id}/reachability", + code: 200, + }), + ), +).annotate({ + identifier: "GetDeploymentReachabilityRequest", +}) as any as S.Schema; + +export type GetDeploymentReachabilityResponseReachability = + | "DEPLOYMENT_REACHABILITY_UNSPECIFIED" + | "DEPLOYMENT_REACHABILITY_REACHABLE" + | "DEPLOYMENT_REACHABILITY_CLOSED_WORKFLOWS_ONLY" + | "DEPLOYMENT_REACHABILITY_UNREACHABLE"; +export const GetDeploymentReachabilityResponseReachability = + /*@__PURE__*/ S.String; + +/** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ +export interface GetDeploymentReachabilityResponse { + deploymentInfo?: DeploymentInfo; + reachability?: GetDeploymentReachabilityResponseReachability; + /** Reachability level might come from server cache. This timestamp specifies when the value was actually calculated. */ + lastUpdateTime?: string; +} +export const GetDeploymentReachabilityResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + deploymentInfo: S.optional(DeploymentInfo), + reachability: S.optional(GetDeploymentReachabilityResponseReachability), + lastUpdateTime: S.optional(S.String), + }), +).annotate({ + identifier: "GetDeploymentReachabilityResponse", +}) as any as S.Schema; + +export interface GetNexusEndpointRequest { + /** Server-generated unique endpoint ID. */ + id: string; +} +export const GetNexusEndpointRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/v1/nexus/endpoints/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetNexusEndpointRequest", +}) as any as S.Schema; + +export interface GetNexusEndpointResponse { + endpoint?: Endpoint; +} +export const GetNexusEndpointResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + endpoint: S.optional(Endpoint), + }), +).annotate({ + identifier: "GetNexusEndpointResponse", +}) as any as S.Schema; + +export interface GetSystemInfoRequest {} +export const GetSystemInfoRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/v1/system-info", code: 200 }), + ), +).annotate({ + identifier: "GetSystemInfoRequest", +}) as any as S.Schema; + +/** System capability details. */ +export interface GetSystemInfoResponseCapabilities { + /** True if signal and query headers are supported. */ + signalAndQueryHeader?: boolean; + /** True if internal errors are differentiated from other types of errors for purposes of retrying non-internal errors. When unset/false, clients retry all failures. When true, clients should only retry non-internal errors. */ + internalErrorDifferentiation?: boolean; + /** True if RespondActivityTaskFailed API supports including heartbeat details */ + activityFailureIncludeHeartbeat?: boolean; + /** Supports scheduled workflow features. */ + supportsSchedules?: boolean; + /** True if server uses protos that include temporal.api.failure.v1.Failure.encoded_attributes */ + encodedFailureAttributes?: boolean; + /** True if server supports dispatching Workflow and Activity tasks based on a worker's build_id (see: https://github.com/temporalio/proposals/blob/a123af3b559f43db16ea6dd31870bfb754c4dc5e/versioning/worker-versions.md) */ + buildIdBasedVersioning?: boolean; + /** True if server supports upserting workflow memo */ + upsertMemo?: boolean; + /** True if server supports eager workflow task dispatching for the StartWorkflowExecution API */ + eagerWorkflowStart?: boolean; + /** True if the server knows about the sdk metadata field on WFT completions and will record it in history */ + sdkMetadata?: boolean; + /** True if the server supports count group by execution status */ + countGroupByExecutionStatus?: boolean; + /** True if the server supports Nexus operations. This flag is dependent both on server version and for Nexus to be enabled via server configuration. */ + nexus?: boolean; + /** True if the server supports server-scaled deployments. This flag is dependent both on server version and for server-scaled deployments to be enabled via server configuration. */ + serverScaledDeployments?: boolean; +} +export const GetSystemInfoResponseCapabilities = /*@__PURE__*/ S.suspend(() => + S.Struct({ + signalAndQueryHeader: S.optional(S.Boolean), + internalErrorDifferentiation: S.optional(S.Boolean), + activityFailureIncludeHeartbeat: S.optional(S.Boolean), + supportsSchedules: S.optional(S.Boolean), + encodedFailureAttributes: S.optional(S.Boolean), + buildIdBasedVersioning: S.optional(S.Boolean), + upsertMemo: S.optional(S.Boolean), + eagerWorkflowStart: S.optional(S.Boolean), + sdkMetadata: S.optional(S.Boolean), + countGroupByExecutionStatus: S.optional(S.Boolean), + nexus: S.optional(S.Boolean), + serverScaledDeployments: S.optional(S.Boolean), + }), +).annotate({ + identifier: "GetSystemInfoResponseCapabilities", +}) as any as S.Schema; + +export interface GetSystemInfoResponse { + /** Version of the server. */ + serverVersion?: string; + /** All capabilities the system supports. */ + capabilities?: GetSystemInfoResponseCapabilities; +} +export const GetSystemInfoResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + serverVersion: S.optional(S.String), + capabilities: S.optional(GetSystemInfoResponseCapabilities), + }), +).annotate({ + identifier: "GetSystemInfoResponse", +}) as any as S.Schema; + +export interface GetWorkerBuildIdCompatibilityRequest { + namespace: string; + /** Must be set, the task queue to interrogate about worker id compatibility. */ + taskQueue: string; + /** Limits how many compatible sets will be returned. Specify 1 to only return the current default major version set. 0 returns all sets. */ + maxSets?: number; +} +export const GetWorkerBuildIdCompatibilityRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + taskQueue: S.String.pipe(T.Label()), + maxSets: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/task-queues/{taskQueue}/worker-build-id-compatibility", + code: 200, + }), + ), +).annotate({ + identifier: "GetWorkerBuildIdCompatibilityRequest", +}) as any as S.Schema; + +/** All the compatible versions, unordered, except for the last element, which is considered the set "default". */ +export type CompatibleVersionSetBuildIdsList = Array; +export const CompatibleVersionSetBuildIdsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Used by the worker versioning APIs, represents an unordered set of one or more versions which are considered to be compatible with each other. Currently the versions are always worker build IDs. */ +export interface CompatibleVersionSet { + /** All the compatible versions, unordered, except for the last element, which is considered the set "default". */ + buildIds?: CompatibleVersionSetBuildIdsList; +} +export const CompatibleVersionSet = /*@__PURE__*/ S.suspend(() => + S.Struct({ + buildIds: S.optional(CompatibleVersionSetBuildIdsList), + }), +).annotate({ + identifier: "CompatibleVersionSet", +}) as any as S.Schema; + +/** Major version sets, in order from oldest to newest. The last element of the list will always be the current default major version. IE: New workflows will target the most recent version in that version set. There may be fewer sets returned than exist, if the request chose to limit this response. */ +export type GetWorkerBuildIdCompatibilityResponseMajorVersionSetsList = + Array; +export const GetWorkerBuildIdCompatibilityResponseMajorVersionSetsList = + /*@__PURE__*/ S.Array( + CompatibleVersionSet, + ) as any as S.Schema; + +/** [cleanup-wv-pre-release] */ +export interface GetWorkerBuildIdCompatibilityResponse { + /** Major version sets, in order from oldest to newest. The last element of the list will always be the current default major version. IE: New workflows will target the most recent version in that version set. There may be fewer sets returned than exist, if the request chose to limit this response. */ + majorVersionSets?: GetWorkerBuildIdCompatibilityResponseMajorVersionSetsList; +} +export const GetWorkerBuildIdCompatibilityResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + majorVersionSets: S.optional( + GetWorkerBuildIdCompatibilityResponseMajorVersionSetsList, + ), + }), +).annotate({ + identifier: "GetWorkerBuildIdCompatibilityResponse", +}) as any as S.Schema; + +export type GetWorkerTaskReachabilityRequestBuildIdsList = Array; +export const GetWorkerTaskReachabilityRequestBuildIdsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type GetWorkerTaskReachabilityRequestTaskQueuesList = Array; +export const GetWorkerTaskReachabilityRequestTaskQueuesList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type GetWorkerTaskReachabilityRequestReachability = + | "TASK_REACHABILITY_UNSPECIFIED" + | "TASK_REACHABILITY_NEW_WORKFLOWS" + | "TASK_REACHABILITY_EXISTING_WORKFLOWS" + | "TASK_REACHABILITY_OPEN_WORKFLOWS" + | "TASK_REACHABILITY_CLOSED_WORKFLOWS"; +export const GetWorkerTaskReachabilityRequestReachability = + /*@__PURE__*/ S.String; + +export interface GetWorkerTaskReachabilityRequest { + namespace: string; + /** Build ids to retrieve reachability for. An empty string will be interpreted as an unversioned worker. The number of build ids that can be queried in a single API call is limited. Open source users can adjust this limit by setting the server's dynamic config value for `limit.reachabilityQueryBuildIds` with the caveat that this call can strain the visibility store. */ + buildIds?: GetWorkerTaskReachabilityRequestBuildIdsList; + /** Task queues to retrieve reachability for. Leave this empty to query for all task queues associated with given build ids in the namespace. Must specify at least one task queue if querying for an unversioned worker. The number of task queues that the server will fetch reachability information for is limited. See the `GetWorkerTaskReachabilityResponse` documentation for more information. */ + taskQueues?: GetWorkerTaskReachabilityRequestTaskQueuesList; + /** Type of reachability to query for. `TASK_REACHABILITY_NEW_WORKFLOWS` is always returned in the response. Use `TASK_REACHABILITY_EXISTING_WORKFLOWS` if your application needs to respond to queries on closed workflows. Otherwise, use `TASK_REACHABILITY_OPEN_WORKFLOWS`. Default is `TASK_REACHABILITY_EXISTING_WORKFLOWS` if left unspecified. See the TaskReachability docstring for information about each enum variant. */ + reachability?: GetWorkerTaskReachabilityRequestReachability | (string & {}); +} +export const GetWorkerTaskReachabilityRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + buildIds: S.optional( + GetWorkerTaskReachabilityRequestBuildIdsList.pipe(T.Query()), + ), + taskQueues: S.optional( + GetWorkerTaskReachabilityRequestTaskQueuesList.pipe(T.Query()), + ), + reachability: S.optional( + GetWorkerTaskReachabilityRequestReachability.pipe(T.Query()), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/worker-task-reachability", + code: 200, + }), + ), +).annotate({ + identifier: "GetWorkerTaskReachabilityRequest", +}) as any as S.Schema; + +export type TaskQueueReachabilityReachabilityItem = + | "TASK_REACHABILITY_UNSPECIFIED" + | "TASK_REACHABILITY_NEW_WORKFLOWS" + | "TASK_REACHABILITY_EXISTING_WORKFLOWS" + | "TASK_REACHABILITY_OPEN_WORKFLOWS" + | "TASK_REACHABILITY_CLOSED_WORKFLOWS"; +export const TaskQueueReachabilityReachabilityItem = /*@__PURE__*/ S.String; + +/** Task reachability for a worker in a single task queue. See the TaskReachability docstring for information about each enum variant. If reachability is empty, this worker is considered unreachable in this task queue. */ +export type TaskQueueReachabilityReachabilityList = + Array; +export const TaskQueueReachabilityReachabilityList = /*@__PURE__*/ S.Array( + TaskQueueReachabilityReachabilityItem, +) as any as S.Schema; + +/** Reachability of tasks for a worker on a single task queue. */ +export interface TaskQueueReachability { + taskQueue?: string; + /** Task reachability for a worker in a single task queue. See the TaskReachability docstring for information about each enum variant. If reachability is empty, this worker is considered unreachable in this task queue. */ + reachability?: TaskQueueReachabilityReachabilityList; +} +export const TaskQueueReachability = /*@__PURE__*/ S.suspend(() => + S.Struct({ + taskQueue: S.optional(S.String), + reachability: S.optional(TaskQueueReachabilityReachabilityList), + }), +).annotate({ + identifier: "TaskQueueReachability", +}) as any as S.Schema; + +/** Reachability per task queue. */ +export type BuildIdReachabilityTaskQueueReachabilityList = + Array; +export const BuildIdReachabilityTaskQueueReachabilityList = + /*@__PURE__*/ S.Array( + TaskQueueReachability, + ) as any as S.Schema; + +/** Reachability of tasks for a worker by build id, in one or more task queues. */ +export interface BuildIdReachability { + /** A build id or empty if unversioned. */ + buildId?: string; + /** Reachability per task queue. */ + taskQueueReachability?: BuildIdReachabilityTaskQueueReachabilityList; +} +export const BuildIdReachability = /*@__PURE__*/ S.suspend(() => + S.Struct({ + buildId: S.optional(S.String), + taskQueueReachability: S.optional( + BuildIdReachabilityTaskQueueReachabilityList, + ), + }), +).annotate({ + identifier: "BuildIdReachability", +}) as any as S.Schema; + +/** Task reachability, broken down by build id and then task queue. When requesting a large number of task queues or all task queues associated with the given build ids in a namespace, all task queues will be listed in the response but some of them may not contain reachability information due to a server enforced limit. When reaching the limit, task queues that reachability information could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue another call to get the reachability for those task queues. Open source users can adjust this limit by setting the server's dynamic config value for `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. */ +export type GetWorkerTaskReachabilityResponseBuildIdReachabilityList = + Array; +export const GetWorkerTaskReachabilityResponseBuildIdReachabilityList = + /*@__PURE__*/ S.Array( + BuildIdReachability, + ) as any as S.Schema; + +/** [cleanup-wv-pre-release] Deprecated. Use `DescribeTaskQueue`. */ +export interface GetWorkerTaskReachabilityResponse { + /** Task reachability, broken down by build id and then task queue. When requesting a large number of task queues or all task queues associated with the given build ids in a namespace, all task queues will be listed in the response but some of them may not contain reachability information due to a server enforced limit. When reaching the limit, task queues that reachability information could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue another call to get the reachability for those task queues. Open source users can adjust this limit by setting the server's dynamic config value for `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. */ + buildIdReachability?: GetWorkerTaskReachabilityResponseBuildIdReachabilityList; +} +export const GetWorkerTaskReachabilityResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + buildIdReachability: S.optional( + GetWorkerTaskReachabilityResponseBuildIdReachabilityList, + ), + }), +).annotate({ + identifier: "GetWorkerTaskReachabilityResponse", +}) as any as S.Schema; + +export interface GetWorkerVersioningRulesRequest { + namespace: string; + taskQueue: string; +} +export const GetWorkerVersioningRulesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + taskQueue: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/task-queues/{taskQueue}/worker-versioning-rules", + code: 200, + }), + ), +).annotate({ + identifier: "GetWorkerVersioningRulesRequest", +}) as any as S.Schema; + +export interface RampByPercentage { + /** Acceptable range is [0,100). */ + rampPercentage?: number; +} +export const RampByPercentage = /*@__PURE__*/ S.suspend(() => + S.Struct({ + rampPercentage: S.optional(S.Number), + }), +).annotate({ + identifier: "RampByPercentage", +}) as any as S.Schema; + +/** Assignment rules are applied to *new* Workflow and Activity executions at schedule time to assign them to a Build ID. Assignment rules will not be used in the following cases: - Child Workflows or Continue-As-New Executions who inherit their parent/previous Workflow's assigned Build ID (by setting the `inherit_build_id` flag - default behavior in SDKs when the same Task Queue is used.) - An Activity that inherits the assigned Build ID of its Workflow (by setting the `use_workflow_build_id` flag - default behavior in SDKs when the same Task Queue is used.) In absence of (applicable) redirect rules (`CompatibleBuildIdRedirectRule`s) the task will be dispatched to Workers of the Build ID determined by the assignment rules (or inherited). Otherwise, the final Build ID will be determined by the redirect rules. Once a Workflow completes its first Workflow Task in a particular Build ID it stays in that Build ID regardless of changes to assignment rules. Redirect rules can be used to move the workflow to another compatible Build ID. When using Worker Versioning on a Task Queue, in the steady state, there should typically be a single assignment rule to send all new executions to the latest Build ID. Existence of at least one such "unconditional" rule at all times is enforces by the system, unless the `force` flag is used by the user when replacing/deleting these rules (for exceptional cases). During a deployment, one or more additional rules can be added to assign a subset of the tasks to a new Build ID based on a "ramp percentage". When there are multiple assignment rules for a Task Queue, the rules are evaluated in order, starting from index 0. The first applicable rule will be applied and the rest will be ignored. In the event that no assignment rule is applicable on a task (or the Task Queue is simply not versioned), the tasks will be dispatched to an unversioned Worker. */ +export interface BuildIdAssignmentRule { + targetBuildId?: string; + /** This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID. */ + percentageRamp?: RampByPercentage; +} +export const BuildIdAssignmentRule = /*@__PURE__*/ S.suspend(() => + S.Struct({ + targetBuildId: S.optional(S.String), + percentageRamp: S.optional(RampByPercentage), + }), +).annotate({ + identifier: "BuildIdAssignmentRule", +}) as any as S.Schema; + +export interface TimestampedBuildIdAssignmentRule { + rule?: BuildIdAssignmentRule; + createTime?: string; +} +export const TimestampedBuildIdAssignmentRule = /*@__PURE__*/ S.suspend(() => + S.Struct({ + rule: S.optional(BuildIdAssignmentRule), + createTime: S.optional(S.String), + }), +).annotate({ + identifier: "TimestampedBuildIdAssignmentRule", +}) as any as S.Schema; + +export type GetWorkerVersioningRulesResponseAssignmentRulesList = + Array; +export const GetWorkerVersioningRulesResponseAssignmentRulesList = + /*@__PURE__*/ S.Array( + TimestampedBuildIdAssignmentRule, + ) as any as S.Schema; + +/** These rules apply to tasks assigned to a particular Build ID (`source_build_id`) to redirect them to another *compatible* Build ID (`target_build_id`). It is user's responsibility to ensure that the target Build ID is compatible with the source Build ID (e.g. by using the Patching API). Most deployments are not expected to need these rules, however following situations can greatly benefit from redirects: - Need to move long-running Workflow Executions from an old Build ID to a newer one. - Need to hotfix some broken or stuck Workflow Executions. In steady state, redirect rules are beneficial when dealing with old Executions ran on now-decommissioned Build IDs: - To redirecting the Workflow Queries to the current (compatible) Build ID. - To be able to Reset an old Execution so it can run on the current (compatible) Build ID. Redirect rules can be chained. */ +export interface CompatibleBuildIdRedirectRule { + sourceBuildId?: string; + /** Target Build ID must be compatible with the Source Build ID; that is it must be able to process event histories made by the Source Build ID by using [Patching](https://docs.temporal.io/workflows#patching) or other means. */ + targetBuildId?: string; +} +export const CompatibleBuildIdRedirectRule = /*@__PURE__*/ S.suspend(() => + S.Struct({ + sourceBuildId: S.optional(S.String), + targetBuildId: S.optional(S.String), + }), +).annotate({ + identifier: "CompatibleBuildIdRedirectRule", +}) as any as S.Schema; + +export interface TimestampedCompatibleBuildIdRedirectRule { + rule?: CompatibleBuildIdRedirectRule; + createTime?: string; +} +export const TimestampedCompatibleBuildIdRedirectRule = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + rule: S.optional(CompatibleBuildIdRedirectRule), + createTime: S.optional(S.String), + }), +).annotate({ + identifier: "TimestampedCompatibleBuildIdRedirectRule", +}) as any as S.Schema; + +export type GetWorkerVersioningRulesResponseCompatibleRedirectRulesList = + Array; +export const GetWorkerVersioningRulesResponseCompatibleRedirectRulesList = + /*@__PURE__*/ S.Array( + TimestampedCompatibleBuildIdRedirectRule, + ) as any as S.Schema; + +/** [cleanup-wv-pre-release] */ +export interface GetWorkerVersioningRulesResponse { + assignmentRules?: GetWorkerVersioningRulesResponseAssignmentRulesList; + compatibleRedirectRules?: GetWorkerVersioningRulesResponseCompatibleRedirectRulesList; + /** This value can be passed back to UpdateWorkerVersioningRulesRequest to ensure that the rules were not modified between this List and the Update, which could lead to lost updates and other confusion. */ + conflictToken?: string; +} +export const GetWorkerVersioningRulesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + assignmentRules: S.optional( + GetWorkerVersioningRulesResponseAssignmentRulesList, + ), + compatibleRedirectRules: S.optional( + GetWorkerVersioningRulesResponseCompatibleRedirectRulesList, + ), + conflictToken: S.optional(S.String), + }), +).annotate({ + identifier: "GetWorkerVersioningRulesResponse", +}) as any as S.Schema; + +export type GetWorkflowExecutionHistoryRequestHistoryEventFilterType = + | "HISTORY_EVENT_FILTER_TYPE_UNSPECIFIED" + | "HISTORY_EVENT_FILTER_TYPE_ALL_EVENT" + | "HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT"; +export const GetWorkflowExecutionHistoryRequestHistoryEventFilterType = + /*@__PURE__*/ S.String; + +export interface GetWorkflowExecutionHistoryRequest { + namespace: string; + execution_workflow_id: string; + execution_workflowId?: string; + execution_runId?: string; + maximumPageSize?: number; + /** If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of these, it should be passed here to fetch the next page. */ + nextPageToken?: string; + /** If set to true, the RPC call will not resolve until there is a new event which matches the `history_event_filter_type`, or a timeout is hit. */ + waitNewEvent?: boolean; + /** Filter returned events such that they match the specified filter type. Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT. */ + historyEventFilterType?: + | GetWorkflowExecutionHistoryRequestHistoryEventFilterType + | (string & {}); + skipArchival?: boolean; +} +export const GetWorkflowExecutionHistoryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + execution_workflow_id: S.String.pipe(T.Label()), + execution_workflowId: S.optional( + S.String.pipe(T.Query("execution.workflowId")), + ), + execution_runId: S.optional(S.String.pipe(T.Query("execution.runId"))), + maximumPageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + waitNewEvent: S.optional(S.Boolean.pipe(T.Query())), + historyEventFilterType: S.optional( + GetWorkflowExecutionHistoryRequestHistoryEventFilterType.pipe(T.Query()), + ), + skipArchival: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/workflows/{execution_workflow_id}/history", + code: 200, + }), + ), +).annotate({ + identifier: "GetWorkflowExecutionHistoryRequest", +}) as any as S.Schema; + +export type HistoryEventEventType = + | "EVENT_TYPE_UNSPECIFIED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT" + | "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED" + | "EVENT_TYPE_WORKFLOW_TASK_STARTED" + | "EVENT_TYPE_WORKFLOW_TASK_COMPLETED" + | "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT" + | "EVENT_TYPE_WORKFLOW_TASK_FAILED" + | "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED" + | "EVENT_TYPE_ACTIVITY_TASK_STARTED" + | "EVENT_TYPE_ACTIVITY_TASK_COMPLETED" + | "EVENT_TYPE_ACTIVITY_TASK_FAILED" + | "EVENT_TYPE_ACTIVITY_TASK_TIMED_OUT" + | "EVENT_TYPE_ACTIVITY_TASK_CANCEL_REQUESTED" + | "EVENT_TYPE_ACTIVITY_TASK_CANCELED" + | "EVENT_TYPE_TIMER_STARTED" + | "EVENT_TYPE_TIMER_FIRED" + | "EVENT_TYPE_TIMER_CANCELED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED" + | "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_CANCEL_REQUESTED" + | "EVENT_TYPE_MARKER_RECORDED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW" + | "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_START_CHILD_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_STARTED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT" + | "EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TERMINATED" + | "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED" + | "EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED" + | "EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED" + | "EVENT_TYPE_UPSERT_WORKFLOW_SEARCH_ATTRIBUTES" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ADMITTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_REJECTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_COMPLETED" + | "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED_EXTERNALLY" + | "EVENT_TYPE_ACTIVITY_PROPERTIES_MODIFIED_EXTERNALLY" + | "EVENT_TYPE_WORKFLOW_PROPERTIES_MODIFIED" + | "EVENT_TYPE_NEXUS_OPERATION_SCHEDULED" + | "EVENT_TYPE_NEXUS_OPERATION_STARTED" + | "EVENT_TYPE_NEXUS_OPERATION_COMPLETED" + | "EVENT_TYPE_NEXUS_OPERATION_FAILED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCELED" + | "EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED" + | "EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_PAUSED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED" + | "EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPING_TRANSITIONED"; +export const HistoryEventEventType = /*@__PURE__*/ S.String; + +/** Links to related entities, such as the entity that started this event's workflow. */ +export type HistoryEventLinksList = Array; +export const HistoryEventLinksList = /*@__PURE__*/ S.Array( + Link, +) as any as S.Schema; + +/** Principal is an authenticated caller identity computed by the server from trusted authentication context. */ +export interface Principal { + /** Low-cardinality category of the principal (e.g., "jwt", "users"). */ + type?: string; + /** Identifier within that category (e.g., sub JWT claim, email address). */ + name?: string; +} +export const Principal = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.optional(S.String), + name: S.optional(S.String), + }), +).annotate({ identifier: "Principal" }) as any as S.Schema; + +export type WorkflowExecutionStartedEventAttributesInitiator = + | "CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED" + | "CONTINUE_AS_NEW_INITIATOR_WORKFLOW" + | "CONTINUE_AS_NEW_INITIATOR_RETRY" + | "CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE"; +export const WorkflowExecutionStartedEventAttributesInitiator = + /*@__PURE__*/ S.String; + +/** Completion callbacks attached when this workflow was started. */ +export type WorkflowExecutionStartedEventAttributesCompletionCallbacksList = + Array; +export const WorkflowExecutionStartedEventAttributesCompletionCallbacksList = + /*@__PURE__*/ S.Array( + Callback, + ) as any as S.Schema; + +/** Experimental. If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior specified in that command. Only used for the initial task of this run and the initial task of any retries of this run. Not passed to children or to future continue-as-new. Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility with history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade value if the InheritedAutoUpgradeInfo is non-empty. */ +export type InheritedAutoUpgradeInfoContinueAsNewInitialVersioningBehavior = + | "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED" + | "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE" + | "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION"; +export const InheritedAutoUpgradeInfoContinueAsNewInitialVersioningBehavior = + /*@__PURE__*/ S.String; + +/** Used as part of WorkflowExecutionStartedEventAttributes to pass down the AutoUpgrade behavior and source deployment version to a workflow execution whose parent/previous workflow has an AutoUpgrade behavior. Also used for Upgrade-on-CaN behaviors AutoUpgrade and UseRampingVersion. */ +export interface InheritedAutoUpgradeInfo { + /** The source deployment version of the parent/previous workflow. */ + sourceDeploymentVersion?: WorkerDeploymentVersion; + /** The revision number of the source deployment version of the parent/previous workflow. */ + sourceDeploymentRevisionNumber?: string; + /** Experimental. If this workflow is the result of a continue-as-new, this field is set to the initial_versioning_behavior specified in that command. Only used for the initial task of this run and the initial task of any retries of this run. Not passed to children or to future continue-as-new. Note: In the first release of Upgrade-on-CaN, when the only ContinueAsNewVersioningBehavior was AutoUpgrade, a non-empty InheritedAutoUpgradeInfo meant that the workflow should start as AutoUpgrade. So for compatibility with history events generated during that time, know that an UNSPECIFIED value here is equivalent to AutoUpgrade value if the InheritedAutoUpgradeInfo is non-empty. */ + continueAsNewInitialVersioningBehavior?: InheritedAutoUpgradeInfoContinueAsNewInitialVersioningBehavior; +} +export const InheritedAutoUpgradeInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + sourceDeploymentVersion: S.optional(WorkerDeploymentVersion), + sourceDeploymentRevisionNumber: S.optional(S.String), + continueAsNewInitialVersioningBehavior: S.optional( + InheritedAutoUpgradeInfoContinueAsNewInitialVersioningBehavior, + ), + }), +).annotate({ + identifier: "InheritedAutoUpgradeInfo", +}) as any as S.Schema; + +/** Wrapper for a target deployment version that the SDK declined to upgrade to. See declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes. */ +export interface DeclinedTargetVersionUpgrade { + deploymentVersion?: WorkerDeploymentVersion; + /** Revision number of the task queue routing config at the time the target was declined. If an incoming target's revision is <= this value, it is not newer and is not used for deciding whether or not to suppress the upgrade signal. */ + revisionNumber?: string; +} +export const DeclinedTargetVersionUpgrade = /*@__PURE__*/ S.suspend(() => + S.Struct({ + deploymentVersion: S.optional(WorkerDeploymentVersion), + revisionNumber: S.optional(S.String), + }), +).annotate({ + identifier: "DeclinedTargetVersionUpgrade", +}) as any as S.Schema; + +/** Configuration for time skipping during a workflow execution. When enabled, virtual time advances automatically whenever there is no in-flight work. In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations, and possibly other features added in the future. User timers are not classified as in-flight work and will be skipped over. When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists. Propagation behavior of time skipping: The enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows: (1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are inherited from the current execution. The configured bound is shared between the inherited skipped duration and any additional duration skipped by the new run. (2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the current workflow started; the accumulated skipped duration of the current run is not propagated. (3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that point, the resulting run ends up with the same final time-skipping configuration as the previous run. */ +export interface TimeSkippingConfig { + /** Enables or disables time skipping for this workflow execution. */ + enabled?: boolean; + /** Maximum total virtual time that can be skipped. */ + maxSkippedDuration?: string; + /** Maximum elapsed time since time skipping was enabled. This includes both skipped time and real time elapsing. */ + maxElapsedDuration?: string; +} +export const TimeSkippingConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + enabled: S.optional(S.Boolean), + maxSkippedDuration: S.optional(S.String), + maxElapsedDuration: S.optional(S.String), + }), +).annotate({ + identifier: "TimeSkippingConfig", +}) as any as S.Schema; + +/** Always the first event in workflow history */ +export interface WorkflowExecutionStartedEventAttributes { + workflowType?: WorkflowType; + /** If this workflow is a child, the namespace our parent lives in. SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only. */ + parentWorkflowNamespace?: string; + parentWorkflowNamespaceId?: string; + /** Contains information about parent workflow execution that initiated the child workflow these attributes belong to. If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated. */ + parentWorkflowExecution?: WorkflowExecution; + /** EventID of the child execution initiated event in parent workflow */ + parentInitiatedEventId?: string; + taskQueue?: TaskQueue; + /** SDK will deserialize this and provide it as arguments to the workflow function */ + input?: Payloads; + /** Total workflow execution timeout including retries and continue as new. */ + workflowExecutionTimeout?: string; + /** Timeout of a single workflow run. */ + workflowRunTimeout?: string; + /** Timeout of a single workflow task. */ + workflowTaskTimeout?: string; + /** Run id of the previous workflow which continued-as-new or retried or cron executed into this workflow. */ + continuedExecutionRunId?: string; + initiator?: WorkflowExecutionStartedEventAttributesInitiator; + continuedFailure?: Failure; + lastCompletionResult?: Payloads; + /** This is the run id when the WorkflowExecutionStarted event was written. A workflow reset changes the execution run_id, but preserves this field. */ + originalExecutionRunId?: string; + /** Identity of the client who requested this execution */ + identity?: string; + /** This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. Used to identify a chain. */ + firstExecutionRunId?: string; + retryPolicy?: RetryPolicy; + /** Starting at 1, the number of times we have tried to execute this workflow */ + attempt?: number; + /** The absolute time at which the workflow will be timed out. This is passed without change to the next run/retry of a workflow. */ + workflowExecutionExpirationTime?: string; + /** If this workflow runs on a cron schedule, it will appear here */ + cronSchedule?: string; + /** For a cron workflow, this contains the amount of time between when this iteration of the cron workflow was scheduled and when it should run next per its cron_schedule. */ + firstWorkflowTaskBackoff?: string; + memo?: Memo; + searchAttributes?: SearchAttributes; + prevAutoResetPoints?: ResetPoints; + header?: Header; + /** Version of the child execution initiated event in parent workflow It should be used together with parent_initiated_event_id to identify a child initiated event for global namespace */ + parentInitiatedEventVersion?: string; + /** This field is new in 1.21. */ + workflowId?: string; + /** If this workflow intends to use anything other than the current overall default version for the queue, then we include it here. Deprecated. [cleanup-experimental-wv] */ + sourceVersionStamp?: WorkerVersionStamp; + /** Completion callbacks attached when this workflow was started. */ + completionCallbacks?: WorkflowExecutionStartedEventAttributesCompletionCallbacksList; + /** Contains information about the root workflow execution. The root workflow execution is defined as follows: 1. A workflow without parent workflow is its own root workflow. 2. A workflow that has a parent workflow has the same root workflow as its parent workflow. When the workflow is its own root workflow, then root_workflow_execution is nil. Note: workflows continued as new or reseted may or may not have parents, check examples below. Examples: Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3. - The root workflow of all three workflows is W1. - W1 has root_workflow_execution set to nil. - W2 and W3 have root_workflow_execution set to W1. Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3. - The root workflow of all three workflows is W1. - W1 has root_workflow_execution set to nil. - W2 and W3 have root_workflow_execution set to W1. Scenario 3: Workflow W1 continued as new W2. - The root workflow of W1 is W1 and the root workflow of W2 is W2. - W1 and W2 have root_workflow_execution set to nil. Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3 - The root workflow of all three workflows is W1. - W1 has root_workflow_execution set to nil. - W2 and W3 have root_workflow_execution set to W1. Scenario 5: Workflow W1 is reseted, creating W2. - The root workflow of W1 is W1 and the root workflow of W2 is W2. - W1 and W2 have root_workflow_execution set to nil. */ + rootWorkflowExecution?: WorkflowExecution; + /** When present, this execution is assigned to the build ID of its parent or previous execution. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + inheritedBuildId?: string; + /** Versioning override applied to this workflow when it was started. Children, crons, retries, and continue-as-new will inherit source run's override if pinned and if the new workflow's Task Queue belongs to the override version. */ + versioningOverride?: VersioningOverride; + /** When present, it means this is a child workflow of a parent that is Pinned to this Worker Deployment Version. In this case, child workflow will start as Pinned to this Version instead of starting on the Current Version of its Task Queue. This is set only if the child workflow is starting on a Task Queue belonging to the same Worker Deployment Version. Deprecated. Use `parent_versioning_info`. */ + parentPinnedWorkerDeploymentVersion?: string; + /** Priority metadata */ + priority?: Priority; + /** If present, the new workflow should start on this version with pinned base behavior. Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version. A new run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the new run's Task Queue belongs to that version. A new run initiated by workflow Cron will never inherit. A new run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version). Pinned override is inherited if Task Queue of new run is compatible with the override version. Override is inherited separately and takes precedence over inherited base version. Note: This field is mutually exclusive with inherited_auto_upgrade_info. Additionaly, versioning_override, if present, overrides this field during routing decisions. */ + inheritedPinnedVersion?: WorkerDeploymentVersion; + /** If present, the new workflow begins with AutoUpgrade behavior. Before dispatching the first workflow task, this field is set to the deployment version on which the parent/ previous run was operating. This inheritance only happens when the task queues belong to the same deployment version. The first workflow task will then be dispatched to either this inherited deployment version, or the current deployment version of the task queue's Deployment. After the first workflow task, the effective behavior depends on worker-sent values in subsequent workflow tasks. Inheritance rules: - ContinueAsNew and child workflows: inherit AutoUpgrade behavior and deployment version - Cron: never inherits - Retry: inherits only if the retried run is effectively AutoUpgrade at the time of retry, and inherited AutoUpgrade behavior when it started (i.e. it is a child of an AutoUpgrade parent or ContinueAsNew of an AutoUpgrade run, running on the same deployment as the parent/previous run) Additional notes: - This field is mutually exclusive with `inherited_pinned_version`. - `versioning_override`, if present, overrides this field during routing decisions. - SDK implementations do not interact with this field and is only used internally by the server to ensure task routing correctness. */ + inheritedAutoUpgradeInfo?: InheritedAutoUpgradeInfo; + /** A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and eager execution was accepted by the server. Only populated by server with version >= 1.29.0. */ + eagerExecutionAccepted?: boolean; + /** During a previous run of this workflow, the server may have notified the SDK that the Target Worker Deployment Version changed, but the SDK declined to upgrade (e.g., by continuing-as-new with PINNED behavior). This field records the target version that was declined. This is a wrapper message to distinguish "never declined" (nil wrapper) from "declined an unversioned target" (non-nil wrapper with nil deployment_version). Used internally by the server during continue-as-new and retry. Should not be read or interpreted by SDKs. */ + declinedTargetVersionUpgrade?: DeclinedTargetVersionUpgrade; + /** Initial time-skipping configuration for this workflow execution, recorded at start time. This may have been set explicitly via the start workflow request, or propagated from a parent/previous execution. The configuration may be updated after start via UpdateWorkflowExecutionOptions, which will be reflected in the WorkflowExecutionOptionsUpdatedEvent. */ + timeSkippingConfig?: TimeSkippingConfig; + /** The time skipped by the previous execution that started this workflow. It can happen in cases of child workflows and continue-as-new workflows. */ + initialSkippedDuration?: string; +} +export const WorkflowExecutionStartedEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + workflowType: S.optional(WorkflowType), + parentWorkflowNamespace: S.optional(S.String), + parentWorkflowNamespaceId: S.optional(S.String), + parentWorkflowExecution: S.optional(WorkflowExecution), + parentInitiatedEventId: S.optional(S.String), + taskQueue: S.optional(TaskQueue), + input: S.optional(Payloads), + workflowExecutionTimeout: S.optional(S.String), + workflowRunTimeout: S.optional(S.String), + workflowTaskTimeout: S.optional(S.String), + continuedExecutionRunId: S.optional(S.String), + initiator: S.optional(WorkflowExecutionStartedEventAttributesInitiator), + continuedFailure: S.optional(Failure), + lastCompletionResult: S.optional(Payloads), + originalExecutionRunId: S.optional(S.String), + identity: S.optional(S.String), + firstExecutionRunId: S.optional(S.String), + retryPolicy: S.optional(RetryPolicy), + attempt: S.optional(S.Number), + workflowExecutionExpirationTime: S.optional(S.String), + cronSchedule: S.optional(S.String), + firstWorkflowTaskBackoff: S.optional(S.String), + memo: S.optional(Memo), + searchAttributes: S.optional(SearchAttributes), + prevAutoResetPoints: S.optional(ResetPoints), + header: S.optional(Header), + parentInitiatedEventVersion: S.optional(S.String), + workflowId: S.optional(S.String), + sourceVersionStamp: S.optional(WorkerVersionStamp), + completionCallbacks: S.optional( + WorkflowExecutionStartedEventAttributesCompletionCallbacksList, + ), + rootWorkflowExecution: S.optional(WorkflowExecution), + inheritedBuildId: S.optional(S.String), + versioningOverride: S.optional(VersioningOverride), + parentPinnedWorkerDeploymentVersion: S.optional(S.String), + priority: S.optional(Priority), + inheritedPinnedVersion: S.optional(WorkerDeploymentVersion), + inheritedAutoUpgradeInfo: S.optional(InheritedAutoUpgradeInfo), + eagerExecutionAccepted: S.optional(S.Boolean), + declinedTargetVersionUpgrade: S.optional(DeclinedTargetVersionUpgrade), + timeSkippingConfig: S.optional(TimeSkippingConfig), + initialSkippedDuration: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowExecutionStartedEventAttributes", +}) as any as S.Schema; + +export interface WorkflowExecutionCompletedEventAttributes { + /** Serialized result of workflow completion (ie: The return value of the workflow function) */ + result?: Payloads; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** If another run is started by cron, this contains the new run id. */ + newExecutionRunId?: string; +} +export const WorkflowExecutionCompletedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + result: S.optional(Payloads), + workflowTaskCompletedEventId: S.optional(S.String), + newExecutionRunId: S.optional(S.String), + }), + ).annotate({ + identifier: "WorkflowExecutionCompletedEventAttributes", + }) as any as S.Schema; + +export type WorkflowExecutionFailedEventAttributesRetryState = + | "RETRY_STATE_UNSPECIFIED" + | "RETRY_STATE_IN_PROGRESS" + | "RETRY_STATE_NON_RETRYABLE_FAILURE" + | "RETRY_STATE_TIMEOUT" + | "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + | "RETRY_STATE_RETRY_POLICY_NOT_SET" + | "RETRY_STATE_INTERNAL_SERVER_ERROR" + | "RETRY_STATE_CANCEL_REQUESTED"; +export const WorkflowExecutionFailedEventAttributesRetryState = + /*@__PURE__*/ S.String; + +export interface WorkflowExecutionFailedEventAttributes { + /** Serialized result of workflow failure (ex: An exception thrown, or error returned) */ + failure?: Failure; + retryState?: WorkflowExecutionFailedEventAttributesRetryState; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** If another run is started by cron or retry, this contains the new run id. */ + newExecutionRunId?: string; +} +export const WorkflowExecutionFailedEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + failure: S.optional(Failure), + retryState: S.optional(WorkflowExecutionFailedEventAttributesRetryState), + workflowTaskCompletedEventId: S.optional(S.String), + newExecutionRunId: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowExecutionFailedEventAttributes", +}) as any as S.Schema; + +export type WorkflowExecutionTimedOutEventAttributesRetryState = + | "RETRY_STATE_UNSPECIFIED" + | "RETRY_STATE_IN_PROGRESS" + | "RETRY_STATE_NON_RETRYABLE_FAILURE" + | "RETRY_STATE_TIMEOUT" + | "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + | "RETRY_STATE_RETRY_POLICY_NOT_SET" + | "RETRY_STATE_INTERNAL_SERVER_ERROR" + | "RETRY_STATE_CANCEL_REQUESTED"; +export const WorkflowExecutionTimedOutEventAttributesRetryState = + /*@__PURE__*/ S.String; + +export interface WorkflowExecutionTimedOutEventAttributes { + retryState?: WorkflowExecutionTimedOutEventAttributesRetryState; + /** If another run is started by cron or retry, this contains the new run id. */ + newExecutionRunId?: string; +} +export const WorkflowExecutionTimedOutEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + retryState: S.optional( + WorkflowExecutionTimedOutEventAttributesRetryState, + ), + newExecutionRunId: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowExecutionTimedOutEventAttributes", +}) as any as S.Schema; + +export interface WorkflowTaskScheduledEventAttributes { + /** The task queue this workflow task was enqueued in, which could be a normal or sticky queue */ + taskQueue?: TaskQueue; + /** How long the worker has to process this task once receiving it before it times out (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + startToCloseTimeout?: string; + /** Starting at 1, how many attempts there have been to complete this task */ + attempt?: number; +} +export const WorkflowTaskScheduledEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + taskQueue: S.optional(TaskQueue), + startToCloseTimeout: S.optional(S.String), + attempt: S.optional(S.Number), + }), +).annotate({ + identifier: "WorkflowTaskScheduledEventAttributes", +}) as any as S.Schema; + +export type WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsItem = + | "SUGGEST_CONTINUE_AS_NEW_REASON_UNSPECIFIED" + | "SUGGEST_CONTINUE_AS_NEW_REASON_HISTORY_SIZE_TOO_LARGE" + | "SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_HISTORY_EVENTS" + | "SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_UPDATES"; +export const WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsItem = + /*@__PURE__*/ S.String; + +/** The reason(s) that suggest_continue_as_new is true, if it is. Unset if suggest_continue_as_new is false. */ +export type WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsList = + Array; +export const WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsList = + /*@__PURE__*/ S.Array( + WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsItem, + ) as any as S.Schema; + +export interface WorkflowTaskStartedEventAttributes { + /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ + scheduledEventId?: string; + /** Identity of the worker who picked up this task */ + identity?: string; + /** This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response, so matching could retry and history service would return success if the request_id matches. In that case, matching will continue to deliver the task to worker. Without this field, history service would return AlreadyStarted error, and matching would drop the task. */ + requestId?: string; + /** True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why. */ + suggestContinueAsNew?: boolean; + /** The reason(s) that suggest_continue_as_new is true, if it is. Unset if suggest_continue_as_new is false. */ + suggestContinueAsNewReasons?: WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsList; + /** True if Workflow's Target Worker Deployment Version is different from its Pinned Version and the workflow is Pinned. Experimental. */ + targetWorkerDeploymentVersionChanged?: boolean; + /** Total history size in bytes, which the workflow might use to decide when to continue-as-new regardless of the suggestion. Note that history event count is just the event id of this event, so we don't include it explicitly here. */ + historySizeBytes?: string; + /** Version info of the worker to whom this task was dispatched. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + workerVersion?: WorkerVersionStamp; + /** Used by server internally to properly reapply build ID redirects to an execution when rebuilding it from events. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + buildIdRedirectCounter?: string; +} +export const WorkflowTaskStartedEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduledEventId: S.optional(S.String), + identity: S.optional(S.String), + requestId: S.optional(S.String), + suggestContinueAsNew: S.optional(S.Boolean), + suggestContinueAsNewReasons: S.optional( + WorkflowTaskStartedEventAttributesSuggestContinueAsNewReasonsList, + ), + targetWorkerDeploymentVersionChanged: S.optional(S.Boolean), + historySizeBytes: S.optional(S.String), + workerVersion: S.optional(WorkerVersionStamp), + buildIdRedirectCounter: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowTaskStartedEventAttributes", +}) as any as S.Schema; + +/** Internal flags used by the core SDK. SDKs using flags must comply with the following behavior: During replay: * If a flag is not recognized (value is too high or not defined), it must fail the workflow task. * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for that flag during and after this WFT are allowed to assume that the flag is present. * If a code check for a flag does not find the flag in the set of used flags, it must take the branch corresponding to the absence of that flag. During non-replay execution of new WFTs: * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not previously recorded) flags when completing the WFT. SDKs which are too old to even know about this field at all are considered to produce undefined behavior if they replay workflows which used this mechanism. (-- api-linter: core::0141::forbidden-types=disabled aip.dev/not-precedent: These really shouldn't have negative values. --) */ +export type WorkflowTaskCompletedMetadataCoreUsedFlagsList = Array; +export const WorkflowTaskCompletedMetadataCoreUsedFlagsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +/** Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages here as processing a workflow with a different language than the one which authored it is already undefined behavior. See `core_used_patches` for more. (-- api-linter: core::0141::forbidden-types=disabled aip.dev/not-precedent: These really shouldn't have negative values. --) */ +export type WorkflowTaskCompletedMetadataLangUsedFlagsList = Array; +export const WorkflowTaskCompletedMetadataLangUsedFlagsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface WorkflowTaskCompletedMetadata { + /** Internal flags used by the core SDK. SDKs using flags must comply with the following behavior: During replay: * If a flag is not recognized (value is too high or not defined), it must fail the workflow task. * If a flag is recognized, it is stored in a set of used flags for the run. Code checks for that flag during and after this WFT are allowed to assume that the flag is present. * If a code check for a flag does not find the flag in the set of used flags, it must take the branch corresponding to the absence of that flag. During non-replay execution of new WFTs: * The SDK is free to use all flags it knows about. It must record any newly-used (IE: not previously recorded) flags when completing the WFT. SDKs which are too old to even know about this field at all are considered to produce undefined behavior if they replay workflows which used this mechanism. (-- api-linter: core::0141::forbidden-types=disabled aip.dev/not-precedent: These really shouldn't have negative values. --) */ + coreUsedFlags?: WorkflowTaskCompletedMetadataCoreUsedFlagsList; + /** Flags used by the SDK lang. No attempt is made to distinguish between different SDK languages here as processing a workflow with a different language than the one which authored it is already undefined behavior. See `core_used_patches` for more. (-- api-linter: core::0141::forbidden-types=disabled aip.dev/not-precedent: These really shouldn't have negative values. --) */ + langUsedFlags?: WorkflowTaskCompletedMetadataLangUsedFlagsList; + /** Name of the SDK that processed the task. This is usually something like "temporal-go" and is usually the same as client-name gRPC header. This should only be set if its value changed since the last time recorded on the workflow (or be set on the first task). (-- api-linter: core::0122::name-suffix=disabled aip.dev/not-precedent: We're ok with a name suffix here. --) */ + sdkName?: string; + /** Version of the SDK that processed the task. This is usually something like "1.20.0" and is usually the same as client-version gRPC header. This should only be set if its value changed since the last time recorded on the workflow (or be set on the first task). */ + sdkVersion?: string; +} +export const WorkflowTaskCompletedMetadata = /*@__PURE__*/ S.suspend(() => + S.Struct({ + coreUsedFlags: S.optional(WorkflowTaskCompletedMetadataCoreUsedFlagsList), + langUsedFlags: S.optional(WorkflowTaskCompletedMetadataLangUsedFlagsList), + sdkName: S.optional(S.String), + sdkVersion: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowTaskCompletedMetadata", +}) as any as S.Schema; + +/** Metadata relevant for metering purposes */ +export interface MeteringMetadata { + /** Count of local activities which have begun an execution attempt during this workflow task, and whose first attempt occurred in some previous task. This is used for metering purposes, and does not affect workflow state. (-- api-linter: core::0141::forbidden-types=disabled aip.dev/not-precedent: Negative values make no sense to represent. --) */ + nonfirstLocalActivityExecutionAttempts?: number; +} +export const MeteringMetadata = /*@__PURE__*/ S.suspend(() => + S.Struct({ + nonfirstLocalActivityExecutionAttempts: S.optional(S.Number), + }), +).annotate({ + identifier: "MeteringMetadata", +}) as any as S.Schema; + +/** Versioning behavior sent by the worker that completed this task for this particular workflow execution. UNSPECIFIED means the task was completed by an unversioned worker. This value updates workflow execution's `versioning_info.behavior`. */ +export type WorkflowTaskCompletedEventAttributesVersioningBehavior = + | "VERSIONING_BEHAVIOR_UNSPECIFIED" + | "VERSIONING_BEHAVIOR_PINNED" + | "VERSIONING_BEHAVIOR_AUTO_UPGRADE"; +export const WorkflowTaskCompletedEventAttributesVersioningBehavior = + /*@__PURE__*/ S.String; + +export interface WorkflowTaskCompletedEventAttributes { + /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ + scheduledEventId?: string; + /** The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to */ + startedEventId?: string; + /** Identity of the worker who completed this task */ + identity?: string; + /** Binary ID of the worker who completed this task Deprecated. Replaced with `deployment_version`. */ + binaryChecksum?: string; + /** Version info of the worker who processed this workflow task. If present, the `build_id` field within is also used as `binary_checksum`, which may be omitted in that case (it may also be populated to preserve compatibility). Deprecated. Use `deployment_version` and `versioning_behavior` instead. */ + workerVersion?: WorkerVersionStamp; + /** Data the SDK wishes to record for itself, but server need not interpret, and does not directly impact workflow state. */ + sdkMetadata?: WorkflowTaskCompletedMetadata; + /** Local usage data sent during workflow task completion and recorded here for posterity */ + meteringMetadata?: MeteringMetadata; + /** The deployment that completed this task. May or may not be set for unversioned workers, depending on whether a value is sent by the SDK. This value updates workflow execution's `versioning_info.deployment`. Deprecated. Replaced with `deployment_version`. */ + deployment?: Deployment; + /** Versioning behavior sent by the worker that completed this task for this particular workflow execution. UNSPECIFIED means the task was completed by an unversioned worker. This value updates workflow execution's `versioning_info.behavior`. */ + versioningBehavior?: WorkflowTaskCompletedEventAttributesVersioningBehavior; + /** The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` is set. This value updates workflow execution's `versioning_info.version`. Deprecated. Replaced with `deployment_version`. */ + workerDeploymentVersion?: string; + /** The name of Worker Deployment that completed this task. Must be set if `versioning_behavior` is set. This value updates workflow execution's `worker_deployment_name`. */ + workerDeploymentName?: string; + /** The Worker Deployment Version that completed this task. Must be set if `versioning_behavior` is set. This value updates workflow execution's `versioning_info.deployment_version`. */ + deploymentVersion?: WorkerDeploymentVersion; +} +export const WorkflowTaskCompletedEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + scheduledEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + identity: S.optional(S.String), + binaryChecksum: S.optional(S.String), + workerVersion: S.optional(WorkerVersionStamp), + sdkMetadata: S.optional(WorkflowTaskCompletedMetadata), + meteringMetadata: S.optional(MeteringMetadata), + deployment: S.optional(Deployment), + versioningBehavior: S.optional( + WorkflowTaskCompletedEventAttributesVersioningBehavior, + ), + workerDeploymentVersion: S.optional(S.String), + workerDeploymentName: S.optional(S.String), + deploymentVersion: S.optional(WorkerDeploymentVersion), + }), +).annotate({ + identifier: "WorkflowTaskCompletedEventAttributes", +}) as any as S.Schema; + +export type WorkflowTaskTimedOutEventAttributesTimeoutType = + | "TIMEOUT_TYPE_UNSPECIFIED" + | "TIMEOUT_TYPE_START_TO_CLOSE" + | "TIMEOUT_TYPE_SCHEDULE_TO_START" + | "TIMEOUT_TYPE_SCHEDULE_TO_CLOSE" + | "TIMEOUT_TYPE_HEARTBEAT"; +export const WorkflowTaskTimedOutEventAttributesTimeoutType = + /*@__PURE__*/ S.String; + +export interface WorkflowTaskTimedOutEventAttributes { + /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ + scheduledEventId?: string; + /** The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to */ + startedEventId?: string; + timeoutType?: WorkflowTaskTimedOutEventAttributesTimeoutType; +} +export const WorkflowTaskTimedOutEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduledEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + timeoutType: S.optional(WorkflowTaskTimedOutEventAttributesTimeoutType), + }), +).annotate({ + identifier: "WorkflowTaskTimedOutEventAttributes", +}) as any as S.Schema; + +export type WorkflowTaskFailedEventAttributesCause = + | "WORKFLOW_TASK_FAILED_CAUSE_UNSPECIFIED" + | "WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_COMMAND" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID" + | "WORKFLOW_TASK_FAILED_CAUSE_RESET_STICKY_TASK_QUEUE" + | "WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_FORCE_CLOSE_COMMAND" + | "WORKFLOW_TASK_FAILED_CAUSE_FAILOVER_CLOSE_COMMAND" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE" + | "WORKFLOW_TASK_FAILED_CAUSE_RESET_WORKFLOW" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY" + | "WORKFLOW_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_MODIFY_WORKFLOW_PROPERTIES_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_PENDING_CHILD_WORKFLOWS_LIMIT_EXCEEDED" + | "WORKFLOW_TASK_FAILED_CAUSE_PENDING_ACTIVITIES_LIMIT_EXCEEDED" + | "WORKFLOW_TASK_FAILED_CAUSE_PENDING_SIGNALS_LIMIT_EXCEEDED" + | "WORKFLOW_TASK_FAILED_CAUSE_PENDING_REQUEST_CANCEL_LIMIT_EXCEEDED" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_UPDATE_WORKFLOW_EXECUTION_MESSAGE" + | "WORKFLOW_TASK_FAILED_CAUSE_UNHANDLED_UPDATE" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_SCHEDULE_NEXUS_OPERATION_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_PENDING_NEXUS_OPERATIONS_LIMIT_EXCEEDED" + | "WORKFLOW_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_NEXUS_OPERATION_ATTRIBUTES" + | "WORKFLOW_TASK_FAILED_CAUSE_FEATURE_DISABLED" + | "WORKFLOW_TASK_FAILED_CAUSE_GRPC_MESSAGE_TOO_LARGE" + | "WORKFLOW_TASK_FAILED_CAUSE_PAYLOADS_TOO_LARGE"; +export const WorkflowTaskFailedEventAttributesCause = /*@__PURE__*/ S.String; + +export interface WorkflowTaskFailedEventAttributes { + /** The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to */ + scheduledEventId?: string; + /** The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to */ + startedEventId?: string; + cause?: WorkflowTaskFailedEventAttributesCause; + /** The failure details */ + failure?: Failure; + /** If a worker explicitly failed this task, this field contains the worker's identity. When the server generates the failure internally this field is set as 'history-service'. */ + identity?: string; + /** The original run id of the workflow. For reset workflow. */ + baseRunId?: string; + /** If the workflow is being reset, the new run id. */ + newRunId?: string; + /** Version of the event where the history branch was forked. Used by multi-cluster replication during resets to identify the correct history branch. */ + forkEventVersion?: string; + /** Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] If a worker explicitly failed this task, its binary id */ + binaryChecksum?: string; + /** Version info of the worker who processed this workflow task. If present, the `build_id` field within is also used as `binary_checksum`, which may be omitted in that case (it may also be populated to preserve compatibility). Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + workerVersion?: WorkerVersionStamp; +} +export const WorkflowTaskFailedEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduledEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + cause: S.optional(WorkflowTaskFailedEventAttributesCause), + failure: S.optional(Failure), + identity: S.optional(S.String), + baseRunId: S.optional(S.String), + newRunId: S.optional(S.String), + forkEventVersion: S.optional(S.String), + binaryChecksum: S.optional(S.String), + workerVersion: S.optional(WorkerVersionStamp), + }), +).annotate({ + identifier: "WorkflowTaskFailedEventAttributes", +}) as any as S.Schema; + +export interface ActivityTaskScheduledEventAttributes { + /** The worker/user assigned identifier for the activity */ + activityId?: string; + activityType?: WorkflowType; + taskQueue?: TaskQueue; + header?: Header; + input?: Payloads; + /** Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted. Either this or `start_to_close_timeout` must be specified. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToCloseTimeout?: string; + /** Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is to put it back into the same queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not specified. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToStartTimeout?: string; + /** Maximum time an activity is allowed to execute after being picked up by a worker. This timeout is always retryable. Either this or `schedule_to_close_timeout` must be specified. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + startToCloseTimeout?: string; + /** Maximum permitted time between successful worker heartbeats. */ + heartbeatTimeout?: string; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** Activities are assigned a default retry policy controlled by the service's dynamic configuration. Retries will happen up to `schedule_to_close_timeout`. To disable retries set retry_policy.maximum_attempts to 1. */ + retryPolicy?: RetryPolicy; + /** If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise, Assignment rules of the activity's Task Queue will be used to determine the Build ID. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + useWorkflowBuildId?: boolean; + /** Priority metadata. If this message is not present, or any fields are not present, they inherit the values from the workflow. */ + priority?: Priority; +} +export const ActivityTaskScheduledEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + activityId: S.optional(S.String), + activityType: S.optional(WorkflowType), + taskQueue: S.optional(TaskQueue), + header: S.optional(Header), + input: S.optional(Payloads), + scheduleToCloseTimeout: S.optional(S.String), + scheduleToStartTimeout: S.optional(S.String), + startToCloseTimeout: S.optional(S.String), + heartbeatTimeout: S.optional(S.String), + workflowTaskCompletedEventId: S.optional(S.String), + retryPolicy: S.optional(RetryPolicy), + useWorkflowBuildId: S.optional(S.Boolean), + priority: S.optional(Priority), + }), +).annotate({ + identifier: "ActivityTaskScheduledEventAttributes", +}) as any as S.Schema; + +export interface ActivityTaskStartedEventAttributes { + /** The id of the `ACTIVITY_TASK_SCHEDULED` event this task corresponds to */ + scheduledEventId?: string; + /** id of the worker that picked up this task */ + identity?: string; + /** This field is populated from the RecordActivityTaskStartedRequest. Matching service would set the request_id on the RecordActivityTaskStartedRequest to a new UUID. This is useful in case a RecordActivityTaskStarted call succeed but matching doesn't get that response, so matching could retry and history service would return success if the request_id matches. In that case, matching will continue to deliver the task to worker. Without this field, history service would return AlreadyStarted error, and matching would drop the task. */ + requestId?: string; + /** Starting at 1, the number of times this task has been attempted */ + attempt?: number; + /** Will be set to the most recent failure details, if this task has previously failed and then been retried. */ + lastFailure?: Failure; + /** Version info of the worker to whom this task was dispatched. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + workerVersion?: WorkerVersionStamp; + /** Used by server internally to properly reapply build ID redirects to an execution when rebuilding it from events. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + buildIdRedirectCounter?: string; +} +export const ActivityTaskStartedEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduledEventId: S.optional(S.String), + identity: S.optional(S.String), + requestId: S.optional(S.String), + attempt: S.optional(S.Number), + lastFailure: S.optional(Failure), + workerVersion: S.optional(WorkerVersionStamp), + buildIdRedirectCounter: S.optional(S.String), + }), +).annotate({ + identifier: "ActivityTaskStartedEventAttributes", +}) as any as S.Schema; + +export interface ActivityTaskCompletedEventAttributes { + /** Serialized results of the activity. IE: The return value of the activity function */ + result?: Payloads; + /** The id of the `ACTIVITY_TASK_SCHEDULED` event this completion corresponds to */ + scheduledEventId?: string; + /** The id of the `ACTIVITY_TASK_STARTED` event this completion corresponds to */ + startedEventId?: string; + /** id of the worker that completed this task */ + identity?: string; + /** Version info of the worker who processed this workflow task. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + workerVersion?: WorkerVersionStamp; +} +export const ActivityTaskCompletedEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + result: S.optional(Payloads), + scheduledEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + identity: S.optional(S.String), + workerVersion: S.optional(WorkerVersionStamp), + }), +).annotate({ + identifier: "ActivityTaskCompletedEventAttributes", +}) as any as S.Schema; + +export type ActivityTaskFailedEventAttributesRetryState = + | "RETRY_STATE_UNSPECIFIED" + | "RETRY_STATE_IN_PROGRESS" + | "RETRY_STATE_NON_RETRYABLE_FAILURE" + | "RETRY_STATE_TIMEOUT" + | "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + | "RETRY_STATE_RETRY_POLICY_NOT_SET" + | "RETRY_STATE_INTERNAL_SERVER_ERROR" + | "RETRY_STATE_CANCEL_REQUESTED"; +export const ActivityTaskFailedEventAttributesRetryState = + /*@__PURE__*/ S.String; + +export interface ActivityTaskFailedEventAttributes { + /** Failure details */ + failure?: Failure; + /** The id of the `ACTIVITY_TASK_SCHEDULED` event this failure corresponds to */ + scheduledEventId?: string; + /** The id of the `ACTIVITY_TASK_STARTED` event this failure corresponds to */ + startedEventId?: string; + /** id of the worker that failed this task */ + identity?: string; + retryState?: ActivityTaskFailedEventAttributesRetryState; + /** Version info of the worker who processed this workflow task. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + workerVersion?: WorkerVersionStamp; +} +export const ActivityTaskFailedEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + failure: S.optional(Failure), + scheduledEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + identity: S.optional(S.String), + retryState: S.optional(ActivityTaskFailedEventAttributesRetryState), + workerVersion: S.optional(WorkerVersionStamp), + }), +).annotate({ + identifier: "ActivityTaskFailedEventAttributes", +}) as any as S.Schema; + +export type ActivityTaskTimedOutEventAttributesRetryState = + | "RETRY_STATE_UNSPECIFIED" + | "RETRY_STATE_IN_PROGRESS" + | "RETRY_STATE_NON_RETRYABLE_FAILURE" + | "RETRY_STATE_TIMEOUT" + | "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + | "RETRY_STATE_RETRY_POLICY_NOT_SET" + | "RETRY_STATE_INTERNAL_SERVER_ERROR" + | "RETRY_STATE_CANCEL_REQUESTED"; +export const ActivityTaskTimedOutEventAttributesRetryState = + /*@__PURE__*/ S.String; + +export interface ActivityTaskTimedOutEventAttributes { + /** If this activity had failed, was retried, and then timed out, that failure is stored as the `cause` in here. */ + failure?: Failure; + /** The id of the `ACTIVITY_TASK_SCHEDULED` event this timeout corresponds to */ + scheduledEventId?: string; + /** The id of the `ACTIVITY_TASK_STARTED` event this timeout corresponds to */ + startedEventId?: string; + retryState?: ActivityTaskTimedOutEventAttributesRetryState; +} +export const ActivityTaskTimedOutEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + failure: S.optional(Failure), + scheduledEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + retryState: S.optional(ActivityTaskTimedOutEventAttributesRetryState), + }), +).annotate({ + identifier: "ActivityTaskTimedOutEventAttributes", +}) as any as S.Schema; + +export interface TimerStartedEventAttributes { + /** The worker/user assigned id for this timer */ + timerId?: string; + /** How long until this timer fires (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + startToFireTimeout?: string; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; +} +export const TimerStartedEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timerId: S.optional(S.String), + startToFireTimeout: S.optional(S.String), + workflowTaskCompletedEventId: S.optional(S.String), + }), +).annotate({ + identifier: "TimerStartedEventAttributes", +}) as any as S.Schema; + +export interface TimerFiredEventAttributes { + /** Will match the `timer_id` from `TIMER_STARTED` event for this timer */ + timerId?: string; + /** The id of the `TIMER_STARTED` event itself */ + startedEventId?: string; +} +export const TimerFiredEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timerId: S.optional(S.String), + startedEventId: S.optional(S.String), + }), +).annotate({ + identifier: "TimerFiredEventAttributes", +}) as any as S.Schema; + +export interface ActivityTaskCancelRequestedEventAttributes { + /** The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel request corresponds to */ + scheduledEventId?: string; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; +} +export const ActivityTaskCancelRequestedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduledEventId: S.optional(S.String), + workflowTaskCompletedEventId: S.optional(S.String), + }), + ).annotate({ + identifier: "ActivityTaskCancelRequestedEventAttributes", + }) as any as S.Schema; + +export interface ActivityTaskCanceledEventAttributes { + /** Additional information that the activity reported upon confirming cancellation */ + details?: Payloads; + /** id of the most recent `ACTIVITY_TASK_CANCEL_REQUESTED` event which refers to the same activity */ + latestCancelRequestedEventId?: string; + /** The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel confirmation corresponds to */ + scheduledEventId?: string; + /** The id of the `ACTIVITY_TASK_STARTED` event this cancel confirmation corresponds to */ + startedEventId?: string; + /** id of the worker who canceled this activity */ + identity?: string; + /** Version info of the worker who processed this workflow task. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] */ + workerVersion?: WorkerVersionStamp; +} +export const ActivityTaskCanceledEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.optional(Payloads), + latestCancelRequestedEventId: S.optional(S.String), + scheduledEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + identity: S.optional(S.String), + workerVersion: S.optional(WorkerVersionStamp), + }), +).annotate({ + identifier: "ActivityTaskCanceledEventAttributes", +}) as any as S.Schema; + +export interface TimerCanceledEventAttributes { + /** Will match the `timer_id` from `TIMER_STARTED` event for this timer */ + timerId?: string; + /** The id of the `TIMER_STARTED` event itself */ + startedEventId?: string; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** The id of the worker who requested this cancel */ + identity?: string; +} +export const TimerCanceledEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + timerId: S.optional(S.String), + startedEventId: S.optional(S.String), + workflowTaskCompletedEventId: S.optional(S.String), + identity: S.optional(S.String), + }), +).annotate({ + identifier: "TimerCanceledEventAttributes", +}) as any as S.Schema; + +/** Serialized information recorded in the marker */ +export type MarkerRecordedEventAttributesDetailsMap = { + [key: string]: Payloads | undefined; +}; +export const MarkerRecordedEventAttributesDetailsMap = /*@__PURE__*/ S.Record( + S.String, + Payloads, +) as any as S.Schema; + +export interface MarkerRecordedEventAttributes { + /** Workers use this to identify the "types" of various markers. Ex: Local activity, side effect. */ + markerName?: string; + /** Serialized information recorded in the marker */ + details?: MarkerRecordedEventAttributesDetailsMap; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + header?: Header; + /** Some uses of markers, like a local activity, could "fail". If they did that is recorded here. */ + failure?: Failure; +} +export const MarkerRecordedEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + markerName: S.optional(S.String), + details: S.optional(MarkerRecordedEventAttributesDetailsMap), + workflowTaskCompletedEventId: S.optional(S.String), + header: S.optional(Header), + failure: S.optional(Failure), + }), +).annotate({ + identifier: "MarkerRecordedEventAttributes", +}) as any as S.Schema; + +export interface WorkflowExecutionSignaledEventAttributes { + /** The name/type of the signal to fire */ + signalName?: string; + /** Will be deserialized and provided as argument(s) to the signal handler */ + input?: Payloads; + /** id of the worker/client who sent this signal */ + identity?: string; + /** Headers that were passed by the sender of the signal and copied by temporal server into the workflow task. */ + header?: Header; + /** Deprecated. This field is never respected and should always be set to false. */ + skipGenerateWorkflowTask?: boolean; + /** When signal origin is a workflow execution, this field is set. */ + externalWorkflowExecution?: WorkflowExecution; + /** The request ID of the Signal request, used by the server to attach this to the correct Event ID when generating link. */ + requestId?: string; +} +export const WorkflowExecutionSignaledEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + signalName: S.optional(S.String), + input: S.optional(Payloads), + identity: S.optional(S.String), + header: S.optional(Header), + skipGenerateWorkflowTask: S.optional(S.Boolean), + externalWorkflowExecution: S.optional(WorkflowExecution), + requestId: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowExecutionSignaledEventAttributes", +}) as any as S.Schema; + +export interface WorkflowExecutionTerminatedEventAttributes { + /** User/client provided reason for termination */ + reason?: string; + details?: Payloads; + /** id of the client who requested termination */ + identity?: string; +} +export const WorkflowExecutionTerminatedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + reason: S.optional(S.String), + details: S.optional(Payloads), + identity: S.optional(S.String), + }), + ).annotate({ + identifier: "WorkflowExecutionTerminatedEventAttributes", + }) as any as S.Schema; + +export interface WorkflowExecutionCancelRequestedEventAttributes { + /** User provided reason for requesting cancellation */ + cause?: string; + /** The ID of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event in the external workflow history when the cancellation was requested by another workflow. */ + externalInitiatedEventId?: string; + externalWorkflowExecution?: WorkflowExecution; + /** id of the worker or client who requested this cancel */ + identity?: string; +} +export const WorkflowExecutionCancelRequestedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + cause: S.optional(S.String), + externalInitiatedEventId: S.optional(S.String), + externalWorkflowExecution: S.optional(WorkflowExecution), + identity: S.optional(S.String), + }), + ).annotate({ + identifier: "WorkflowExecutionCancelRequestedEventAttributes", + }) as any as S.Schema; + +export interface WorkflowExecutionCanceledEventAttributes { + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + details?: Payloads; +} +export const WorkflowExecutionCanceledEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + workflowTaskCompletedEventId: S.optional(S.String), + details: S.optional(Payloads), + }), +).annotate({ + identifier: "WorkflowExecutionCanceledEventAttributes", +}) as any as S.Schema; + +export interface RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** The namespace the workflow to be cancelled lives in. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; + /** Deprecated. */ + control?: string; + /** Workers are expected to set this to true if the workflow they are requesting to cancel is a child of the workflow which issued the request */ + childWorkflowOnly?: boolean; + /** Reason for requesting the cancellation */ + reason?: string; +} +export const RequestCancelExternalWorkflowExecutionInitiatedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowTaskCompletedEventId: S.optional(S.String), + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + control: S.optional(S.String), + childWorkflowOnly: S.optional(S.Boolean), + reason: S.optional(S.String), + }), + ).annotate({ + identifier: + "RequestCancelExternalWorkflowExecutionInitiatedEventAttributes", + }) as any as S.Schema; + +export type RequestCancelExternalWorkflowExecutionFailedEventAttributesCause = + | "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED" + | "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND" + | "CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND"; +export const RequestCancelExternalWorkflowExecutionFailedEventAttributesCause = + /*@__PURE__*/ S.String; + +export interface RequestCancelExternalWorkflowExecutionFailedEventAttributes { + cause?: RequestCancelExternalWorkflowExecutionFailedEventAttributesCause; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** Namespace of the workflow which failed to cancel. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; + /** id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure corresponds to */ + initiatedEventId?: string; + /** Deprecated. */ + control?: string; +} +export const RequestCancelExternalWorkflowExecutionFailedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + cause: S.optional( + RequestCancelExternalWorkflowExecutionFailedEventAttributesCause, + ), + workflowTaskCompletedEventId: S.optional(S.String), + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + initiatedEventId: S.optional(S.String), + control: S.optional(S.String), + }), + ).annotate({ + identifier: "RequestCancelExternalWorkflowExecutionFailedEventAttributes", + }) as any as S.Schema; + +export interface ExternalWorkflowExecutionCancelRequestedEventAttributes { + /** id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to */ + initiatedEventId?: string; + /** Namespace of the to-be-cancelled workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; +} +export const ExternalWorkflowExecutionCancelRequestedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + initiatedEventId: S.optional(S.String), + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + }), + ).annotate({ + identifier: "ExternalWorkflowExecutionCancelRequestedEventAttributes", + }) as any as S.Schema; + +export type WorkflowExecutionContinuedAsNewEventAttributesInitiator = + | "CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED" + | "CONTINUE_AS_NEW_INITIATOR_WORKFLOW" + | "CONTINUE_AS_NEW_INITIATOR_RETRY" + | "CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE"; +export const WorkflowExecutionContinuedAsNewEventAttributesInitiator = + /*@__PURE__*/ S.String; + +/** Experimental. Optionally decide the versioning behavior that the first task of the new run should use. For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version of the previous run. */ +export type WorkflowExecutionContinuedAsNewEventAttributesInitialVersioningBehavior = + | "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_UNSPECIFIED" + | "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_AUTO_UPGRADE" + | "CONTINUE_AS_NEW_VERSIONING_BEHAVIOR_USE_RAMPING_VERSION"; +export const WorkflowExecutionContinuedAsNewEventAttributesInitialVersioningBehavior = + /*@__PURE__*/ S.String; + +export interface WorkflowExecutionContinuedAsNewEventAttributes { + /** The run ID of the new workflow started by this continue-as-new */ + newExecutionRunId?: string; + workflowType?: WorkflowType; + taskQueue?: TaskQueue; + input?: Payloads; + /** Timeout of a single workflow run. */ + workflowRunTimeout?: string; + /** Timeout of a single workflow task. */ + workflowTaskTimeout?: string; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** How long the server will wait before scheduling the first workflow task for the new run. Used for cron, retry, and other continue-as-new cases that server may enforce some minimal delay between new runs for system protection purpose. */ + backoffStartInterval?: string; + initiator?: WorkflowExecutionContinuedAsNewEventAttributesInitiator; + /** Deprecated. If a workflow's retry policy would cause a new run to start when the current one has failed, this field would be populated with that failure. Now (when supported by server and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set. */ + failure?: Failure; + /** The result from the most recent completed run of this workflow. The SDK surfaces this to the new run via APIs such as `GetLastCompletionResult`. */ + lastCompletionResult?: Payloads; + header?: Header; + memo?: Memo; + searchAttributes?: SearchAttributes; + /** If this is set, the new execution inherits the Build ID of the current execution. Otherwise, the assignment rules will be used to independently assign a Build ID to the new execution. Deprecated. Only considered for versioning v0.2. */ + inheritBuildId?: boolean; + /** Experimental. Optionally decide the versioning behavior that the first task of the new run should use. For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version of the previous run. */ + initialVersioningBehavior?: WorkflowExecutionContinuedAsNewEventAttributesInitialVersioningBehavior; +} +export const WorkflowExecutionContinuedAsNewEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + newExecutionRunId: S.optional(S.String), + workflowType: S.optional(WorkflowType), + taskQueue: S.optional(TaskQueue), + input: S.optional(Payloads), + workflowRunTimeout: S.optional(S.String), + workflowTaskTimeout: S.optional(S.String), + workflowTaskCompletedEventId: S.optional(S.String), + backoffStartInterval: S.optional(S.String), + initiator: S.optional( + WorkflowExecutionContinuedAsNewEventAttributesInitiator, + ), + failure: S.optional(Failure), + lastCompletionResult: S.optional(Payloads), + header: S.optional(Header), + memo: S.optional(Memo), + searchAttributes: S.optional(SearchAttributes), + inheritBuildId: S.optional(S.Boolean), + initialVersioningBehavior: S.optional( + WorkflowExecutionContinuedAsNewEventAttributesInitialVersioningBehavior, + ), + }), + ).annotate({ + identifier: "WorkflowExecutionContinuedAsNewEventAttributes", + }) as any as S.Schema; + +/** Default: PARENT_CLOSE_POLICY_TERMINATE. */ +export type StartChildWorkflowExecutionInitiatedEventAttributesParentClosePolicy = + | "PARENT_CLOSE_POLICY_UNSPECIFIED" + | "PARENT_CLOSE_POLICY_TERMINATE" + | "PARENT_CLOSE_POLICY_ABANDON" + | "PARENT_CLOSE_POLICY_REQUEST_CANCEL"; +export const StartChildWorkflowExecutionInitiatedEventAttributesParentClosePolicy = + /*@__PURE__*/ S.String; + +/** Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ +export type StartChildWorkflowExecutionInitiatedEventAttributesWorkflowIdReusePolicy = + | "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED" + | "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE" + | "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + | "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE" + | "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING"; +export const StartChildWorkflowExecutionInitiatedEventAttributesWorkflowIdReusePolicy = + /*@__PURE__*/ S.String; + +export interface StartChildWorkflowExecutionInitiatedEventAttributes { + /** Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowId?: string; + workflowType?: WorkflowType; + taskQueue?: TaskQueue; + input?: Payloads; + /** Total workflow execution timeout including retries and continue as new. */ + workflowExecutionTimeout?: string; + /** Timeout of a single workflow run. */ + workflowRunTimeout?: string; + /** Timeout of a single workflow task. */ + workflowTaskTimeout?: string; + /** Default: PARENT_CLOSE_POLICY_TERMINATE. */ + parentClosePolicy?: StartChildWorkflowExecutionInitiatedEventAttributesParentClosePolicy; + /** Deprecated. */ + control?: string; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ + workflowIdReusePolicy?: StartChildWorkflowExecutionInitiatedEventAttributesWorkflowIdReusePolicy; + retryPolicy?: RetryPolicy; + /** If this child runs on a cron schedule, it will appear here */ + cronSchedule?: string; + header?: Header; + memo?: Memo; + searchAttributes?: SearchAttributes; + /** If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment rules of the child's Task Queue will be used to independently assign a Build ID to it. Deprecated. Only considered for versioning v0.2. */ + inheritBuildId?: boolean; + /** Priority metadata */ + priority?: Priority; + /** The propagated time-skipping configuration for the child workflow. */ + timeSkippingConfig?: TimeSkippingConfig; + /** Propagate the duration skipped to the child workflow. */ + initialSkippedDuration?: string; +} +export const StartChildWorkflowExecutionInitiatedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowId: S.optional(S.String), + workflowType: S.optional(WorkflowType), + taskQueue: S.optional(TaskQueue), + input: S.optional(Payloads), + workflowExecutionTimeout: S.optional(S.String), + workflowRunTimeout: S.optional(S.String), + workflowTaskTimeout: S.optional(S.String), + parentClosePolicy: S.optional( + StartChildWorkflowExecutionInitiatedEventAttributesParentClosePolicy, + ), + control: S.optional(S.String), + workflowTaskCompletedEventId: S.optional(S.String), + workflowIdReusePolicy: S.optional( + StartChildWorkflowExecutionInitiatedEventAttributesWorkflowIdReusePolicy, + ), + retryPolicy: S.optional(RetryPolicy), + cronSchedule: S.optional(S.String), + header: S.optional(Header), + memo: S.optional(Memo), + searchAttributes: S.optional(SearchAttributes), + inheritBuildId: S.optional(S.Boolean), + priority: S.optional(Priority), + timeSkippingConfig: S.optional(TimeSkippingConfig), + initialSkippedDuration: S.optional(S.String), + }), + ).annotate({ + identifier: "StartChildWorkflowExecutionInitiatedEventAttributes", + }) as any as S.Schema; + +export type StartChildWorkflowExecutionFailedEventAttributesCause = + | "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED" + | "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_EXISTS" + | "START_CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND"; +export const StartChildWorkflowExecutionFailedEventAttributesCause = + /*@__PURE__*/ S.String; + +export interface StartChildWorkflowExecutionFailedEventAttributes { + /** Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowId?: string; + workflowType?: WorkflowType; + cause?: StartChildWorkflowExecutionFailedEventAttributesCause; + /** Deprecated. */ + control?: string; + /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ + initiatedEventId?: string; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; +} +export const StartChildWorkflowExecutionFailedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowId: S.optional(S.String), + workflowType: S.optional(WorkflowType), + cause: S.optional(StartChildWorkflowExecutionFailedEventAttributesCause), + control: S.optional(S.String), + initiatedEventId: S.optional(S.String), + workflowTaskCompletedEventId: S.optional(S.String), + }), + ).annotate({ + identifier: "StartChildWorkflowExecutionFailedEventAttributes", + }) as any as S.Schema; + +export interface ChildWorkflowExecutionStartedEventAttributes { + /** Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ + initiatedEventId?: string; + workflowExecution?: WorkflowExecution; + workflowType?: WorkflowType; + header?: Header; +} +export const ChildWorkflowExecutionStartedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + initiatedEventId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + workflowType: S.optional(WorkflowType), + header: S.optional(Header), + }), + ).annotate({ + identifier: "ChildWorkflowExecutionStartedEventAttributes", + }) as any as S.Schema; + +export interface ChildWorkflowExecutionCompletedEventAttributes { + result?: Payloads; + /** Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; + workflowType?: WorkflowType; + /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ + initiatedEventId?: string; + /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ + startedEventId?: string; +} +export const ChildWorkflowExecutionCompletedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + result: S.optional(Payloads), + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + workflowType: S.optional(WorkflowType), + initiatedEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + }), + ).annotate({ + identifier: "ChildWorkflowExecutionCompletedEventAttributes", + }) as any as S.Schema; + +export type ChildWorkflowExecutionFailedEventAttributesRetryState = + | "RETRY_STATE_UNSPECIFIED" + | "RETRY_STATE_IN_PROGRESS" + | "RETRY_STATE_NON_RETRYABLE_FAILURE" + | "RETRY_STATE_TIMEOUT" + | "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + | "RETRY_STATE_RETRY_POLICY_NOT_SET" + | "RETRY_STATE_INTERNAL_SERVER_ERROR" + | "RETRY_STATE_CANCEL_REQUESTED"; +export const ChildWorkflowExecutionFailedEventAttributesRetryState = + /*@__PURE__*/ S.String; + +export interface ChildWorkflowExecutionFailedEventAttributes { + failure?: Failure; + /** Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; + workflowType?: WorkflowType; + /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ + initiatedEventId?: string; + /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ + startedEventId?: string; + retryState?: ChildWorkflowExecutionFailedEventAttributesRetryState; +} +export const ChildWorkflowExecutionFailedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + failure: S.optional(Failure), + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + workflowType: S.optional(WorkflowType), + initiatedEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + retryState: S.optional( + ChildWorkflowExecutionFailedEventAttributesRetryState, + ), + }), + ).annotate({ + identifier: "ChildWorkflowExecutionFailedEventAttributes", + }) as any as S.Schema; + +export interface ChildWorkflowExecutionCanceledEventAttributes { + details?: Payloads; + /** Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; + workflowType?: WorkflowType; + /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ + initiatedEventId?: string; + /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ + startedEventId?: string; +} +export const ChildWorkflowExecutionCanceledEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.optional(Payloads), + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + workflowType: S.optional(WorkflowType), + initiatedEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + }), + ).annotate({ + identifier: "ChildWorkflowExecutionCanceledEventAttributes", + }) as any as S.Schema; + +export type ChildWorkflowExecutionTimedOutEventAttributesRetryState = + | "RETRY_STATE_UNSPECIFIED" + | "RETRY_STATE_IN_PROGRESS" + | "RETRY_STATE_NON_RETRYABLE_FAILURE" + | "RETRY_STATE_TIMEOUT" + | "RETRY_STATE_MAXIMUM_ATTEMPTS_REACHED" + | "RETRY_STATE_RETRY_POLICY_NOT_SET" + | "RETRY_STATE_INTERNAL_SERVER_ERROR" + | "RETRY_STATE_CANCEL_REQUESTED"; +export const ChildWorkflowExecutionTimedOutEventAttributesRetryState = + /*@__PURE__*/ S.String; + +export interface ChildWorkflowExecutionTimedOutEventAttributes { + /** Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; + workflowType?: WorkflowType; + /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ + initiatedEventId?: string; + /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ + startedEventId?: string; + retryState?: ChildWorkflowExecutionTimedOutEventAttributesRetryState; +} +export const ChildWorkflowExecutionTimedOutEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + workflowType: S.optional(WorkflowType), + initiatedEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + retryState: S.optional( + ChildWorkflowExecutionTimedOutEventAttributesRetryState, + ), + }), + ).annotate({ + identifier: "ChildWorkflowExecutionTimedOutEventAttributes", + }) as any as S.Schema; + +export interface ChildWorkflowExecutionTerminatedEventAttributes { + /** Namespace of the child workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; + workflowType?: WorkflowType; + /** Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to */ + initiatedEventId?: string; + /** Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to */ + startedEventId?: string; +} +export const ChildWorkflowExecutionTerminatedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + workflowType: S.optional(WorkflowType), + initiatedEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + }), + ).annotate({ + identifier: "ChildWorkflowExecutionTerminatedEventAttributes", + }) as any as S.Schema; + +export interface SignalExternalWorkflowExecutionInitiatedEventAttributes { + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** Namespace of the to-be-signalled workflow. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; + /** name/type of the signal to fire in the external workflow */ + signalName?: string; + /** Serialized arguments to provide to the signal handler */ + input?: Payloads; + /** Deprecated. */ + control?: string; + /** Workers are expected to set this to true if the workflow they are requesting to cancel is a child of the workflow which issued the request */ + childWorkflowOnly?: boolean; + header?: Header; +} +export const SignalExternalWorkflowExecutionInitiatedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowTaskCompletedEventId: S.optional(S.String), + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + signalName: S.optional(S.String), + input: S.optional(Payloads), + control: S.optional(S.String), + childWorkflowOnly: S.optional(S.Boolean), + header: S.optional(Header), + }), + ).annotate({ + identifier: "SignalExternalWorkflowExecutionInitiatedEventAttributes", + }) as any as S.Schema; + +export type SignalExternalWorkflowExecutionFailedEventAttributesCause = + | "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNSPECIFIED" + | "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND" + | "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_NAMESPACE_NOT_FOUND" + | "SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_SIGNAL_COUNT_LIMIT_EXCEEDED"; +export const SignalExternalWorkflowExecutionFailedEventAttributesCause = + /*@__PURE__*/ S.String; + +export interface SignalExternalWorkflowExecutionFailedEventAttributes { + cause?: SignalExternalWorkflowExecutionFailedEventAttributesCause; + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** Namespace of the workflow which failed the signal. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; + initiatedEventId?: string; + /** Deprecated. */ + control?: string; +} +export const SignalExternalWorkflowExecutionFailedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + cause: S.optional( + SignalExternalWorkflowExecutionFailedEventAttributesCause, + ), + workflowTaskCompletedEventId: S.optional(S.String), + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + initiatedEventId: S.optional(S.String), + control: S.optional(S.String), + }), + ).annotate({ + identifier: "SignalExternalWorkflowExecutionFailedEventAttributes", + }) as any as S.Schema; + +export interface ExternalWorkflowExecutionSignaledEventAttributes { + /** id of the `SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to */ + initiatedEventId?: string; + /** Namespace of the workflow which was signaled. SDKs and UI tools should use `namespace` field but server must use `namespace_id` only. */ + namespace?: string; + namespaceId?: string; + workflowExecution?: WorkflowExecution; + /** Deprecated. */ + control?: string; +} +export const ExternalWorkflowExecutionSignaledEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + initiatedEventId: S.optional(S.String), + namespace: S.optional(S.String), + namespaceId: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + control: S.optional(S.String), + }), + ).annotate({ + identifier: "ExternalWorkflowExecutionSignaledEventAttributes", + }) as any as S.Schema; + +export interface UpsertWorkflowSearchAttributesEventAttributes { + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + searchAttributes?: SearchAttributes; +} +export const UpsertWorkflowSearchAttributesEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowTaskCompletedEventId: S.optional(S.String), + searchAttributes: S.optional(SearchAttributes), + }), + ).annotate({ + identifier: "UpsertWorkflowSearchAttributesEventAttributes", + }) as any as S.Schema; + +/** Metadata about a Workflow Update. */ +export interface Meta { + /** An ID with workflow-scoped uniqueness for this Update. */ + updateId?: string; + /** A string identifying the agent that requested this Update. */ + identity?: string; +} +export const Meta = /*@__PURE__*/ S.suspend(() => + S.Struct({ + updateId: S.optional(S.String), + identity: S.optional(S.String), + }), +).annotate({ identifier: "Meta" }) as any as S.Schema; + +export interface Input { + /** Headers that are passed with the Update from the requesting entity. These can include things like auth or tracing tokens. */ + header?: Header; + /** The name of the Update handler to invoke on the target Workflow. */ + name?: string; + /** The arguments to pass to the named Update handler. */ + args?: Payloads; +} +export const Input = /*@__PURE__*/ S.suspend(() => + S.Struct({ + header: S.optional(Header), + name: S.optional(S.String), + args: S.optional(Payloads), + }), +).annotate({ identifier: "Input" }) as any as S.Schema; + +/** The client request that triggers a Workflow Update. */ +export interface Request { + meta?: Meta; + input?: Input; +} +export const Request = /*@__PURE__*/ S.suspend(() => + S.Struct({ + meta: S.optional(Meta), + input: S.optional(Input), + }), +).annotate({ identifier: "Request" }) as any as S.Schema; + +export interface WorkflowExecutionUpdateAcceptedEventAttributes { + /** The instance ID of the update protocol that generated this event. */ + protocolInstanceId?: string; + /** The message ID of the original request message that initiated this update. Needed so that the worker can recreate and deliver that same message as part of replay. */ + acceptedRequestMessageId?: string; + /** The event ID used to sequence the original request message. */ + acceptedRequestSequencingEventId?: string; + /** The message payload of the original request message that initiated this update. */ + acceptedRequest?: Request; +} +export const WorkflowExecutionUpdateAcceptedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + protocolInstanceId: S.optional(S.String), + acceptedRequestMessageId: S.optional(S.String), + acceptedRequestSequencingEventId: S.optional(S.String), + acceptedRequest: S.optional(Request), + }), + ).annotate({ + identifier: "WorkflowExecutionUpdateAcceptedEventAttributes", + }) as any as S.Schema; + +export interface WorkflowExecutionUpdateRejectedEventAttributes { + /** The instance ID of the update protocol that generated this event. */ + protocolInstanceId?: string; + /** The message ID of the original request message that initiated this update. Needed so that the worker can recreate and deliver that same message as part of replay. */ + rejectedRequestMessageId?: string; + /** The event ID used to sequence the original request message. */ + rejectedRequestSequencingEventId?: string; + /** The message payload of the original request message that initiated this update. */ + rejectedRequest?: Request; + /** The cause of rejection. */ + failure?: Failure; +} +export const WorkflowExecutionUpdateRejectedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + protocolInstanceId: S.optional(S.String), + rejectedRequestMessageId: S.optional(S.String), + rejectedRequestSequencingEventId: S.optional(S.String), + rejectedRequest: S.optional(Request), + failure: S.optional(Failure), + }), + ).annotate({ + identifier: "WorkflowExecutionUpdateRejectedEventAttributes", + }) as any as S.Schema; + +/** The outcome of a Workflow Update: success or failure. */ +export interface Outcome { + success?: Payloads; + failure?: Failure; +} +export const Outcome = /*@__PURE__*/ S.suspend(() => + S.Struct({ + success: S.optional(Payloads), + failure: S.optional(Failure), + }), +).annotate({ identifier: "Outcome" }) as any as S.Schema; + +export interface WorkflowExecutionUpdateCompletedEventAttributes { + /** The metadata about this update. */ + meta?: Meta; + /** The event ID indicating the acceptance of this update. */ + acceptedEventId?: string; + /** The outcome of executing the workflow update function. */ + outcome?: Outcome; +} +export const WorkflowExecutionUpdateCompletedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + meta: S.optional(Meta), + acceptedEventId: S.optional(S.String), + outcome: S.optional(Outcome), + }), + ).annotate({ + identifier: "WorkflowExecutionUpdateCompletedEventAttributes", + }) as any as S.Schema; + +/** Not used anywhere. Use case is replaced by WorkflowExecutionOptionsUpdatedEventAttributes */ +export interface WorkflowPropertiesModifiedExternallyEventAttributes { + /** Not used. */ + newTaskQueue?: string; + /** Not used. */ + newWorkflowTaskTimeout?: string; + /** Not used. */ + newWorkflowRunTimeout?: string; + /** Not used. */ + newWorkflowExecutionTimeout?: string; + /** Not used. */ + upsertedMemo?: Memo; +} +export const WorkflowPropertiesModifiedExternallyEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + newTaskQueue: S.optional(S.String), + newWorkflowTaskTimeout: S.optional(S.String), + newWorkflowRunTimeout: S.optional(S.String), + newWorkflowExecutionTimeout: S.optional(S.String), + upsertedMemo: S.optional(Memo), + }), + ).annotate({ + identifier: "WorkflowPropertiesModifiedExternallyEventAttributes", + }) as any as S.Schema; + +export interface ActivityPropertiesModifiedExternallyEventAttributes { + /** The id of the `ACTIVITY_TASK_SCHEDULED` event this modification corresponds to. */ + scheduledEventId?: string; + /** If set, update the retry policy of the activity, replacing it with the specified one. The number of attempts at the activity is preserved. */ + newRetryPolicy?: RetryPolicy; +} +export const ActivityPropertiesModifiedExternallyEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduledEventId: S.optional(S.String), + newRetryPolicy: S.optional(RetryPolicy), + }), + ).annotate({ + identifier: "ActivityPropertiesModifiedExternallyEventAttributes", + }) as any as S.Schema; + +export interface WorkflowPropertiesModifiedEventAttributes { + /** The `WORKFLOW_TASK_COMPLETED` event which this command was reported with */ + workflowTaskCompletedEventId?: string; + /** If set, update the workflow memo with the provided values. The values will be merged with the existing memo. If the user wants to delete values, a default/empty Payload should be used as the value for the key being deleted. */ + upsertedMemo?: Memo; +} +export const WorkflowPropertiesModifiedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowTaskCompletedEventId: S.optional(S.String), + upsertedMemo: S.optional(Memo), + }), + ).annotate({ + identifier: "WorkflowPropertiesModifiedEventAttributes", + }) as any as S.Schema; + +/** An explanation of why this event was written to history. */ +export type WorkflowExecutionUpdateAdmittedEventAttributesOrigin = + | "UPDATE_ADMITTED_EVENT_ORIGIN_UNSPECIFIED" + | "UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY"; +export const WorkflowExecutionUpdateAdmittedEventAttributesOrigin = + /*@__PURE__*/ S.String; + +export interface WorkflowExecutionUpdateAdmittedEventAttributes { + /** The update request associated with this event. */ + request?: Request; + /** An explanation of why this event was written to history. */ + origin?: WorkflowExecutionUpdateAdmittedEventAttributesOrigin; +} +export const WorkflowExecutionUpdateAdmittedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + request: S.optional(Request), + origin: S.optional(WorkflowExecutionUpdateAdmittedEventAttributesOrigin), + }), + ).annotate({ + identifier: "WorkflowExecutionUpdateAdmittedEventAttributes", + }) as any as S.Schema; + +/** Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal activities and child workflows, these are transmitted to Nexus operations that may be external and are not traditional payloads. */ +export type NexusOperationScheduledEventAttributesNexusHeaderMap = { + [key: string]: string | undefined; +}; +export const NexusOperationScheduledEventAttributesNexusHeaderMap = + /*@__PURE__*/ S.Record( + S.String, + S.String, + ) as any as S.Schema; + +/** Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command. */ +export interface NexusOperationScheduledEventAttributes { + /** Endpoint name, must exist in the endpoint registry. */ + endpoint?: string; + /** Service name. */ + service?: string; + /** Operation name. */ + operation?: string; + /** Input for the operation. The server converts this into Nexus request content and the appropriate content headers internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the content is transformed back to the original Payload stored in this event. */ + input?: unknown; + /** Schedule-to-close timeout for this operation. Indicates how long the caller is willing to wait for operation completion. Calls are retried internally by the server. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) (-- api-linter: core::0142::time-field-names=disabled aip.dev/not-precedent: "timeout" is an acceptable suffix for duration fields in this API. --) */ + scheduleToCloseTimeout?: string; + /** Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal activities and child workflows, these are transmitted to Nexus operations that may be external and are not traditional payloads. */ + nexusHeader?: NexusOperationScheduledEventAttributesNexusHeaderMap; + /** The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with. */ + workflowTaskCompletedEventId?: string; + /** A unique ID generated by the history service upon creation of this event. The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key. */ + requestId?: string; + /** Endpoint ID as resolved in the endpoint registry at the time this event was generated. This is stored on the event and used internally by the server in case the endpoint is renamed from the time the event was originally scheduled. */ + endpointId?: string; + /** Schedule-to-start timeout for this operation. See ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToStartTimeout?: string; + /** Start-to-close timeout for this operation. See ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + startToCloseTimeout?: string; +} +export const NexusOperationScheduledEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + endpoint: S.optional(S.String), + service: S.optional(S.String), + operation: S.optional(S.String), + input: S.optional(S.Unknown), + scheduleToCloseTimeout: S.optional(S.String), + nexusHeader: S.optional( + NexusOperationScheduledEventAttributesNexusHeaderMap, + ), + workflowTaskCompletedEventId: S.optional(S.String), + requestId: S.optional(S.String), + endpointId: S.optional(S.String), + scheduleToStartTimeout: S.optional(S.String), + startToCloseTimeout: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationScheduledEventAttributes", +}) as any as S.Schema; + +/** Event marking an asynchronous operation was started by the responding Nexus handler. If the operation completes synchronously, this event is not generated. In rare situations, such as request timeouts, the service may fail to record the actual start time and will fabricate this event upon receiving the operation completion via callback. */ +export interface NexusOperationStartedEventAttributes { + /** The ID of the `NEXUS_OPERATION_SCHEDULED` event this task corresponds to. */ + scheduledEventId?: string; + /** The operation ID returned by the Nexus handler in the response to the StartOperation request. This ID is used when canceling the operation. Deprecated: Renamed to operation_token. */ + operationId?: string; + /** The request ID allocated at schedule time. */ + requestId?: string; + /** The operation token returned by the Nexus handler in the response to the StartOperation request. This token is used when canceling the operation. */ + operationToken?: string; +} +export const NexusOperationStartedEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + scheduledEventId: S.optional(S.String), + operationId: S.optional(S.String), + requestId: S.optional(S.String), + operationToken: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationStartedEventAttributes", +}) as any as S.Schema; + +/** Nexus operation completed successfully. */ +export interface NexusOperationCompletedEventAttributes { + /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ + scheduledEventId?: string; + /** Serialized result of the Nexus operation. The response of the Nexus handler. Delivered either via a completion callback or as a response to a synchronous operation. */ + result?: unknown; + /** The request ID allocated at schedule time. */ + requestId?: string; +} +export const NexusOperationCompletedEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + scheduledEventId: S.optional(S.String), + result: S.optional(S.Unknown), + requestId: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationCompletedEventAttributes", +}) as any as S.Schema; + +/** Nexus operation failed. */ +export interface NexusOperationFailedEventAttributes { + /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ + scheduledEventId?: string; + /** Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo. */ + failure?: Failure; + /** The request ID allocated at schedule time. */ + requestId?: string; +} +export const NexusOperationFailedEventAttributes = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduledEventId: S.optional(S.String), + failure: S.optional(Failure), + requestId: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationFailedEventAttributes", +}) as any as S.Schema; + +/** Nexus operation completed as canceled. May or may not have been due to a cancellation request by the workflow. */ +export interface NexusOperationCanceledEventAttributes { + /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ + scheduledEventId?: string; + /** Cancellation details. */ + failure?: Failure; + /** The request ID allocated at schedule time. */ + requestId?: string; +} +export const NexusOperationCanceledEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + scheduledEventId: S.optional(S.String), + failure: S.optional(Failure), + requestId: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationCanceledEventAttributes", +}) as any as S.Schema; + +/** Nexus operation timed out. */ +export interface NexusOperationTimedOutEventAttributes { + /** The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation. */ + scheduledEventId?: string; + /** Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo. */ + failure?: Failure; + /** The request ID allocated at schedule time. */ + requestId?: string; +} +export const NexusOperationTimedOutEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + scheduledEventId: S.optional(S.String), + failure: S.optional(Failure), + requestId: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationTimedOutEventAttributes", +}) as any as S.Schema; + +export interface NexusOperationCancelRequestedEventAttributes { + /** The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. */ + scheduledEventId?: string; + /** The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported with. */ + workflowTaskCompletedEventId?: string; +} +export const NexusOperationCancelRequestedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduledEventId: S.optional(S.String), + workflowTaskCompletedEventId: S.optional(S.String), + }), + ).annotate({ + identifier: "NexusOperationCancelRequestedEventAttributes", + }) as any as S.Schema; + +/** Completion callbacks attached to the running workflow execution. */ +export type WorkflowExecutionOptionsUpdatedEventAttributesAttachedCompletionCallbacksList = + Array; +export const WorkflowExecutionOptionsUpdatedEventAttributesAttachedCompletionCallbacksList = + /*@__PURE__*/ S.Array( + Callback, + ) as any as S.Schema; + +export interface WorkflowExecutionOptionsUpdatedEventAttributes { + /** Versioning override upserted in this event. Ignored if nil or if unset_versioning_override is true. */ + versioningOverride?: VersioningOverride; + /** Versioning override removed in this event. */ + unsetVersioningOverride?: boolean; + /** Request ID attached to the running workflow execution so that subsequent requests with same request ID will be deduped. */ + attachedRequestId?: string; + /** Completion callbacks attached to the running workflow execution. */ + attachedCompletionCallbacks?: WorkflowExecutionOptionsUpdatedEventAttributesAttachedCompletionCallbacksList; + /** Optional. The identity of the client who initiated the request that created this event. */ + identity?: string; + /** Priority override upserted in this event. Represents the full priority; not just partial fields. Ignored if nil. */ + priority?: Priority; + /** If set, the time-skipping configuration was changed. Contains the full updated configuration. */ + timeSkippingConfig?: TimeSkippingConfig; +} +export const WorkflowExecutionOptionsUpdatedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + versioningOverride: S.optional(VersioningOverride), + unsetVersioningOverride: S.optional(S.Boolean), + attachedRequestId: S.optional(S.String), + attachedCompletionCallbacks: S.optional( + WorkflowExecutionOptionsUpdatedEventAttributesAttachedCompletionCallbacksList, + ), + identity: S.optional(S.String), + priority: S.optional(Priority), + timeSkippingConfig: S.optional(TimeSkippingConfig), + }), + ).annotate({ + identifier: "WorkflowExecutionOptionsUpdatedEventAttributes", + }) as any as S.Schema; + +export interface NexusOperationCancelRequestCompletedEventAttributes { + /** The ID of the `NEXUS_OPERATION_CANCEL_REQUESTED` event. */ + requestedEventId?: string; + /** The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported with. */ + workflowTaskCompletedEventId?: string; + /** The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. */ + scheduledEventId?: string; +} +export const NexusOperationCancelRequestCompletedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + requestedEventId: S.optional(S.String), + workflowTaskCompletedEventId: S.optional(S.String), + scheduledEventId: S.optional(S.String), + }), + ).annotate({ + identifier: "NexusOperationCancelRequestCompletedEventAttributes", + }) as any as S.Schema; + +export interface NexusOperationCancelRequestFailedEventAttributes { + /** The ID of the `NEXUS_OPERATION_CANCEL_REQUESTED` event. */ + requestedEventId?: string; + /** The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported with. */ + workflowTaskCompletedEventId?: string; + /** Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo. */ + failure?: Failure; + /** The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to. */ + scheduledEventId?: string; +} +export const NexusOperationCancelRequestFailedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + requestedEventId: S.optional(S.String), + workflowTaskCompletedEventId: S.optional(S.String), + failure: S.optional(Failure), + scheduledEventId: S.optional(S.String), + }), + ).annotate({ + identifier: "NexusOperationCancelRequestFailedEventAttributes", + }) as any as S.Schema; + +/** Attributes for an event marking that a workflow execution was paused. */ +export interface WorkflowExecutionPausedEventAttributes { + /** The identity of the client who paused the workflow execution. */ + identity?: string; + /** The reason for pausing the workflow execution. */ + reason?: string; + /** The request ID of the request that paused the workflow execution. */ + requestId?: string; +} +export const WorkflowExecutionPausedEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + identity: S.optional(S.String), + reason: S.optional(S.String), + requestId: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowExecutionPausedEventAttributes", +}) as any as S.Schema; + +/** Attributes for an event marking that a workflow execution was unpaused. */ +export interface WorkflowExecutionUnpausedEventAttributes { + /** The identity of the client who unpaused the workflow execution. */ + identity?: string; + /** The reason for unpausing the workflow execution. */ + reason?: string; + /** The request ID of the request that unpaused the workflow execution. */ + requestId?: string; +} +export const WorkflowExecutionUnpausedEventAttributes = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + identity: S.optional(S.String), + reason: S.optional(S.String), + requestId: S.optional(S.String), + }), +).annotate({ + identifier: "WorkflowExecutionUnpausedEventAttributes", +}) as any as S.Schema; + +/** Attributes for an event indicating that time skipping state changed for a workflow execution, either time was advanced or time skipping was disabled automatically due to a bound being reached. The worker_may_ignore field in HistoryEvent should always be set true for this event. */ +export interface WorkflowExecutionTimeSkippingTransitionedEventAttributes { + /** The virtual time after time skipping was applied. */ + targetTime?: string; + /** when true, time skipping was disabled automatically due to a bound being reached. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "after" is used to indicate temporal ordering. --) */ + disabledAfterBound?: boolean; + /** The wall-clock time when the time-skipping state changed event was generated. */ + wallClockTime?: string; +} +export const WorkflowExecutionTimeSkippingTransitionedEventAttributes = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + targetTime: S.optional(S.String), + disabledAfterBound: S.optional(S.Boolean), + wallClockTime: S.optional(S.String), + }), + ).annotate({ + identifier: "WorkflowExecutionTimeSkippingTransitionedEventAttributes", + }) as any as S.Schema; + +/** History events are the method by which Temporal SDKs advance (or recreate) workflow state. See the `EventType` enum for more info about what each event is for. */ +export interface HistoryEvent { + /** Monotonically increasing event number, starts at 1. */ + eventId?: string; + eventTime?: string; + eventType?: HistoryEventEventType; + /** Failover version of the event, used by the server for multi-cluster replication and history versioning. SDKs generally ignore this field. */ + version?: string; + /** Identifier used by the service to order replication and transfer tasks associated with this event. SDKs generally ignore this field. */ + taskId?: string; + /** Set to true when the SDK may ignore the event as it does not impact workflow state or information in any way that the SDK need be concerned with. If an SDK encounters an event type which it does not understand, it must error unless this is true. If it is true, it's acceptable for the event type and/or attributes to be uninterpretable. */ + workerMayIgnore?: boolean; + /** Metadata on the event. This is often carried over from commands and client calls. Most events won't have this information, and how this information is used is dependent upon the interface that reads it. Current well-known uses: * workflow_execution_started_event_attributes - summary and details from start workflow. * timer_started_event_attributes - summary represents an identifier for the timer for use by user interfaces. */ + userMetadata?: UserMetadata; + /** Links to related entities, such as the entity that started this event's workflow. */ + links?: HistoryEventLinksList; + /** Server-computed authenticated caller identity associated with this event. */ + principal?: Principal; + workflowExecutionStartedEventAttributes?: WorkflowExecutionStartedEventAttributes; + workflowExecutionCompletedEventAttributes?: WorkflowExecutionCompletedEventAttributes; + workflowExecutionFailedEventAttributes?: WorkflowExecutionFailedEventAttributes; + workflowExecutionTimedOutEventAttributes?: WorkflowExecutionTimedOutEventAttributes; + workflowTaskScheduledEventAttributes?: WorkflowTaskScheduledEventAttributes; + workflowTaskStartedEventAttributes?: WorkflowTaskStartedEventAttributes; + workflowTaskCompletedEventAttributes?: WorkflowTaskCompletedEventAttributes; + workflowTaskTimedOutEventAttributes?: WorkflowTaskTimedOutEventAttributes; + workflowTaskFailedEventAttributes?: WorkflowTaskFailedEventAttributes; + activityTaskScheduledEventAttributes?: ActivityTaskScheduledEventAttributes; + activityTaskStartedEventAttributes?: ActivityTaskStartedEventAttributes; + activityTaskCompletedEventAttributes?: ActivityTaskCompletedEventAttributes; + activityTaskFailedEventAttributes?: ActivityTaskFailedEventAttributes; + activityTaskTimedOutEventAttributes?: ActivityTaskTimedOutEventAttributes; + timerStartedEventAttributes?: TimerStartedEventAttributes; + timerFiredEventAttributes?: TimerFiredEventAttributes; + activityTaskCancelRequestedEventAttributes?: ActivityTaskCancelRequestedEventAttributes; + activityTaskCanceledEventAttributes?: ActivityTaskCanceledEventAttributes; + timerCanceledEventAttributes?: TimerCanceledEventAttributes; + markerRecordedEventAttributes?: MarkerRecordedEventAttributes; + workflowExecutionSignaledEventAttributes?: WorkflowExecutionSignaledEventAttributes; + workflowExecutionTerminatedEventAttributes?: WorkflowExecutionTerminatedEventAttributes; + workflowExecutionCancelRequestedEventAttributes?: WorkflowExecutionCancelRequestedEventAttributes; + workflowExecutionCanceledEventAttributes?: WorkflowExecutionCanceledEventAttributes; + requestCancelExternalWorkflowExecutionInitiatedEventAttributes?: RequestCancelExternalWorkflowExecutionInitiatedEventAttributes; + requestCancelExternalWorkflowExecutionFailedEventAttributes?: RequestCancelExternalWorkflowExecutionFailedEventAttributes; + externalWorkflowExecutionCancelRequestedEventAttributes?: ExternalWorkflowExecutionCancelRequestedEventAttributes; + workflowExecutionContinuedAsNewEventAttributes?: WorkflowExecutionContinuedAsNewEventAttributes; + startChildWorkflowExecutionInitiatedEventAttributes?: StartChildWorkflowExecutionInitiatedEventAttributes; + startChildWorkflowExecutionFailedEventAttributes?: StartChildWorkflowExecutionFailedEventAttributes; + childWorkflowExecutionStartedEventAttributes?: ChildWorkflowExecutionStartedEventAttributes; + childWorkflowExecutionCompletedEventAttributes?: ChildWorkflowExecutionCompletedEventAttributes; + childWorkflowExecutionFailedEventAttributes?: ChildWorkflowExecutionFailedEventAttributes; + childWorkflowExecutionCanceledEventAttributes?: ChildWorkflowExecutionCanceledEventAttributes; + childWorkflowExecutionTimedOutEventAttributes?: ChildWorkflowExecutionTimedOutEventAttributes; + childWorkflowExecutionTerminatedEventAttributes?: ChildWorkflowExecutionTerminatedEventAttributes; + signalExternalWorkflowExecutionInitiatedEventAttributes?: SignalExternalWorkflowExecutionInitiatedEventAttributes; + signalExternalWorkflowExecutionFailedEventAttributes?: SignalExternalWorkflowExecutionFailedEventAttributes; + externalWorkflowExecutionSignaledEventAttributes?: ExternalWorkflowExecutionSignaledEventAttributes; + upsertWorkflowSearchAttributesEventAttributes?: UpsertWorkflowSearchAttributesEventAttributes; + workflowExecutionUpdateAcceptedEventAttributes?: WorkflowExecutionUpdateAcceptedEventAttributes; + workflowExecutionUpdateRejectedEventAttributes?: WorkflowExecutionUpdateRejectedEventAttributes; + workflowExecutionUpdateCompletedEventAttributes?: WorkflowExecutionUpdateCompletedEventAttributes; + workflowPropertiesModifiedExternallyEventAttributes?: WorkflowPropertiesModifiedExternallyEventAttributes; + activityPropertiesModifiedExternallyEventAttributes?: ActivityPropertiesModifiedExternallyEventAttributes; + workflowPropertiesModifiedEventAttributes?: WorkflowPropertiesModifiedEventAttributes; + workflowExecutionUpdateAdmittedEventAttributes?: WorkflowExecutionUpdateAdmittedEventAttributes; + nexusOperationScheduledEventAttributes?: NexusOperationScheduledEventAttributes; + nexusOperationStartedEventAttributes?: NexusOperationStartedEventAttributes; + nexusOperationCompletedEventAttributes?: NexusOperationCompletedEventAttributes; + nexusOperationFailedEventAttributes?: NexusOperationFailedEventAttributes; + nexusOperationCanceledEventAttributes?: NexusOperationCanceledEventAttributes; + nexusOperationTimedOutEventAttributes?: NexusOperationTimedOutEventAttributes; + nexusOperationCancelRequestedEventAttributes?: NexusOperationCancelRequestedEventAttributes; + workflowExecutionOptionsUpdatedEventAttributes?: WorkflowExecutionOptionsUpdatedEventAttributes; + nexusOperationCancelRequestCompletedEventAttributes?: NexusOperationCancelRequestCompletedEventAttributes; + nexusOperationCancelRequestFailedEventAttributes?: NexusOperationCancelRequestFailedEventAttributes; + workflowExecutionPausedEventAttributes?: WorkflowExecutionPausedEventAttributes; + workflowExecutionUnpausedEventAttributes?: WorkflowExecutionUnpausedEventAttributes; + workflowExecutionTimeSkippingTransitionedEventAttributes?: WorkflowExecutionTimeSkippingTransitionedEventAttributes; +} +export const HistoryEvent = /*@__PURE__*/ S.suspend(() => + S.Struct({ + eventId: S.optional(S.String), + eventTime: S.optional(S.String), + eventType: S.optional(HistoryEventEventType), + version: S.optional(S.String), + taskId: S.optional(S.String), + workerMayIgnore: S.optional(S.Boolean), + userMetadata: S.optional(UserMetadata), + links: S.optional(HistoryEventLinksList), + principal: S.optional(Principal), + workflowExecutionStartedEventAttributes: S.optional( + WorkflowExecutionStartedEventAttributes, + ), + workflowExecutionCompletedEventAttributes: S.optional( + WorkflowExecutionCompletedEventAttributes, + ), + workflowExecutionFailedEventAttributes: S.optional( + WorkflowExecutionFailedEventAttributes, + ), + workflowExecutionTimedOutEventAttributes: S.optional( + WorkflowExecutionTimedOutEventAttributes, + ), + workflowTaskScheduledEventAttributes: S.optional( + WorkflowTaskScheduledEventAttributes, + ), + workflowTaskStartedEventAttributes: S.optional( + WorkflowTaskStartedEventAttributes, + ), + workflowTaskCompletedEventAttributes: S.optional( + WorkflowTaskCompletedEventAttributes, + ), + workflowTaskTimedOutEventAttributes: S.optional( + WorkflowTaskTimedOutEventAttributes, + ), + workflowTaskFailedEventAttributes: S.optional( + WorkflowTaskFailedEventAttributes, + ), + activityTaskScheduledEventAttributes: S.optional( + ActivityTaskScheduledEventAttributes, + ), + activityTaskStartedEventAttributes: S.optional( + ActivityTaskStartedEventAttributes, + ), + activityTaskCompletedEventAttributes: S.optional( + ActivityTaskCompletedEventAttributes, + ), + activityTaskFailedEventAttributes: S.optional( + ActivityTaskFailedEventAttributes, + ), + activityTaskTimedOutEventAttributes: S.optional( + ActivityTaskTimedOutEventAttributes, + ), + timerStartedEventAttributes: S.optional(TimerStartedEventAttributes), + timerFiredEventAttributes: S.optional(TimerFiredEventAttributes), + activityTaskCancelRequestedEventAttributes: S.optional( + ActivityTaskCancelRequestedEventAttributes, + ), + activityTaskCanceledEventAttributes: S.optional( + ActivityTaskCanceledEventAttributes, + ), + timerCanceledEventAttributes: S.optional(TimerCanceledEventAttributes), + markerRecordedEventAttributes: S.optional(MarkerRecordedEventAttributes), + workflowExecutionSignaledEventAttributes: S.optional( + WorkflowExecutionSignaledEventAttributes, + ), + workflowExecutionTerminatedEventAttributes: S.optional( + WorkflowExecutionTerminatedEventAttributes, + ), + workflowExecutionCancelRequestedEventAttributes: S.optional( + WorkflowExecutionCancelRequestedEventAttributes, + ), + workflowExecutionCanceledEventAttributes: S.optional( + WorkflowExecutionCanceledEventAttributes, + ), + requestCancelExternalWorkflowExecutionInitiatedEventAttributes: S.optional( + RequestCancelExternalWorkflowExecutionInitiatedEventAttributes, + ), + requestCancelExternalWorkflowExecutionFailedEventAttributes: S.optional( + RequestCancelExternalWorkflowExecutionFailedEventAttributes, + ), + externalWorkflowExecutionCancelRequestedEventAttributes: S.optional( + ExternalWorkflowExecutionCancelRequestedEventAttributes, + ), + workflowExecutionContinuedAsNewEventAttributes: S.optional( + WorkflowExecutionContinuedAsNewEventAttributes, + ), + startChildWorkflowExecutionInitiatedEventAttributes: S.optional( + StartChildWorkflowExecutionInitiatedEventAttributes, + ), + startChildWorkflowExecutionFailedEventAttributes: S.optional( + StartChildWorkflowExecutionFailedEventAttributes, + ), + childWorkflowExecutionStartedEventAttributes: S.optional( + ChildWorkflowExecutionStartedEventAttributes, + ), + childWorkflowExecutionCompletedEventAttributes: S.optional( + ChildWorkflowExecutionCompletedEventAttributes, + ), + childWorkflowExecutionFailedEventAttributes: S.optional( + ChildWorkflowExecutionFailedEventAttributes, + ), + childWorkflowExecutionCanceledEventAttributes: S.optional( + ChildWorkflowExecutionCanceledEventAttributes, + ), + childWorkflowExecutionTimedOutEventAttributes: S.optional( + ChildWorkflowExecutionTimedOutEventAttributes, + ), + childWorkflowExecutionTerminatedEventAttributes: S.optional( + ChildWorkflowExecutionTerminatedEventAttributes, + ), + signalExternalWorkflowExecutionInitiatedEventAttributes: S.optional( + SignalExternalWorkflowExecutionInitiatedEventAttributes, + ), + signalExternalWorkflowExecutionFailedEventAttributes: S.optional( + SignalExternalWorkflowExecutionFailedEventAttributes, + ), + externalWorkflowExecutionSignaledEventAttributes: S.optional( + ExternalWorkflowExecutionSignaledEventAttributes, + ), + upsertWorkflowSearchAttributesEventAttributes: S.optional( + UpsertWorkflowSearchAttributesEventAttributes, + ), + workflowExecutionUpdateAcceptedEventAttributes: S.optional( + WorkflowExecutionUpdateAcceptedEventAttributes, + ), + workflowExecutionUpdateRejectedEventAttributes: S.optional( + WorkflowExecutionUpdateRejectedEventAttributes, + ), + workflowExecutionUpdateCompletedEventAttributes: S.optional( + WorkflowExecutionUpdateCompletedEventAttributes, + ), + workflowPropertiesModifiedExternallyEventAttributes: S.optional( + WorkflowPropertiesModifiedExternallyEventAttributes, + ), + activityPropertiesModifiedExternallyEventAttributes: S.optional( + ActivityPropertiesModifiedExternallyEventAttributes, + ), + workflowPropertiesModifiedEventAttributes: S.optional( + WorkflowPropertiesModifiedEventAttributes, + ), + workflowExecutionUpdateAdmittedEventAttributes: S.optional( + WorkflowExecutionUpdateAdmittedEventAttributes, + ), + nexusOperationScheduledEventAttributes: S.optional( + NexusOperationScheduledEventAttributes, + ), + nexusOperationStartedEventAttributes: S.optional( + NexusOperationStartedEventAttributes, + ), + nexusOperationCompletedEventAttributes: S.optional( + NexusOperationCompletedEventAttributes, + ), + nexusOperationFailedEventAttributes: S.optional( + NexusOperationFailedEventAttributes, + ), + nexusOperationCanceledEventAttributes: S.optional( + NexusOperationCanceledEventAttributes, + ), + nexusOperationTimedOutEventAttributes: S.optional( + NexusOperationTimedOutEventAttributes, + ), + nexusOperationCancelRequestedEventAttributes: S.optional( + NexusOperationCancelRequestedEventAttributes, + ), + workflowExecutionOptionsUpdatedEventAttributes: S.optional( + WorkflowExecutionOptionsUpdatedEventAttributes, + ), + nexusOperationCancelRequestCompletedEventAttributes: S.optional( + NexusOperationCancelRequestCompletedEventAttributes, + ), + nexusOperationCancelRequestFailedEventAttributes: S.optional( + NexusOperationCancelRequestFailedEventAttributes, + ), + workflowExecutionPausedEventAttributes: S.optional( + WorkflowExecutionPausedEventAttributes, + ), + workflowExecutionUnpausedEventAttributes: S.optional( + WorkflowExecutionUnpausedEventAttributes, + ), + workflowExecutionTimeSkippingTransitionedEventAttributes: S.optional( + WorkflowExecutionTimeSkippingTransitionedEventAttributes, + ), + }), +).annotate({ identifier: "HistoryEvent" }) as any as S.Schema; + +export type HistoryEventsList = Array; +export const HistoryEventsList = /*@__PURE__*/ S.Array( + HistoryEvent, +) as any as S.Schema; + +export interface History { + events?: HistoryEventsList; +} +export const History = /*@__PURE__*/ S.suspend(() => + S.Struct({ + events: S.optional(HistoryEventsList), + }), +).annotate({ identifier: "History" }) as any as S.Schema; + +export type DataBlobEncodingType = + | "ENCODING_TYPE_UNSPECIFIED" + | "ENCODING_TYPE_PROTO3" + | "ENCODING_TYPE_JSON"; +export const DataBlobEncodingType = /*@__PURE__*/ S.String; + +export interface DataBlob { + encodingType?: DataBlobEncodingType; + data?: string; +} +export const DataBlob = /*@__PURE__*/ S.suspend(() => + S.Struct({ + encodingType: S.optional(DataBlobEncodingType), + data: S.optional(S.String), + }), +).annotate({ identifier: "DataBlob" }) as any as S.Schema; + +/** Raw history is an alternate representation of history that may be returned if configured on the frontend. This is not supported by all SDKs. Either this or `history` will be set. */ +export type GetWorkflowExecutionHistoryResponseRawHistoryList = Array; +export const GetWorkflowExecutionHistoryResponseRawHistoryList = + /*@__PURE__*/ S.Array( + DataBlob, + ) as any as S.Schema; + +export interface GetWorkflowExecutionHistoryResponse { + history?: History; + /** Raw history is an alternate representation of history that may be returned if configured on the frontend. This is not supported by all SDKs. Either this or `history` will be set. */ + rawHistory?: GetWorkflowExecutionHistoryResponseRawHistoryList; + /** Will be set if there are more history events than were included in this response */ + nextPageToken?: string; + archived?: boolean; +} +export const GetWorkflowExecutionHistoryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + history: S.optional(History), + rawHistory: S.optional(GetWorkflowExecutionHistoryResponseRawHistoryList), + nextPageToken: S.optional(S.String), + archived: S.optional(S.Boolean), + }), +).annotate({ + identifier: "GetWorkflowExecutionHistoryResponse", +}) as any as S.Schema; + +export interface GetWorkflowExecutionHistoryReverseRequest { + namespace: string; + execution_workflow_id: string; + execution_workflowId?: string; + execution_runId?: string; + maximumPageSize?: number; + nextPageToken?: string; +} +export const GetWorkflowExecutionHistoryReverseRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + execution_workflow_id: S.String.pipe(T.Label()), + execution_workflowId: S.optional( + S.String.pipe(T.Query("execution.workflowId")), + ), + execution_runId: S.optional(S.String.pipe(T.Query("execution.runId"))), + maximumPageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/workflows/{execution_workflow_id}/history-reverse", + code: 200, + }), + ), + ).annotate({ + identifier: "GetWorkflowExecutionHistoryReverseRequest", + }) as any as S.Schema; + +export interface GetWorkflowExecutionHistoryReverseResponse { + history?: History; + /** Will be set if there are more history events than were included in this response */ + nextPageToken?: string; +} +export const GetWorkflowExecutionHistoryReverseResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + history: S.optional(History), + nextPageToken: S.optional(S.String), + }), + ).annotate({ + identifier: "GetWorkflowExecutionHistoryReverseResponse", + }) as any as S.Schema; + +export interface ListActivityExecutionsRequest { + namespace: string; + /** Max number of executions to return per page. */ + pageSize?: number; + /** Token returned in ListActivityExecutionsResponse. */ + nextPageToken?: string; + /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. */ + query?: string; +} +export const ListActivityExecutionsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + pageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + query: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/activities", + code: 200, + }), + ), +).annotate({ + identifier: "ListActivityExecutionsRequest", +}) as any as S.Schema; + +/** Only scheduled and terminal statuses appear here. More detailed information in PendingActivityInfo but not available in the list response. */ +export type ActivityExecutionListInfoStatus = + | "ACTIVITY_EXECUTION_STATUS_UNSPECIFIED" + | "ACTIVITY_EXECUTION_STATUS_RUNNING" + | "ACTIVITY_EXECUTION_STATUS_COMPLETED" + | "ACTIVITY_EXECUTION_STATUS_FAILED" + | "ACTIVITY_EXECUTION_STATUS_CANCELED" + | "ACTIVITY_EXECUTION_STATUS_TERMINATED" + | "ACTIVITY_EXECUTION_STATUS_TIMED_OUT"; +export const ActivityExecutionListInfoStatus = /*@__PURE__*/ S.String; + +/** Limited activity information returned in the list response. When adding fields here, ensure that it is also present in ActivityExecutionInfo (note that it may already be present in ActivityExecutionInfo but not at the top-level). */ +export interface ActivityExecutionListInfo { + /** A unique identifier of this activity within its namespace along with run ID (below). */ + activityId?: string; + /** The run ID of the standalone activity. */ + runId?: string; + /** The type of the activity, a string that maps to a registered activity on a worker. */ + activityType?: WorkflowType; + /** Time the activity was originally scheduled via a StartActivityExecution request. */ + scheduleTime?: string; + /** If the activity is in a terminal status, this field represents the time the activity transitioned to that status. */ + closeTime?: string; + /** Only scheduled and terminal statuses appear here. More detailed information in PendingActivityInfo but not available in the list response. */ + status?: ActivityExecutionListInfoStatus; + /** Search attributes from the start request. */ + searchAttributes?: SearchAttributes; + /** The task queue this activity was scheduled on when it was originally started, updated on activity options update. */ + taskQueue?: string; + /** Updated on terminal status. */ + stateTransitionCount?: string; + /** Updated once on scheduled and once on terminal status. */ + stateSizeBytes?: string; + /** The difference between close time and scheduled time. This field is only populated if the activity is closed. */ + executionDuration?: string; +} +export const ActivityExecutionListInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + activityId: S.optional(S.String), + runId: S.optional(S.String), + activityType: S.optional(WorkflowType), + scheduleTime: S.optional(S.String), + closeTime: S.optional(S.String), + status: S.optional(ActivityExecutionListInfoStatus), + searchAttributes: S.optional(SearchAttributes), + taskQueue: S.optional(S.String), + stateTransitionCount: S.optional(S.String), + stateSizeBytes: S.optional(S.String), + executionDuration: S.optional(S.String), + }), +).annotate({ + identifier: "ActivityExecutionListInfo", +}) as any as S.Schema; + +export type ListActivityExecutionsResponseExecutionsList = + Array; +export const ListActivityExecutionsResponseExecutionsList = + /*@__PURE__*/ S.Array( + ActivityExecutionListInfo, + ) as any as S.Schema; + +export interface ListActivityExecutionsResponse { + executions?: ListActivityExecutionsResponseExecutionsList; + /** Token to use to fetch the next page. If empty, there is no next page. */ + nextPageToken?: string; +} +export const ListActivityExecutionsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + executions: S.optional(ListActivityExecutionsResponseExecutionsList), + nextPageToken: S.optional(S.String), + }), +).annotate({ + identifier: "ListActivityExecutionsResponse", +}) as any as S.Schema; + +export interface ListArchivedWorkflowExecutionsRequest { + namespace: string; + pageSize?: number; + nextPageToken?: string; + query?: string; +} +export const ListArchivedWorkflowExecutionsRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + pageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + query: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/archived-workflows", + code: 200, + }), + ), +).annotate({ + identifier: "ListArchivedWorkflowExecutionsRequest", +}) as any as S.Schema; + +export type ListArchivedWorkflowExecutionsResponseExecutionsList = + Array; +export const ListArchivedWorkflowExecutionsResponseExecutionsList = + /*@__PURE__*/ S.Array( + WorkflowExecutionInfo, + ) as any as S.Schema; + +export interface ListArchivedWorkflowExecutionsResponse { + executions?: ListArchivedWorkflowExecutionsResponseExecutionsList; + nextPageToken?: string; +} +export const ListArchivedWorkflowExecutionsResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + executions: S.optional( + ListArchivedWorkflowExecutionsResponseExecutionsList, + ), + nextPageToken: S.optional(S.String), + }), +).annotate({ + identifier: "ListArchivedWorkflowExecutionsResponse", +}) as any as S.Schema; + +export interface ListBatchOperationsRequest { + /** Namespace that contains the batch operation */ + namespace: string; + /** List page size */ + pageSize?: number; + /** Next page token */ + nextPageToken?: string; +} +export const ListBatchOperationsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + pageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/batch-operations", + code: 200, + }), + ), +).annotate({ + identifier: "ListBatchOperationsRequest", +}) as any as S.Schema; + +/** Batch operation state */ +export type BatchOperationInfoState = + | "BATCH_OPERATION_STATE_UNSPECIFIED" + | "BATCH_OPERATION_STATE_RUNNING" + | "BATCH_OPERATION_STATE_COMPLETED" + | "BATCH_OPERATION_STATE_FAILED"; +export const BatchOperationInfoState = /*@__PURE__*/ S.String; + +export interface BatchOperationInfo { + /** Batch job ID */ + jobId?: string; + /** Batch operation state */ + state?: BatchOperationInfoState; + /** Batch operation start time */ + startTime?: string; + /** Batch operation close time */ + closeTime?: string; +} +export const BatchOperationInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + jobId: S.optional(S.String), + state: S.optional(BatchOperationInfoState), + startTime: S.optional(S.String), + closeTime: S.optional(S.String), + }), +).annotate({ + identifier: "BatchOperationInfo", +}) as any as S.Schema; + +/** BatchOperationInfo contains the basic info about batch operation */ +export type ListBatchOperationsResponseOperationInfoList = + Array; +export const ListBatchOperationsResponseOperationInfoList = + /*@__PURE__*/ S.Array( + BatchOperationInfo, + ) as any as S.Schema; + +export interface ListBatchOperationsResponse { + /** BatchOperationInfo contains the basic info about batch operation */ + operationInfo?: ListBatchOperationsResponseOperationInfoList; + nextPageToken?: string; +} +export const ListBatchOperationsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + operationInfo: S.optional(ListBatchOperationsResponseOperationInfoList), + nextPageToken: S.optional(S.String), + }), +).annotate({ + identifier: "ListBatchOperationsResponse", +}) as any as S.Schema; + +export interface ListDeploymentsRequest { + namespace: string; + pageSize?: number; + nextPageToken?: string; + /** Optional. Use to filter based on exact series name match. */ + seriesName?: string; +} +export const ListDeploymentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + pageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + seriesName: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/deployments", + code: 200, + }), + ), +).annotate({ + identifier: "ListDeploymentsRequest", +}) as any as S.Schema; + +/** DeploymentListInfo is an abbreviated set of fields from DeploymentInfo that's returned in ListDeployments. Deprecated. */ +export interface DeploymentListInfo { + deployment?: Deployment; + createTime?: string; + /** If this deployment is the current deployment of its deployment series. */ + isCurrent?: boolean; +} +export const DeploymentListInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + deployment: S.optional(Deployment), + createTime: S.optional(S.String), + isCurrent: S.optional(S.Boolean), + }), +).annotate({ + identifier: "DeploymentListInfo", +}) as any as S.Schema; + +export type ListDeploymentsResponseDeploymentsList = Array; +export const ListDeploymentsResponseDeploymentsList = /*@__PURE__*/ S.Array( + DeploymentListInfo, +) as any as S.Schema; + +/** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ +export interface ListDeploymentsResponse { + nextPageToken?: string; + deployments?: ListDeploymentsResponseDeploymentsList; +} +export const ListDeploymentsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + nextPageToken: S.optional(S.String), + deployments: S.optional(ListDeploymentsResponseDeploymentsList), + }), +).annotate({ + identifier: "ListDeploymentsResponse", +}) as any as S.Schema; + +export interface ListNamespacesRequest { + pageSize?: number; + nextPageToken?: string; + /** By default namespaces in NAMESPACE_STATE_DELETED state are not included. Setting include_deleted to true will include deleted namespaces. Note: Namespace is in NAMESPACE_STATE_DELETED state when it was deleted from the system but associated data is not deleted yet. */ + namespaceFilter_includeDeleted?: boolean; +} +export const ListNamespacesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + namespaceFilter_includeDeleted: S.optional( + S.Boolean.pipe(T.Query("namespaceFilter.includeDeleted")), + ), + }).pipe(T.Http({ method: "GET", uri: "/api/v1/namespaces", code: 200 })), +).annotate({ + identifier: "ListNamespacesRequest", +}) as any as S.Schema; + +export type ListNamespacesResponseNamespacesList = + Array; +export const ListNamespacesResponseNamespacesList = /*@__PURE__*/ S.Array( + DescribeNamespaceResponse, +) as any as S.Schema; + +export interface ListNamespacesResponse { + namespaces?: ListNamespacesResponseNamespacesList; + nextPageToken?: string; +} +export const ListNamespacesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespaces: S.optional(ListNamespacesResponseNamespacesList), + nextPageToken: S.optional(S.String), + }), +).annotate({ + identifier: "ListNamespacesResponse", +}) as any as S.Schema; + +export interface ListNexusEndpointsRequest { + pageSize?: number; + /** To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's response, the token will be empty if there's no other page. Note: the last page may be empty if the total number of endpoints registered is a multiple of the page size. */ + nextPageToken?: string; + /** Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results. (-- api-linter: core::203::field-behavior-required=disabled aip.dev/not-precedent: Not following linter rules. --) */ + name?: string; +} +export const ListNexusEndpointsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + name: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/v1/nexus/endpoints", code: 200 })), +).annotate({ + identifier: "ListNexusEndpointsRequest", +}) as any as S.Schema; + +export type ListNexusEndpointsResponseEndpointsList = Array; +export const ListNexusEndpointsResponseEndpointsList = /*@__PURE__*/ S.Array( + Endpoint, +) as any as S.Schema; + +export interface ListNexusEndpointsResponse { + /** Token for getting the next page. */ + nextPageToken?: string; + endpoints?: ListNexusEndpointsResponseEndpointsList; +} +export const ListNexusEndpointsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + nextPageToken: S.optional(S.String), + endpoints: S.optional(ListNexusEndpointsResponseEndpointsList), + }), +).annotate({ + identifier: "ListNexusEndpointsResponse", +}) as any as S.Schema; + +export interface ListNexusOperationExecutionsRequest { + namespace: string; + /** Max number of operations to return per page. */ + pageSize?: number; + /** Token returned in ListNexusOperationExecutionsResponse. */ + nextPageToken?: string; + /** Visibility query, see https://docs.temporal.io/list-filter for the syntax. Search attributes that are avaialble for Nexus operations include: - OperationId - RunId - Endpoint - Service - Operation - RequestId - StartTime - ExecutionTime - CloseTime - ExecutionStatus - ExecutionDuration - StateTransitionCount */ + query?: string; +} +export const ListNexusOperationExecutionsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + pageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + query: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/nexus-operations", + code: 200, + }), + ), +).annotate({ + identifier: "ListNexusOperationExecutionsRequest", +}) as any as S.Schema; + +/** The status is updated once, when the operation is originally scheduled, and again when the operation reaches a terminal status. */ +export type NexusOperationExecutionListInfoStatus = + | "NEXUS_OPERATION_EXECUTION_STATUS_UNSPECIFIED" + | "NEXUS_OPERATION_EXECUTION_STATUS_RUNNING" + | "NEXUS_OPERATION_EXECUTION_STATUS_COMPLETED" + | "NEXUS_OPERATION_EXECUTION_STATUS_FAILED" + | "NEXUS_OPERATION_EXECUTION_STATUS_CANCELED" + | "NEXUS_OPERATION_EXECUTION_STATUS_TERMINATED" + | "NEXUS_OPERATION_EXECUTION_STATUS_TIMED_OUT"; +export const NexusOperationExecutionListInfoStatus = /*@__PURE__*/ S.String; + +/** Limited Nexus operation information returned in the list response. When adding fields here, ensure that it is also present in NexusOperationExecutionInfo (note that it may already be present in NexusOperationExecutionInfo but not at the top-level). */ +export interface NexusOperationExecutionListInfo { + /** A unique identifier of this operation within its namespace along with run ID (below). */ + operationId?: string; + /** The run ID of the standalone Nexus operation. */ + runId?: string; + /** Endpoint name. */ + endpoint?: string; + /** Service name. */ + service?: string; + /** Operation name. */ + operation?: string; + /** Time the operation was originally scheduled via a StartNexusOperation request. */ + scheduleTime?: string; + /** If the operation is in a terminal status, this field represents the time the operation transitioned to that status. */ + closeTime?: string; + /** The status is updated once, when the operation is originally scheduled, and again when the operation reaches a terminal status. */ + status?: NexusOperationExecutionListInfoStatus; + /** Search attributes from the start request. */ + searchAttributes?: SearchAttributes; + /** Updated on terminal status. */ + stateTransitionCount?: string; + /** The difference between close time and scheduled time. This field is only populated if the operation is closed. */ + executionDuration?: string; +} +export const NexusOperationExecutionListInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + operationId: S.optional(S.String), + runId: S.optional(S.String), + endpoint: S.optional(S.String), + service: S.optional(S.String), + operation: S.optional(S.String), + scheduleTime: S.optional(S.String), + closeTime: S.optional(S.String), + status: S.optional(NexusOperationExecutionListInfoStatus), + searchAttributes: S.optional(SearchAttributes), + stateTransitionCount: S.optional(S.String), + executionDuration: S.optional(S.String), + }), +).annotate({ + identifier: "NexusOperationExecutionListInfo", +}) as any as S.Schema; + +export type ListNexusOperationExecutionsResponseOperationsList = + Array; +export const ListNexusOperationExecutionsResponseOperationsList = + /*@__PURE__*/ S.Array( + NexusOperationExecutionListInfo, + ) as any as S.Schema; + +export interface ListNexusOperationExecutionsResponse { + operations?: ListNexusOperationExecutionsResponseOperationsList; + /** Token to use to fetch the next page. If empty, there is no next page. */ + nextPageToken?: string; +} +export const ListNexusOperationExecutionsResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + operations: S.optional( + ListNexusOperationExecutionsResponseOperationsList, + ), + nextPageToken: S.optional(S.String), + }), +).annotate({ + identifier: "ListNexusOperationExecutionsResponse", +}) as any as S.Schema; + +export interface ListScheduleMatchingTimesRequest { + /** The namespace of the schedule to query. */ + namespace: string; + /** The id of the schedule to query. */ + scheduleId: string; + /** Time range to query. */ + startTime?: string; + endTime?: string; +} +export const ListScheduleMatchingTimesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + scheduleId: S.String.pipe(T.Label()), + startTime: S.optional(S.String.pipe(T.Query())), + endTime: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/matching-times", + code: 200, + }), + ), +).annotate({ + identifier: "ListScheduleMatchingTimesRequest", +}) as any as S.Schema; + +export type ListScheduleMatchingTimesResponseStartTimeList = Array; +export const ListScheduleMatchingTimesResponseStartTimeList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface ListScheduleMatchingTimesResponse { + startTime?: ListScheduleMatchingTimesResponseStartTimeList; +} +export const ListScheduleMatchingTimesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + startTime: S.optional(ListScheduleMatchingTimesResponseStartTimeList), + }), +).annotate({ + identifier: "ListScheduleMatchingTimesResponse", +}) as any as S.Schema; + +export interface ListSchedulesRequest { + /** The namespace to list schedules in. */ + namespace: string; + /** How many to return at once. */ + maximumPageSize?: number; + /** Token to get the next page of results. */ + nextPageToken?: string; + /** Query to filter schedules. */ + query?: string; +} +export const ListSchedulesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + maximumPageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + query: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/schedules", + code: 200, + }), + ), +).annotate({ + identifier: "ListSchedulesRequest", +}) as any as S.Schema; + +/** From info (maybe fewer entries): */ +export type ScheduleListInfoRecentActionsList = Array; +export const ScheduleListInfoRecentActionsList = /*@__PURE__*/ S.Array( + ScheduleActionResult, +) as any as S.Schema; + +export type ScheduleListInfoFutureActionTimesList = Array; +export const ScheduleListInfoFutureActionTimesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo that's returned in ListSchedules. */ +export interface ScheduleListInfo { + /** From spec: Some fields are dropped from this copy of spec: timezone_data */ + spec?: ScheduleSpec; + /** From action: Action is a oneof field, but we need to encode this in JSON and oneof fields don't work well with JSON. If action is start_workflow, this is set: */ + workflowType?: WorkflowType; + /** From state: */ + notes?: string; + paused?: boolean; + /** From info (maybe fewer entries): */ + recentActions?: ScheduleListInfoRecentActionsList; + futureActionTimes?: ScheduleListInfoFutureActionTimesList; +} +export const ScheduleListInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + spec: S.optional(ScheduleSpec), + workflowType: S.optional(WorkflowType), + notes: S.optional(S.String), + paused: S.optional(S.Boolean), + recentActions: S.optional(ScheduleListInfoRecentActionsList), + futureActionTimes: S.optional(ScheduleListInfoFutureActionTimesList), + }), +).annotate({ + identifier: "ScheduleListInfo", +}) as any as S.Schema; + +/** ScheduleListEntry is returned by ListSchedules. */ +export interface ScheduleListEntry { + scheduleId?: string; + memo?: Memo; + searchAttributes?: SearchAttributes; + info?: ScheduleListInfo; +} +export const ScheduleListEntry = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scheduleId: S.optional(S.String), + memo: S.optional(Memo), + searchAttributes: S.optional(SearchAttributes), + info: S.optional(ScheduleListInfo), + }), +).annotate({ + identifier: "ScheduleListEntry", +}) as any as S.Schema; + +export type ListSchedulesResponseSchedulesList = Array; +export const ListSchedulesResponseSchedulesList = /*@__PURE__*/ S.Array( + ScheduleListEntry, +) as any as S.Schema; + +export interface ListSchedulesResponse { + schedules?: ListSchedulesResponseSchedulesList; + nextPageToken?: string; +} +export const ListSchedulesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + schedules: S.optional(ListSchedulesResponseSchedulesList), + nextPageToken: S.optional(S.String), + }), +).annotate({ + identifier: "ListSchedulesResponse", +}) as any as S.Schema; + +export interface ListSearchAttributesRequest { + namespace: string; +} +export const ListSearchAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/search-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "ListSearchAttributesRequest", +}) as any as S.Schema; + +export type ListSearchAttributesResponseCustomAttributesValue = + | "INDEXED_VALUE_TYPE_UNSPECIFIED" + | "INDEXED_VALUE_TYPE_TEXT" + | "INDEXED_VALUE_TYPE_KEYWORD" + | "INDEXED_VALUE_TYPE_INT" + | "INDEXED_VALUE_TYPE_DOUBLE" + | "INDEXED_VALUE_TYPE_BOOL" + | "INDEXED_VALUE_TYPE_DATETIME" + | "INDEXED_VALUE_TYPE_KEYWORD_LIST"; +export const ListSearchAttributesResponseCustomAttributesValue = + /*@__PURE__*/ S.String; + +/** Mapping between custom (user-registered) search attribute name to its IndexedValueType. */ +export type ListSearchAttributesResponseCustomAttributesMap = { + [key: string]: ListSearchAttributesResponseCustomAttributesValue | undefined; +}; +export const ListSearchAttributesResponseCustomAttributesMap = + /*@__PURE__*/ S.Record( + S.String, + ListSearchAttributesResponseCustomAttributesValue, + ) as any as S.Schema; + +export type ListSearchAttributesResponseSystemAttributesValue = + | "INDEXED_VALUE_TYPE_UNSPECIFIED" + | "INDEXED_VALUE_TYPE_TEXT" + | "INDEXED_VALUE_TYPE_KEYWORD" + | "INDEXED_VALUE_TYPE_INT" + | "INDEXED_VALUE_TYPE_DOUBLE" + | "INDEXED_VALUE_TYPE_BOOL" + | "INDEXED_VALUE_TYPE_DATETIME" + | "INDEXED_VALUE_TYPE_KEYWORD_LIST"; +export const ListSearchAttributesResponseSystemAttributesValue = + /*@__PURE__*/ S.String; + +/** Mapping between system (predefined) search attribute name to its IndexedValueType. */ +export type ListSearchAttributesResponseSystemAttributesMap = { + [key: string]: ListSearchAttributesResponseSystemAttributesValue | undefined; +}; +export const ListSearchAttributesResponseSystemAttributesMap = + /*@__PURE__*/ S.Record( + S.String, + ListSearchAttributesResponseSystemAttributesValue, + ) as any as S.Schema; + +/** Mapping from the attribute name to the visibility storage native type. */ +export type ListSearchAttributesResponseStorageSchemaMap = { + [key: string]: string | undefined; +}; +export const ListSearchAttributesResponseStorageSchemaMap = + /*@__PURE__*/ S.Record( + S.String, + S.String, + ) as any as S.Schema; + +export interface ListSearchAttributesResponse { + /** Mapping between custom (user-registered) search attribute name to its IndexedValueType. */ + customAttributes?: ListSearchAttributesResponseCustomAttributesMap; + /** Mapping between system (predefined) search attribute name to its IndexedValueType. */ + systemAttributes?: ListSearchAttributesResponseSystemAttributesMap; + /** Mapping from the attribute name to the visibility storage native type. */ + storageSchema?: ListSearchAttributesResponseStorageSchemaMap; +} +export const ListSearchAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + customAttributes: S.optional( + ListSearchAttributesResponseCustomAttributesMap, + ), + systemAttributes: S.optional( + ListSearchAttributesResponseSystemAttributesMap, + ), + storageSchema: S.optional(ListSearchAttributesResponseStorageSchemaMap), + }), +).annotate({ + identifier: "ListSearchAttributesResponse", +}) as any as S.Schema; + +export interface ListWorkerDeploymentsRequest { + namespace: string; + pageSize?: number; + nextPageToken?: string; +} +export const ListWorkerDeploymentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + pageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/worker-deployments", + code: 200, + }), + ), +).annotate({ + identifier: "ListWorkerDeploymentsRequest", +}) as any as S.Schema; + +/** A subset of WorkerDeploymentInfo */ +export interface ListWorkerDeploymentsResponseWorkerDeploymentSummary { + name?: string; + createTime?: string; + routingConfig?: RoutingConfig; + /** Summary of the version that was added most recently in the Worker Deployment. */ + latestVersionSummary?: WorkerDeploymentInfoWorkerDeploymentVersionSummary; + /** Summary of the current version of the Worker Deployment. */ + currentVersionSummary?: WorkerDeploymentInfoWorkerDeploymentVersionSummary; + /** Summary of the ramping version of the Worker Deployment. */ + rampingVersionSummary?: WorkerDeploymentInfoWorkerDeploymentVersionSummary; +} +export const ListWorkerDeploymentsResponseWorkerDeploymentSummary = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.String), + createTime: S.optional(S.String), + routingConfig: S.optional(RoutingConfig), + latestVersionSummary: S.optional( + WorkerDeploymentInfoWorkerDeploymentVersionSummary, + ), + currentVersionSummary: S.optional( + WorkerDeploymentInfoWorkerDeploymentVersionSummary, + ), + rampingVersionSummary: S.optional( + WorkerDeploymentInfoWorkerDeploymentVersionSummary, + ), + }), + ).annotate({ + identifier: "ListWorkerDeploymentsResponseWorkerDeploymentSummary", + }) as any as S.Schema; + +/** The list of worker deployments. */ +export type ListWorkerDeploymentsResponseWorkerDeploymentsList = + Array; +export const ListWorkerDeploymentsResponseWorkerDeploymentsList = + /*@__PURE__*/ S.Array( + ListWorkerDeploymentsResponseWorkerDeploymentSummary, + ) as any as S.Schema; + +export interface ListWorkerDeploymentsResponse { + nextPageToken?: string; + /** The list of worker deployments. */ + workerDeployments?: ListWorkerDeploymentsResponseWorkerDeploymentsList; +} +export const ListWorkerDeploymentsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + nextPageToken: S.optional(S.String), + workerDeployments: S.optional( + ListWorkerDeploymentsResponseWorkerDeploymentsList, + ), + }), +).annotate({ + identifier: "ListWorkerDeploymentsResponse", +}) as any as S.Schema; + +export interface ListWorkersRequest { + namespace: string; + pageSize?: number; + nextPageToken?: string; + /** `query` in ListWorkers is used to filter workers based on worker attributes. Supported attributes: * WorkerInstanceKey * WorkerIdentity * HostName * TaskQueue * DeploymentName * BuildId * SdkName * SdkVersion * StartTime * Status */ + query?: string; + /** When true, the response will include system workers that are created implicitly by the server and not by the user. By default, system workers are excluded. */ + includeSystemWorkers?: boolean; +} +export const ListWorkersRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + pageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + query: S.optional(S.String.pipe(T.Query())), + includeSystemWorkers: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/workers", + code: 200, + }), + ), +).annotate({ + identifier: "ListWorkersRequest", +}) as any as S.Schema; + +/** Deprecated: Use workers instead. This field returns full WorkerInfo which includes expensive runtime metrics. We will stop populating this field in the future. */ +export type ListWorkersResponseWorkersInfoList = Array; +export const ListWorkersResponseWorkersInfoList = /*@__PURE__*/ S.Array( + WorkerInfo, +) as any as S.Schema; + +/** Worker status. Defined by SDK. */ +export type WorkerListInfoStatus = + | "WORKER_STATUS_UNSPECIFIED" + | "WORKER_STATUS_RUNNING" + | "WORKER_STATUS_SHUTTING_DOWN" + | "WORKER_STATUS_SHUTDOWN"; +export const WorkerListInfoStatus = /*@__PURE__*/ S.String; + +/** Plugins currently in use by this SDK. */ +export type WorkerListInfoPluginsList = Array; +export const WorkerListInfoPluginsList = /*@__PURE__*/ S.Array( + PluginInfo, +) as any as S.Schema; + +/** Storage drivers in use by this SDK. */ +export type WorkerListInfoDriversList = Array; +export const WorkerListInfoDriversList = /*@__PURE__*/ S.Array( + StorageDriverInfo, +) as any as S.Schema; + +/** Limited worker information returned in the list response. When adding fields here, ensure that it is also added to WorkerInfo (as it carries the full worker information). */ +export interface WorkerListInfo { + /** Worker identifier, should be unique for the namespace. It is distinct from worker identity, which is not necessarily namespace-unique. */ + workerInstanceKey?: string; + /** Worker identity, set by the client, may not be unique. Usually host_name+(user group name)+process_id, but can be overwritten by the user. */ + workerIdentity?: string; + /** Task queue this worker is polling for tasks. */ + taskQueue?: string; + deploymentVersion?: WorkerDeploymentVersion; + sdkName?: string; + sdkVersion?: string; + /** Worker status. Defined by SDK. */ + status?: WorkerListInfoStatus; + /** Worker start time. It can be used to determine worker uptime. (current time - start time) */ + startTime?: string; + /** Worker host identifier. */ + hostName?: string; + /** Worker grouping identifier. A key to group workers that share the same client+namespace+process. This will be used to build the worker command nexus task queue name: "temporal-sys/worker-commands/{worker_grouping_key}" */ + workerGroupingKey?: string; + /** Worker process identifier. This id only needs to be unique within one host (so using e.g. a unix pid would be appropriate). */ + processId?: string; + /** Plugins currently in use by this SDK. */ + plugins?: WorkerListInfoPluginsList; + /** Storage drivers in use by this SDK. */ + drivers?: WorkerListInfoDriversList; +} +export const WorkerListInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workerInstanceKey: S.optional(S.String), + workerIdentity: S.optional(S.String), + taskQueue: S.optional(S.String), + deploymentVersion: S.optional(WorkerDeploymentVersion), + sdkName: S.optional(S.String), + sdkVersion: S.optional(S.String), + status: S.optional(WorkerListInfoStatus), + startTime: S.optional(S.String), + hostName: S.optional(S.String), + workerGroupingKey: S.optional(S.String), + processId: S.optional(S.String), + plugins: S.optional(WorkerListInfoPluginsList), + drivers: S.optional(WorkerListInfoDriversList), + }), +).annotate({ identifier: "WorkerListInfo" }) as any as S.Schema; + +/** Limited worker information. */ +export type ListWorkersResponseWorkersList = Array; +export const ListWorkersResponseWorkersList = /*@__PURE__*/ S.Array( + WorkerListInfo, +) as any as S.Schema; + +export interface ListWorkersResponse { + /** Deprecated: Use workers instead. This field returns full WorkerInfo which includes expensive runtime metrics. We will stop populating this field in the future. */ + workersInfo?: ListWorkersResponseWorkersInfoList; + /** Limited worker information. */ + workers?: ListWorkersResponseWorkersList; + /** Next page token */ + nextPageToken?: string; +} +export const ListWorkersResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workersInfo: S.optional(ListWorkersResponseWorkersInfoList), + workers: S.optional(ListWorkersResponseWorkersList), + nextPageToken: S.optional(S.String), + }), +).annotate({ + identifier: "ListWorkersResponse", +}) as any as S.Schema; + +export interface ListWorkflowExecutionsRequest { + namespace: string; + pageSize?: number; + nextPageToken?: string; + query?: string; +} +export const ListWorkflowExecutionsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + pageSize: S.optional(S.Number.pipe(T.Query())), + nextPageToken: S.optional(S.String.pipe(T.Query())), + query: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/workflows", + code: 200, + }), + ), +).annotate({ + identifier: "ListWorkflowExecutionsRequest", +}) as any as S.Schema; + +export type ListWorkflowExecutionsResponseExecutionsList = + Array; +export const ListWorkflowExecutionsResponseExecutionsList = + /*@__PURE__*/ S.Array( + WorkflowExecutionInfo, + ) as any as S.Schema; + +export interface ListWorkflowExecutionsResponse { + executions?: ListWorkflowExecutionsResponseExecutionsList; + nextPageToken?: string; +} +export const ListWorkflowExecutionsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + executions: S.optional(ListWorkflowExecutionsResponseExecutionsList), + nextPageToken: S.optional(S.String), + }), +).annotate({ + identifier: "ListWorkflowExecutionsResponse", +}) as any as S.Schema; + +export interface ListWorkflowRulesRequest { + namespace: string; + nextPageToken?: string; +} +export const ListWorkflowRulesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + nextPageToken: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/workflow-rules", + code: 200, + }), + ), +).annotate({ + identifier: "ListWorkflowRulesRequest", +}) as any as S.Schema; + +export type ListWorkflowRulesResponseRulesList = Array; +export const ListWorkflowRulesResponseRulesList = /*@__PURE__*/ S.Array( + WorkflowRule, +) as any as S.Schema; + +export interface ListWorkflowRulesResponse { + rules?: ListWorkflowRulesResponseRulesList; + nextPageToken?: string; +} +export const ListWorkflowRulesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + rules: S.optional(ListWorkflowRulesResponseRulesList), + nextPageToken: S.optional(S.String), + }), +).annotate({ + identifier: "ListWorkflowRulesResponse", +}) as any as S.Schema; + +export interface PatchScheduleRequest { + /** The namespace of the schedule to patch. */ + namespace: string; + /** The id of the schedule to patch. */ + scheduleId: string; + patch?: SchedulePatch; + /** The identity of the client who initiated this request. */ + identity?: string; + /** A unique identifier for this update request for idempotence. Typically UUIDv4. */ + requestId?: string; +} +export const PatchScheduleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + scheduleId: S.String.pipe(T.Label()), + patch: S.optional(SchedulePatch), + identity: S.optional(S.String), + requestId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/patch", + code: 200, + }), + ), +).annotate({ + identifier: "PatchScheduleRequest", +}) as any as S.Schema; + +export type PatchScheduleResponse2 = unknown; +export const PatchScheduleResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "PatchScheduleResponse2", +}) as any as S.Schema; + +export interface PauseActivityRequest { + /** Namespace of the workflow which scheduled this activity. */ + namespace: string; + /** Execution info of the workflow which scheduled this activity */ + execution?: WorkflowExecution; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Only the activity with this ID will be paused. */ + id?: string; + /** Pause all running activities of this type. Note: Experimental - the behavior of pause by activity type might change in a future release. */ + type?: string; + /** Reason to pause the activity. */ + reason?: string; + /** Used to de-dupe pause requests. */ + requestId?: string; +} +export const PauseActivityRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + execution: S.optional(WorkflowExecution), + identity: S.optional(S.String), + id: S.optional(S.String), + type: S.optional(S.String), + reason: S.optional(S.String), + requestId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities-deprecated/pause", + code: 200, + }), + ), +).annotate({ + identifier: "PauseActivityRequest", +}) as any as S.Schema; + +export type PauseActivityResponse2 = unknown; +export const PauseActivityResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "PauseActivityResponse2", +}) as any as S.Schema; + +export interface PauseActivityExecutionRequest { + /** Namespace of the workflow which scheduled this activity. */ + namespace: string; + /** The ID of the activity to target. */ + activityId: string; + /** If provided, pause a workflow activity (or activities) for the given workflow ID. If empty, targets a standalone activity. */ + workflowId?: string; + /** Run ID of the workflow or standalone activity. */ + runId?: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Reason to pause the activity. */ + reason?: string; + /** Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. */ + resourceId?: string; + /** Used to de-dupe pause requests. */ + requestId?: string; +} +export const PauseActivityExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + workflowId: S.optional(S.String), + runId: S.optional(S.String), + identity: S.optional(S.String), + reason: S.optional(S.String), + resourceId: S.optional(S.String), + requestId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/pause", + code: 200, + }), + ), +).annotate({ + identifier: "PauseActivityExecutionRequest", +}) as any as S.Schema; + +export type PauseActivityExecutionResponse2 = unknown; +export const PauseActivityExecutionResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "PauseActivityExecutionResponse2", +}) as any as S.Schema; + +export interface PauseWorkflowExecutionRequest { + /** Namespace of the workflow to pause. */ + namespace: string; + /** ID of the workflow execution to be paused. Required. */ + workflowId: string; + /** Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused. */ + runId?: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Reason to pause the workflow execution. */ + reason?: string; + /** A unique identifier for this pause request for idempotence. Typically UUIDv4. */ + requestId?: string; +} +export const PauseWorkflowExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workflowId: S.String.pipe(T.Label()), + runId: S.optional(S.String), + identity: S.optional(S.String), + reason: S.optional(S.String), + requestId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{workflowId}/pause", + code: 200, + }), + ), +).annotate({ + identifier: "PauseWorkflowExecutionRequest", +}) as any as S.Schema; + +export type PauseWorkflowExecutionResponse2 = unknown; +export const PauseWorkflowExecutionResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "PauseWorkflowExecutionResponse2", +}) as any as S.Schema; + +export interface PollActivityExecutionRequest { + namespace: string; + activityId: string; + /** Activity run ID. If empty the request targets the latest run. */ + runId?: string; +} +export const PollActivityExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + runId: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/outcome", + code: 200, + }), + ), +).annotate({ + identifier: "PollActivityExecutionRequest", +}) as any as S.Schema; + +export interface PollActivityExecutionResponse { + /** The run ID of the activity, useful when run_id was not specified in the request. */ + runId?: string; + outcome?: ActivityExecutionOutcome; +} +export const PollActivityExecutionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + runId: S.optional(S.String), + outcome: S.optional(ActivityExecutionOutcome), + }), +).annotate({ + identifier: "PollActivityExecutionResponse", +}) as any as S.Schema; + +export type PollNexusOperationExecutionRequestWaitStage = + | "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED" + | "NEXUS_OPERATION_WAIT_STAGE_STARTED" + | "NEXUS_OPERATION_WAIT_STAGE_CLOSED"; +export const PollNexusOperationExecutionRequestWaitStage = + /*@__PURE__*/ S.String; + +export interface PollNexusOperationExecutionRequest { + namespace: string; + operationId: string; + /** Operation run ID. If empty the request targets the latest run. */ + runId?: string; + /** Stage to wait for. The operation may be in a more advanced stage when the poll is unblocked. */ + waitStage?: PollNexusOperationExecutionRequestWaitStage | (string & {}); +} +export const PollNexusOperationExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + operationId: S.String.pipe(T.Label()), + runId: S.optional(S.String.pipe(T.Query())), + waitStage: S.optional( + PollNexusOperationExecutionRequestWaitStage.pipe(T.Query()), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}/poll", + code: 200, + }), + ), +).annotate({ + identifier: "PollNexusOperationExecutionRequest", +}) as any as S.Schema; + +/** The current stage of the operation. May be more advanced than the stage requested in the poll. */ +export type PollNexusOperationExecutionResponseWaitStage = + | "NEXUS_OPERATION_WAIT_STAGE_UNSPECIFIED" + | "NEXUS_OPERATION_WAIT_STAGE_STARTED" + | "NEXUS_OPERATION_WAIT_STAGE_CLOSED"; +export const PollNexusOperationExecutionResponseWaitStage = + /*@__PURE__*/ S.String; + +export interface PollNexusOperationExecutionResponse { + /** The run ID of the operation, useful when run_id was not specified in the request. */ + runId?: string; + /** The current stage of the operation. May be more advanced than the stage requested in the poll. */ + waitStage?: PollNexusOperationExecutionResponseWaitStage; + /** Operation token. Only populated for asynchronous operations after a successful StartOperation call. */ + operationToken?: string; + /** The result if the operation completed successfully. */ + result?: unknown; + /** The failure if the operation completed unsuccessfully. */ + failure?: Failure; +} +export const PollNexusOperationExecutionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + runId: S.optional(S.String), + waitStage: S.optional(PollNexusOperationExecutionResponseWaitStage), + operationToken: S.optional(S.String), + result: S.optional(S.Unknown), + failure: S.optional(Failure), + }), +).annotate({ + identifier: "PollNexusOperationExecutionResponse", +}) as any as S.Schema; + +/** See https://docs.temporal.io/docs/concepts/queries/ */ +export interface WorkflowQuery { + /** The workflow-author-defined identifier of the query. Typically a function name. */ + queryType?: string; + /** Serialized arguments that will be provided to the query handler. */ + queryArgs?: Payloads; + /** Headers that were passed by the caller of the query and copied by temporal server into the workflow task. */ + header?: Header; +} +export const WorkflowQuery = /*@__PURE__*/ S.suspend(() => + S.Struct({ + queryType: S.optional(S.String), + queryArgs: S.optional(Payloads), + header: S.optional(Header), + }), +).annotate({ identifier: "WorkflowQuery" }) as any as S.Schema; + +/** QueryRejectCondition can used to reject the query if workflow state does not satisfy condition. Default: QUERY_REJECT_CONDITION_NONE. */ +export type QueryWorkflowRequestQueryRejectCondition = + | "QUERY_REJECT_CONDITION_UNSPECIFIED" + | "QUERY_REJECT_CONDITION_NONE" + | "QUERY_REJECT_CONDITION_NOT_OPEN" + | "QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY"; +export const QueryWorkflowRequestQueryRejectCondition = /*@__PURE__*/ S.String; + +export interface QueryWorkflowRequest { + namespace: string; + execution_workflow_id: string; + query_query_type: string; + execution?: WorkflowExecution; + query?: WorkflowQuery; + /** QueryRejectCondition can used to reject the query if workflow state does not satisfy condition. Default: QUERY_REJECT_CONDITION_NONE. */ + queryRejectCondition?: + | QueryWorkflowRequestQueryRejectCondition + | (string & {}); +} +export const QueryWorkflowRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + execution_workflow_id: S.String.pipe(T.Label()), + query_query_type: S.String.pipe(T.Label()), + execution: S.optional(WorkflowExecution), + query: S.optional(WorkflowQuery), + queryRejectCondition: S.optional(QueryWorkflowRequestQueryRejectCondition), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{execution_workflow_id}/query/{query_query_type}", + code: 200, + }), + ), +).annotate({ + identifier: "QueryWorkflowRequest", +}) as any as S.Schema; + +export type QueryRejectedStatus = + | "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED" + | "WORKFLOW_EXECUTION_STATUS_RUNNING" + | "WORKFLOW_EXECUTION_STATUS_COMPLETED" + | "WORKFLOW_EXECUTION_STATUS_FAILED" + | "WORKFLOW_EXECUTION_STATUS_CANCELED" + | "WORKFLOW_EXECUTION_STATUS_TERMINATED" + | "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW" + | "WORKFLOW_EXECUTION_STATUS_TIMED_OUT" + | "WORKFLOW_EXECUTION_STATUS_PAUSED"; +export const QueryRejectedStatus = /*@__PURE__*/ S.String; + +export interface QueryRejected { + status?: QueryRejectedStatus; +} +export const QueryRejected = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: S.optional(QueryRejectedStatus), + }), +).annotate({ identifier: "QueryRejected" }) as any as S.Schema; + +export interface QueryWorkflowResponse { + queryResult?: Payloads; + queryRejected?: QueryRejected; +} +export const QueryWorkflowResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + queryResult: S.optional(Payloads), + queryRejected: S.optional(QueryRejected), + }), +).annotate({ + identifier: "QueryWorkflowResponse", +}) as any as S.Schema; + +export interface RecordActivityTaskHeartbeatRequest { + namespace: string; + /** The task token as received in `PollActivityTaskQueueResponse` */ + taskToken?: string; + /** Arbitrary data, of which the most recent call is kept, to store for this activity */ + details?: Payloads; + /** The identity of the worker/client */ + identity?: string; + /** Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. */ + resourceId?: string; +} +export const RecordActivityTaskHeartbeatRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + taskToken: S.optional(S.String), + details: S.optional(Payloads), + identity: S.optional(S.String), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activity-heartbeat", + code: 200, + }), + ), +).annotate({ + identifier: "RecordActivityTaskHeartbeatRequest", +}) as any as S.Schema; + +export interface RecordActivityTaskHeartbeatResponse { + /** Will be set to true if the activity has been asked to cancel itself. The SDK should then notify the activity of cancellation if it is still running. */ + cancelRequested?: boolean; + /** Will be set to true if the activity is paused. */ + activityPaused?: boolean; + /** Will be set to true if the activity was reset. Applies only to the current run. */ + activityReset?: boolean; +} +export const RecordActivityTaskHeartbeatResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + cancelRequested: S.optional(S.Boolean), + activityPaused: S.optional(S.Boolean), + activityReset: S.optional(S.Boolean), + }), +).annotate({ + identifier: "RecordActivityTaskHeartbeatResponse", +}) as any as S.Schema; + +export interface RecordActivityTaskHeartbeatByIdRequest { + /** Namespace of the workflow which scheduled this activity */ + namespace: string; + /** Id of the activity we're heartbeating */ + activityId: string; + /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ + workflowId?: string; + /** For a workflow activity - the run ID of the workflow which scheduled this activity. For a standalone activity - the run ID of the activity. */ + runId?: string; + /** Arbitrary data, of which the most recent call is kept, to store for this activity */ + details?: Payloads; + /** The identity of the worker/client */ + identity?: string; + /** Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. */ + resourceId?: string; +} +export const RecordActivityTaskHeartbeatByIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + workflowId: S.optional(S.String), + runId: S.optional(S.String), + details: S.optional(Payloads), + identity: S.optional(S.String), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/heartbeat", + code: 200, + }), + ), +).annotate({ + identifier: "RecordActivityTaskHeartbeatByIdRequest", +}) as any as S.Schema; + +export interface RecordActivityTaskHeartbeatByIdResponse { + /** Will be set to true if the activity has been asked to cancel itself. The SDK should then notify the activity of cancellation if it is still running. */ + cancelRequested?: boolean; + /** Will be set to true if the activity is paused. */ + activityPaused?: boolean; + /** Will be set to true if the activity was reset. Applies only to the current run. */ + activityReset?: boolean; +} +export const RecordActivityTaskHeartbeatByIdResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + cancelRequested: S.optional(S.Boolean), + activityPaused: S.optional(S.Boolean), + activityReset: S.optional(S.Boolean), + }), +).annotate({ + identifier: "RecordActivityTaskHeartbeatByIdResponse", +}) as any as S.Schema; + +export type RecordWorkerHeartbeatRequestWorkerHeartbeatList = + Array; +export const RecordWorkerHeartbeatRequestWorkerHeartbeatList = + /*@__PURE__*/ S.Array( + WorkerHeartbeat, + ) as any as S.Schema; + +export interface RecordWorkerHeartbeatRequest { + /** Namespace this worker belongs to. */ + namespace: string; + /** The identity of the client who initiated this request. */ + identity?: string; + workerHeartbeat?: RecordWorkerHeartbeatRequestWorkerHeartbeatList; + /** Resource ID for routing. Contains the worker grouping key. */ + resourceId?: string; +} +export const RecordWorkerHeartbeatRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + identity: S.optional(S.String), + workerHeartbeat: S.optional( + RecordWorkerHeartbeatRequestWorkerHeartbeatList, + ), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workers/heartbeat", + code: 200, + }), + ), +).annotate({ + identifier: "RecordWorkerHeartbeatRequest", +}) as any as S.Schema; + +export type RecordWorkerHeartbeatResponse2 = unknown; +export const RecordWorkerHeartbeatResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "RecordWorkerHeartbeatResponse2", +}) as any as S.Schema; + +export type RegisterNamespaceRequestClustersList = + Array; +export const RegisterNamespaceRequestClustersList = /*@__PURE__*/ S.Array( + ClusterReplicationConfig, +) as any as S.Schema; + +/** A key-value map for any customized purpose. */ +export type RegisterNamespaceRequestDataMap = { + [key: string]: string | undefined; +}; +export const RegisterNamespaceRequestDataMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +/** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ +export type RegisterNamespaceRequestHistoryArchivalState = + | "ARCHIVAL_STATE_UNSPECIFIED" + | "ARCHIVAL_STATE_DISABLED" + | "ARCHIVAL_STATE_ENABLED"; +export const RegisterNamespaceRequestHistoryArchivalState = + /*@__PURE__*/ S.String; + +/** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ +export type RegisterNamespaceRequestVisibilityArchivalState = + | "ARCHIVAL_STATE_UNSPECIFIED" + | "ARCHIVAL_STATE_DISABLED" + | "ARCHIVAL_STATE_ENABLED"; +export const RegisterNamespaceRequestVisibilityArchivalState = + /*@__PURE__*/ S.String; + +export interface RegisterNamespaceRequest { + namespace?: string; + description?: string; + ownerEmail?: string; + workflowExecutionRetentionPeriod?: string; + clusters?: RegisterNamespaceRequestClustersList; + activeClusterName?: string; + /** A key-value map for any customized purpose. */ + data?: RegisterNamespaceRequestDataMap; + securityToken?: string; + isGlobalNamespace?: boolean; + /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ + historyArchivalState?: + | RegisterNamespaceRequestHistoryArchivalState + | (string & {}); + historyArchivalUri?: string; + /** If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used. */ + visibilityArchivalState?: + | RegisterNamespaceRequestVisibilityArchivalState + | (string & {}); + visibilityArchivalUri?: string; +} +export const RegisterNamespaceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String), + description: S.optional(S.String), + ownerEmail: S.optional(S.String), + workflowExecutionRetentionPeriod: S.optional(S.String), + clusters: S.optional(RegisterNamespaceRequestClustersList), + activeClusterName: S.optional(S.String), + data: S.optional(RegisterNamespaceRequestDataMap), + securityToken: S.optional(S.String), + isGlobalNamespace: S.optional(S.Boolean), + historyArchivalState: S.optional( + RegisterNamespaceRequestHistoryArchivalState, + ), + historyArchivalUri: S.optional(S.String), + visibilityArchivalState: S.optional( + RegisterNamespaceRequestVisibilityArchivalState, + ), + visibilityArchivalUri: S.optional(S.String), + }).pipe(T.Http({ method: "POST", uri: "/api/v1/namespaces", code: 200 })), +).annotate({ + identifier: "RegisterNamespaceRequest", +}) as any as S.Schema; + +export type RegisterNamespaceResponse2 = unknown; +export const RegisterNamespaceResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "RegisterNamespaceResponse2", +}) as any as S.Schema; + +export interface RequestCancelActivityExecutionRequest { + namespace: string; + activityId: string; + /** Activity run ID, targets the latest run if run_id is empty. */ + runId?: string; + /** The identity of the worker/client. */ + identity?: string; + /** Used to de-dupe cancellation requests. */ + requestId?: string; + /** Reason for requesting the cancellation, recorded and available via the PollActivityExecution API. Not propagated to a worker if an activity attempt is currently running. */ + reason?: string; +} +export const RequestCancelActivityExecutionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + runId: S.optional(S.String), + identity: S.optional(S.String), + requestId: S.optional(S.String), + reason: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/cancel", + code: 200, + }), + ), +).annotate({ + identifier: "RequestCancelActivityExecutionRequest", +}) as any as S.Schema; + +export type RequestCancelActivityExecutionResponse2 = unknown; +export const RequestCancelActivityExecutionResponse2 = /*@__PURE__*/ S.suspend( + () => S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "RequestCancelActivityExecutionResponse2", +}) as any as S.Schema; + +export interface RequestCancelNexusOperationExecutionRequest { + namespace: string; + operationId: string; + /** Operation run ID, targets the latest run if empty. */ + runId?: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Used to de-dupe cancellation requests. */ + requestId?: string; + /** Reason for requesting the cancellation, recorded and available via the DescribeNexusOperationExecution API. */ + reason?: string; +} +export const RequestCancelNexusOperationExecutionRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + operationId: S.String.pipe(T.Label()), + runId: S.optional(S.String), + identity: S.optional(S.String), + requestId: S.optional(S.String), + reason: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}/cancel", + code: 200, + }), + ), + ).annotate({ + identifier: "RequestCancelNexusOperationExecutionRequest", + }) as any as S.Schema; + +export type RequestCancelNexusOperationExecutionResponse2 = unknown; +export const RequestCancelNexusOperationExecutionResponse2 = + /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({ + identifier: "RequestCancelNexusOperationExecutionResponse2", + }) as any as S.Schema; + +/** Links to be associated with the WorkflowExecutionCanceled event. */ +export type RequestCancelWorkflowExecutionRequestLinksList = Array; +export const RequestCancelWorkflowExecutionRequestLinksList = + /*@__PURE__*/ S.Array( + Link, + ) as any as S.Schema; + +export interface RequestCancelWorkflowExecutionRequest { + namespace: string; + workflow_execution_workflow_id: string; + workflowExecution?: WorkflowExecution; + /** The identity of the worker/client */ + identity?: string; + /** Used to de-dupe cancellation requests */ + requestId?: string; + /** If set, this call will error if the most recent (if no run id is set on `workflow_execution`), or specified (if it is) workflow execution is not part of the same execution chain as this id. */ + firstExecutionRunId?: string; + /** Reason for requesting the cancellation */ + reason?: string; + /** Links to be associated with the WorkflowExecutionCanceled event. */ + links?: RequestCancelWorkflowExecutionRequestLinksList; +} +export const RequestCancelWorkflowExecutionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workflow_execution_workflow_id: S.String.pipe(T.Label()), + workflowExecution: S.optional(WorkflowExecution), + identity: S.optional(S.String), + requestId: S.optional(S.String), + firstExecutionRunId: S.optional(S.String), + reason: S.optional(S.String), + links: S.optional(RequestCancelWorkflowExecutionRequestLinksList), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/cancel", + code: 200, + }), + ), +).annotate({ + identifier: "RequestCancelWorkflowExecutionRequest", +}) as any as S.Schema; + +export type RequestCancelWorkflowExecutionResponse2 = unknown; +export const RequestCancelWorkflowExecutionResponse2 = /*@__PURE__*/ S.suspend( + () => S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "RequestCancelWorkflowExecutionResponse2", +}) as any as S.Schema; + +export interface ResetActivityRequest { + /** Namespace of the workflow which scheduled this activity. */ + namespace: string; + /** Execution info of the workflow which scheduled this activity */ + execution?: WorkflowExecution; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Only activity with this ID will be reset. */ + id?: string; + /** Reset all running activities with of this type. */ + type?: string; + /** Reset all running activities. */ + matchAll?: boolean; + /** Indicates that activity should reset heartbeat details. This flag will be applied only to the new instance of the activity. */ + resetHeartbeat?: boolean; + /** If activity is paused, it will remain paused after reset */ + keepPaused?: boolean; + /** If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration. (unless it is paused and keep_paused is set) */ + jitter?: string; + /** If set, the activity options will be restored to the defaults. Default options are then options activity was created with. They are part of the first schedule event. */ + restoreOriginalOptions?: boolean; +} +export const ResetActivityRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + execution: S.optional(WorkflowExecution), + identity: S.optional(S.String), + id: S.optional(S.String), + type: S.optional(S.String), + matchAll: S.optional(S.Boolean), + resetHeartbeat: S.optional(S.Boolean), + keepPaused: S.optional(S.Boolean), + jitter: S.optional(S.String), + restoreOriginalOptions: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities-deprecated/reset", + code: 200, + }), + ), +).annotate({ + identifier: "ResetActivityRequest", +}) as any as S.Schema; + +export type ResetActivityResponse2 = unknown; +export const ResetActivityResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "ResetActivityResponse2", +}) as any as S.Schema; + +export interface ResetActivityExecutionRequest { + /** Namespace of the workflow which scheduled this activity. */ + namespace: string; + /** The ID of the activity to target. */ + activityId: string; + /** If provided, targets a workflow activity for the given workflow ID. If empty, targets a standalone activity. */ + workflowId?: string; + /** Run ID of the workflow or standalone activity. */ + runId?: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Indicates that activity should reset heartbeat details. This flag will be applied only to the new instance of the activity. */ + resetHeartbeat?: boolean; + /** If activity is paused, it will remain paused after reset */ + keepPaused?: boolean; + /** If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration. (unless it is paused and keep_paused is set) */ + jitter?: string; + /** If set, the activity options will be restored to the defaults. Default options are then options activity was created with. They are part of the first schedule event. */ + restoreOriginalOptions?: boolean; + /** Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. */ + resourceId?: string; +} +export const ResetActivityExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + workflowId: S.optional(S.String), + runId: S.optional(S.String), + identity: S.optional(S.String), + resetHeartbeat: S.optional(S.Boolean), + keepPaused: S.optional(S.Boolean), + jitter: S.optional(S.String), + restoreOriginalOptions: S.optional(S.Boolean), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/reset", + code: 200, + }), + ), +).annotate({ + identifier: "ResetActivityExecutionRequest", +}) as any as S.Schema; + +export type ResetActivityExecutionResponse2 = unknown; +export const ResetActivityExecutionResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "ResetActivityExecutionResponse2", +}) as any as S.Schema; + +/** Deprecated. Use `options`. Default: RESET_REAPPLY_TYPE_SIGNAL */ +export type ResetWorkflowExecutionRequestResetReapplyType = + | "RESET_REAPPLY_TYPE_UNSPECIFIED" + | "RESET_REAPPLY_TYPE_SIGNAL" + | "RESET_REAPPLY_TYPE_NONE" + | "RESET_REAPPLY_TYPE_ALL_ELIGIBLE"; +export const ResetWorkflowExecutionRequestResetReapplyType = + /*@__PURE__*/ S.String; + +export type ResetWorkflowExecutionRequestResetReapplyExcludeTypesItem = + | "RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED" + | "RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL" + | "RESET_REAPPLY_EXCLUDE_TYPE_UPDATE" + | "RESET_REAPPLY_EXCLUDE_TYPE_NEXUS" + | "RESET_REAPPLY_EXCLUDE_TYPE_CANCEL_REQUEST"; +export const ResetWorkflowExecutionRequestResetReapplyExcludeTypesItem = + /*@__PURE__*/ S.String; + +/** Event types not to be reapplied */ +export type ResetWorkflowExecutionRequestResetReapplyExcludeTypesList = Array< + ResetWorkflowExecutionRequestResetReapplyExcludeTypesItem | (string & {}) +>; +export const ResetWorkflowExecutionRequestResetReapplyExcludeTypesList = + /*@__PURE__*/ S.Array( + ResetWorkflowExecutionRequestResetReapplyExcludeTypesItem, + ) as any as S.Schema; + +/** Links to be associated with the WorkflowExecutionSignaled event. */ +export type PostResetOperationSignalWorkflowLinksList = Array; +export const PostResetOperationSignalWorkflowLinksList = /*@__PURE__*/ S.Array( + Link, +) as any as S.Schema; + +/** SignalWorkflow represents sending a signal after a workflow reset. Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest. */ +export interface PostResetOperationSignalWorkflow { + /** The workflow author-defined name of the signal to send to the workflow. */ + signalName?: string; + /** Serialized value(s) to provide with the signal. */ + input?: Payloads; + /** Headers that are passed with the signal to the processing workflow. */ + header?: Header; + /** Links to be associated with the WorkflowExecutionSignaled event. */ + links?: PostResetOperationSignalWorkflowLinksList; +} +export const PostResetOperationSignalWorkflow = /*@__PURE__*/ S.suspend(() => + S.Struct({ + signalName: S.optional(S.String), + input: S.optional(Payloads), + header: S.optional(Header), + links: S.optional(PostResetOperationSignalWorkflowLinksList), + }), +).annotate({ + identifier: "PostResetOperationSignalWorkflow", +}) as any as S.Schema; + +export interface WorkflowExecutionOptions { + /** If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. */ + versioningOverride?: VersioningOverride; + /** If set, overrides the workflow's priority sent by the SDK. */ + priority?: Priority; + /** Time-skipping configuration for this workflow execution. If not set, the time-skipping configuration is not updated by this request; the existing configuration is preserved. */ + timeSkippingConfig?: TimeSkippingConfig; +} +export const WorkflowExecutionOptions = /*@__PURE__*/ S.suspend(() => + S.Struct({ + versioningOverride: S.optional(VersioningOverride), + priority: S.optional(Priority), + timeSkippingConfig: S.optional(TimeSkippingConfig), + }), +).annotate({ + identifier: "WorkflowExecutionOptions", +}) as any as S.Schema; + +/** UpdateWorkflowOptions represents updating workflow execution options after a workflow reset. Keep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest. */ +export interface PostResetOperationUpdateWorkflowOptions { + /** Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask. */ + workflowExecutionOptions?: WorkflowExecutionOptions; + /** Controls which fields from `workflow_execution_options` will be applied. To unset a field, set it to null and use the update mask to indicate that it should be mutated. */ + updateMask?: string; +} +export const PostResetOperationUpdateWorkflowOptions = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + workflowExecutionOptions: S.optional(WorkflowExecutionOptions), + updateMask: S.optional(S.String), + }), +).annotate({ + identifier: "PostResetOperationUpdateWorkflowOptions", +}) as any as S.Schema; + +/** PostResetOperation represents an operation to be performed on the new workflow execution after a workflow reset. */ +export interface PostResetOperation { + signalWorkflow?: PostResetOperationSignalWorkflow; + updateWorkflowOptions?: PostResetOperationUpdateWorkflowOptions; +} +export const PostResetOperation = /*@__PURE__*/ S.suspend(() => + S.Struct({ + signalWorkflow: S.optional(PostResetOperationSignalWorkflow), + updateWorkflowOptions: S.optional(PostResetOperationUpdateWorkflowOptions), + }), +).annotate({ + identifier: "PostResetOperation", +}) as any as S.Schema; + +/** Operations to perform after the workflow has been reset. These operations will be applied to the *new* run of the workflow execution in the order they are provided. All operations are applied to the workflow before the first new workflow task is generated */ +export type ResetWorkflowExecutionRequestPostResetOperationsList = + Array; +export const ResetWorkflowExecutionRequestPostResetOperationsList = + /*@__PURE__*/ S.Array( + PostResetOperation, + ) as any as S.Schema; + +export interface ResetWorkflowExecutionRequest { + namespace: string; + workflow_execution_workflow_id: string; + /** The workflow to reset. If this contains a run ID then the workflow will be reset back to the provided event ID in that run. Otherwise it will be reset to the provided event ID in the current run. In all cases the current run will be terminated and a new run started. */ + workflowExecution?: WorkflowExecution; + reason?: string; + /** The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or `WORKFLOW_TASK_STARTED` event to reset to. */ + workflowTaskFinishEventId?: string; + /** Used to de-dupe reset requests */ + requestId?: string; + /** Deprecated. Use `options`. Default: RESET_REAPPLY_TYPE_SIGNAL */ + resetReapplyType?: + | ResetWorkflowExecutionRequestResetReapplyType + | (string & {}); + /** Event types not to be reapplied */ + resetReapplyExcludeTypes?: ResetWorkflowExecutionRequestResetReapplyExcludeTypesList; + /** Operations to perform after the workflow has been reset. These operations will be applied to the *new* run of the workflow execution in the order they are provided. All operations are applied to the workflow before the first new workflow task is generated */ + postResetOperations?: ResetWorkflowExecutionRequestPostResetOperationsList; + /** The identity of the worker/client */ + identity?: string; +} +export const ResetWorkflowExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workflow_execution_workflow_id: S.String.pipe(T.Label()), + workflowExecution: S.optional(WorkflowExecution), + reason: S.optional(S.String), + workflowTaskFinishEventId: S.optional(S.String), + requestId: S.optional(S.String), + resetReapplyType: S.optional(ResetWorkflowExecutionRequestResetReapplyType), + resetReapplyExcludeTypes: S.optional( + ResetWorkflowExecutionRequestResetReapplyExcludeTypesList, + ), + postResetOperations: S.optional( + ResetWorkflowExecutionRequestPostResetOperationsList, + ), + identity: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/reset", + code: 200, + }), + ), +).annotate({ + identifier: "ResetWorkflowExecutionRequest", +}) as any as S.Schema; + +export interface ResetWorkflowExecutionResponse { + runId?: string; +} +export const ResetWorkflowExecutionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + runId: S.optional(S.String), + }), +).annotate({ + identifier: "ResetWorkflowExecutionResponse", +}) as any as S.Schema; + +export interface RespondActivityTaskCanceledRequest { + namespace: string; + /** The task token as received in `PollActivityTaskQueueResponse` */ + taskToken?: string; + /** Serialized additional information to attach to the cancellation */ + details?: Payloads; + /** The identity of the worker/client */ + identity?: string; + /** Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. */ + resourceId?: string; + /** Version info of the worker who processed this task. This message's `build_id` field should always be set by SDKs. Workers opting into versioning will also set the `use_versioning` field to true. See message docstrings for more. Deprecated. Use `deployment_options` instead. */ + workerVersion?: WorkerVersionStamp; + /** Deployment info of the worker that completed this task. Must be present if user has set `WorkerDeploymentOptions` regardless of versioning being enabled or not. Deprecated. Replaced with `deployment_options`. */ + deployment?: Deployment; + /** Worker deployment options that user has set in the worker. */ + deploymentOptions?: WorkerDeploymentOptions; +} +export const RespondActivityTaskCanceledRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + taskToken: S.optional(S.String), + details: S.optional(Payloads), + identity: S.optional(S.String), + resourceId: S.optional(S.String), + workerVersion: S.optional(WorkerVersionStamp), + deployment: S.optional(Deployment), + deploymentOptions: S.optional(WorkerDeploymentOptions), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activity-resolve-as-canceled", + code: 200, + }), + ), +).annotate({ + identifier: "RespondActivityTaskCanceledRequest", +}) as any as S.Schema; + +export type RespondActivityTaskCanceledResponse2 = unknown; +export const RespondActivityTaskCanceledResponse2 = /*@__PURE__*/ S.suspend( + () => S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "RespondActivityTaskCanceledResponse2", +}) as any as S.Schema; + +export interface RespondActivityTaskCanceledByIdRequest { + /** Namespace of the workflow which scheduled this activity */ + namespace: string; + /** Id of the activity to confirm is cancelled */ + activityId: string; + /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ + workflowId?: string; + /** For a workflow activity - the run ID of the workflow which scheduled this activity. For a standalone activity - the run ID of the activity. */ + runId?: string; + /** Serialized additional information to attach to the cancellation */ + details?: Payloads; + /** The identity of the worker/client */ + identity?: string; + /** Worker deployment options that user has set in the worker. */ + deploymentOptions?: WorkerDeploymentOptions; + /** Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. */ + resourceId?: string; +} +export const RespondActivityTaskCanceledByIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + workflowId: S.optional(S.String), + runId: S.optional(S.String), + details: S.optional(Payloads), + identity: S.optional(S.String), + deploymentOptions: S.optional(WorkerDeploymentOptions), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/resolve-as-canceled", + code: 200, + }), + ), +).annotate({ + identifier: "RespondActivityTaskCanceledByIdRequest", +}) as any as S.Schema; + +export type RespondActivityTaskCanceledByIdResponse2 = unknown; +export const RespondActivityTaskCanceledByIdResponse2 = /*@__PURE__*/ S.suspend( + () => S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "RespondActivityTaskCanceledByIdResponse2", +}) as any as S.Schema; + +export interface RespondActivityTaskCompletedRequest { + namespace: string; + /** The task token as received in `PollActivityTaskQueueResponse` */ + taskToken?: string; + /** The result of successfully executing the activity */ + result?: Payloads; + /** The identity of the worker/client */ + identity?: string; + /** Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. */ + resourceId?: string; + /** Version info of the worker who processed this task. This message's `build_id` field should always be set by SDKs. Workers opting into versioning will also set the `use_versioning` field to true. See message docstrings for more. Deprecated. Use `deployment_options` instead. */ + workerVersion?: WorkerVersionStamp; + /** Deployment info of the worker that completed this task. Must be present if user has set `WorkerDeploymentOptions` regardless of versioning being enabled or not. Deprecated. Replaced with `deployment_options`. */ + deployment?: Deployment; + /** Worker deployment options that user has set in the worker. */ + deploymentOptions?: WorkerDeploymentOptions; +} +export const RespondActivityTaskCompletedRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + taskToken: S.optional(S.String), + result: S.optional(Payloads), + identity: S.optional(S.String), + resourceId: S.optional(S.String), + workerVersion: S.optional(WorkerVersionStamp), + deployment: S.optional(Deployment), + deploymentOptions: S.optional(WorkerDeploymentOptions), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activity-complete", + code: 200, + }), + ), +).annotate({ + identifier: "RespondActivityTaskCompletedRequest", +}) as any as S.Schema; + +export type RespondActivityTaskCompletedResponse2 = unknown; +export const RespondActivityTaskCompletedResponse2 = /*@__PURE__*/ S.suspend( + () => S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "RespondActivityTaskCompletedResponse2", +}) as any as S.Schema; + +export interface RespondActivityTaskCompletedByIdRequest { + /** Namespace of the workflow which scheduled this activity */ + namespace: string; + /** Id of the activity to complete */ + activityId: string; + /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ + workflowId?: string; + /** For a workflow activity - the run ID of the workflow which scheduled this activity. For a standalone activity - the run ID of the activity. */ + runId?: string; + /** The serialized result of activity execution */ + result?: Payloads; + /** The identity of the worker/client */ + identity?: string; + /** Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. */ + resourceId?: string; +} +export const RespondActivityTaskCompletedByIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + workflowId: S.optional(S.String), + runId: S.optional(S.String), + result: S.optional(Payloads), + identity: S.optional(S.String), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/complete", + code: 200, + }), + ), +).annotate({ + identifier: "RespondActivityTaskCompletedByIdRequest", +}) as any as S.Schema; + +export type RespondActivityTaskCompletedByIdResponse2 = unknown; +export const RespondActivityTaskCompletedByIdResponse2 = + /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({ + identifier: "RespondActivityTaskCompletedByIdResponse2", + }) as any as S.Schema; + +export interface RespondActivityTaskFailedRequest { + namespace: string; + /** The task token as received in `PollActivityTaskQueueResponse` */ + taskToken?: string; + /** Detailed failure information */ + failure?: Failure; + /** The identity of the worker/client */ + identity?: string; + /** Resource ID for routing. Contains the workflow ID or activity ID for standalone activities. */ + resourceId?: string; + /** Additional details to be stored as last activity heartbeat */ + lastHeartbeatDetails?: Payloads; + /** Version info of the worker who processed this task. This message's `build_id` field should always be set by SDKs. Workers opting into versioning will also set the `use_versioning` field to true. See message docstrings for more. Deprecated. Use `deployment_options` instead. */ + workerVersion?: WorkerVersionStamp; + /** Deployment info of the worker that completed this task. Must be present if user has set `WorkerDeploymentOptions` regardless of versioning being enabled or not. Deprecated. Replaced with `deployment_options`. */ + deployment?: Deployment; + /** Worker deployment options that user has set in the worker. */ + deploymentOptions?: WorkerDeploymentOptions; +} +export const RespondActivityTaskFailedRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + taskToken: S.optional(S.String), + failure: S.optional(Failure), + identity: S.optional(S.String), + resourceId: S.optional(S.String), + lastHeartbeatDetails: S.optional(Payloads), + workerVersion: S.optional(WorkerVersionStamp), + deployment: S.optional(Deployment), + deploymentOptions: S.optional(WorkerDeploymentOptions), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activity-fail", + code: 200, + }), + ), +).annotate({ + identifier: "RespondActivityTaskFailedRequest", +}) as any as S.Schema; + +/** Server validation failures could include last_heartbeat_details payload is too large, request failure is too large */ +export type RespondActivityTaskFailedResponseFailuresList = Array; +export const RespondActivityTaskFailedResponseFailuresList = + /*@__PURE__*/ S.Array( + Failure, + ) as any as S.Schema; + +export interface RespondActivityTaskFailedResponse { + /** Server validation failures could include last_heartbeat_details payload is too large, request failure is too large */ + failures?: RespondActivityTaskFailedResponseFailuresList; +} +export const RespondActivityTaskFailedResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + failures: S.optional(RespondActivityTaskFailedResponseFailuresList), + }), +).annotate({ + identifier: "RespondActivityTaskFailedResponse", +}) as any as S.Schema; + +export interface RespondActivityTaskFailedByIdRequest { + /** Namespace of the workflow which scheduled this activity */ + namespace: string; + /** Id of the activity to fail */ + activityId: string; + /** Id of the workflow which scheduled this activity, leave empty to target a standalone activity */ + workflowId?: string; + /** For a workflow activity - the run ID of the workflow which scheduled this activity. For a standalone activity - the run ID of the activity. */ + runId?: string; + /** Detailed failure information */ + failure?: Failure; + /** The identity of the worker/client */ + identity?: string; + /** Additional details to be stored as last activity heartbeat */ + lastHeartbeatDetails?: Payloads; + /** Resource ID for routing. Contains "workflow:workflow_id" or "activity:activity_id" for standalone activities. */ + resourceId?: string; +} +export const RespondActivityTaskFailedByIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + workflowId: S.optional(S.String), + runId: S.optional(S.String), + failure: S.optional(Failure), + identity: S.optional(S.String), + lastHeartbeatDetails: S.optional(Payloads), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/fail", + code: 200, + }), + ), +).annotate({ + identifier: "RespondActivityTaskFailedByIdRequest", +}) as any as S.Schema; + +/** Server validation failures could include last_heartbeat_details payload is too large, request failure is too large */ +export type RespondActivityTaskFailedByIdResponseFailuresList = Array; +export const RespondActivityTaskFailedByIdResponseFailuresList = + /*@__PURE__*/ S.Array( + Failure, + ) as any as S.Schema; + +export interface RespondActivityTaskFailedByIdResponse { + /** Server validation failures could include last_heartbeat_details payload is too large, request failure is too large */ + failures?: RespondActivityTaskFailedByIdResponseFailuresList; +} +export const RespondActivityTaskFailedByIdResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + failures: S.optional(RespondActivityTaskFailedByIdResponseFailuresList), + }), +).annotate({ + identifier: "RespondActivityTaskFailedByIdResponse", +}) as any as S.Schema; + +export type UpdateDeploymentMetadataUpsertEntriesMap = { + [key: string]: unknown | undefined; +}; +export const UpdateDeploymentMetadataUpsertEntriesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** List of keys to remove from the metadata. */ +export type UpdateDeploymentMetadataRemoveEntriesList = Array; +export const UpdateDeploymentMetadataRemoveEntriesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Used as part of Deployment write APIs to update metadata attached to a deployment. Deprecated. */ +export interface UpdateDeploymentMetadata { + upsertEntries?: UpdateDeploymentMetadataUpsertEntriesMap; + /** List of keys to remove from the metadata. */ + removeEntries?: UpdateDeploymentMetadataRemoveEntriesList; +} +export const UpdateDeploymentMetadata = /*@__PURE__*/ S.suspend(() => + S.Struct({ + upsertEntries: S.optional(UpdateDeploymentMetadataUpsertEntriesMap), + removeEntries: S.optional(UpdateDeploymentMetadataRemoveEntriesList), + }), +).annotate({ + identifier: "UpdateDeploymentMetadata", +}) as any as S.Schema; + +export interface SetCurrentDeploymentRequest { + namespace: string; + deployment_series_name: string; + deployment?: Deployment; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; + /** Optional. Use to add or remove user-defined metadata entries. Metadata entries are exposed when describing a deployment. It is a good place for information such as operator name, links to internal deployment pipelines, etc. */ + updateMetadata?: UpdateDeploymentMetadata; +} +export const SetCurrentDeploymentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deployment_series_name: S.String.pipe(T.Label()), + deployment: S.optional(Deployment), + identity: S.optional(S.String), + updateMetadata: S.optional(UpdateDeploymentMetadata), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/current-deployment/{deployment_series_name}", + code: 200, + }), + ), +).annotate({ + identifier: "SetCurrentDeploymentRequest", +}) as any as S.Schema; + +/** [cleanup-wv-pre-release] Pre-release deployment APIs, clean up later */ +export interface SetCurrentDeploymentResponse { + currentDeploymentInfo?: DeploymentInfo; + /** Info of the deployment that was current before executing this operation. */ + previousDeploymentInfo?: DeploymentInfo; +} +export const SetCurrentDeploymentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + currentDeploymentInfo: S.optional(DeploymentInfo), + previousDeploymentInfo: S.optional(DeploymentInfo), + }), +).annotate({ + identifier: "SetCurrentDeploymentResponse", +}) as any as S.Schema; + +export interface SetWorkerDeploymentCurrentVersionRequest { + namespace: string; + deploymentName: string; + /** Deprecated. Use `build_id`. */ + version?: string; + /** The build id of the Version that you want to set as Current. Pass an empty value to set the Current Version to nil. A nil Current Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) */ + buildId?: string; + /** Optional. This can be the value of conflict_token from a Describe, or another Worker Deployment API. Passing a non-nil conflict token will cause this request to fail if the Deployment's configuration has been modified between the API call that generated the token and this one. */ + conflictToken?: string; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; + /** Optional. By default this request would be rejected if not all the expected Task Queues are being polled by the new Version, to protect against accidental removal of Task Queues, or worker health issues. Pass `true` here to bypass this protection. The set of expected Task Queues is the set of all the Task Queues that were ever poller by the existing Current Version of the Deployment, with the following exclusions: - Task Queues that are not used anymore (inferred by having empty backlog and a task add_rate of 0.) - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue having a different Current Version than the Current Version of this deployment.) WARNING: Do not set this flag unless you are sure that the missing task queue pollers are not needed. If the request is unexpectedly rejected due to missing pollers, then that means the pollers have not reached to the server yet. Only set this if you expect those pollers to never arrive. */ + ignoreMissingTaskQueues?: boolean; + /** Optional. By default this request will be rejected if no pollers have been seen for the proposed Current Version, in order to protect users from routing tasks to pollers that do not exist, leading to possible timeouts. Pass `true` here to bypass this protection. */ + allowNoPollers?: boolean; +} +export const SetWorkerDeploymentCurrentVersionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deploymentName: S.String.pipe(T.Label()), + version: S.optional(S.String), + buildId: S.optional(S.String), + conflictToken: S.optional(S.String), + identity: S.optional(S.String), + ignoreMissingTaskQueues: S.optional(S.Boolean), + allowNoPollers: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}/set-current-version", + code: 200, + }), + ), +).annotate({ + identifier: "SetWorkerDeploymentCurrentVersionRequest", +}) as any as S.Schema; + +export interface SetWorkerDeploymentCurrentVersionResponse { + /** This value is returned so that it can be optionally passed to APIs that write to the Worker Deployment state to ensure that the state did not change between this API call and a future write. */ + conflictToken?: string; + /** Deprecated. Use `previous_deployment_version`. */ + previousVersion?: string; + /** The version that was current before executing this operation. Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the Current version info before calling this API. By passing the `conflict_token` got from the `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes between the two calls. */ + previousDeploymentVersion?: WorkerDeploymentVersion; +} +export const SetWorkerDeploymentCurrentVersionResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + conflictToken: S.optional(S.String), + previousVersion: S.optional(S.String), + previousDeploymentVersion: S.optional(WorkerDeploymentVersion), + }), + ).annotate({ + identifier: "SetWorkerDeploymentCurrentVersionResponse", + }) as any as S.Schema; + +export interface SetWorkerDeploymentManagerRequest { + namespace: string; + deploymentName: string; + /** Arbitrary value for `manager_identity`. Empty will unset the field. */ + managerIdentity?: string; + /** True will set `manager_identity` to `identity`. */ + self?: boolean; + /** Optional. This can be the value of conflict_token from a Describe, or another Worker Deployment API. Passing a non-nil conflict token will cause this request to fail if the Deployment's configuration has been modified between the API call that generated the token and this one. */ + conflictToken?: string; + /** Required. The identity of the client who initiated this request. */ + identity?: string; +} +export const SetWorkerDeploymentManagerRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deploymentName: S.String.pipe(T.Label()), + managerIdentity: S.optional(S.String), + self: S.optional(S.Boolean), + conflictToken: S.optional(S.String), + identity: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}/set-manager", + code: 200, + }), + ), +).annotate({ + identifier: "SetWorkerDeploymentManagerRequest", +}) as any as S.Schema; + +export interface SetWorkerDeploymentManagerResponse { + /** This value is returned so that it can be optionally passed to APIs that write to the Worker Deployment state to ensure that the state did not change between this API call and a future write. */ + conflictToken?: string; + /** What the `manager_identity` field was before this change. Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the manager identity before calling this API. By passing the `conflict_token` got from the `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes between the two calls. */ + previousManagerIdentity?: string; +} +export const SetWorkerDeploymentManagerResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + conflictToken: S.optional(S.String), + previousManagerIdentity: S.optional(S.String), + }), +).annotate({ + identifier: "SetWorkerDeploymentManagerResponse", +}) as any as S.Schema; + +export interface SetWorkerDeploymentRampingVersionRequest { + namespace: string; + deploymentName: string; + /** Deprecated. Use `build_id`. */ + version?: string; + /** The build id of the Version that you want to ramp traffic to. Pass an empty value to set the Ramping Version to nil. A nil Ramping Version represents all the unversioned workers (those with `UNVERSIONED` (or unspecified) `WorkerVersioningMode`.) */ + buildId?: string; + /** Ramp percentage to set. Valid range: [0,100]. */ + percentage?: number; + /** Optional. This can be the value of conflict_token from a Describe, or another Worker Deployment API. Passing a non-nil conflict token will cause this request to fail if the Deployment's configuration has been modified between the API call that generated the token and this one. */ + conflictToken?: string; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; + /** Optional. By default this request would be rejected if not all the expected Task Queues are being polled by the new Version, to protect against accidental removal of Task Queues, or worker health issues. Pass `true` here to bypass this protection. The set of expected Task Queues equals to all the Task Queues ever polled from the existing Current Version of the Deployment, with the following exclusions: - Task Queues that are not used anymore (inferred by having empty backlog and a task add_rate of 0.) - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue having a different Current Version than the Current Version of this deployment.) WARNING: Do not set this flag unless you are sure that the missing task queue poller are not needed. If the request is unexpectedly rejected due to missing pollers, then that means the pollers have not reached to the server yet. Only set this if you expect those pollers to never arrive. Note: this check only happens when the ramping version is about to change, not every time that the percentage changes. Also note that the check is against the deployment's Current Version, not the previous Ramping Version. */ + ignoreMissingTaskQueues?: boolean; + /** Optional. By default this request will be rejected if no pollers have been seen for the proposed Current Version, in order to protect users from routing tasks to pollers that do not exist, leading to possible timeouts. Pass `true` here to bypass this protection. */ + allowNoPollers?: boolean; +} +export const SetWorkerDeploymentRampingVersionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deploymentName: S.String.pipe(T.Label()), + version: S.optional(S.String), + buildId: S.optional(S.String), + percentage: S.optional(S.Number), + conflictToken: S.optional(S.String), + identity: S.optional(S.String), + ignoreMissingTaskQueues: S.optional(S.Boolean), + allowNoPollers: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}/set-ramping-version", + code: 200, + }), + ), +).annotate({ + identifier: "SetWorkerDeploymentRampingVersionRequest", +}) as any as S.Schema; + +export interface SetWorkerDeploymentRampingVersionResponse { + /** This value is returned so that it can be optionally passed to APIs that write to the Worker Deployment state to ensure that the state did not change between this API call and a future write. */ + conflictToken?: string; + /** Deprecated. Use `previous_deployment_version`. */ + previousVersion?: string; + /** The version that was ramping before executing this operation. Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the Ramping version info before calling this API. By passing the `conflict_token` got from the `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes between the two calls. */ + previousDeploymentVersion?: WorkerDeploymentVersion; + /** The ramping version percentage before executing this operation. Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the Ramping version info before calling this API. By passing the `conflict_token` got from the `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes between the two calls. */ + previousPercentage?: number; +} +export const SetWorkerDeploymentRampingVersionResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + conflictToken: S.optional(S.String), + previousVersion: S.optional(S.String), + previousDeploymentVersion: S.optional(WorkerDeploymentVersion), + previousPercentage: S.optional(S.Number), + }), + ).annotate({ + identifier: "SetWorkerDeploymentRampingVersionResponse", + }) as any as S.Schema; + +/** Defines whether to allow re-using the workflow id from a previously *closed* workflow. The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow. */ +export type SignalWithStartWorkflowExecutionRequestWorkflowIdReusePolicy = + | "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED" + | "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE" + | "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + | "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE" + | "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING"; +export const SignalWithStartWorkflowExecutionRequestWorkflowIdReusePolicy = + /*@__PURE__*/ S.String; + +/** Defines how to resolve a workflow id conflict with a *running* workflow. The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING. Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option. See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. */ +export type SignalWithStartWorkflowExecutionRequestWorkflowIdConflictPolicy = + | "WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED" + | "WORKFLOW_ID_CONFLICT_POLICY_FAIL" + | "WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING" + | "WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING"; +export const SignalWithStartWorkflowExecutionRequestWorkflowIdConflictPolicy = + /*@__PURE__*/ S.String; + +/** Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events. */ +export type SignalWithStartWorkflowExecutionRequestLinksList = Array; +export const SignalWithStartWorkflowExecutionRequestLinksList = + /*@__PURE__*/ S.Array( + Link, + ) as any as S.Schema; + +export interface SignalWithStartWorkflowExecutionRequest { + namespace: string; + workflowId: string; + /** The workflow author-defined name of the signal to send to the workflow */ + signalName: string; + workflowType?: WorkflowType; + /** The task queue to start this workflow on, if it will be started */ + taskQueue?: TaskQueue; + /** Serialized arguments to the workflow. These are passed as arguments to the workflow function. */ + input?: Payloads; + /** Total workflow execution timeout including retries and continue as new */ + workflowExecutionTimeout?: string; + /** Timeout of a single workflow run */ + workflowRunTimeout?: string; + /** Timeout of a single workflow task */ + workflowTaskTimeout?: string; + /** The identity of the worker/client */ + identity?: string; + /** Used to de-dupe signal w/ start requests */ + requestId?: string; + /** Defines whether to allow re-using the workflow id from a previously *closed* workflow. The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. See `workflow_id_reuse_policy` for handling a workflow id duplication with a *running* workflow. */ + workflowIdReusePolicy?: + | SignalWithStartWorkflowExecutionRequestWorkflowIdReusePolicy + | (string & {}); + /** Defines how to resolve a workflow id conflict with a *running* workflow. The default policy is WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING. Note that WORKFLOW_ID_CONFLICT_POLICY_FAIL is an invalid option. See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. */ + workflowIdConflictPolicy?: + | SignalWithStartWorkflowExecutionRequestWorkflowIdConflictPolicy + | (string & {}); + /** Serialized value(s) to provide with the signal */ + signalInput?: Payloads; + /** Deprecated. */ + control?: string; + /** Retry policy for the workflow */ + retryPolicy?: RetryPolicy; + /** See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ */ + cronSchedule?: string; + memo?: Memo; + searchAttributes?: SearchAttributes; + header?: Header; + /** Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. Note that the signal will be delivered with the first workflow task. If the workflow gets another SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately and the rest of the delay period will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution will not unblock the workflow. */ + workflowStartDelay?: string; + /** Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo for use by user interfaces to display the fixed as-of-start summary and details of the workflow. */ + userMetadata?: UserMetadata; + /** Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events. */ + links?: SignalWithStartWorkflowExecutionRequestLinksList; + /** If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. */ + versioningOverride?: VersioningOverride; + /** Priority metadata */ + priority?: Priority; + /** Time-skipping configuration. If not set, time skipping is disabled. */ + timeSkippingConfig?: TimeSkippingConfig; +} +export const SignalWithStartWorkflowExecutionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workflowId: S.String.pipe(T.Label()), + signalName: S.String.pipe(T.Label()), + workflowType: S.optional(WorkflowType), + taskQueue: S.optional(TaskQueue), + input: S.optional(Payloads), + workflowExecutionTimeout: S.optional(S.String), + workflowRunTimeout: S.optional(S.String), + workflowTaskTimeout: S.optional(S.String), + identity: S.optional(S.String), + requestId: S.optional(S.String), + workflowIdReusePolicy: S.optional( + SignalWithStartWorkflowExecutionRequestWorkflowIdReusePolicy, + ), + workflowIdConflictPolicy: S.optional( + SignalWithStartWorkflowExecutionRequestWorkflowIdConflictPolicy, + ), + signalInput: S.optional(Payloads), + control: S.optional(S.String), + retryPolicy: S.optional(RetryPolicy), + cronSchedule: S.optional(S.String), + memo: S.optional(Memo), + searchAttributes: S.optional(SearchAttributes), + header: S.optional(Header), + workflowStartDelay: S.optional(S.String), + userMetadata: S.optional(UserMetadata), + links: S.optional(SignalWithStartWorkflowExecutionRequestLinksList), + versioningOverride: S.optional(VersioningOverride), + priority: S.optional(Priority), + timeSkippingConfig: S.optional(TimeSkippingConfig), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}", + code: 200, + }), + ), +).annotate({ + identifier: "SignalWithStartWorkflowExecutionRequest", +}) as any as S.Schema; + +export interface SignalWithStartWorkflowExecutionResponse { + /** The run id of the workflow that was started - or just signaled, if it was already running. */ + runId?: string; + /** If true, a new workflow was started. */ + started?: boolean; + /** Link to be associated with the WorkflowExecutionSignaled event. Added on the response to propagate the backlink. Available from Temporal server 1.31 and up. */ + signalLink?: Link; +} +export const SignalWithStartWorkflowExecutionResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + runId: S.optional(S.String), + started: S.optional(S.Boolean), + signalLink: S.optional(Link), + }), +).annotate({ + identifier: "SignalWithStartWorkflowExecutionResponse", +}) as any as S.Schema; + +/** Links to be associated with the WorkflowExecutionSignaled event. */ +export type SignalWorkflowExecutionRequestLinksList = Array; +export const SignalWorkflowExecutionRequestLinksList = /*@__PURE__*/ S.Array( + Link, +) as any as S.Schema; + +export interface SignalWorkflowExecutionRequest { + namespace: string; + workflow_execution_workflow_id: string; + /** The workflow author-defined name of the signal to send to the workflow */ + signalName: string; + workflowExecution?: WorkflowExecution; + /** Serialized value(s) to provide with the signal */ + input?: Payloads; + /** The identity of the worker/client */ + identity?: string; + /** Used to de-dupe sent signals */ + requestId?: string; + /** Deprecated. */ + control?: string; + /** Headers that are passed with the signal to the processing workflow. These can include things like auth or tracing tokens. */ + header?: Header; + /** Links to be associated with the WorkflowExecutionSignaled event. */ + links?: SignalWorkflowExecutionRequestLinksList; +} +export const SignalWorkflowExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workflow_execution_workflow_id: S.String.pipe(T.Label()), + signalName: S.String.pipe(T.Label()), + workflowExecution: S.optional(WorkflowExecution), + input: S.optional(Payloads), + identity: S.optional(S.String), + requestId: S.optional(S.String), + control: S.optional(S.String), + header: S.optional(Header), + links: S.optional(SignalWorkflowExecutionRequestLinksList), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/signal/{signalName}", + code: 200, + }), + ), +).annotate({ + identifier: "SignalWorkflowExecutionRequest", +}) as any as S.Schema; + +export interface SignalWorkflowExecutionResponse { + /** Link to be associated with the WorkflowExecutionSignaled event. Added on the response to propagate the backlink. Available from Temporal server 1.31 and up. */ + link?: Link; +} +export const SignalWorkflowExecutionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + link: S.optional(Link), + }), +).annotate({ + identifier: "SignalWorkflowExecutionResponse", +}) as any as S.Schema; + +/** Defines whether to allow re-using the activity id from a previously *closed* activity. The default policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ +export type StartActivityExecutionRequestIdReusePolicy = + | "ACTIVITY_ID_REUSE_POLICY_UNSPECIFIED" + | "ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE" + | "ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + | "ACTIVITY_ID_REUSE_POLICY_REJECT_DUPLICATE"; +export const StartActivityExecutionRequestIdReusePolicy = + /*@__PURE__*/ S.String; + +/** Defines how to resolve an activity id conflict with a *running* activity. The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL. */ +export type StartActivityExecutionRequestIdConflictPolicy = + | "ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED" + | "ACTIVITY_ID_CONFLICT_POLICY_FAIL" + | "ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING"; +export const StartActivityExecutionRequestIdConflictPolicy = + /*@__PURE__*/ S.String; + +/** Callbacks to be called by the server when this activity reaches a terminal state. Callback addresses must be whitelisted in the server's dynamic configuration. */ +export type StartActivityExecutionRequestCompletionCallbacksList = + Array; +export const StartActivityExecutionRequestCompletionCallbacksList = + /*@__PURE__*/ S.Array( + Callback, + ) as any as S.Schema; + +/** Links to be associated with the activity. Callbacks may also have associated links; links already included with a callback should not be duplicated here. */ +export type StartActivityExecutionRequestLinksList = Array; +export const StartActivityExecutionRequestLinksList = /*@__PURE__*/ S.Array( + Link, +) as any as S.Schema; + +/** When starting an execution with a conflict policy that uses an existing execution and there is already an existing running execution, OnConflictOptions defines actions to be taken on the existing running execution. */ +export interface OnConflictOptions { + /** Attaches the request ID to the running execution. */ + attachRequestId?: boolean; + /** Attaches the completion callbacks to the running execution. */ + attachCompletionCallbacks?: boolean; + /** Attaches the links to the running execution. */ + attachLinks?: boolean; +} +export const OnConflictOptions = /*@__PURE__*/ S.suspend(() => + S.Struct({ + attachRequestId: S.optional(S.Boolean), + attachCompletionCallbacks: S.optional(S.Boolean), + attachLinks: S.optional(S.Boolean), + }), +).annotate({ + identifier: "OnConflictOptions", +}) as any as S.Schema; + +export interface StartActivityExecutionRequest { + namespace: string; + /** Identifier for this activity. Required. This identifier should be meaningful in the user's own system. It must be unique among activities in the same namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy. */ + activityId: string; + /** The identity of the client who initiated this request */ + identity?: string; + /** A unique identifier for this start request. Typically UUIDv4. */ + requestId?: string; + /** The type of the activity, a string that corresponds to a registered activity on a worker. */ + activityType?: WorkflowType; + /** Task queue to schedule this activity on. */ + taskQueue?: TaskQueue; + /** Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted. Either this or `start_to_close_timeout` must be specified. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToCloseTimeout?: string; + /** Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is to put it back into the same queue. Defaults to `schedule_to_close_timeout` if not specified. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToStartTimeout?: string; + /** Maximum time an activity is allowed to execute after being picked up by a worker. This timeout is always retryable. Either this or `schedule_to_close_timeout` must be specified. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + startToCloseTimeout?: string; + /** Maximum permitted time between successful worker heartbeats. */ + heartbeatTimeout?: string; + /** The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. */ + retryPolicy?: RetryPolicy; + /** Serialized arguments to the activity. These are passed as arguments to the activity function. */ + input?: Payloads; + /** Defines whether to allow re-using the activity id from a previously *closed* activity. The default policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ + idReusePolicy?: StartActivityExecutionRequestIdReusePolicy | (string & {}); + /** Defines how to resolve an activity id conflict with a *running* activity. The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL. */ + idConflictPolicy?: + | StartActivityExecutionRequestIdConflictPolicy + | (string & {}); + /** Search attributes for indexing. */ + searchAttributes?: SearchAttributes; + /** Header for context propagation and tracing purposes. */ + header?: Header; + /** Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. */ + userMetadata?: UserMetadata; + /** Priority metadata. */ + priority?: Priority; + /** Callbacks to be called by the server when this activity reaches a terminal state. Callback addresses must be whitelisted in the server's dynamic configuration. */ + completionCallbacks?: StartActivityExecutionRequestCompletionCallbacksList; + /** Links to be associated with the activity. Callbacks may also have associated links; links already included with a callback should not be duplicated here. */ + links?: StartActivityExecutionRequestLinksList; + /** Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING. */ + onConflictOptions?: OnConflictOptions; + /** Time to wait before dispatching the first activity task. This delay is not applied to retry attempts. */ + startDelay?: string; +} +export const StartActivityExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + identity: S.optional(S.String), + requestId: S.optional(S.String), + activityType: S.optional(WorkflowType), + taskQueue: S.optional(TaskQueue), + scheduleToCloseTimeout: S.optional(S.String), + scheduleToStartTimeout: S.optional(S.String), + startToCloseTimeout: S.optional(S.String), + heartbeatTimeout: S.optional(S.String), + retryPolicy: S.optional(RetryPolicy), + input: S.optional(Payloads), + idReusePolicy: S.optional(StartActivityExecutionRequestIdReusePolicy), + idConflictPolicy: S.optional(StartActivityExecutionRequestIdConflictPolicy), + searchAttributes: S.optional(SearchAttributes), + header: S.optional(Header), + userMetadata: S.optional(UserMetadata), + priority: S.optional(Priority), + completionCallbacks: S.optional( + StartActivityExecutionRequestCompletionCallbacksList, + ), + links: S.optional(StartActivityExecutionRequestLinksList), + onConflictOptions: S.optional(OnConflictOptions), + startDelay: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}", + code: 200, + }), + ), +).annotate({ + identifier: "StartActivityExecutionRequest", +}) as any as S.Schema; + +export interface StartActivityExecutionResponse { + /** The run ID of the activity that was started - or used (via ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING). */ + runId?: string; + /** If true, a new activity was started. */ + started?: boolean; + /** Link to the started activity. */ + link?: Link; +} +export const StartActivityExecutionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + runId: S.optional(S.String), + started: S.optional(S.Boolean), + link: S.optional(Link), + }), +).annotate({ + identifier: "StartActivityExecutionResponse", +}) as any as S.Schema; + +/** Executions to apply the batch operation This field and `visibility_query` are mutually exclusive */ +export type StartBatchOperationRequestExecutionsList = Array; +export const StartBatchOperationRequestExecutionsList = /*@__PURE__*/ S.Array( + WorkflowExecution, +) as any as S.Schema; + +/** BatchOperationTermination sends terminate requests to batch workflows. Keep the parameter in sync with temporal.api.workflowservice.v1.TerminateWorkflowExecutionRequest. Ignore first_execution_run_id because this is used for single workflow operation. */ +export interface BatchOperationTermination { + /** Serialized value(s) to provide to the termination event */ + details?: Payloads; + /** The identity of the worker/client */ + identity?: string; +} +export const BatchOperationTermination = /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.optional(Payloads), + identity: S.optional(S.String), + }), +).annotate({ + identifier: "BatchOperationTermination", +}) as any as S.Schema; + +/** BatchOperationSignal sends signals to batch workflows. Keep the parameter in sync with temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest. */ +export interface BatchOperationSignal { + /** The workflow author-defined name of the signal to send to the workflow */ + signal?: string; + /** Serialized value(s) to provide with the signal */ + input?: Payloads; + /** Headers that are passed with the signal to the processing workflow. These can include things like auth or tracing tokens. */ + header?: Header; + /** The identity of the worker/client */ + identity?: string; +} +export const BatchOperationSignal = /*@__PURE__*/ S.suspend(() => + S.Struct({ + signal: S.optional(S.String), + input: S.optional(Payloads), + header: S.optional(Header), + identity: S.optional(S.String), + }), +).annotate({ + identifier: "BatchOperationSignal", +}) as any as S.Schema; + +/** BatchOperationCancellation sends cancel requests to batch workflows. Keep the parameter in sync with temporal.api.workflowservice.v1.RequestCancelWorkflowExecutionRequest. Ignore first_execution_run_id because this is used for single workflow operation. */ +export interface BatchOperationCancellation { + /** The identity of the worker/client */ + identity?: string; +} +export const BatchOperationCancellation = /*@__PURE__*/ S.suspend(() => + S.Struct({ + identity: S.optional(S.String), + }), +).annotate({ + identifier: "BatchOperationCancellation", +}) as any as S.Schema; + +/** BatchOperationDeletion sends deletion requests to batch workflows. Keep the parameter in sync with temporal.api.workflowservice.v1.DeleteWorkflowExecutionRequest. */ +export type BatchOperationDeletion = BatchOperationCancellation; +export const BatchOperationDeletion = BatchOperationCancellation; + +/** Deprecated. Use `options`. Default: RESET_REAPPLY_TYPE_SIGNAL */ +export type ResetOptionsResetReapplyType = + | "RESET_REAPPLY_TYPE_UNSPECIFIED" + | "RESET_REAPPLY_TYPE_SIGNAL" + | "RESET_REAPPLY_TYPE_NONE" + | "RESET_REAPPLY_TYPE_ALL_ELIGIBLE"; +export const ResetOptionsResetReapplyType = /*@__PURE__*/ S.String; + +export type ResetOptionsResetReapplyExcludeTypesItem = + | "RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED" + | "RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL" + | "RESET_REAPPLY_EXCLUDE_TYPE_UPDATE" + | "RESET_REAPPLY_EXCLUDE_TYPE_NEXUS" + | "RESET_REAPPLY_EXCLUDE_TYPE_CANCEL_REQUEST"; +export const ResetOptionsResetReapplyExcludeTypesItem = /*@__PURE__*/ S.String; + +/** Event types not to be reapplied */ +export type ResetOptionsResetReapplyExcludeTypesList = Array< + ResetOptionsResetReapplyExcludeTypesItem | (string & {}) +>; +export const ResetOptionsResetReapplyExcludeTypesList = /*@__PURE__*/ S.Array( + ResetOptionsResetReapplyExcludeTypesItem, +) as any as S.Schema; + +/** Describes where and how to reset a workflow, used for batch reset currently and may be used for single-workflow reset later. */ +export interface ResetOptions { + /** The id of a specific `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or `WORKFLOW_TASK_STARTED` event to reset to. Note that this option doesn't make sense when used as part of a batch request. */ + workflowTaskId?: string; + /** Resets to the first workflow task processed by this build id. If the workflow was not processed by the build id, or the workflow task can't be determined, no reset will be performed. Note that by default, this reset is allowed to be to a prior run in a chain of continue-as-new. */ + buildId?: string; + /** Deprecated. Use `options`. Default: RESET_REAPPLY_TYPE_SIGNAL */ + resetReapplyType?: ResetOptionsResetReapplyType | (string & {}); + /** If true, limit the reset to only within the current run. (Applies to build_id targets and possibly others in the future.) */ + currentRunOnly?: boolean; + /** Event types not to be reapplied */ + resetReapplyExcludeTypes?: ResetOptionsResetReapplyExcludeTypesList; +} +export const ResetOptions = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowTaskId: S.optional(S.String), + buildId: S.optional(S.String), + resetReapplyType: S.optional(ResetOptionsResetReapplyType), + currentRunOnly: S.optional(S.Boolean), + resetReapplyExcludeTypes: S.optional( + ResetOptionsResetReapplyExcludeTypesList, + ), + }), +).annotate({ identifier: "ResetOptions" }) as any as S.Schema; + +/** Deprecated. Use `options`. */ +export type BatchOperationResetResetType = + | "RESET_TYPE_UNSPECIFIED" + | "RESET_TYPE_FIRST_WORKFLOW_TASK" + | "RESET_TYPE_LAST_WORKFLOW_TASK"; +export const BatchOperationResetResetType = /*@__PURE__*/ S.String; + +/** Deprecated. Use `options`. */ +export type BatchOperationResetResetReapplyType = + | "RESET_REAPPLY_TYPE_UNSPECIFIED" + | "RESET_REAPPLY_TYPE_SIGNAL" + | "RESET_REAPPLY_TYPE_NONE" + | "RESET_REAPPLY_TYPE_ALL_ELIGIBLE"; +export const BatchOperationResetResetReapplyType = /*@__PURE__*/ S.String; + +/** Operations to perform after the workflow has been reset. These operations will be applied to the *new* run of the workflow execution in the order they are provided. All operations are applied to the workflow before the first new workflow task is generated */ +export type BatchOperationResetPostResetOperationsList = + Array; +export const BatchOperationResetPostResetOperationsList = /*@__PURE__*/ S.Array( + PostResetOperation, +) as any as S.Schema; + +/** BatchOperationReset sends reset requests to batch workflows. Keep the parameter in sync with temporal.api.workflowservice.v1.ResetWorkflowExecutionRequest. */ +export interface BatchOperationReset { + /** The identity of the worker/client. */ + identity?: string; + /** Describes what to reset to and how. If set, `reset_type` and `reset_reapply_type` are ignored. */ + options?: ResetOptions; + /** Deprecated. Use `options`. */ + resetType?: BatchOperationResetResetType | (string & {}); + /** Deprecated. Use `options`. */ + resetReapplyType?: BatchOperationResetResetReapplyType | (string & {}); + /** Operations to perform after the workflow has been reset. These operations will be applied to the *new* run of the workflow execution in the order they are provided. All operations are applied to the workflow before the first new workflow task is generated */ + postResetOperations?: BatchOperationResetPostResetOperationsList; +} +export const BatchOperationReset = /*@__PURE__*/ S.suspend(() => + S.Struct({ + identity: S.optional(S.String), + options: S.optional(ResetOptions), + resetType: S.optional(BatchOperationResetResetType), + resetReapplyType: S.optional(BatchOperationResetResetReapplyType), + postResetOperations: S.optional(BatchOperationResetPostResetOperationsList), + }), +).annotate({ + identifier: "BatchOperationReset", +}) as any as S.Schema; + +/** BatchOperationUpdateWorkflowExecutionOptions sends UpdateWorkflowExecutionOptions requests to batch workflows. Keep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest. */ +export interface BatchOperationUpdateWorkflowExecutionOptions { + /** The identity of the worker/client. */ + identity?: string; + /** Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask. */ + workflowExecutionOptions?: WorkflowExecutionOptions; + /** Controls which fields from `workflow_execution_options` will be applied. To unset a field, set it to null and use the update mask to indicate that it should be mutated. */ + updateMask?: string; +} +export const BatchOperationUpdateWorkflowExecutionOptions = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + identity: S.optional(S.String), + workflowExecutionOptions: S.optional(WorkflowExecutionOptions), + updateMask: S.optional(S.String), + }), + ).annotate({ + identifier: "BatchOperationUpdateWorkflowExecutionOptions", + }) as any as S.Schema; + +/** BatchOperationUnpauseActivities sends unpause requests to batch workflows. */ +export interface BatchOperationUnpauseActivities { + /** The identity of the worker/client. */ + identity?: string; + type?: string; + matchAll?: boolean; + /** Setting this flag will also reset the number of attempts. */ + resetAttempts?: boolean; + /** Setting this flag will also reset the heartbeat details. */ + resetHeartbeat?: boolean; + /** If set, the activity will start at a random time within the specified jitter duration, introducing variability to the start time. */ + jitter?: string; +} +export const BatchOperationUnpauseActivities = /*@__PURE__*/ S.suspend(() => + S.Struct({ + identity: S.optional(S.String), + type: S.optional(S.String), + matchAll: S.optional(S.Boolean), + resetAttempts: S.optional(S.Boolean), + resetHeartbeat: S.optional(S.Boolean), + jitter: S.optional(S.String), + }), +).annotate({ + identifier: "BatchOperationUnpauseActivities", +}) as any as S.Schema; + +/** BatchOperationResetActivities sends activity reset requests in a batch. NOTE: keep in sync with temporal.api.workflowservice.v1.ResetActivityRequest */ +export interface BatchOperationResetActivities { + /** The identity of the worker/client. */ + identity?: string; + type?: string; + matchAll?: boolean; + /** Setting this flag will also reset the number of attempts. */ + resetAttempts?: boolean; + /** Setting this flag will also reset the heartbeat details. */ + resetHeartbeat?: boolean; + /** If activity is paused, it will remain paused after reset */ + keepPaused?: boolean; + /** If set, the activity will start at a random time within the specified jitter duration, introducing variability to the start time. */ + jitter?: string; + /** If set, the activity options will be restored to the defaults. Default options are then options activity was created with. They are part of the first ActivityTaskScheduled event. */ + restoreOriginalOptions?: boolean; +} +export const BatchOperationResetActivities = /*@__PURE__*/ S.suspend(() => + S.Struct({ + identity: S.optional(S.String), + type: S.optional(S.String), + matchAll: S.optional(S.Boolean), + resetAttempts: S.optional(S.Boolean), + resetHeartbeat: S.optional(S.Boolean), + keepPaused: S.optional(S.Boolean), + jitter: S.optional(S.String), + restoreOriginalOptions: S.optional(S.Boolean), + }), +).annotate({ + identifier: "BatchOperationResetActivities", +}) as any as S.Schema; + +/** BatchOperationUpdateActivityOptions sends an update-activity-options requests in a batch. NOTE: keep in sync with temporal.api.workflowservice.v1.UpdateActivityRequest */ +export interface BatchOperationUpdateActivityOptions { + /** The identity of the worker/client. */ + identity?: string; + type?: string; + matchAll?: boolean; + /** Update Activity options. Partial updates are accepted and controlled by update_mask. */ + activityOptions?: ActivityOptions; + /** Controls which fields from `activity_options` will be applied */ + updateMask?: string; + /** If set, the activity options will be restored to the default. Default options are then options activity was created with. They are part of the first ActivityTaskScheduled event. This flag cannot be combined with any other option; if you supply restore_original together with other options, the request will be rejected. */ + restoreOriginal?: boolean; +} +export const BatchOperationUpdateActivityOptions = /*@__PURE__*/ S.suspend(() => + S.Struct({ + identity: S.optional(S.String), + type: S.optional(S.String), + matchAll: S.optional(S.Boolean), + activityOptions: S.optional(ActivityOptions), + updateMask: S.optional(S.String), + restoreOriginal: S.optional(S.Boolean), + }), +).annotate({ + identifier: "BatchOperationUpdateActivityOptions", +}) as any as S.Schema; + +export interface StartBatchOperationRequest { + /** Namespace that contains the batch operation */ + namespace: string; + /** Job ID defines the unique ID for the batch job */ + jobId: string; + /** Visibility query defines the the group of workflow to apply the batch operation This field and `executions` are mutually exclusive */ + visibilityQuery?: string; + /** Reason to perform the batch operation */ + reason?: string; + /** Executions to apply the batch operation This field and `visibility_query` are mutually exclusive */ + executions?: StartBatchOperationRequestExecutionsList; + /** Limit for the number of operations processed per second within this batch. Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system overload and minimize potential delays in executing ongoing tasks for user workers. Note that when no explicit limit is provided, the server will operate according to its limit defined by the dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the server's configured limit. */ + maxOperationsPerSecond?: number; + terminationOperation?: BatchOperationTermination; + signalOperation?: BatchOperationSignal; + cancellationOperation?: BatchOperationCancellation; + deletionOperation?: BatchOperationCancellation; + resetOperation?: BatchOperationReset; + updateWorkflowOptionsOperation?: BatchOperationUpdateWorkflowExecutionOptions; + unpauseActivitiesOperation?: BatchOperationUnpauseActivities; + resetActivitiesOperation?: BatchOperationResetActivities; + updateActivityOptionsOperation?: BatchOperationUpdateActivityOptions; +} +export const StartBatchOperationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + jobId: S.String.pipe(T.Label()), + visibilityQuery: S.optional(S.String), + reason: S.optional(S.String), + executions: S.optional(StartBatchOperationRequestExecutionsList), + maxOperationsPerSecond: S.optional(S.Number), + terminationOperation: S.optional(BatchOperationTermination), + signalOperation: S.optional(BatchOperationSignal), + cancellationOperation: S.optional(BatchOperationCancellation), + deletionOperation: S.optional(BatchOperationCancellation), + resetOperation: S.optional(BatchOperationReset), + updateWorkflowOptionsOperation: S.optional( + BatchOperationUpdateWorkflowExecutionOptions, + ), + unpauseActivitiesOperation: S.optional(BatchOperationUnpauseActivities), + resetActivitiesOperation: S.optional(BatchOperationResetActivities), + updateActivityOptionsOperation: S.optional( + BatchOperationUpdateActivityOptions, + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/batch-operations/{jobId}", + code: 200, + }), + ), +).annotate({ + identifier: "StartBatchOperationRequest", +}) as any as S.Schema; + +export type StartBatchOperationResponse2 = unknown; +export const StartBatchOperationResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "StartBatchOperationResponse2", +}) as any as S.Schema; + +/** Defines whether to allow re-using the operation id from a previously *closed* operation. The default policy is NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ +export type StartNexusOperationExecutionRequestIdReusePolicy = + | "NEXUS_OPERATION_ID_REUSE_POLICY_UNSPECIFIED" + | "NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE" + | "NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + | "NEXUS_OPERATION_ID_REUSE_POLICY_REJECT_DUPLICATE"; +export const StartNexusOperationExecutionRequestIdReusePolicy = + /*@__PURE__*/ S.String; + +/** Defines how to resolve an operation id conflict with a *running* operation. The default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL. */ +export type StartNexusOperationExecutionRequestIdConflictPolicy = + | "NEXUS_OPERATION_ID_CONFLICT_POLICY_UNSPECIFIED" + | "NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL" + | "NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING"; +export const StartNexusOperationExecutionRequestIdConflictPolicy = + /*@__PURE__*/ S.String; + +/** Header to attach to the Nexus request. Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and transmitted to external services as-is. This is useful for propagating tracing information. Note these headers are not the same as Temporal headers on internal activities and child workflows, these are transmitted to Nexus operations that may be external and are not traditional payloads. */ +export type StartNexusOperationExecutionRequestNexusHeaderMap = { + [key: string]: string | undefined; +}; +export const StartNexusOperationExecutionRequestNexusHeaderMap = + /*@__PURE__*/ S.Record( + S.String, + S.String, + ) as any as S.Schema; + +export interface StartNexusOperationExecutionRequest { + namespace: string; + /** Identifier for this operation. This is a caller-side ID, distinct from any internal operation identifiers generated by the handler. Must be unique among operations in the same namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy. */ + operationId: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** A unique identifier for this caller-side start request. Typically UUIDv4. StartOperation requests sent to the handler will use a server-generated request ID. */ + requestId?: string; + /** Endpoint name, resolved to a URL via the cluster's endpoint registry. */ + endpoint?: string; + /** Service name. */ + service?: string; + /** Operation name. */ + operation?: string; + /** Schedule-to-close timeout for this operation. Indicates how long the caller is willing to wait for operation completion. Calls are retried internally by the server. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToCloseTimeout?: string; + /** Schedule-to-start timeout for this operation. Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) by the handler. If not set or zero, no schedule-to-start timeout is enforced. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + scheduleToStartTimeout?: string; + /** Start-to-close timeout for this operation. Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been started. Synchronous operations ignore this timeout. If not set or zero, no start-to-close timeout is enforced. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --) */ + startToCloseTimeout?: string; + /** Serialized input to the operation. Passed as the request payload. */ + input?: unknown; + /** Defines whether to allow re-using the operation id from a previously *closed* operation. The default policy is NEXUS_OPERATION_ID_REUSE_POLICY_ALLOW_DUPLICATE. */ + idReusePolicy?: + | StartNexusOperationExecutionRequestIdReusePolicy + | (string & {}); + /** Defines how to resolve an operation id conflict with a *running* operation. The default policy is NEXUS_OPERATION_ID_CONFLICT_POLICY_FAIL. */ + idConflictPolicy?: + | StartNexusOperationExecutionRequestIdConflictPolicy + | (string & {}); + /** Search attributes for indexing. */ + searchAttributes?: SearchAttributes; + /** Header to attach to the Nexus request. Users are responsible for encrypting sensitive data in this header as it is stored in workflow history and transmitted to external services as-is. This is useful for propagating tracing information. Note these headers are not the same as Temporal headers on internal activities and child workflows, these are transmitted to Nexus operations that may be external and are not traditional payloads. */ + nexusHeader?: StartNexusOperationExecutionRequestNexusHeaderMap; + /** Metadata for use by user interfaces to display the fixed as-of-start summary and details of the operation. */ + userMetadata?: UserMetadata; +} +export const StartNexusOperationExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + operationId: S.String.pipe(T.Label()), + identity: S.optional(S.String), + requestId: S.optional(S.String), + endpoint: S.optional(S.String), + service: S.optional(S.String), + operation: S.optional(S.String), + scheduleToCloseTimeout: S.optional(S.String), + scheduleToStartTimeout: S.optional(S.String), + startToCloseTimeout: S.optional(S.String), + input: S.optional(S.Unknown), + idReusePolicy: S.optional(StartNexusOperationExecutionRequestIdReusePolicy), + idConflictPolicy: S.optional( + StartNexusOperationExecutionRequestIdConflictPolicy, + ), + searchAttributes: S.optional(SearchAttributes), + nexusHeader: S.optional(StartNexusOperationExecutionRequestNexusHeaderMap), + userMetadata: S.optional(UserMetadata), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}", + code: 200, + }), + ), +).annotate({ + identifier: "StartNexusOperationExecutionRequest", +}) as any as S.Schema; + +export interface StartNexusOperationExecutionResponse { + /** The run ID of the operation that was started - or used (via NEXUS_OPERATION_ID_CONFLICT_POLICY_USE_EXISTING). */ + runId?: string; + /** If true, a new operation was started. */ + started?: boolean; +} +export const StartNexusOperationExecutionResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + runId: S.optional(S.String), + started: S.optional(S.Boolean), + }), +).annotate({ + identifier: "StartNexusOperationExecutionResponse", +}) as any as S.Schema; + +/** Defines whether to allow re-using the workflow id from a previously *closed* workflow. The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow. */ +export type StartWorkflowExecutionRequestWorkflowIdReusePolicy = + | "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED" + | "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE" + | "WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY" + | "WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE" + | "WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING"; +export const StartWorkflowExecutionRequestWorkflowIdReusePolicy = + /*@__PURE__*/ S.String; + +/** Defines how to resolve a workflow id conflict with a *running* workflow. The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL. See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. */ +export type StartWorkflowExecutionRequestWorkflowIdConflictPolicy = + | "WORKFLOW_ID_CONFLICT_POLICY_UNSPECIFIED" + | "WORKFLOW_ID_CONFLICT_POLICY_FAIL" + | "WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING" + | "WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING"; +export const StartWorkflowExecutionRequestWorkflowIdConflictPolicy = + /*@__PURE__*/ S.String; + +/** Callbacks to be called by the server when this workflow reaches a terminal state. If the workflow continues-as-new, these callbacks will be carried over to the new execution. Callback addresses must be whitelisted in the server's dynamic configuration. */ +export type StartWorkflowExecutionRequestCompletionCallbacksList = + Array; +export const StartWorkflowExecutionRequestCompletionCallbacksList = + /*@__PURE__*/ S.Array( + Callback, + ) as any as S.Schema; + +/** Links to be associated with the workflow. */ +export type StartWorkflowExecutionRequestLinksList = Array; +export const StartWorkflowExecutionRequestLinksList = /*@__PURE__*/ S.Array( + Link, +) as any as S.Schema; + +export interface StartWorkflowExecutionRequest { + namespace: string; + workflowId: string; + workflowType?: WorkflowType; + taskQueue?: TaskQueue; + /** Serialized arguments to the workflow. These are passed as arguments to the workflow function. */ + input?: Payloads; + /** Total workflow execution timeout including retries and continue as new. */ + workflowExecutionTimeout?: string; + /** Timeout of a single workflow run. */ + workflowRunTimeout?: string; + /** Timeout of a single workflow task. */ + workflowTaskTimeout?: string; + /** The identity of the client who initiated this request */ + identity?: string; + /** A unique identifier for this start request. Typically UUIDv4. */ + requestId?: string; + /** Defines whether to allow re-using the workflow id from a previously *closed* workflow. The default policy is WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE. See `workflow_id_conflict_policy` for handling a workflow id duplication with a *running* workflow. */ + workflowIdReusePolicy?: + | StartWorkflowExecutionRequestWorkflowIdReusePolicy + | (string & {}); + /** Defines how to resolve a workflow id conflict with a *running* workflow. The default policy is WORKFLOW_ID_CONFLICT_POLICY_FAIL. See `workflow_id_reuse_policy` for handling a workflow id duplication with a *closed* workflow. */ + workflowIdConflictPolicy?: + | StartWorkflowExecutionRequestWorkflowIdConflictPolicy + | (string & {}); + /** The retry policy for the workflow. Will never exceed `workflow_execution_timeout`. */ + retryPolicy?: RetryPolicy; + /** See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/ */ + cronSchedule?: string; + memo?: Memo; + searchAttributes?: SearchAttributes; + header?: Header; + /** Request to get the first workflow task inline in the response bypassing matching service and worker polling. If set to `true` the caller is expected to have a worker available and capable of processing the task. The returned task will be marked as started and is expected to be completed by the specified `workflow_task_timeout`. */ + requestEagerExecution?: boolean; + /** These values will be available as ContinuedFailure and LastCompletionResult in the WorkflowExecutionStarted event and through SDKs. The are currently only used by the server itself (for the schedules feature) and are not intended to be exposed in StartWorkflowExecution. */ + continuedFailure?: Failure; + lastCompletionResult?: Payloads; + /** Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest of the delay will be ignored. */ + workflowStartDelay?: string; + /** Callbacks to be called by the server when this workflow reaches a terminal state. If the workflow continues-as-new, these callbacks will be carried over to the new execution. Callback addresses must be whitelisted in the server's dynamic configuration. */ + completionCallbacks?: StartWorkflowExecutionRequestCompletionCallbacksList; + /** Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo for use by user interfaces to display the fixed as-of-start summary and details of the workflow. */ + userMetadata?: UserMetadata; + /** Links to be associated with the workflow. */ + links?: StartWorkflowExecutionRequestLinksList; + /** If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion. To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions. */ + versioningOverride?: VersioningOverride; + /** Defines actions to be done to the existing running workflow when the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set (ie., nil value) or set to a empty object (ie., all options with default value), it won't do anything to the existing running workflow. If set, it will add a history event to the running workflow. */ + onConflictOptions?: OnConflictOptions; + /** Priority metadata */ + priority?: Priority; + /** Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`. */ + eagerWorkerDeploymentOptions?: WorkerDeploymentOptions; + /** Time-skipping configuration. If not set, time skipping is disabled. */ + timeSkippingConfig?: TimeSkippingConfig; +} +export const StartWorkflowExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workflowId: S.String.pipe(T.Label()), + workflowType: S.optional(WorkflowType), + taskQueue: S.optional(TaskQueue), + input: S.optional(Payloads), + workflowExecutionTimeout: S.optional(S.String), + workflowRunTimeout: S.optional(S.String), + workflowTaskTimeout: S.optional(S.String), + identity: S.optional(S.String), + requestId: S.optional(S.String), + workflowIdReusePolicy: S.optional( + StartWorkflowExecutionRequestWorkflowIdReusePolicy, + ), + workflowIdConflictPolicy: S.optional( + StartWorkflowExecutionRequestWorkflowIdConflictPolicy, + ), + retryPolicy: S.optional(RetryPolicy), + cronSchedule: S.optional(S.String), + memo: S.optional(Memo), + searchAttributes: S.optional(SearchAttributes), + header: S.optional(Header), + requestEagerExecution: S.optional(S.Boolean), + continuedFailure: S.optional(Failure), + lastCompletionResult: S.optional(Payloads), + workflowStartDelay: S.optional(S.String), + completionCallbacks: S.optional( + StartWorkflowExecutionRequestCompletionCallbacksList, + ), + userMetadata: S.optional(UserMetadata), + links: S.optional(StartWorkflowExecutionRequestLinksList), + versioningOverride: S.optional(VersioningOverride), + onConflictOptions: S.optional(OnConflictOptions), + priority: S.optional(Priority), + eagerWorkerDeploymentOptions: S.optional(WorkerDeploymentOptions), + timeSkippingConfig: S.optional(TimeSkippingConfig), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{workflowId}", + code: 200, + }), + ), +).annotate({ + identifier: "StartWorkflowExecutionRequest", +}) as any as S.Schema; + +/** Current execution status of the workflow. Typically remains WORKFLOW_EXECUTION_STATUS_RUNNING unless a de-dupe occurs or in specific scenarios handled within the ExecuteMultiOperation (refer to its docs). */ +export type StartWorkflowExecutionResponseStatus = + | "WORKFLOW_EXECUTION_STATUS_UNSPECIFIED" + | "WORKFLOW_EXECUTION_STATUS_RUNNING" + | "WORKFLOW_EXECUTION_STATUS_COMPLETED" + | "WORKFLOW_EXECUTION_STATUS_FAILED" + | "WORKFLOW_EXECUTION_STATUS_CANCELED" + | "WORKFLOW_EXECUTION_STATUS_TERMINATED" + | "WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW" + | "WORKFLOW_EXECUTION_STATUS_TIMED_OUT" + | "WORKFLOW_EXECUTION_STATUS_PAUSED"; +export const StartWorkflowExecutionResponseStatus = /*@__PURE__*/ S.String; + +/** Queries that should be executed after applying the history in this task. Responses should be attached to `RespondWorkflowTaskCompletedRequest::query_results` */ +export type PollWorkflowTaskQueueResponseQueriesMap = { + [key: string]: WorkflowQuery | undefined; +}; +export const PollWorkflowTaskQueueResponseQueriesMap = /*@__PURE__*/ S.Record( + S.String, + WorkflowQuery, +) as any as S.Schema; + +/** Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. */ +export interface GoogleProtobufAny { + /** The type of the serialized message. */ + _type?: string; +} +export const GoogleProtobufAny = /*@__PURE__*/ S.suspend(() => + S.Struct({ + _type: S.optional(S.String.pipe(T.Body("@type"))), + }), +).annotate({ + identifier: "GoogleProtobufAny", +}) as any as S.Schema; + +/** (-- api-linter: core::0146::any=disabled aip.dev/not-precedent: We want runtime extensibility for the body field --) */ +export interface Message { + /** An ID for this specific message. */ + id?: string; + /** Identifies the specific instance of a protocol to which this message belongs. */ + protocolInstanceId?: string; + eventId?: string; + commandIndex?: string; + /** The opaque data carried by this message. The protocol type can be extracted from the package name of the message carried inside the Any. */ + body?: GoogleProtobufAny; +} +export const Message = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.optional(S.String), + protocolInstanceId: S.optional(S.String), + eventId: S.optional(S.String), + commandIndex: S.optional(S.String), + body: S.optional(GoogleProtobufAny), + }), +).annotate({ identifier: "Message" }) as any as S.Schema; + +/** Protocol messages piggybacking on a WFT as a transport */ +export type PollWorkflowTaskQueueResponseMessagesList = Array; +export const PollWorkflowTaskQueueResponseMessagesList = /*@__PURE__*/ S.Array( + Message, +) as any as S.Schema; + +/** Attached to task responses to give hints to the SDK about how it may adjust its number of pollers. */ +export interface PollerScalingDecision { + /** How many poll requests to suggest should be added or removed, if any. As of now, server only scales up or down by 1. However, SDKs should allow for other values (while staying within defined min/max). The SDK is free to ignore this suggestion, EX: making more polls would not make sense because all slots are already occupied. */ + pollRequestDeltaSuggestion?: number; +} +export const PollerScalingDecision = /*@__PURE__*/ S.suspend(() => + S.Struct({ + pollRequestDeltaSuggestion: S.optional(S.Number), + }), +).annotate({ + identifier: "PollerScalingDecision", +}) as any as S.Schema; + +export interface PollerGroupInfo { + id?: string; + weight?: number; +} +export const PollerGroupInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.optional(S.String), + weight: S.optional(S.Number), + }), +).annotate({ + identifier: "PollerGroupInfo", +}) as any as S.Schema; + +/** The weighted list of poller groups IDs that client should use for future polls to this task queue. Client is expected to: 1. Maintain minimum number of pollers no less than the number of groups. 2. Try to assign the next poll to a group without any pending polls, 3. If every group has some pending polls, assign the next poll to a group randomly according to the weights. */ +export type PollWorkflowTaskQueueResponsePollerGroupInfosList = + Array; +export const PollWorkflowTaskQueueResponsePollerGroupInfosList = + /*@__PURE__*/ S.Array( + PollerGroupInfo, + ) as any as S.Schema; + +export interface PollWorkflowTaskQueueResponse { + /** A unique identifier for this task */ + taskToken?: string; + workflowExecution?: WorkflowExecution; + workflowType?: WorkflowType; + /** The last workflow task started event which was processed by some worker for this execution. Will be zero if no task has ever started. */ + previousStartedEventId?: string; + /** The id of the most recent workflow task started event, which will have been generated as a result of this poll request being served. Will be zero if the task does not contain any events which would advance history (no new WFT started). Currently this can happen for queries. */ + startedEventId?: string; + /** Starting at 1, the number of attempts to complete this task by any worker. */ + attempt?: number; + /** A hint that there are more tasks already present in this task queue partition. Can be used to prioritize draining a sticky queue. Specifically, the returned number is the number of tasks remaining in the in-memory buffer for this partition, which is currently capped at 1000. Because sticky queues only have one partition, this number is more useful when draining them. Normal queues, typically having more than one partition, will return a number representing only some portion of the overall backlog. Subsequent RPCs may not hit the same partition as this call. */ + backlogCountHint?: string; + /** The history for this workflow, which will either be complete or partial. Partial histories are sent to workers who have signaled that they are using a sticky queue when completing a workflow task. */ + history?: History; + /** Will be set if there are more history events than were included in this response. Such events should be fetched via `GetWorkflowExecutionHistory`. */ + nextPageToken?: string; + /** Legacy queries appear in this field. The query must be responded to via `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on closed workflows) then the `history` field will be populated with the entire history. It may also be populated if this task originates on a non-sticky queue. */ + query?: WorkflowQuery; + /** The task queue this task originated from, which will always be the original non-sticky name for the queue, even if this response came from polling a sticky queue. */ + workflowExecutionTaskQueue?: TaskQueue; + /** When this task was scheduled by the server */ + scheduledTime?: string; + /** When the current workflow task started event was generated, meaning the current attempt. */ + startedTime?: string; + /** Queries that should be executed after applying the history in this task. Responses should be attached to `RespondWorkflowTaskCompletedRequest::query_results` */ + queries?: PollWorkflowTaskQueueResponseQueriesMap; + /** Protocol messages piggybacking on a WFT as a transport */ + messages?: PollWorkflowTaskQueueResponseMessagesList; + /** Server-advised information the SDK may use to adjust its poller count. */ + pollerScalingDecision?: PollerScalingDecision; + /** This poller group ID identifies the owner of the workflow task awaiting for query response. Corresponding RespondQueryTaskCompleted should pass this value for proper routing. */ + pollerGroupId?: string; + /** The weighted list of poller groups IDs that client should use for future polls to this task queue. Client is expected to: 1. Maintain minimum number of pollers no less than the number of groups. 2. Try to assign the next poll to a group without any pending polls, 3. If every group has some pending polls, assign the next poll to a group randomly according to the weights. */ + pollerGroupInfos?: PollWorkflowTaskQueueResponsePollerGroupInfosList; +} +export const PollWorkflowTaskQueueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + taskToken: S.optional(S.String), + workflowExecution: S.optional(WorkflowExecution), + workflowType: S.optional(WorkflowType), + previousStartedEventId: S.optional(S.String), + startedEventId: S.optional(S.String), + attempt: S.optional(S.Number), + backlogCountHint: S.optional(S.String), + history: S.optional(History), + nextPageToken: S.optional(S.String), + query: S.optional(WorkflowQuery), + workflowExecutionTaskQueue: S.optional(TaskQueue), + scheduledTime: S.optional(S.String), + startedTime: S.optional(S.String), + queries: S.optional(PollWorkflowTaskQueueResponseQueriesMap), + messages: S.optional(PollWorkflowTaskQueueResponseMessagesList), + pollerScalingDecision: S.optional(PollerScalingDecision), + pollerGroupId: S.optional(S.String), + pollerGroupInfos: S.optional( + PollWorkflowTaskQueueResponsePollerGroupInfosList, + ), + }), +).annotate({ + identifier: "PollWorkflowTaskQueueResponse", +}) as any as S.Schema; + +export interface StartWorkflowExecutionResponse { + /** The run id of the workflow that was started - or used (via WorkflowIdConflictPolicy USE_EXISTING). */ + runId?: string; + /** If true, a new workflow was started. */ + started?: boolean; + /** Current execution status of the workflow. Typically remains WORKFLOW_EXECUTION_STATUS_RUNNING unless a de-dupe occurs or in specific scenarios handled within the ExecuteMultiOperation (refer to its docs). */ + status?: StartWorkflowExecutionResponseStatus; + /** When `request_eager_execution` is set on the `StartWorkflowExecutionRequest`, the server - if supported - will return the first workflow task to be eagerly executed. The caller is expected to have a worker available to process the task. */ + eagerWorkflowTask?: PollWorkflowTaskQueueResponse; + /** Link to the workflow event. */ + link?: Link; +} +export const StartWorkflowExecutionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + runId: S.optional(S.String), + started: S.optional(S.Boolean), + status: S.optional(StartWorkflowExecutionResponseStatus), + eagerWorkflowTask: S.optional(PollWorkflowTaskQueueResponse), + link: S.optional(Link), + }), +).annotate({ + identifier: "StartWorkflowExecutionResponse", +}) as any as S.Schema; + +export interface StopBatchOperationRequest { + /** Namespace that contains the batch operation */ + namespace: string; + /** Batch job id */ + jobId: string; + /** Reason to stop a batch operation */ + reason?: string; + /** Identity of the operator */ + identity?: string; +} +export const StopBatchOperationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + jobId: S.String.pipe(T.Label()), + reason: S.optional(S.String), + identity: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/batch-operations/{jobId}/stop", + code: 200, + }), + ), +).annotate({ + identifier: "StopBatchOperationRequest", +}) as any as S.Schema; + +export type StopBatchOperationResponse2 = unknown; +export const StopBatchOperationResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "StopBatchOperationResponse2", +}) as any as S.Schema; + +export interface TerminateActivityExecutionRequest { + namespace: string; + activityId: string; + /** Activity run ID, targets the latest run if run_id is empty. */ + runId?: string; + /** The identity of the worker/client. */ + identity?: string; + /** Used to de-dupe termination requests. */ + requestId?: string; + /** Reason for requesting the termination, recorded in in the activity's result failure outcome. */ + reason?: string; +} +export const TerminateActivityExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + runId: S.optional(S.String), + identity: S.optional(S.String), + requestId: S.optional(S.String), + reason: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/terminate", + code: 200, + }), + ), +).annotate({ + identifier: "TerminateActivityExecutionRequest", +}) as any as S.Schema; + +export type TerminateActivityExecutionResponse2 = unknown; +export const TerminateActivityExecutionResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "TerminateActivityExecutionResponse2", +}) as any as S.Schema; + +export interface TerminateNexusOperationExecutionRequest { + namespace: string; + operationId: string; + /** Operation run ID, targets the latest run if empty. */ + runId?: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Used to de-dupe termination requests. */ + requestId?: string; + /** Reason for requesting the termination, recorded in the operation's result failure outcome. */ + reason?: string; +} +export const TerminateNexusOperationExecutionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + operationId: S.String.pipe(T.Label()), + runId: S.optional(S.String), + identity: S.optional(S.String), + requestId: S.optional(S.String), + reason: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/nexus-operations/{operationId}/terminate", + code: 200, + }), + ), +).annotate({ + identifier: "TerminateNexusOperationExecutionRequest", +}) as any as S.Schema; + +export type TerminateNexusOperationExecutionResponse2 = unknown; +export const TerminateNexusOperationExecutionResponse2 = + /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({ + identifier: "TerminateNexusOperationExecutionResponse2", + }) as any as S.Schema; + +/** Links to be associated with the WorkflowExecutionTerminated event. */ +export type TerminateWorkflowExecutionRequestLinksList = Array; +export const TerminateWorkflowExecutionRequestLinksList = /*@__PURE__*/ S.Array( + Link, +) as any as S.Schema; + +export interface TerminateWorkflowExecutionRequest { + namespace: string; + workflow_execution_workflow_id: string; + workflowExecution?: WorkflowExecution; + reason?: string; + /** Serialized additional information to attach to the termination event */ + details?: Payloads; + /** The identity of the worker/client */ + identity?: string; + /** If set, this call will error if the most recent (if no run id is set on `workflow_execution`), or specified (if it is) workflow execution is not part of the same execution chain as this id. */ + firstExecutionRunId?: string; + /** Links to be associated with the WorkflowExecutionTerminated event. */ + links?: TerminateWorkflowExecutionRequestLinksList; +} +export const TerminateWorkflowExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workflow_execution_workflow_id: S.String.pipe(T.Label()), + workflowExecution: S.optional(WorkflowExecution), + reason: S.optional(S.String), + details: S.optional(Payloads), + identity: S.optional(S.String), + firstExecutionRunId: S.optional(S.String), + links: S.optional(TerminateWorkflowExecutionRequestLinksList), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/terminate", + code: 200, + }), + ), +).annotate({ + identifier: "TerminateWorkflowExecutionRequest", +}) as any as S.Schema; + +export type TerminateWorkflowExecutionResponse2 = unknown; +export const TerminateWorkflowExecutionResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "TerminateWorkflowExecutionResponse2", +}) as any as S.Schema; + +export interface TriggerWorkflowRuleRequest { + namespace: string; + execution_workflow_id: string; + /** Execution info of the workflow which scheduled this activity */ + execution?: WorkflowExecution; + id?: string; + /** Note: Rule ID and expiration date are not used in the trigger request. */ + spec?: WorkflowRuleSpec; + /** The identity of the client who initiated this request */ + identity?: string; +} +export const TriggerWorkflowRuleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + execution_workflow_id: S.String.pipe(T.Label()), + execution: S.optional(WorkflowExecution), + id: S.optional(S.String), + spec: S.optional(WorkflowRuleSpec), + identity: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{execution_workflow_id}/trigger-rule", + code: 200, + }), + ), +).annotate({ + identifier: "TriggerWorkflowRuleRequest", +}) as any as S.Schema; + +export interface TriggerWorkflowRuleResponse { + /** True is the rule was applied, based on the rule conditions (predicate/visibility_query). */ + applied?: boolean; +} +export const TriggerWorkflowRuleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + applied: S.optional(S.Boolean), + }), +).annotate({ + identifier: "TriggerWorkflowRuleResponse", +}) as any as S.Schema; + +export interface UnpauseActivityRequest { + /** Namespace of the workflow which scheduled this activity. */ + namespace: string; + /** Execution info of the workflow which scheduled this activity */ + execution?: WorkflowExecution; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Only the activity with this ID will be unpaused. */ + id?: string; + /** Unpause all running activities with of this type. */ + type?: string; + /** Unpause all running activities. */ + unpauseAll?: boolean; + /** Providing this flag will also reset the number of attempts. */ + resetAttempts?: boolean; + /** Providing this flag will also reset the heartbeat details. */ + resetHeartbeat?: boolean; + /** If set, the activity will start at a random time within the specified jitter duration. */ + jitter?: string; +} +export const UnpauseActivityRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + execution: S.optional(WorkflowExecution), + identity: S.optional(S.String), + id: S.optional(S.String), + type: S.optional(S.String), + unpauseAll: S.optional(S.Boolean), + resetAttempts: S.optional(S.Boolean), + resetHeartbeat: S.optional(S.Boolean), + jitter: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities-deprecated/unpause", + code: 200, + }), + ), +).annotate({ + identifier: "UnpauseActivityRequest", +}) as any as S.Schema; + +export type UnpauseActivityResponse2 = unknown; +export const UnpauseActivityResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "UnpauseActivityResponse2", +}) as any as S.Schema; + +export interface UnpauseActivityExecutionRequest { + /** Namespace of the workflow which scheduled this activity. */ + namespace: string; + /** The ID of the activity to target. */ + activityId: string; + /** If provided, targets a workflow activity for the given workflow ID. If empty, targets a standalone activity. */ + workflowId?: string; + /** Run ID of the workflow or standalone activity. */ + runId?: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Providing this flag will also reset the number of attempts. */ + resetAttempts?: boolean; + /** Providing this flag will also reset the heartbeat details. */ + resetHeartbeat?: boolean; + /** Reason to unpause the activity. */ + reason?: string; + /** If set, the activity will start at a random time within the specified jitter duration. */ + jitter?: string; + /** Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. */ + resourceId?: string; +} +export const UnpauseActivityExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + workflowId: S.optional(S.String), + runId: S.optional(S.String), + identity: S.optional(S.String), + resetAttempts: S.optional(S.Boolean), + resetHeartbeat: S.optional(S.Boolean), + reason: S.optional(S.String), + jitter: S.optional(S.String), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/unpause", + code: 200, + }), + ), +).annotate({ + identifier: "UnpauseActivityExecutionRequest", +}) as any as S.Schema; + +export type UnpauseActivityExecutionResponse2 = unknown; +export const UnpauseActivityExecutionResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "UnpauseActivityExecutionResponse2", +}) as any as S.Schema; + +export interface UnpauseWorkflowExecutionRequest { + /** Namespace of the workflow to unpause. */ + namespace: string; + /** ID of the workflow execution to be paused. Required. */ + workflowId: string; + /** Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused. */ + runId?: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Reason to unpause the workflow execution. */ + reason?: string; + /** A unique identifier for this unpause request for idempotence. Typically UUIDv4. */ + requestId?: string; +} +export const UnpauseWorkflowExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workflowId: S.String.pipe(T.Label()), + runId: S.optional(S.String), + identity: S.optional(S.String), + reason: S.optional(S.String), + requestId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{workflowId}/unpause", + code: 200, + }), + ), +).annotate({ + identifier: "UnpauseWorkflowExecutionRequest", +}) as any as S.Schema; + +export type UnpauseWorkflowExecutionResponse2 = unknown; +export const UnpauseWorkflowExecutionResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "UnpauseWorkflowExecutionResponse2", +}) as any as S.Schema; + +export interface UpdateActivityExecutionOptionsRequest { + /** Namespace of the workflow which scheduled this activity */ + namespace: string; + /** The ID of the activity to target. */ + activityId: string; + /** If provided, targets a workflow activity for the given workflow ID. If empty, targets a standalone activity. */ + workflowId?: string; + /** Run ID of the workflow or standalone activity. */ + runId?: string; + /** The identity of the client who initiated this request */ + identity?: string; + /** Activity options. Partial updates are accepted and controlled by update_mask */ + activityOptions?: ActivityOptions; + /** Controls which fields from `activity_options` will be applied */ + updateMask?: string; + /** If set, the activity options will be restored to the default. Default options are then options activity was created with. They are part of the first schedule event. This flag cannot be combined with any other option; if you supply restore_original together with other options, the request will be rejected. */ + restoreOriginal?: boolean; + /** Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. */ + resourceId?: string; +} +export const UpdateActivityExecutionOptionsRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + activityId: S.String.pipe(T.Label()), + workflowId: S.optional(S.String), + runId: S.optional(S.String), + identity: S.optional(S.String), + activityOptions: S.optional(ActivityOptions), + updateMask: S.optional(S.String), + restoreOriginal: S.optional(S.Boolean), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities/{activityId}/update-options", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateActivityExecutionOptionsRequest", +}) as any as S.Schema; + +export interface UpdateActivityExecutionOptionsResponse { + /** Activity options after an update */ + activityOptions?: ActivityOptions; +} +export const UpdateActivityExecutionOptionsResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + activityOptions: S.optional(ActivityOptions), + }), +).annotate({ + identifier: "UpdateActivityExecutionOptionsResponse", +}) as any as S.Schema; + +export interface UpdateActivityOptionsRequest { + /** Namespace of the workflow which scheduled this activity */ + namespace: string; + /** Execution info of the workflow which scheduled this activity */ + execution?: WorkflowExecution; + /** The identity of the client who initiated this request */ + identity?: string; + /** Activity options. Partial updates are accepted and controlled by update_mask */ + activityOptions?: ActivityOptions; + /** Controls which fields from `activity_options` will be applied */ + updateMask?: string; + /** Only activity with this ID will be updated. */ + id?: string; + /** Update all running activities of this type. */ + type?: string; + /** Update all running activities. */ + matchAll?: boolean; + /** If set, the activity options will be restored to the default. Default options are then options activity was created with. They are part of the first schedule event. This flag cannot be combined with any other option; if you supply restore_original together with other options, the request will be rejected. */ + restoreOriginal?: boolean; +} +export const UpdateActivityOptionsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + execution: S.optional(WorkflowExecution), + identity: S.optional(S.String), + activityOptions: S.optional(ActivityOptions), + updateMask: S.optional(S.String), + id: S.optional(S.String), + type: S.optional(S.String), + matchAll: S.optional(S.Boolean), + restoreOriginal: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/activities-deprecated/update-options", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateActivityOptionsRequest", +}) as any as S.Schema; + +/** Deprecated. Use `UpdateActivityExecutionOptionsResponse`. */ +export interface UpdateActivityOptionsResponse { + /** Activity options after an update */ + activityOptions?: ActivityOptions; +} +export const UpdateActivityOptionsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + activityOptions: S.optional(ActivityOptions), + }), +).annotate({ + identifier: "UpdateActivityOptionsResponse", +}) as any as S.Schema; + +/** A key-value map for any customized purpose. If data already exists on the namespace, this will merge with the existing key values. */ +export type UpdateNamespaceInfoDataMap = { [key: string]: string | undefined }; +export const UpdateNamespaceInfoDataMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +/** New namespace state, server will reject if transition is not allowed. Allowed transitions are: Registered -> [ Deleted | Deprecated | Handover ] Handover -> [ Registered ] Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state. */ +export type UpdateNamespaceInfoState = + | "NAMESPACE_STATE_UNSPECIFIED" + | "NAMESPACE_STATE_REGISTERED" + | "NAMESPACE_STATE_DEPRECATED" + | "NAMESPACE_STATE_DELETED"; +export const UpdateNamespaceInfoState = /*@__PURE__*/ S.String; + +export interface UpdateNamespaceInfo { + description?: string; + ownerEmail?: string; + /** A key-value map for any customized purpose. If data already exists on the namespace, this will merge with the existing key values. */ + data?: UpdateNamespaceInfoDataMap; + /** New namespace state, server will reject if transition is not allowed. Allowed transitions are: Registered -> [ Deleted | Deprecated | Handover ] Handover -> [ Registered ] Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state. */ + state?: UpdateNamespaceInfoState | (string & {}); +} +export const UpdateNamespaceInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.String), + ownerEmail: S.optional(S.String), + data: S.optional(UpdateNamespaceInfoDataMap), + state: S.optional(UpdateNamespaceInfoState), + }), +).annotate({ + identifier: "UpdateNamespaceInfo", +}) as any as S.Schema; + +export interface UpdateNamespaceRequest { + namespace: string; + updateInfo?: UpdateNamespaceInfo; + config?: NamespaceConfig; + replicationConfig?: NamespaceReplicationConfig; + securityToken?: string; + deleteBadBinary?: string; + /** promote local namespace to global namespace. Ignored if namespace is already global namespace. */ + promoteNamespace?: boolean; +} +export const UpdateNamespaceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + updateInfo: S.optional(UpdateNamespaceInfo), + config: S.optional(NamespaceConfig), + replicationConfig: S.optional(NamespaceReplicationConfig), + securityToken: S.optional(S.String), + deleteBadBinary: S.optional(S.String), + promoteNamespace: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/update", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateNamespaceRequest", +}) as any as S.Schema; + +export interface UpdateNamespaceResponse { + namespaceInfo?: NamespaceInfo; + config?: NamespaceConfig; + replicationConfig?: NamespaceReplicationConfig; + failoverVersion?: string; + isGlobalNamespace?: boolean; +} +export const UpdateNamespaceResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespaceInfo: S.optional(NamespaceInfo), + config: S.optional(NamespaceConfig), + replicationConfig: S.optional(NamespaceReplicationConfig), + failoverVersion: S.optional(S.String), + isGlobalNamespace: S.optional(S.Boolean), + }), +).annotate({ + identifier: "UpdateNamespaceResponse", +}) as any as S.Schema; + +export interface UpdateNexusEndpointRequest { + /** Server-generated unique endpoint ID. */ + id: string; + /** Data version for this endpoint. Must match current version. */ + version?: string; + spec?: EndpointSpec; +} +export const UpdateNexusEndpointRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + version: S.optional(S.String), + spec: S.optional(EndpointSpec), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/nexus/endpoints/{id}/update", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateNexusEndpointRequest", +}) as any as S.Schema; + +export interface UpdateNexusEndpointResponse { + /** Data post acceptance. Can be used to issue additional updates to this record. */ + endpoint?: Endpoint; +} +export const UpdateNexusEndpointResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + endpoint: S.optional(Endpoint), + }), +).annotate({ + identifier: "UpdateNexusEndpointResponse", +}) as any as S.Schema; + +export interface UpdateScheduleRequest { + /** The namespace of the schedule to update. */ + namespace: string; + /** The id of the schedule to update. */ + scheduleId: string; + /** The new schedule. The four main fields of the schedule (spec, action, policies, state) are replaced completely by the values in this message. */ + schedule?: Schedule; + /** This can be the value of conflict_token from a DescribeScheduleResponse, which will cause this request to fail if the schedule has been modified between the Describe and this Update. If missing, the schedule will be updated unconditionally. */ + conflictToken?: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** A unique identifier for this update request for idempotence. Typically UUIDv4. */ + requestId?: string; + /** Schedule search attributes to be updated. Do not set this field if you do not want to update the search attributes. A non-null empty object will set the search attributes to an empty map. Note: you cannot only update the search attributes with `UpdateScheduleRequest`, you must also set the `schedule` field; otherwise, it will unset the schedule. */ + searchAttributes?: SearchAttributes; + /** Schedule memo to replace. If set, replaces the entire memo. Do not set this field if you do not want to update the memo. A non-null empty object will clear the memo. */ + memo?: Memo; +} +export const UpdateScheduleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + scheduleId: S.String.pipe(T.Label()), + schedule: S.optional(Schedule), + conflictToken: S.optional(S.String), + identity: S.optional(S.String), + requestId: S.optional(S.String), + searchAttributes: S.optional(SearchAttributes), + memo: S.optional(Memo), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/schedules/{scheduleId}/update", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateScheduleRequest", +}) as any as S.Schema; + +export type UpdateScheduleResponse2 = unknown; +export const UpdateScheduleResponse2 = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "UpdateScheduleResponse2", +}) as any as S.Schema; + +export type UpdateTaskQueueConfigRequestTaskQueueType = + | "TASK_QUEUE_TYPE_UNSPECIFIED" + | "TASK_QUEUE_TYPE_WORKFLOW" + | "TASK_QUEUE_TYPE_ACTIVITY" + | "TASK_QUEUE_TYPE_NEXUS"; +export const UpdateTaskQueueConfigRequestTaskQueueType = /*@__PURE__*/ S.String; + +export interface UpdateTaskQueueConfigRequestRateLimitUpdate { + /** Rate Limit to be updated */ + rateLimit?: RateLimit; + /** Reason for why the rate limit was set. */ + reason?: string; +} +export const UpdateTaskQueueConfigRequestRateLimitUpdate = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + rateLimit: S.optional(RateLimit), + reason: S.optional(S.String), + }), + ).annotate({ + identifier: "UpdateTaskQueueConfigRequestRateLimitUpdate", + }) as any as S.Schema; + +/** If set, overrides the fairness weight for each specified fairness key. Fairness keys not listed in this map will keep their existing overrides (if any). */ +export type UpdateTaskQueueConfigRequestSetFairnessWeightOverridesMap = { + [key: string]: number | undefined; +}; +export const UpdateTaskQueueConfigRequestSetFairnessWeightOverridesMap = + /*@__PURE__*/ S.Record( + S.String, + S.Number, + ) as any as S.Schema; + +/** If set, removes any existing fairness weight overrides for each specified fairness key. Fairness weights for corresponding keys fall back to the values set during task creation (if any), or to the default weight of 1.0. */ +export type UpdateTaskQueueConfigRequestUnsetFairnessWeightOverridesList = + Array; +export const UpdateTaskQueueConfigRequestUnsetFairnessWeightOverridesList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface UpdateTaskQueueConfigRequest { + namespace: string; + /** Selects the task queue to update. */ + taskQueue: string; + identity?: string; + taskQueueType?: UpdateTaskQueueConfigRequestTaskQueueType | (string & {}); + /** Update to queue-wide rate limit. If not set, this configuration is unchanged. NOTE: A limit set by the worker is overriden; and restored again when reset. If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit. */ + updateQueueRateLimit?: UpdateTaskQueueConfigRequestRateLimitUpdate; + /** Update to the default fairness key rate limit. If not set, this configuration is unchanged. If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit. */ + updateFairnessKeyRateLimitDefault?: UpdateTaskQueueConfigRequestRateLimitUpdate; + /** If set, overrides the fairness weight for each specified fairness key. Fairness keys not listed in this map will keep their existing overrides (if any). */ + setFairnessWeightOverrides?: UpdateTaskQueueConfigRequestSetFairnessWeightOverridesMap; + /** If set, removes any existing fairness weight overrides for each specified fairness key. Fairness weights for corresponding keys fall back to the values set during task creation (if any), or to the default weight of 1.0. */ + unsetFairnessWeightOverrides?: UpdateTaskQueueConfigRequestUnsetFairnessWeightOverridesList; +} +export const UpdateTaskQueueConfigRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + taskQueue: S.String.pipe(T.Label()), + identity: S.optional(S.String), + taskQueueType: S.optional(UpdateTaskQueueConfigRequestTaskQueueType), + updateQueueRateLimit: S.optional( + UpdateTaskQueueConfigRequestRateLimitUpdate, + ), + updateFairnessKeyRateLimitDefault: S.optional( + UpdateTaskQueueConfigRequestRateLimitUpdate, + ), + setFairnessWeightOverrides: S.optional( + UpdateTaskQueueConfigRequestSetFairnessWeightOverridesMap, + ), + unsetFairnessWeightOverrides: S.optional( + UpdateTaskQueueConfigRequestUnsetFairnessWeightOverridesList, + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/task-queues/{taskQueue}/update-config", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateTaskQueueConfigRequest", +}) as any as S.Schema; + +export interface UpdateTaskQueueConfigResponse { + config?: TaskQueueConfig; +} +export const UpdateTaskQueueConfigResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + config: S.optional(TaskQueueConfig), + }), +).annotate({ + identifier: "UpdateTaskQueueConfigResponse", +}) as any as S.Schema; + +export interface UpdateWorkerConfigRequest { + /** Namespace this worker belongs to. */ + namespace: string; + /** The identity of the client who initiated this request. */ + identity?: string; + /** Reason for sending worker command, can be used for audit purpose. */ + reason?: string; + /** Partial updates are accepted and controlled by update_mask. The worker configuration to set. */ + workerConfig?: WorkerConfig; + /** Controls which fields from `worker_config` will be applied */ + updateMask?: string; + /** Defines which workers should receive this command. */ + selector?: WorkerSelector; + /** Resource ID for routing. Contains the worker grouping key. */ + resourceId?: string; +} +export const UpdateWorkerConfigRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + identity: S.optional(S.String), + reason: S.optional(S.String), + workerConfig: S.optional(WorkerConfig), + updateMask: S.optional(S.String), + selector: S.optional(WorkerSelector), + resourceId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workers/update-config", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateWorkerConfigRequest", +}) as any as S.Schema; + +export interface UpdateWorkerConfigResponse { + /** The worker configuration. Will be returned if the command was sent to a single worker. */ + workerConfig?: WorkerConfig; +} +export const UpdateWorkerConfigResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workerConfig: S.optional(WorkerConfig), + }), +).annotate({ + identifier: "UpdateWorkerConfigResponse", +}) as any as S.Schema; + +export interface ComputeConfigScalingGroupUpdate { + scalingGroup?: ComputeConfigScalingGroup; + /** Controls which fields from `scaling_group` will be applied. Semantics: - Mask is ignored for new scaling groups (only applicable when scaling group already exists). - Empty mask for an existing scaling group is no-op: no change. - Non-empty mask for an existing scaling group will update/unset only to the fields mentioned in the mask. - Accepted paths: "task_queue_types", "provider", "provider.type", "provider.details", "provider.nexus_endpoint", "scaler", "scaler.type", "scaler.details" */ + updateMask?: string; +} +export const ComputeConfigScalingGroupUpdate = /*@__PURE__*/ S.suspend(() => + S.Struct({ + scalingGroup: S.optional(ComputeConfigScalingGroup), + updateMask: S.optional(S.String), + }), +).annotate({ + identifier: "ComputeConfigScalingGroupUpdate", +}) as any as S.Schema; + +/** Optional. Contains the compute config scaling groups to add or update for the Worker Deployment. */ +export type UpdateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap = + { [key: string]: ComputeConfigScalingGroupUpdate | undefined }; +export const UpdateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap = + /*@__PURE__*/ S.Record( + S.String, + ComputeConfigScalingGroupUpdate, + ) as any as S.Schema; + +/** Optional. Contains the compute config scaling groups to remove from the Worker Deployment. */ +export type UpdateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList = + Array; +export const UpdateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface UpdateWorkerDeploymentVersionComputeConfigRequest { + namespace: string; + deployment_version_deployment_name: string; + deployment_version_build_id: string; + /** Required. */ + deploymentVersion?: WorkerDeploymentVersion; + /** Optional. Contains the compute config scaling groups to add or update for the Worker Deployment. */ + computeConfigScalingGroups?: UpdateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap; + /** Optional. Contains the compute config scaling groups to remove from the Worker Deployment. */ + removeComputeConfigScalingGroups?: UpdateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; + /** A unique identifier for this create request for idempotence. Typically UUIDv4. If a second request with the same ID is recieved, it is considered a successful no-op. Retrying with a different request ID for the same deployment name + build ID is an error. */ + requestId?: string; +} +export const UpdateWorkerDeploymentVersionComputeConfigRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deployment_version_deployment_name: S.String.pipe(T.Label()), + deployment_version_build_id: S.String.pipe(T.Label()), + deploymentVersion: S.optional(WorkerDeploymentVersion), + computeConfigScalingGroups: S.optional( + UpdateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap, + ), + removeComputeConfigScalingGroups: S.optional( + UpdateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList, + ), + identity: S.optional(S.String), + requestId: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}/{deployment_version_build_id}/update-compute-config", + code: 200, + }), + ), + ).annotate({ + identifier: "UpdateWorkerDeploymentVersionComputeConfigRequest", + }) as any as S.Schema; + +export type UpdateWorkerDeploymentVersionComputeConfigResponse2 = unknown; +export const UpdateWorkerDeploymentVersionComputeConfigResponse2 = + /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({ + identifier: "UpdateWorkerDeploymentVersionComputeConfigResponse2", + }) as any as S.Schema; + +export type UpdateWorkerDeploymentVersionMetadataRequestUpsertEntriesMap = { + [key: string]: unknown | undefined; +}; +export const UpdateWorkerDeploymentVersionMetadataRequestUpsertEntriesMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +/** List of keys to remove from the metadata. */ +export type UpdateWorkerDeploymentVersionMetadataRequestRemoveEntriesList = + Array; +export const UpdateWorkerDeploymentVersionMetadataRequestRemoveEntriesList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface UpdateWorkerDeploymentVersionMetadataRequest { + namespace: string; + deployment_version_deployment_name: string; + deployment_version_build_id: string; + /** Deprecated. Use `deployment_version`. */ + version?: string; + /** Required. */ + deploymentVersion?: WorkerDeploymentVersion; + upsertEntries?: UpdateWorkerDeploymentVersionMetadataRequestUpsertEntriesMap; + /** List of keys to remove from the metadata. */ + removeEntries?: UpdateWorkerDeploymentVersionMetadataRequestRemoveEntriesList; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; +} +export const UpdateWorkerDeploymentVersionMetadataRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deployment_version_deployment_name: S.String.pipe(T.Label()), + deployment_version_build_id: S.String.pipe(T.Label()), + version: S.optional(S.String), + deploymentVersion: S.optional(WorkerDeploymentVersion), + upsertEntries: S.optional( + UpdateWorkerDeploymentVersionMetadataRequestUpsertEntriesMap, + ), + removeEntries: S.optional( + UpdateWorkerDeploymentVersionMetadataRequestRemoveEntriesList, + ), + identity: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}/{deployment_version_build_id}/update-metadata", + code: 200, + }), + ), + ).annotate({ + identifier: "UpdateWorkerDeploymentVersionMetadataRequest", + }) as any as S.Schema; + +export interface UpdateWorkerDeploymentVersionMetadataResponse { + /** Full metadata after performing the update. */ + metadata?: VersionMetadata; +} +export const UpdateWorkerDeploymentVersionMetadataResponse = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + metadata: S.optional(VersionMetadata), + }), + ).annotate({ + identifier: "UpdateWorkerDeploymentVersionMetadataResponse", + }) as any as S.Schema; + +/** Indicates the Update lifecycle stage that the Update must reach before API call is returned. NOTE: This field works together with API call timeout which is limited by server timeout (maximum wait time). If server timeout is expired before user specified timeout, API call returns even if specified stage is not reached. */ +export type WaitPolicyLifecycleStage = + | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED" + | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED" + | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED" + | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED"; +export const WaitPolicyLifecycleStage = /*@__PURE__*/ S.String; + +/** Specifies client's intent to wait for Update results. */ +export interface WaitPolicy { + /** Indicates the Update lifecycle stage that the Update must reach before API call is returned. NOTE: This field works together with API call timeout which is limited by server timeout (maximum wait time). If server timeout is expired before user specified timeout, API call returns even if specified stage is not reached. */ + lifecycleStage?: WaitPolicyLifecycleStage | (string & {}); +} +export const WaitPolicy = /*@__PURE__*/ S.suspend(() => + S.Struct({ + lifecycleStage: S.optional(WaitPolicyLifecycleStage), + }), +).annotate({ identifier: "WaitPolicy" }) as any as S.Schema; + +export interface UpdateWorkflowExecutionRequest { + /** The namespace name of the target Workflow. */ + namespace: string; + workflow_execution_workflow_id: string; + request_input_name: string; + /** The target Workflow Id and (optionally) a specific Run Id thereof. (-- api-linter: core::0203::optional=disabled aip.dev/not-precedent: false positive triggered by the word "optional" --) */ + workflowExecution?: WorkflowExecution; + /** If set, this call will error if the most recent (if no Run Id is set on `workflow_execution`), or specified (if it is) Workflow Execution is not part of the same execution chain as this Id. */ + firstExecutionRunId?: string; + /** Specifies client's intent to wait for Update results. NOTE: This field works together with API call timeout which is limited by server timeout (maximum wait time). If server timeout is expired before user specified timeout, API call returns even if specified stage is not reached. Actual reached stage will be included in the response. */ + waitPolicy?: WaitPolicy; + /** The request information that will be delivered all the way down to the Workflow Execution. */ + request?: Request; +} +export const UpdateWorkflowExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workflow_execution_workflow_id: S.String.pipe(T.Label()), + request_input_name: S.String.pipe(T.Label()), + workflowExecution: S.optional(WorkflowExecution), + firstExecutionRunId: S.optional(S.String), + waitPolicy: S.optional(WaitPolicy), + request: S.optional(Request), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/update/{request_input_name}", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateWorkflowExecutionRequest", +}) as any as S.Schema; + +/** The data needed by a client to refer to a previously invoked Workflow Update. */ +export interface UpdateRef { + workflowExecution?: WorkflowExecution; + updateId?: string; +} +export const UpdateRef = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workflowExecution: S.optional(WorkflowExecution), + updateId: S.optional(S.String), + }), +).annotate({ identifier: "UpdateRef" }) as any as S.Schema; + +/** The most advanced lifecycle stage that the Update is known to have reached, where lifecycle stages are ordered UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. UNSPECIFIED will be returned if and only if the server's maximum wait time was reached before the Update reached the stage specified in the request WaitPolicy, and before the context deadline expired; clients may may then retry the call as needed. */ +export type UpdateWorkflowExecutionResponseStage = + | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED" + | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED" + | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED" + | "UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED"; +export const UpdateWorkflowExecutionResponseStage = /*@__PURE__*/ S.String; + +export interface UpdateWorkflowExecutionResponse { + /** Enough information for subsequent poll calls if needed. Never null. */ + updateRef?: UpdateRef; + /** The outcome of the Update if and only if the Workflow Update has completed. If this response is being returned before the Update has completed then this field will not be set. */ + outcome?: Outcome; + /** The most advanced lifecycle stage that the Update is known to have reached, where lifecycle stages are ordered UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED < UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED < UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED < UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED. UNSPECIFIED will be returned if and only if the server's maximum wait time was reached before the Update reached the stage specified in the request WaitPolicy, and before the context deadline expired; clients may may then retry the call as needed. */ + stage?: UpdateWorkflowExecutionResponseStage; +} +export const UpdateWorkflowExecutionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + updateRef: S.optional(UpdateRef), + outcome: S.optional(Outcome), + stage: S.optional(UpdateWorkflowExecutionResponseStage), + }), +).annotate({ + identifier: "UpdateWorkflowExecutionResponse", +}) as any as S.Schema; + +export interface UpdateWorkflowExecutionOptionsRequest { + /** The namespace name of the target Workflow. */ + namespace: string; + workflow_execution_workflow_id: string; + /** The target Workflow Id and (optionally) a specific Run Id thereof. (-- api-linter: core::0203::optional=disabled aip.dev/not-precedent: false positive triggered by the word "optional" --) */ + workflowExecution?: WorkflowExecution; + /** Workflow Execution options. Partial updates are accepted and controlled by update_mask. */ + workflowExecutionOptions?: WorkflowExecutionOptions; + /** Controls which fields from `workflow_execution_options` will be applied. To unset a field, set it to null and use the update mask to indicate that it should be mutated. */ + updateMask?: string; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; +} +export const UpdateWorkflowExecutionOptionsRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + workflow_execution_workflow_id: S.String.pipe(T.Label()), + workflowExecution: S.optional(WorkflowExecution), + workflowExecutionOptions: S.optional(WorkflowExecutionOptions), + updateMask: S.optional(S.String), + identity: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/workflows/{workflow_execution_workflow_id}/update-options", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateWorkflowExecutionOptionsRequest", +}) as any as S.Schema; + +export interface UpdateWorkflowExecutionOptionsResponse { + /** Workflow Execution options after update. */ + workflowExecutionOptions?: WorkflowExecutionOptions; +} +export const UpdateWorkflowExecutionOptionsResponse = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + workflowExecutionOptions: S.optional(WorkflowExecutionOptions), + }), +).annotate({ + identifier: "UpdateWorkflowExecutionOptionsResponse", +}) as any as S.Schema; + +/** Optional. Contains the compute config scaling groups to add or update for the Worker Deployment. */ +export type ValidateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap = + { [key: string]: ComputeConfigScalingGroupUpdate | undefined }; +export const ValidateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap = + /*@__PURE__*/ S.Record( + S.String, + ComputeConfigScalingGroupUpdate, + ) as any as S.Schema; + +/** Optional. Contains the compute config scaling groups to remove from the Worker Deployment. */ +export type ValidateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList = + Array; +export const ValidateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface ValidateWorkerDeploymentVersionComputeConfigRequest { + namespace: string; + deployment_version_deployment_name: string; + deployment_version_build_id: string; + /** Required. */ + deploymentVersion?: WorkerDeploymentVersion; + /** Optional. Contains the compute config scaling groups to add or update for the Worker Deployment. */ + computeConfigScalingGroups?: ValidateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap; + /** Optional. Contains the compute config scaling groups to remove from the Worker Deployment. */ + removeComputeConfigScalingGroups?: ValidateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList; + /** Optional. The identity of the client who initiated this request. */ + identity?: string; +} +export const ValidateWorkerDeploymentVersionComputeConfigRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + deployment_version_deployment_name: S.String.pipe(T.Label()), + deployment_version_build_id: S.String.pipe(T.Label()), + deploymentVersion: S.optional(WorkerDeploymentVersion), + computeConfigScalingGroups: S.optional( + ValidateWorkerDeploymentVersionComputeConfigRequestComputeConfigScalingGroupsMap, + ), + removeComputeConfigScalingGroups: S.optional( + ValidateWorkerDeploymentVersionComputeConfigRequestRemoveComputeConfigScalingGroupsList, + ), + identity: S.optional(S.String), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/v1/namespaces/{namespace}/worker-deployment-versions/{deployment_version_deployment_name}/{deployment_version_build_id}/validate-compute-config", + code: 200, + }), + ), + ).annotate({ + identifier: "ValidateWorkerDeploymentVersionComputeConfigRequest", + }) as any as S.Schema; + +export type ValidateWorkerDeploymentVersionComputeConfigResponse2 = unknown; +export const ValidateWorkerDeploymentVersionComputeConfigResponse2 = + /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({ + identifier: "ValidateWorkerDeploymentVersionComputeConfigResponse2", + }) as any as S.Schema; + +export type CountActivityExecutionsError = TemporalOpError; +/** CountActivityExecutions is a visibility API to count activity executions in a specific namespace. */ +export const countActivityExecutions: API.OperationMethod< + CountActivityExecutionsRequest, + CountActivityExecutionsResponse, + CountActivityExecutionsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CountActivityExecutionsRequest, + output: CountActivityExecutionsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type CountNexusOperationExecutionsError = TemporalOpError; +/** CountNexusOperationExecutions is a visibility API to count Nexus operations in a specific namespace. */ +export const countNexusOperationExecutions: API.OperationMethod< + CountNexusOperationExecutionsRequest, + CountNexusOperationExecutionsResponse, + CountNexusOperationExecutionsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CountNexusOperationExecutionsRequest, + output: CountNexusOperationExecutionsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type CountSchedulesError = TemporalOpError; +/** CountSchedules is a visibility API to count schedules in a specific namespace. */ +export const countSchedules: API.OperationMethod< + CountSchedulesRequest, + CountSchedulesResponse, + CountSchedulesError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CountSchedulesRequest, + output: CountSchedulesResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type CountWorkflowExecutionsError = TemporalOpError; +/** CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace. */ +export const countWorkflowExecutions: API.OperationMethod< + CountWorkflowExecutionsRequest, + CountWorkflowExecutionsResponse, + CountWorkflowExecutionsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CountWorkflowExecutionsRequest, + output: CountWorkflowExecutionsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type CreateNexusEndpointError = TemporalOpError; +/** Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of ALREADY_EXISTS. Returns the created endpoint with its initial version. You may use this version for subsequent updates. */ +export const createNexusEndpoint: API.OperationMethod< + CreateNexusEndpointRequest, + CreateNexusEndpointResponse, + CreateNexusEndpointError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNexusEndpointRequest, + output: CreateNexusEndpointResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type CreateScheduleError = TemporalOpError; +/** Creates a new schedule. */ +export const createSchedule: API.OperationMethod< + CreateScheduleRequest, + CreateScheduleResponse, + CreateScheduleError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateScheduleRequest, + output: CreateScheduleResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type CreateWorkerDeploymentError = TemporalOpError; +/** Creates a new Worker Deployment. Experimental. This API might significantly change or be removed in a future release. */ +export const createWorkerDeployment: API.OperationMethod< + CreateWorkerDeploymentRequest, + CreateWorkerDeploymentResponse, + CreateWorkerDeploymentError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateWorkerDeploymentRequest, + output: CreateWorkerDeploymentResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type CreateWorkerDeploymentVersionError = TemporalOpError; +/** Creates a new Worker Deployment Version. Experimental. This API might significantly change or be removed in a future release. */ +export const createWorkerDeploymentVersion: API.OperationMethod< + CreateWorkerDeploymentVersionRequest, + CreateWorkerDeploymentVersionResponse2, + CreateWorkerDeploymentVersionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateWorkerDeploymentVersionRequest, + output: CreateWorkerDeploymentVersionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type CreateWorkflowRuleError = TemporalOpError; +/** Create a new workflow rule. The rules are used to control the workflow execution. The rule will be applied to all running and new workflows in the namespace. If the rule with such ID already exist this call will fail Note: the rules are part of namespace configuration and will be stored in the namespace config. Namespace config is eventually consistent. */ +export const createWorkflowRule: API.OperationMethod< + CreateWorkflowRuleRequest, + CreateWorkflowRuleResponse, + CreateWorkflowRuleError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateWorkflowRuleRequest, + output: CreateWorkflowRuleResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DeleteNexusEndpointError = TemporalOpError; +/** Delete an incoming Nexus service by ID. */ +export const deleteNexusEndpoint: API.OperationMethod< + DeleteNexusEndpointRequest, + DeleteNexusEndpointResponse2, + DeleteNexusEndpointError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteNexusEndpointRequest, + output: DeleteNexusEndpointResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DeleteScheduleError = TemporalOpError; +/** Deletes a schedule, removing it from the system. */ +export const deleteSchedule: API.OperationMethod< + DeleteScheduleRequest, + DeleteScheduleResponse2, + DeleteScheduleError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteScheduleRequest, + output: DeleteScheduleResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DeleteWorkerDeploymentError = TemporalOpError; +/** Deletes records of (an old) Deployment. A deployment can only be deleted if it has no Version in it. Experimental. This API might significantly change or be removed in a future release. */ +export const deleteWorkerDeployment: API.OperationMethod< + DeleteWorkerDeploymentRequest, + DeleteWorkerDeploymentResponse2, + DeleteWorkerDeploymentError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteWorkerDeploymentRequest, + output: DeleteWorkerDeploymentResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DeleteWorkerDeploymentVersionError = TemporalOpError; +/** Used for manual deletion of Versions. User can delete a Version only when all the following conditions are met: - It is not the Current or Ramping Version of its Deployment. - It has no active pollers (none of the task queues in the Version have pollers) - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition can be skipped by passing `skip-drainage=true`. Experimental. This API might significantly change or be removed in a future release. */ +export const deleteWorkerDeploymentVersion: API.OperationMethod< + DeleteWorkerDeploymentVersionRequest, + DeleteWorkerDeploymentVersionResponse2, + DeleteWorkerDeploymentVersionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteWorkerDeploymentVersionRequest, + output: DeleteWorkerDeploymentVersionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DeleteWorkflowRuleError = TemporalOpError; +/** Delete rule by rule id */ +export const deleteWorkflowRule: API.OperationMethod< + DeleteWorkflowRuleRequest, + DeleteWorkflowRuleResponse2, + DeleteWorkflowRuleError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteWorkflowRuleRequest, + output: DeleteWorkflowRuleResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeActivityExecutionError = TemporalOpError; +/** DescribeActivityExecution returns information about an activity execution. It can be used to: - Get current activity info without waiting - Long-poll for next state change and return new activity info Response can optionally include activity input or outcome (if the activity has completed). */ +export const describeActivityExecution: API.OperationMethod< + DescribeActivityExecutionRequest, + DescribeActivityExecutionResponse, + DescribeActivityExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeActivityExecutionRequest, + output: DescribeActivityExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeBatchOperationError = TemporalOpError; +/** DescribeBatchOperation returns the information about a batch operation */ +export const describeBatchOperation: API.OperationMethod< + DescribeBatchOperationRequest, + DescribeBatchOperationResponse, + DescribeBatchOperationError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeBatchOperationRequest, + output: DescribeBatchOperationResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeDeploymentError = TemporalOpError; +/** Describes a worker deployment. Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `DescribeWorkerDeploymentVersion`. */ +export const describeDeployment: API.OperationMethod< + DescribeDeploymentRequest, + DescribeDeploymentResponse, + DescribeDeploymentError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeDeploymentRequest, + output: DescribeDeploymentResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeNamespaceError = TemporalOpError; +/** DescribeNamespace returns the information and configuration for a registered namespace. */ +export const describeNamespace: API.OperationMethod< + DescribeNamespaceRequest, + DescribeNamespaceResponse, + DescribeNamespaceError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeNamespaceRequest, + output: DescribeNamespaceResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeNexusOperationExecutionError = TemporalOpError; +/** DescribeNexusOperationExecution returns information about a Nexus operation. Supported use cases include: - Get current operation info without waiting - Long-poll for next state change and return new operation info Response can optionally include operation input or outcome (if the operation has completed). */ +export const describeNexusOperationExecution: API.OperationMethod< + DescribeNexusOperationExecutionRequest, + DescribeNexusOperationExecutionResponse, + DescribeNexusOperationExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeNexusOperationExecutionRequest, + output: DescribeNexusOperationExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeScheduleError = TemporalOpError; +/** Returns the schedule description and current state of an existing schedule. */ +export const describeSchedule: API.OperationMethod< + DescribeScheduleRequest, + DescribeScheduleResponse, + DescribeScheduleError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeScheduleRequest, + output: DescribeScheduleResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeTaskQueueError = TemporalOpError; +/** DescribeTaskQueue returns the following information about the target task queue, broken down by Build ID: - List of pollers - Workflow Reachability status - Backlog info for Workflow and/or Activity tasks */ +export const describeTaskQueue: API.OperationMethod< + DescribeTaskQueueRequest, + DescribeTaskQueueResponse, + DescribeTaskQueueError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeTaskQueueRequest, + output: DescribeTaskQueueResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeWorkerError = TemporalOpError; +/** DescribeWorker returns information about the specified worker. */ +export const describeWorker: API.OperationMethod< + DescribeWorkerRequest, + DescribeWorkerResponse, + DescribeWorkerError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeWorkerRequest, + output: DescribeWorkerResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeWorkerDeploymentError = TemporalOpError; +/** Describes a Worker Deployment. Experimental. This API might significantly change or be removed in a future release. */ +export const describeWorkerDeployment: API.OperationMethod< + DescribeWorkerDeploymentRequest, + DescribeWorkerDeploymentResponse, + DescribeWorkerDeploymentError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeWorkerDeploymentRequest, + output: DescribeWorkerDeploymentResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeWorkerDeploymentVersionError = TemporalOpError; +/** Describes a worker deployment version. Experimental. This API might significantly change or be removed in a future release. */ +export const describeWorkerDeploymentVersion: API.OperationMethod< + DescribeWorkerDeploymentVersionRequest, + DescribeWorkerDeploymentVersionResponse, + DescribeWorkerDeploymentVersionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeWorkerDeploymentVersionRequest, + output: DescribeWorkerDeploymentVersionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeWorkflowExecutionError = TemporalOpError; +/** DescribeWorkflowExecution returns information about the specified workflow execution. */ +export const describeWorkflowExecution: API.OperationMethod< + DescribeWorkflowExecutionRequest, + DescribeWorkflowExecutionResponse, + DescribeWorkflowExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeWorkflowExecutionRequest, + output: DescribeWorkflowExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type DescribeWorkflowRuleError = TemporalOpError; +/** DescribeWorkflowRule return the rule specification for existing rule id. If there is no rule with such id - NOT FOUND error will be returned. */ +export const describeWorkflowRule: API.OperationMethod< + DescribeWorkflowRuleRequest, + DescribeWorkflowRuleResponse, + DescribeWorkflowRuleError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DescribeWorkflowRuleRequest, + output: DescribeWorkflowRuleResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type FetchWorkerConfigError = TemporalOpError; +/** FetchWorkerConfig returns the worker configuration for a specific worker. */ +export const fetchWorkerConfig: API.OperationMethod< + FetchWorkerConfigRequest, + FetchWorkerConfigResponse, + FetchWorkerConfigError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: FetchWorkerConfigRequest, + output: FetchWorkerConfigResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type GetClusterInfoError = TemporalOpError; +/** GetClusterInfo returns information about temporal cluster */ +export const getClusterInfo: API.OperationMethod< + GetClusterInfoRequest, + GetClusterInfoResponse, + GetClusterInfoError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetClusterInfoRequest, + output: GetClusterInfoResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type GetCurrentDeploymentError = TemporalOpError; +/** Returns the current deployment (and its info) for a given deployment series. Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced by `current_version` returned by `DescribeWorkerDeployment`. */ +export const getCurrentDeployment: API.OperationMethod< + GetCurrentDeploymentRequest, + GetCurrentDeploymentResponse, + GetCurrentDeploymentError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCurrentDeploymentRequest, + output: GetCurrentDeploymentResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type GetDeploymentReachabilityError = TemporalOpError; +/** Returns the reachability level of a worker deployment to help users decide when it is time to decommission a deployment. Reachability level is calculated based on the deployment's `status` and existing workflows that depend on the given deployment for their execution. Calculating reachability is relatively expensive. Therefore, server might return a recently cached value. In such a case, the `last_update_time` will inform you about the actual reachability calculation time. Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `DrainageInfo` returned by `DescribeWorkerDeploymentVersion`. */ +export const getDeploymentReachability: API.OperationMethod< + GetDeploymentReachabilityRequest, + GetDeploymentReachabilityResponse, + GetDeploymentReachabilityError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDeploymentReachabilityRequest, + output: GetDeploymentReachabilityResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type GetNexusEndpointError = TemporalOpError; +/** Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates. */ +export const getNexusEndpoint: API.OperationMethod< + GetNexusEndpointRequest, + GetNexusEndpointResponse, + GetNexusEndpointError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetNexusEndpointRequest, + output: GetNexusEndpointResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type GetSystemInfoError = TemporalOpError; +/** GetSystemInfo returns information about the system. */ +export const getSystemInfo: API.OperationMethod< + GetSystemInfoRequest, + GetSystemInfoResponse, + GetSystemInfoError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSystemInfoRequest, + output: GetSystemInfoResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type GetWorkerBuildIdCompatibilityError = TemporalOpError; +/** Deprecated. Use `GetWorkerVersioningRules`. Fetches the worker build id versioning sets for a task queue. */ +export const getWorkerBuildIdCompatibility: API.OperationMethod< + GetWorkerBuildIdCompatibilityRequest, + GetWorkerBuildIdCompatibilityResponse, + GetWorkerBuildIdCompatibilityError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetWorkerBuildIdCompatibilityRequest, + output: GetWorkerBuildIdCompatibilityResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type GetWorkerTaskReachabilityError = TemporalOpError; +/** Deprecated. Use `DescribeTaskQueue`. Fetches task reachability to determine whether a worker may be retired. The request may specify task queues to query for or let the server fetch all task queues mapped to the given build IDs. When requesting a large number of task queues or all task queues associated with the given build ids in a namespace, all task queues will be listed in the response but some of them may not contain reachability information due to a server enforced limit. When reaching the limit, task queues that reachability information could not be retrieved for will be marked with a single TASK_REACHABILITY_UNSPECIFIED entry. The caller may issue another call to get the reachability for those task queues. Open source users can adjust this limit by setting the server's dynamic config value for `limit.reachabilityTaskQueueScan` with the caveat that this call can strain the visibility store. */ +export const getWorkerTaskReachability: API.OperationMethod< + GetWorkerTaskReachabilityRequest, + GetWorkerTaskReachabilityResponse, + GetWorkerTaskReachabilityError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetWorkerTaskReachabilityRequest, + output: GetWorkerTaskReachabilityResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type GetWorkerVersioningRulesError = TemporalOpError; +/** Fetches the Build ID assignment and redirect rules for a Task Queue. WARNING: Worker Versioning is not yet stable and the API and behavior may change incompatibly. */ +export const getWorkerVersioningRules: API.OperationMethod< + GetWorkerVersioningRulesRequest, + GetWorkerVersioningRulesResponse, + GetWorkerVersioningRulesError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetWorkerVersioningRulesRequest, + output: GetWorkerVersioningRulesResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type GetWorkflowExecutionHistoryError = TemporalOpError; +/** GetWorkflowExecutionHistory returns the history of specified workflow execution. Fails with `NotFound` if the specified workflow execution is unknown to the service. */ +export const getWorkflowExecutionHistory: API.OperationMethod< + GetWorkflowExecutionHistoryRequest, + GetWorkflowExecutionHistoryResponse, + GetWorkflowExecutionHistoryError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetWorkflowExecutionHistoryRequest, + output: GetWorkflowExecutionHistoryResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type GetWorkflowExecutionHistoryReverseError = TemporalOpError; +/** GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse order (starting from last event). Fails with`NotFound` if the specified workflow execution is unknown to the service. */ +export const getWorkflowExecutionHistoryReverse: API.OperationMethod< + GetWorkflowExecutionHistoryReverseRequest, + GetWorkflowExecutionHistoryReverseResponse, + GetWorkflowExecutionHistoryReverseError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetWorkflowExecutionHistoryReverseRequest, + output: GetWorkflowExecutionHistoryReverseResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListActivityExecutionsError = TemporalOpError; +/** ListActivityExecutions is a visibility API to list activity executions in a specific namespace. */ +export const listActivityExecutions: API.OperationMethod< + ListActivityExecutionsRequest, + ListActivityExecutionsResponse, + ListActivityExecutionsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListActivityExecutionsRequest, + output: ListActivityExecutionsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListArchivedWorkflowExecutionsError = TemporalOpError; +/** ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace. */ +export const listArchivedWorkflowExecutions: API.OperationMethod< + ListArchivedWorkflowExecutionsRequest, + ListArchivedWorkflowExecutionsResponse, + ListArchivedWorkflowExecutionsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListArchivedWorkflowExecutionsRequest, + output: ListArchivedWorkflowExecutionsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListBatchOperationsError = TemporalOpError; +/** ListBatchOperations returns a list of batch operations */ +export const listBatchOperations: API.OperationMethod< + ListBatchOperationsRequest, + ListBatchOperationsResponse, + ListBatchOperationsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListBatchOperationsRequest, + output: ListBatchOperationsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListDeploymentsError = TemporalOpError; +/** Lists worker deployments in the namespace. Optionally can filter based on deployment series name. Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced with `ListWorkerDeployments`. */ +export const listDeployments: API.OperationMethod< + ListDeploymentsRequest, + ListDeploymentsResponse, + ListDeploymentsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListDeploymentsRequest, + output: ListDeploymentsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListNamespacesError = TemporalOpError; +/** ListNamespaces returns the information and configuration for all namespaces. */ +export const listNamespaces: API.OperationMethod< + ListNamespacesRequest, + ListNamespacesResponse, + ListNamespacesError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListNamespacesRequest, + output: ListNamespacesResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListNexusEndpointsError = TemporalOpError; +/** List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the next_page_token field of the previous response to get the next page of results. An empty next_page_token indicates that there are no more results. During pagination, a newly added service with an ID lexicographically earlier than the previous page's last endpoint's ID may be missed. */ +export const listNexusEndpoints: API.OperationMethod< + ListNexusEndpointsRequest, + ListNexusEndpointsResponse, + ListNexusEndpointsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListNexusEndpointsRequest, + output: ListNexusEndpointsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListNexusOperationExecutionsError = TemporalOpError; +/** ListNexusOperationExecutions is a visibility API to list Nexus operations in a specific namespace. */ +export const listNexusOperationExecutions: API.OperationMethod< + ListNexusOperationExecutionsRequest, + ListNexusOperationExecutionsResponse, + ListNexusOperationExecutionsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListNexusOperationExecutionsRequest, + output: ListNexusOperationExecutionsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListScheduleMatchingTimesError = TemporalOpError; +/** Lists matching times within a range. */ +export const listScheduleMatchingTimes: API.OperationMethod< + ListScheduleMatchingTimesRequest, + ListScheduleMatchingTimesResponse, + ListScheduleMatchingTimesError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListScheduleMatchingTimesRequest, + output: ListScheduleMatchingTimesResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListSchedulesError = TemporalOpError; +/** List all schedules in a namespace. */ +export const listSchedules: API.OperationMethod< + ListSchedulesRequest, + ListSchedulesResponse, + ListSchedulesError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListSchedulesRequest, + output: ListSchedulesResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListSearchAttributesError = TemporalOpError; +/** ListSearchAttributes returns comprehensive information about search attributes. */ +export const listSearchAttributes: API.OperationMethod< + ListSearchAttributesRequest, + ListSearchAttributesResponse, + ListSearchAttributesError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListSearchAttributesRequest, + output: ListSearchAttributesResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListWorkerDeploymentsError = TemporalOpError; +/** Lists all Worker Deployments that are tracked in the Namespace. Experimental. This API might significantly change or be removed in a future release. */ +export const listWorkerDeployments: API.OperationMethod< + ListWorkerDeploymentsRequest, + ListWorkerDeploymentsResponse, + ListWorkerDeploymentsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListWorkerDeploymentsRequest, + output: ListWorkerDeploymentsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListWorkersError = TemporalOpError; +/** ListWorkers is a visibility API to list worker status information in a specific namespace. */ +export const listWorkers: API.OperationMethod< + ListWorkersRequest, + ListWorkersResponse, + ListWorkersError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListWorkersRequest, + output: ListWorkersResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListWorkflowExecutionsError = TemporalOpError; +/** ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace. */ +export const listWorkflowExecutions: API.OperationMethod< + ListWorkflowExecutionsRequest, + ListWorkflowExecutionsResponse, + ListWorkflowExecutionsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListWorkflowExecutionsRequest, + output: ListWorkflowExecutionsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ListWorkflowRulesError = TemporalOpError; +/** Return all namespace workflow rules */ +export const listWorkflowRules: API.OperationMethod< + ListWorkflowRulesRequest, + ListWorkflowRulesResponse, + ListWorkflowRulesError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListWorkflowRulesRequest, + output: ListWorkflowRulesResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type PatchScheduleError = TemporalOpError; +/** Makes a specific change to a schedule or triggers an immediate action. */ +export const patchSchedule: API.OperationMethod< + PatchScheduleRequest, + PatchScheduleResponse2, + PatchScheduleError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchScheduleRequest, + output: PatchScheduleResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type PauseActivityError = TemporalOpError; +/** PauseActivity pauses the execution of an activity specified by its ID or type. If there are multiple pending activities of the provided type - all of them will be paused Pausing an activity means: - If the activity is currently waiting for a retry or is running and subsequently fails, it will not be rescheduled until it is unpaused. - If the activity is already paused, calling this method will have no effect. - If the activity is running and finishes successfully, the activity will be completed. - If the activity is running and finishes with failure: * if there is no retry left - the activity will be completed. * if there are more retries left - the activity will be paused. For long-running activities: - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. - The activity should respond to the cancellation accordingly. Returns a `NotFound` error if there is no pending activity with the provided ID or type This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and structured to work well for standalone activities. */ +export const pauseActivity: API.OperationMethod< + PauseActivityRequest, + PauseActivityResponse2, + PauseActivityError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PauseActivityRequest, + output: PauseActivityResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type PauseActivityExecutionError = TemporalOpError; +/** PauseActivityExecution pauses the execution of an activity specified by its ID. This API can be used to target a workflow activity or a standalone activity Pausing an activity means: - If the activity is currently waiting for a retry or is running and subsequently fails, it will not be rescheduled until it is unpaused. - If the activity is already paused, calling this method will have no effect. - If the activity is running and finishes successfully, the activity will be completed. - If the activity is running and finishes with failure: * if there is no retry left - the activity will be completed. * if there are more retries left - the activity will be paused. For long-running activities: - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. Returns a `NotFound` error if there is no pending activity with the provided ID */ +export const pauseActivityExecution: API.OperationMethod< + PauseActivityExecutionRequest, + PauseActivityExecutionResponse2, + PauseActivityExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PauseActivityExecutionRequest, + output: PauseActivityExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type PauseWorkflowExecutionError = TemporalOpError; +/** Note: This is an experimental API and the behavior may change in a future release. PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in - The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history - No new workflow tasks or activity tasks are dispatched. - Any workflow task currently executing on the worker will be allowed to complete. - Any activity task currently executing will be paused. - All server-side events will continue to be processed by the server. - Queries & Updates on a paused workflow will be rejected. */ +export const pauseWorkflowExecution: API.OperationMethod< + PauseWorkflowExecutionRequest, + PauseWorkflowExecutionResponse2, + PauseWorkflowExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PauseWorkflowExecutionRequest, + output: PauseWorkflowExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type PollActivityExecutionError = TemporalOpError; +/** PollActivityExecution long-polls for an activity execution to complete and returns the outcome (result or failure). */ +export const pollActivityExecution: API.OperationMethod< + PollActivityExecutionRequest, + PollActivityExecutionResponse, + PollActivityExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PollActivityExecutionRequest, + output: PollActivityExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type PollNexusOperationExecutionError = TemporalOpError; +/** PollNexusOperationExecution long-polls for a Nexus operation for a given wait stage to complete and returns the outcome (result or failure). */ +export const pollNexusOperationExecution: API.OperationMethod< + PollNexusOperationExecutionRequest, + PollNexusOperationExecutionResponse, + PollNexusOperationExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PollNexusOperationExecutionRequest, + output: PollNexusOperationExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type QueryWorkflowError = TemporalOpError; +/** QueryWorkflow requests a query be executed for a specified workflow execution. */ +export const queryWorkflow: API.OperationMethod< + QueryWorkflowRequest, + QueryWorkflowResponse, + QueryWorkflowError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: QueryWorkflowRequest, + output: QueryWorkflowResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RecordActivityTaskHeartbeatError = TemporalOpError; +/** RecordActivityTaskHeartbeat is optionally called by workers while they execute activities. If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task, then the current attempt times out. Depending on RetryPolicy, this may trigger a retry or time out the activity. For workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations, in that event, the SDK should request cancellation of the activity. The request may contain response `details` which will be persisted by the server and may be used by the activity to checkpoint progress. The `cancel_requested` field in the response indicates whether cancellation has been requested for the activity. */ +export const recordActivityTaskHeartbeat: API.OperationMethod< + RecordActivityTaskHeartbeatRequest, + RecordActivityTaskHeartbeatResponse, + RecordActivityTaskHeartbeatError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RecordActivityTaskHeartbeatRequest, + output: RecordActivityTaskHeartbeatResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RecordActivityTaskHeartbeatByIdError = TemporalOpError; +/** See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) */ +export const recordActivityTaskHeartbeatById: API.OperationMethod< + RecordActivityTaskHeartbeatByIdRequest, + RecordActivityTaskHeartbeatByIdResponse, + RecordActivityTaskHeartbeatByIdError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RecordActivityTaskHeartbeatByIdRequest, + output: RecordActivityTaskHeartbeatByIdResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RecordWorkerHeartbeatError = TemporalOpError; +/** WorkerHeartbeat receive heartbeat request from the worker. */ +export const recordWorkerHeartbeat: API.OperationMethod< + RecordWorkerHeartbeatRequest, + RecordWorkerHeartbeatResponse2, + RecordWorkerHeartbeatError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RecordWorkerHeartbeatRequest, + output: RecordWorkerHeartbeatResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RegisterNamespaceError = TemporalOpError; +/** RegisterNamespace creates a new namespace which can be used as a container for all resources. A Namespace is a top level entity within Temporal, and is used as a container for resources like workflow executions, task queues, etc. A Namespace acts as a sandbox and provides isolation for all resources within the namespace. All resources belongs to exactly one namespace. */ +export const registerNamespace: API.OperationMethod< + RegisterNamespaceRequest, + RegisterNamespaceResponse2, + RegisterNamespaceError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RegisterNamespaceRequest, + output: RegisterNamespaceResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RequestCancelActivityExecutionError = TemporalOpError; +/** RequestCancelActivityExecution requests cancellation of an activity execution. Cancellation is cooperative: this call records the request, but the activity must detect and acknowledge it for the activity to reach CANCELED status. The cancellation signal is delivered via `cancel_requested` in the heartbeat response; SDKs surface this via language-idiomatic mechanisms (context cancellation, exceptions, abort signals). */ +export const requestCancelActivityExecution: API.OperationMethod< + RequestCancelActivityExecutionRequest, + RequestCancelActivityExecutionResponse2, + RequestCancelActivityExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RequestCancelActivityExecutionRequest, + output: RequestCancelActivityExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RequestCancelNexusOperationExecutionError = TemporalOpError; +/** RequestCancelNexusOperationExecution requests cancellation of a Nexus operation. Requesting to cancel an operation does not automatically transition the operation to canceled status. The operation will only transition to canceled status if it supports cancellation and the handler processes the cancellation request. */ +export const requestCancelNexusOperationExecution: API.OperationMethod< + RequestCancelNexusOperationExecutionRequest, + RequestCancelNexusOperationExecutionResponse2, + RequestCancelNexusOperationExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RequestCancelNexusOperationExecutionRequest, + output: RequestCancelNexusOperationExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RequestCancelWorkflowExecutionError = TemporalOpError; +/** RequestCancelWorkflowExecution is called by workers when they want to request cancellation of a workflow execution. This results in a new `WORKFLOW_EXECUTION_CANCEL_REQUESTED` event being written to the workflow history and a new workflow task created for the workflow. It returns success if the requested workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist. */ +export const requestCancelWorkflowExecution: API.OperationMethod< + RequestCancelWorkflowExecutionRequest, + RequestCancelWorkflowExecutionResponse2, + RequestCancelWorkflowExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RequestCancelWorkflowExecutionRequest, + output: RequestCancelWorkflowExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ResetActivityError = TemporalOpError; +/** ResetActivity resets the execution of an activity specified by its ID or type. If there are multiple pending activities of the provided type - all of them will be reset. Resetting an activity means: * number of attempts will be reset to 0. * activity timeouts will be reset. * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: it will be scheduled immediately (* see 'jitter' flag), Flags: 'jitter': the activity will be scheduled at a random time within the jitter duration. If the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided. 'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset. 'keep_paused': if the activity is paused, it will remain paused. Returns a `NotFound` error if there is no pending activity with the provided ID or type. This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and structured to work well for standalone activities. */ +export const resetActivity: API.OperationMethod< + ResetActivityRequest, + ResetActivityResponse2, + ResetActivityError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ResetActivityRequest, + output: ResetActivityResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ResetActivityExecutionError = TemporalOpError; +/** ResetActivityExecution resets the execution of an activity specified by its ID. This API can be used to target a workflow activity or a standalone activity. Resetting an activity means: * number of attempts will be reset to 0. * activity timeouts will be reset. * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: it will be scheduled immediately (* see 'jitter' flag) Returns a `NotFound` error if there is no pending activity with the provided ID or type. */ +export const resetActivityExecution: API.OperationMethod< + ResetActivityExecutionRequest, + ResetActivityExecutionResponse2, + ResetActivityExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ResetActivityExecutionRequest, + output: ResetActivityExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ResetWorkflowExecutionError = TemporalOpError; +/** ResetWorkflowExecution will reset an existing workflow execution to a specified `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current execution instance. "Exclusive" means the identified completed event itself is not replayed in the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed immediately, and a new workflow task will be scheduled to retry it. */ +export const resetWorkflowExecution: API.OperationMethod< + ResetWorkflowExecutionRequest, + ResetWorkflowExecutionResponse, + ResetWorkflowExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ResetWorkflowExecutionRequest, + output: ResetWorkflowExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RespondActivityTaskCanceledError = TemporalOpError; +/** RespondActivityTaskFailed is called by workers when processing an activity task fails. For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history and a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. */ +export const respondActivityTaskCanceled: API.OperationMethod< + RespondActivityTaskCanceledRequest, + RespondActivityTaskCanceledResponse2, + RespondActivityTaskCanceledError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RespondActivityTaskCanceledRequest, + output: RespondActivityTaskCanceledResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RespondActivityTaskCanceledByIdError = TemporalOpError; +/** See `RespondActivityTaskCanceled`. This version allows clients to record failures by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) */ +export const respondActivityTaskCanceledById: API.OperationMethod< + RespondActivityTaskCanceledByIdRequest, + RespondActivityTaskCanceledByIdResponse2, + RespondActivityTaskCanceledByIdError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RespondActivityTaskCanceledByIdRequest, + output: RespondActivityTaskCanceledByIdResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RespondActivityTaskCompletedError = TemporalOpError; +/** RespondActivityTaskCompleted is called by workers when they successfully complete an activity task. For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history and a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. */ +export const respondActivityTaskCompleted: API.OperationMethod< + RespondActivityTaskCompletedRequest, + RespondActivityTaskCompletedResponse2, + RespondActivityTaskCompletedError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RespondActivityTaskCompletedRequest, + output: RespondActivityTaskCompletedResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RespondActivityTaskCompletedByIdError = TemporalOpError; +/** See `RespondActivityTaskCompleted`. This version allows clients to record completions by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) */ +export const respondActivityTaskCompletedById: API.OperationMethod< + RespondActivityTaskCompletedByIdRequest, + RespondActivityTaskCompletedByIdResponse2, + RespondActivityTaskCompletedByIdError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RespondActivityTaskCompletedByIdRequest, + output: RespondActivityTaskCompletedByIdResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RespondActivityTaskFailedError = TemporalOpError; +/** RespondActivityTaskFailed is called by workers when processing an activity task fails. This results in a new `ACTIVITY_TASK_FAILED` event being written to the workflow history and a new workflow task created for the workflow. Fails with `NotFound` if the task token is no longer valid due to activity timeout, already being completed, or never having existed. */ +export const respondActivityTaskFailed: API.OperationMethod< + RespondActivityTaskFailedRequest, + RespondActivityTaskFailedResponse, + RespondActivityTaskFailedError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RespondActivityTaskFailedRequest, + output: RespondActivityTaskFailedResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type RespondActivityTaskFailedByIdError = TemporalOpError; +/** See `RecordActivityTaskFailed`. This version allows clients to record failures by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) */ +export const respondActivityTaskFailedById: API.OperationMethod< + RespondActivityTaskFailedByIdRequest, + RespondActivityTaskFailedByIdResponse, + RespondActivityTaskFailedByIdError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RespondActivityTaskFailedByIdRequest, + output: RespondActivityTaskFailedByIdResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type SetCurrentDeploymentError = TemporalOpError; +/** Sets a deployment as the current deployment for its deployment series. Can optionally update the metadata of the deployment as well. Experimental. This API might significantly change or be removed in a future release. Deprecated. Replaced by `SetWorkerDeploymentCurrentVersion`. */ +export const setCurrentDeployment: API.OperationMethod< + SetCurrentDeploymentRequest, + SetCurrentDeploymentResponse, + SetCurrentDeploymentError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SetCurrentDeploymentRequest, + output: SetCurrentDeploymentResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type SetWorkerDeploymentCurrentVersionError = TemporalOpError; +/** Set/unset the Current Version of a Worker Deployment. Automatically unsets the Ramping Version if it is the Version being set as Current. Experimental. This API might significantly change or be removed in a future release. */ +export const setWorkerDeploymentCurrentVersion: API.OperationMethod< + SetWorkerDeploymentCurrentVersionRequest, + SetWorkerDeploymentCurrentVersionResponse, + SetWorkerDeploymentCurrentVersionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SetWorkerDeploymentCurrentVersionRequest, + output: SetWorkerDeploymentCurrentVersionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type SetWorkerDeploymentManagerError = TemporalOpError; +/** Set/unset the ManagerIdentity of a Worker Deployment. Experimental. This API might significantly change or be removed in a future release. */ +export const setWorkerDeploymentManager: API.OperationMethod< + SetWorkerDeploymentManagerRequest, + SetWorkerDeploymentManagerResponse, + SetWorkerDeploymentManagerError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SetWorkerDeploymentManagerRequest, + output: SetWorkerDeploymentManagerResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type SetWorkerDeploymentRampingVersionError = TemporalOpError; +/** Set/unset the Ramping Version of a Worker Deployment and its ramp percentage. Can be used for gradual ramp to unversioned workers too. Experimental. This API might significantly change or be removed in a future release. */ +export const setWorkerDeploymentRampingVersion: API.OperationMethod< + SetWorkerDeploymentRampingVersionRequest, + SetWorkerDeploymentRampingVersionResponse, + SetWorkerDeploymentRampingVersionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SetWorkerDeploymentRampingVersionRequest, + output: SetWorkerDeploymentRampingVersionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type SignalWithStartWorkflowExecutionError = TemporalOpError; +/** SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if it isn't yet started. If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history and a workflow task is generated. If the workflow is not running or not found, then the workflow is created with `WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a workflow task is generated. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "With" is used to indicate combined operation. --) */ +export const signalWithStartWorkflowExecution: API.OperationMethod< + SignalWithStartWorkflowExecutionRequest, + SignalWithStartWorkflowExecutionResponse, + SignalWithStartWorkflowExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SignalWithStartWorkflowExecutionRequest, + output: SignalWithStartWorkflowExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type SignalWorkflowExecutionError = TemporalOpError; +/** SignalWorkflowExecution is used to send a signal to a running workflow execution. This results in a `WORKFLOW_EXECUTION_SIGNALED` event recorded in the history and a workflow task being created for the execution. */ +export const signalWorkflowExecution: API.OperationMethod< + SignalWorkflowExecutionRequest, + SignalWorkflowExecutionResponse, + SignalWorkflowExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SignalWorkflowExecutionRequest, + output: SignalWorkflowExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type StartActivityExecutionError = TemporalOpError; +/** StartActivityExecution starts a new activity execution. Returns an `ActivityExecutionAlreadyStarted` error if an instance already exists with same activity ID in this namespace unless permitted by the specified ID conflict policy. */ +export const startActivityExecution: API.OperationMethod< + StartActivityExecutionRequest, + StartActivityExecutionResponse, + StartActivityExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: StartActivityExecutionRequest, + output: StartActivityExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type StartBatchOperationError = TemporalOpError; +/** StartBatchOperation starts a new batch operation */ +export const startBatchOperation: API.OperationMethod< + StartBatchOperationRequest, + StartBatchOperationResponse2, + StartBatchOperationError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: StartBatchOperationRequest, + output: StartBatchOperationResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type StartNexusOperationExecutionError = TemporalOpError; +/** StartNexusOperationExecution starts a new Nexus operation. Returns a `NexusOperationExecutionAlreadyStarted` error if an instance already exists with same operation ID in this namespace unless permitted by the specified ID conflict policy. */ +export const startNexusOperationExecution: API.OperationMethod< + StartNexusOperationExecutionRequest, + StartNexusOperationExecutionResponse, + StartNexusOperationExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: StartNexusOperationExecutionRequest, + output: StartNexusOperationExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type StartWorkflowExecutionError = TemporalOpError; +/** StartWorkflowExecution starts a new workflow execution. It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an instance already exists with same workflow id. */ +export const startWorkflowExecution: API.OperationMethod< + StartWorkflowExecutionRequest, + StartWorkflowExecutionResponse, + StartWorkflowExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: StartWorkflowExecutionRequest, + output: StartWorkflowExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type StopBatchOperationError = TemporalOpError; +/** StopBatchOperation stops a batch operation */ +export const stopBatchOperation: API.OperationMethod< + StopBatchOperationRequest, + StopBatchOperationResponse2, + StopBatchOperationError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: StopBatchOperationRequest, + output: StopBatchOperationResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type TerminateActivityExecutionError = TemporalOpError; +/** TerminateActivityExecution terminates an existing activity execution immediately. Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a running attempt. */ +export const terminateActivityExecution: API.OperationMethod< + TerminateActivityExecutionRequest, + TerminateActivityExecutionResponse2, + TerminateActivityExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: TerminateActivityExecutionRequest, + output: TerminateActivityExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type TerminateNexusOperationExecutionError = TemporalOpError; +/** TerminateNexusOperationExecution terminates an existing Nexus operation immediately. Termination happens immediately and the operation handler cannot react to it. A terminated operation will have its outcome set to a failure with a termination reason. */ +export const terminateNexusOperationExecution: API.OperationMethod< + TerminateNexusOperationExecutionRequest, + TerminateNexusOperationExecutionResponse2, + TerminateNexusOperationExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: TerminateNexusOperationExecutionRequest, + output: TerminateNexusOperationExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type TerminateWorkflowExecutionError = TemporalOpError; +/** TerminateWorkflowExecution terminates an existing workflow execution by recording a `WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the execution instance. */ +export const terminateWorkflowExecution: API.OperationMethod< + TerminateWorkflowExecutionRequest, + TerminateWorkflowExecutionResponse2, + TerminateWorkflowExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: TerminateWorkflowExecutionRequest, + output: TerminateWorkflowExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type TriggerWorkflowRuleError = TemporalOpError; +/** TriggerWorkflowRule allows to: * trigger existing rule for a specific workflow execution; * trigger rule for a specific workflow execution without creating a rule; This is useful for one-off operations. */ +export const triggerWorkflowRule: API.OperationMethod< + TriggerWorkflowRuleRequest, + TriggerWorkflowRuleResponse, + TriggerWorkflowRuleError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: TriggerWorkflowRuleRequest, + output: TriggerWorkflowRuleResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UnpauseActivityError = TemporalOpError; +/** UnpauseActivity unpauses the execution of an activity specified by its ID or type. If there are multiple pending activities of the provided type - all of them will be unpaused. If activity is not paused, this call will have no effect. If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). Once the activity is unpaused, all timeout timers will be regenerated. Flags: 'jitter': the activity will be scheduled at a random time within the jitter duration. 'reset_attempts': the number of attempts will be reset. 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. Returns a `NotFound` error if there is no pending activity with the provided ID or type This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and structured to work well for standalone activities. */ +export const unpauseActivity: API.OperationMethod< + UnpauseActivityRequest, + UnpauseActivityResponse2, + UnpauseActivityError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UnpauseActivityRequest, + output: UnpauseActivityResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UnpauseActivityExecutionError = TemporalOpError; +/** UnpauseActivityExecution unpauses the execution of an activity specified by its ID. This API can be used to target a workflow activity or a standalone activity. If activity is not paused, this call will have no effect. If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). Once the activity is unpaused, all timeout timers will be regenerated. Returns a `NotFound` error if there is no pending activity with the provided ID */ +export const unpauseActivityExecution: API.OperationMethod< + UnpauseActivityExecutionRequest, + UnpauseActivityExecutionResponse2, + UnpauseActivityExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UnpauseActivityExecutionRequest, + output: UnpauseActivityExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UnpauseWorkflowExecutionError = TemporalOpError; +/** Note: This is an experimental API and the behavior may change in a future release. UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request. Unpausing a workflow execution results in - The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history - Workflow tasks and activity tasks are resumed. */ +export const unpauseWorkflowExecution: API.OperationMethod< + UnpauseWorkflowExecutionRequest, + UnpauseWorkflowExecutionResponse2, + UnpauseWorkflowExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UnpauseWorkflowExecutionRequest, + output: UnpauseWorkflowExecutionResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateActivityExecutionOptionsError = TemporalOpError; +/** UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID. This API can be used to target a workflow activity or a standalone activity. */ +export const updateActivityExecutionOptions: API.OperationMethod< + UpdateActivityExecutionOptionsRequest, + UpdateActivityExecutionOptionsResponse, + UpdateActivityExecutionOptionsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateActivityExecutionOptionsRequest, + output: UpdateActivityExecutionOptionsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateActivityOptionsError = TemporalOpError; +/** UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. If there are multiple pending activities of the provided type - all of them will be updated. This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and structured to work well for standalone activities. */ +export const updateActivityOptions: API.OperationMethod< + UpdateActivityOptionsRequest, + UpdateActivityOptionsResponse, + UpdateActivityOptionsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateActivityOptionsRequest, + output: UpdateActivityOptionsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateNamespaceError = TemporalOpError; +/** UpdateNamespace is used to update the information and configuration of a registered namespace. */ +export const updateNamespace: API.OperationMethod< + UpdateNamespaceRequest, + UpdateNamespaceResponse, + UpdateNamespaceError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateNamespaceRequest, + output: UpdateNamespaceResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateNexusEndpointError = TemporalOpError; +/** Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or `ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not match. Returns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't need to increment the version yourself. The server will increment the version for you after each update. */ +export const updateNexusEndpoint: API.OperationMethod< + UpdateNexusEndpointRequest, + UpdateNexusEndpointResponse, + UpdateNexusEndpointError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateNexusEndpointRequest, + output: UpdateNexusEndpointResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateScheduleError = TemporalOpError; +/** Changes the configuration or state of an existing schedule. */ +export const updateSchedule: API.OperationMethod< + UpdateScheduleRequest, + UpdateScheduleResponse2, + UpdateScheduleError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateScheduleRequest, + output: UpdateScheduleResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateTaskQueueConfigError = TemporalOpError; +/** Updates task queue configuration. For the overall queue rate limit: the rate limit set by this api overrides the worker-set rate limit, which uncouples the rate limit from the worker lifecycle. If the overall queue rate limit is unset, the worker-set rate limit takes effect. */ +export const updateTaskQueueConfig: API.OperationMethod< + UpdateTaskQueueConfigRequest, + UpdateTaskQueueConfigResponse, + UpdateTaskQueueConfigError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateTaskQueueConfigRequest, + output: UpdateTaskQueueConfigResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateWorkerConfigError = TemporalOpError; +/** UpdateWorkerConfig updates the worker configuration of one or more workers. Can be used to partially update the worker configuration. Can be used to update the configuration of multiple workers. */ +export const updateWorkerConfig: API.OperationMethod< + UpdateWorkerConfigRequest, + UpdateWorkerConfigResponse, + UpdateWorkerConfigError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateWorkerConfigRequest, + output: UpdateWorkerConfigResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateWorkerDeploymentVersionComputeConfigError = TemporalOpError; +/** Updates the compute config attached to a Worker Deployment Version. Experimental. This API might significantly change or be removed in a future release. */ +export const updateWorkerDeploymentVersionComputeConfig: API.OperationMethod< + UpdateWorkerDeploymentVersionComputeConfigRequest, + UpdateWorkerDeploymentVersionComputeConfigResponse2, + UpdateWorkerDeploymentVersionComputeConfigError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateWorkerDeploymentVersionComputeConfigRequest, + output: UpdateWorkerDeploymentVersionComputeConfigResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateWorkerDeploymentVersionMetadataError = TemporalOpError; +/** Updates the user-given metadata attached to a Worker Deployment Version. Experimental. This API might significantly change or be removed in a future release. */ +export const updateWorkerDeploymentVersionMetadata: API.OperationMethod< + UpdateWorkerDeploymentVersionMetadataRequest, + UpdateWorkerDeploymentVersionMetadataResponse, + UpdateWorkerDeploymentVersionMetadataError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateWorkerDeploymentVersionMetadataRequest, + output: UpdateWorkerDeploymentVersionMetadataResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateWorkflowExecutionError = TemporalOpError; +/** Invokes the specified Update function on user Workflow code. */ +export const updateWorkflowExecution: API.OperationMethod< + UpdateWorkflowExecutionRequest, + UpdateWorkflowExecutionResponse, + UpdateWorkflowExecutionError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateWorkflowExecutionRequest, + output: UpdateWorkflowExecutionResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type UpdateWorkflowExecutionOptionsError = TemporalOpError; +/** UpdateWorkflowExecutionOptions partially updates the WorkflowExecutionOptions of an existing workflow execution. */ +export const updateWorkflowExecutionOptions: API.OperationMethod< + UpdateWorkflowExecutionOptionsRequest, + UpdateWorkflowExecutionOptionsResponse, + UpdateWorkflowExecutionOptionsError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateWorkflowExecutionOptionsRequest, + output: UpdateWorkflowExecutionOptionsResponse, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); + +export type ValidateWorkerDeploymentVersionComputeConfigError = TemporalOpError; +/** Validates the compute config without attaching it to a Worker Deployment Version. Experimental. This API might significantly change or be removed in a future release. */ +export const validateWorkerDeploymentVersionComputeConfig: API.OperationMethod< + ValidateWorkerDeploymentVersionComputeConfigRequest, + ValidateWorkerDeploymentVersionComputeConfigResponse2, + ValidateWorkerDeploymentVersionComputeConfigError, + TemporalOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ValidateWorkerDeploymentVersionComputeConfigRequest, + output: ValidateWorkerDeploymentVersionComputeConfigResponse2, + errors: [UnknownTemporalError], + protocol: TemporalProtocol, + retry: Retry.Retry, +})); diff --git a/packages/temporal/src/traits.ts b/packages/temporal/src/traits.ts new file mode 100644 index 000000000..d5b6af067 --- /dev/null +++ b/packages/temporal/src/traits.ts @@ -0,0 +1,44 @@ +/** + * Temporal SDK trait surface — hand-written. + * + * Re-exports the generic protocol traits from core (so generated operations + * import everything from one place). Temporal has no envelope of its own; the + * REST-protocol traits (SensitiveValue / RawResponse) come from + * `core/protocol-rest`. + */ +export { + Body, + Header, + Query, + Label, + Http, + ResponseCode, + HttpBody, + FormDataFile, + KeyDictionary, + UnionCases, + applyErrorMatchers, + getErrorMatchers, + type HttpTrait, + type ErrorMatcher, + bodySymbol, + headerSymbol, + querySymbol, + labelSymbol, + httpSymbol, + responseCodeSymbol, + httpBodySymbol, + formDataFileSymbol, + keyDictionarySymbol, + unionCasesSymbol, + errorMatchersSymbol, +} from "@distilled.cloud/core/trait"; + +export { + SensitiveValue, + RawResponse, + RawResponseRoot, + sensitiveValueSymbol, + rawResponseSymbol, + rawResponseRootSymbol, +} from "@distilled.cloud/core/protocol-rest"; diff --git a/packages/temporal/tsconfig.json b/packages/temporal/tsconfig.json new file mode 100644 index 000000000..56b16e575 --- /dev/null +++ b/packages/temporal/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "composite": true, + "noEmit": false, + "outDir": "./lib", + "rootDir": "./src", + "paths": { + "@distilled.cloud/core/*": ["../core/src/*"] + } + }, + "references": [{ "path": "../core" }] +} diff --git a/packages/temporal/tsconfig.scripts.json b/packages/temporal/tsconfig.scripts.json new file mode 100644 index 000000000..be37c3474 --- /dev/null +++ b/packages/temporal/tsconfig.scripts.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["scripts/**/*.ts"], + "compilerOptions": { + "composite": true, + "noEmit": false, + "emitDeclarationOnly": true, + "outDir": "./.scripts-types", + "rootDir": "./scripts", + "tsBuildInfoFile": "./.scripts-types/tsconfig.scripts.tsbuildinfo", + // Resolve @distilled.cloud/core/* to src (the bun condition), matching + // how the scripts actually run under bun. + "rewriteRelativeImportExtensions": false, + "customConditions": ["bun"] + }, + "references": [{ "path": "../core" }] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a5b177f1..beb5dcdc7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -560,6 +560,25 @@ importers: specifier: catalog:tooling version: 26.4.0 + packages/temporal: + dependencies: + '@distilled.cloud/core': + specifier: workspace:* + version: link:../core + effect: + specifier: catalog:effect + version: 4.0.0-rc.112 + devDependencies: + '@effect/platform-bun': + specifier: catalog:effect + version: 4.0.0-rc.112(effect@4.0.0-rc.112) + '@types/bun': + specifier: catalog:tooling + version: 1.4.0 + '@types/node': + specifier: catalog:tooling + version: 26.4.0 + packages/turso: dependencies: '@distilled.cloud/core': diff --git a/stacks/distilled-submodules/SpecRepos.ts b/stacks/distilled-submodules/SpecRepos.ts index 97e991a7b..16a31feb9 100644 --- a/stacks/distilled-submodules/SpecRepos.ts +++ b/stacks/distilled-submodules/SpecRepos.ts @@ -71,6 +71,7 @@ export const SPEC_REPOS: readonly SpecRepo[] = [ { package: "railway" }, { package: "stripe" }, { package: "supabase" }, + { package: "temporal" }, { package: "turso" }, { package: "typesense" }, { package: "vercel" }, diff --git a/stacks/distilled-submodules/spec-repos/temporal/fetch-specs.ts b/stacks/distilled-submodules/spec-repos/temporal/fetch-specs.ts new file mode 100644 index 000000000..80c7b92fb --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/temporal/fetch-specs.ts @@ -0,0 +1,164 @@ +#!/usr/bin/env bun +/** + * Mirrors Temporal's first-party WorkflowService HTTP OpenAPI spec and + * snapshots vendor docs into ../specs/. + * + * temporalio/api publishes OpenAPI 3.0.3 generated from the WorkflowService + * proto (`openapi/openapiv3.yaml`). YAML is parsed and rewritten as + * deterministic JSON so a whitespace-only change upstream produces no + * mirror diff. Docs are snapshotted here so generate never crawls the live + * site. + * + * Usage: + * bun run fetch-specs.ts + * + * Specs are saved to: + * ../specs/openapi.json + * ../specs/docs/... + */ + +import { existsSync, mkdirSync } from "fs"; +import { dirname } from "path"; + +/** Upstream repository, as `/`. */ +const REPO = "temporalio/api"; +/** Branch (or tag/commit) to mirror. */ +const REF = "master"; +const OPENAPI_PATH = "openapi/openapiv3.yaml"; + +const OPENAPI_SPEC_URL = `https://raw.githubusercontent.com/${REPO}/${REF}/${OPENAPI_PATH.split( + "/", +) + .map(encodeURIComponent) + .join("/")}`; + +const SPECS_DIR = "../specs"; +const DOCS_DIR = `${SPECS_DIR}/docs`; +const OUTPUT_PATH = `${SPECS_DIR}/openapi.json`; +const USER_AGENT = "distilled.cloud-temporal-spec-mirror"; + +interface DocFile { + url: string; + output: string; +} + +const DOC_FILES: DocFile[] = [ + { + url: "https://docs.temporal.io/ops", + output: "docs/ops.html", + }, + { + url: "https://docs.temporal.io/self-hosted-guide/server-frontend-api-reference", + output: "docs/server-frontend-api-reference.html", + }, + { + url: "https://docs.temporal.io/cloud/api-keys", + output: "docs/cloud-api-keys.html", + }, + { + url: "https://docs.temporal.io/references/client-environment-configuration", + output: "docs/client-environment-configuration.html", + }, + { + url: "https://docs.temporal.io/references/api-reference", + output: "docs/api-reference.html", + }, +]; + +if (!existsSync(SPECS_DIR)) { + mkdirSync(SPECS_DIR, { recursive: true }); +} +if (!existsSync(DOCS_DIR)) { + mkdirSync(DOCS_DIR, { recursive: true }); +} + +const fetchText = async (url: string): Promise => { + const response = await fetch(url, { + headers: { + accept: "text/yaml, application/yaml, text/html, text/plain, */*", + "user-agent": USER_AGENT, + }, + }); + if (!response.ok) { + throw new Error( + `Failed to fetch ${url}: ${response.status} ${response.statusText}`, + ); + } + return await response.text(); +}; + +async function main() { + console.log(`Fetching OpenAPI spec from ${OPENAPI_SPEC_URL}...`); + const yaml = await fetchText(OPENAPI_SPEC_URL); + // gnostic emits a few long path keys as YAML explicit-key (`?` / `:`) + // pairs. Bun.YAML rejects those as "Multiline implicit key"; quoting + // them first is enough to parse. + const yamlForParse = yaml.replace( + /^(\s*)\? (.+)\n\1: /gm, + (_match, indent: string, key: string) => + `${indent}${JSON.stringify(key)}:\n${indent} `, + ); + const spec = Bun.YAML.parse(yamlForParse) as Record; + + // Fail here rather than three steps later in the generator: a login page + // or a gutted response is still valid YAML, but it is not an OpenAPI + // document. + if (typeof spec.openapi !== "string" || spec.paths === undefined) { + throw new Error( + `${OPENAPI_SPEC_URL} returned YAML without \`openapi\`/\`paths\` — not an OpenAPI document`, + ); + } + + console.log(`Writing spec to ${OUTPUT_PATH}...`); + await Bun.write(OUTPUT_PATH, JSON.stringify(spec, null, 2) + "\n"); + + const docs: Array<{ path: string; source: string; bytes: number }> = []; + for (const doc of DOC_FILES) { + console.log(`Fetching docs ${doc.url}...`); + const body = await fetchText(doc.url); + if (body.trim().length === 0) { + throw new Error(`${doc.url} returned an empty body`); + } + if (!/temporal/i.test(body)) { + throw new Error( + `${doc.url} does not look like Temporal docs (no "temporal" in body)`, + ); + } + const outputPath = `${SPECS_DIR}/${doc.output}`; + mkdirSync(dirname(outputPath), { recursive: true }); + console.log(`Writing ${outputPath}...`); + await Bun.write(outputPath, body.endsWith("\n") ? body : `${body}\n`); + docs.push({ path: doc.output, source: doc.url, bytes: body.length }); + } + + const info = + spec.info && typeof spec.info === "object" + ? (spec.info as { title?: unknown; version?: unknown }) + : undefined; + const manifest = { + origin: "https://github.com/temporalio/api", + openapi: [ + { + file: "openapi.json", + source: OPENAPI_SPEC_URL, + openapi: spec.openapi, + title: typeof info?.title === "string" ? info.title : undefined, + paths: Object.keys(spec.paths as object).length, + }, + ], + docs, + }; + await Bun.write( + `${DOCS_DIR}/_manifest.json`, + JSON.stringify(manifest, null, 2) + "\n", + ); + + console.log( + `Done! OpenAPI ${spec.openapi} — ${Object.keys(spec.paths as object).length} paths, ${docs.length} docs`, + ); +} + +main().catch((err) => { + console.error("Fatal error:", err); + process.exit(1); +}); diff --git a/stacks/distilled-submodules/spec-repos/temporal/package.json b/stacks/distilled-submodules/spec-repos/temporal/package.json new file mode 100644 index 000000000..8bdb04212 --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/temporal/package.json @@ -0,0 +1,27 @@ +{ + "name": "temporal-spec", + "private": true, + "type": "module", + "scripts": { + "fetch-specs": "bun run fetch-specs.ts", + "tsc": "tsc --noEmit", + "lint": "oxlint .", + "fmt": "oxfmt --write .", + "fmt:check": "oxfmt --check .", + "check": "bun run tsc && bun run lint && bun run fmt:check" + }, + "workspaces": { + "catalog": { + "@typescript/native-preview": "latest", + "oxfmt": "0.21.0", + "oxlint": "1.36.0" + } + }, + "dependencies": { + "@typescript/native-preview": "catalog:" + }, + "devDependencies": { + "oxfmt": "catalog:", + "oxlint": "catalog:" + } +} diff --git a/stacks/distilled-submodules/spec-repos/temporal/readme.md b/stacks/distilled-submodules/spec-repos/temporal/readme.md new file mode 100644 index 000000000..3465b6dd9 --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/temporal/readme.md @@ -0,0 +1,34 @@ +# spec-mirror-temporal + +A git mirror of Temporal's first-party [WorkflowService OpenAPI spec](https://github.com/temporalio/api/blob/master/openapi/openapiv3.yaml), reduced to exactly the file the +[`@distilled.cloud/temporal`](https://github.com/alchemy-run/distilled) generator reads: + +- `specs/openapi.json` — `openapi/openapiv3.yaml` parsed to deterministic JSON +- `specs/docs/` — snapshots of vendor docs used at generate time + +Nothing else from `temporalio/api` is mirrored, so this repository stays small +enough to use as a git submodule — the upstream repository is never cloned. + +The mirror is updated every 24 hours by +[`.github/workflows/update-specs.yml`](./.github/workflows/update-specs.yml). + +## Usage as a submodule + +```sh +git submodule add https://github.com/distilled-mirror/spec-mirror-temporal.git +``` + +## Updating specs + +From `.meta/`: + +```sh +bun install +bun run fetch-specs +``` + +--- + +This repository is managed by the `distilled-submodules` Alchemy stack in +[alchemy-run/distilled](https://github.com/alchemy-run/distilled) (`stacks/distilled-submodules`). +Its scaffolding is generated — edit it there, not here. diff --git a/tsconfig.json b/tsconfig.json index 7289e61be..7f363cf3d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,60 +1,176 @@ { "files": [], "references": [ - { "path": "./packages/core/tsconfig.json" }, - { "path": "./packages/cloudflare/tsconfig.json" }, - { "path": "./packages/cloudflare/tsconfig.scripts.json" }, - { "path": "./packages/aws/tsconfig.json" }, - { "path": "./packages/aws/tsconfig.scripts.json" }, - { "path": "./packages/axiom/tsconfig.json" }, - { "path": "./packages/axiom/tsconfig.scripts.json" }, - { "path": "./packages/azure/tsconfig.json" }, - { "path": "./packages/azure/tsconfig.scripts.json" }, - { "path": "./packages/coinbase/tsconfig.json" }, - { "path": "./packages/coinbase/tsconfig.scripts.json" }, - { "path": "./packages/discord/tsconfig.json" }, - { "path": "./packages/discord/tsconfig.scripts.json" }, - { "path": "./packages/expo-eas/tsconfig.json" }, - { "path": "./packages/expo-eas/tsconfig.scripts.json" }, - { "path": "./packages/fly-io/tsconfig.json" }, - { "path": "./packages/fly-io/tsconfig.scripts.json" }, - { "path": "./packages/gcp/tsconfig.json" }, - { "path": "./packages/gcp/tsconfig.scripts.json" }, - { "path": "./packages/github/tsconfig.json" }, - { "path": "./packages/github/tsconfig.scripts.json" }, - { "path": "./packages/hetzner/tsconfig.json" }, - { "path": "./packages/hetzner/tsconfig.scripts.json" }, - { "path": "./packages/huggingface/tsconfig.json" }, - { "path": "./packages/huggingface/tsconfig.scripts.json" }, - { "path": "./packages/kubernetes/tsconfig.json" }, - { "path": "./packages/kubernetes/tsconfig.scripts.json" }, - { "path": "./packages/mongodb-atlas/tsconfig.json" }, - { "path": "./packages/mongodb-atlas/tsconfig.scripts.json" }, - { "path": "./packages/modal/tsconfig.json" }, - { "path": "./packages/modal/tsconfig.scripts.json" }, - { "path": "./packages/neon/tsconfig.json" }, - { "path": "./packages/neon/tsconfig.scripts.json" }, - { "path": "./packages/planetscale/tsconfig.json" }, - { "path": "./packages/planetscale/tsconfig.scripts.json" }, - { "path": "./packages/posthog/tsconfig.json" }, - { "path": "./packages/posthog/tsconfig.scripts.json" }, - { "path": "./packages/prisma-postgres/tsconfig.json" }, - { "path": "./packages/prisma-postgres/tsconfig.scripts.json" }, - { "path": "./packages/railway/tsconfig.json" }, - { "path": "./packages/railway/tsconfig.scripts.json" }, - { "path": "./packages/stripe/tsconfig.json" }, - { "path": "./packages/stripe/tsconfig.scripts.json" }, - { "path": "./packages/supabase/tsconfig.json" }, - { "path": "./packages/supabase/tsconfig.scripts.json" }, - { "path": "./packages/turso/tsconfig.json" }, - { "path": "./packages/turso/tsconfig.scripts.json" }, - { "path": "./packages/typesense/tsconfig.json" }, - { "path": "./packages/typesense/tsconfig.scripts.json" }, - { "path": "./packages/vercel/tsconfig.json" }, - { "path": "./packages/vercel/tsconfig.scripts.json" }, - { "path": "./packages/whop/tsconfig.json" }, - { "path": "./packages/whop/tsconfig.scripts.json" }, - { "path": "./packages/workos/tsconfig.json" }, - { "path": "./packages/workos/tsconfig.scripts.json" } + { + "path": "./packages/core/tsconfig.json" + }, + { + "path": "./packages/cloudflare/tsconfig.json" + }, + { + "path": "./packages/cloudflare/tsconfig.scripts.json" + }, + { + "path": "./packages/aws/tsconfig.json" + }, + { + "path": "./packages/aws/tsconfig.scripts.json" + }, + { + "path": "./packages/axiom/tsconfig.json" + }, + { + "path": "./packages/axiom/tsconfig.scripts.json" + }, + { + "path": "./packages/azure/tsconfig.json" + }, + { + "path": "./packages/azure/tsconfig.scripts.json" + }, + { + "path": "./packages/coinbase/tsconfig.json" + }, + { + "path": "./packages/coinbase/tsconfig.scripts.json" + }, + { + "path": "./packages/discord/tsconfig.json" + }, + { + "path": "./packages/discord/tsconfig.scripts.json" + }, + { + "path": "./packages/expo-eas/tsconfig.json" + }, + { + "path": "./packages/expo-eas/tsconfig.scripts.json" + }, + { + "path": "./packages/fly-io/tsconfig.json" + }, + { + "path": "./packages/fly-io/tsconfig.scripts.json" + }, + { + "path": "./packages/gcp/tsconfig.json" + }, + { + "path": "./packages/gcp/tsconfig.scripts.json" + }, + { + "path": "./packages/github/tsconfig.json" + }, + { + "path": "./packages/github/tsconfig.scripts.json" + }, + { + "path": "./packages/hetzner/tsconfig.json" + }, + { + "path": "./packages/hetzner/tsconfig.scripts.json" + }, + { + "path": "./packages/huggingface/tsconfig.json" + }, + { + "path": "./packages/huggingface/tsconfig.scripts.json" + }, + { + "path": "./packages/kubernetes/tsconfig.json" + }, + { + "path": "./packages/kubernetes/tsconfig.scripts.json" + }, + { + "path": "./packages/modal/tsconfig.json" + }, + { + "path": "./packages/modal/tsconfig.scripts.json" + }, + { + "path": "./packages/mongodb-atlas/tsconfig.json" + }, + { + "path": "./packages/mongodb-atlas/tsconfig.scripts.json" + }, + { + "path": "./packages/neon/tsconfig.json" + }, + { + "path": "./packages/neon/tsconfig.scripts.json" + }, + { + "path": "./packages/planetscale/tsconfig.json" + }, + { + "path": "./packages/planetscale/tsconfig.scripts.json" + }, + { + "path": "./packages/posthog/tsconfig.json" + }, + { + "path": "./packages/posthog/tsconfig.scripts.json" + }, + { + "path": "./packages/prisma-postgres/tsconfig.json" + }, + { + "path": "./packages/prisma-postgres/tsconfig.scripts.json" + }, + { + "path": "./packages/railway/tsconfig.json" + }, + { + "path": "./packages/railway/tsconfig.scripts.json" + }, + { + "path": "./packages/stripe/tsconfig.json" + }, + { + "path": "./packages/stripe/tsconfig.scripts.json" + }, + { + "path": "./packages/supabase/tsconfig.json" + }, + { + "path": "./packages/supabase/tsconfig.scripts.json" + }, + { + "path": "./packages/temporal/tsconfig.json" + }, + { + "path": "./packages/temporal/tsconfig.scripts.json" + }, + { + "path": "./packages/turso/tsconfig.json" + }, + { + "path": "./packages/turso/tsconfig.scripts.json" + }, + { + "path": "./packages/typesense/tsconfig.json" + }, + { + "path": "./packages/typesense/tsconfig.scripts.json" + }, + { + "path": "./packages/vercel/tsconfig.json" + }, + { + "path": "./packages/vercel/tsconfig.scripts.json" + }, + { + "path": "./packages/whop/tsconfig.json" + }, + { + "path": "./packages/whop/tsconfig.scripts.json" + }, + { + "path": "./packages/workos/tsconfig.json" + }, + { + "path": "./packages/workos/tsconfig.scripts.json" + } ] }