apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: http-callback-gate
  labels:
    dagweave.io/catalog-item: http-callback-gate
  annotations:
    # The catalog semver this manifest was authored at. The dagweave app records
    # (catalog-item-id, semver) -> content-hash -> base-vN when it mints the tenant
    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.
    dagweave.io/catalog-version: "1.0.0"
    dagweave.io/catalog-category: "Approval"
spec:
  entrypoint: gate
  templates:
    - name: gate
      inputs:
        parameters:
          # Informational message describing what the workflow is waiting for.
          # Surfaced on the suspended node; it does not affect execution.
          - name: message
            default: "Waiting for an external system to resume this node."
      # A suspend node with no duration blocks indefinitely until an external system
      # resumes it over the Argo Server HTTP API, e.g.:
      #   PUT /api/v1/workflows/{namespace}/{name}/resume
      #   (optionally with a nodeFieldSelector body to target this specific node,
      #    e.g. {"nodeFieldSelector": "displayName=<step name>"})
      # equivalently `argo resume <workflow> --node-field-selector displayName=<name>`.
      # No image or container runs — the node simply blocks downstream steps until the
      # callback arrives.
      suspend: {}
