> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usenash.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Nash exposes two MCP servers. The docs MCP server at https://docs.usenash.com/mcp searches this documentation and needs no credentials. The Nash MCP server at https://mcp.usenash.com/mcp operates an organization's deliveries and needs a Nash API key. See https://docs.usenash.com/reference/build-with-ai.
> Use the Sandbox environment (https://api.sandbox.usenash.com/v1) for anything that creates or dispatches deliveries during development.

# Create Notification Trigger

> Create a notification trigger on the authenticated organization. The request body is a discriminated union on `type`: each trigger type (see GET /v1/notification-triggers/templates) has its own typed `parameters` shape in the OpenAPI schema. An invalid `type` returns a 400 listing all valid types. Use the `Nash-Org-Id` header to scope creation to a specific org (e.g. a child org).



## OpenAPI

````yaml post /v1/notification-triggers
openapi: 3.1.0
info:
  title: Nash API
  version: 1.0.0
servers:
  - url: https://api.sandbox.usenash.com
    description: Sandbox API
  - url: https://api.sandbox.ap-southeast-2.usenash.com
    description: Sandbox API (Australia)
  - url: https://api.usenash.com
    description: Production API
  - url: https://api.ap-southeast-2.usenash.com
    description: Production API (Australia)
security: []
tags:
  - name: Notifications
    description: Notifications
    x-nash-topic: config
  - name: Annotate
    description: Annotate
    x-nash-topic: wismo
  - name: Notifications — Send
    description: One-off notification send without a NotificationTrigger.
    x-nash-topic: notifications
  - name: Shipping
    description: Shipping operations
    x-nash-topic: shipping
  - name: Workflow
    description: Workflow automation management
    x-nash-topic: scheduling
  - name: Workflow Execution
    description: Workflow execution history and monitoring
    x-nash-topic: scheduling
  - name: Optimization Strategies
    description: Create, read, update, and delete route optimization strategies.
    x-nash-topic: scheduling
  - name: AI Agents
    description: AI agent management — create, read, update, and delete agents
    x-nash-topic: config
  - name: AI Functions
    description: LLM-backed domain tools
    x-nash-topic: ai
  - name: Webhooks
    description: Webhook delivery inspection
    x-nash-topic: webhooks
  - name: Miscellaneous
    description: Miscellaneous
  - name: Job
    description: Job
    x-nash-topic: wismo
  - name: Batch Job
    description: Batch Job
    x-nash-topic: wismo
  - name: Order
    description: Order
    x-nash-topic: wismo
  - name: Provider
    description: Provider
    x-nash-topic: provider
  - name: Dispatch Strategies
    description: Dispatch Strategies
    x-nash-topic: scheduling
  - name: Store Locations
    description: Store Locations
    x-nash-topic: config
  - name: Delivery Windows
    description: Delivery Windows
    x-nash-topic: config
  - name: Templates
    description: Templates
    x-nash-topic: config
  - name: Zones
    description: Zones
    x-nash-topic: config
  - name: Feedback
    description: Feedback
    x-nash-topic: reporting
  - name: Organizations
    description: Organizations
    x-nash-topic: config
  - name: Store Catalog
    description: Store Catalog
    x-nash-topic: config
  - name: Route
    description: Route
    x-nash-topic: scheduling
  - name: Messaging
    description: Messaging
    x-nash-topic: config
  - name: Billing
    description: Invoice-aligned customer billing usage
    x-nash-topic: config
  - name: Contracts
    description: Provider contract pricing and version listings
    x-nash-topic: provider
  - name: Couriers
    description: Couriers
    x-nash-topic: provider
  - name: Fleet
    description: Inbound endpoints fleets call to manage their drivers.
    x-nash-topic: driver
  - name: Embed Sessions
    description: >-
      Mint short-lived, browser-safe sessions for embedded Nash Widgets.
      Authenticated with an org embed credential, which must stay on your
      backend.
    x-nash-topic: config
  - name: Event Timeline
    description: Entity-scoped event timeline + outbound provider traffic for one entity.
    x-nash-topic: internal
  - name: Optimization Fleet Projection
    description: >-
      Optimizer-facing projection of the effective fleet for a single-store
      solve
    x-nash-topic: scheduling
  - name: Inventory
    description: Store inventory catalog sync to SFTP retail destinations (e.g. Uber).
    x-nash-topic: store_catalog
  - name: Hub Scanning
    description: Scan physical packages onto their route rack at a hub.
    x-nash-topic: scheduling
  - name: Optimization Activities
    description: Optimization runs launched from the portal or the API
    x-nash-topic: scheduling
  - name: Route Restrictions
    description: Org-scoped geographic areas the route optimizer must avoid traversing.
    x-nash-topic: config
  - name: Shifts
    description: Shifts
    x-nash-topic: provider
  - name: Users
    description: User, role, and organization-membership management.
    x-nash-topic: config
  - name: Vehicles
    description: Vehicles
    x-nash-topic: provider
  - name: Widgets
    description: >-
      Org configuration for embedded Nash Widgets: parent origins, enablement,
      and embed credentials.
    x-nash-topic: config
  - name: Provider Chat
    description: Carrier-chat context for a route, scoped to the caller's organization.
    x-nash-topic: internal
  - name: Order Ingestion
    description: >-
      Internal validate, commit, and reconciliation boundary for governed Order
      imports.
    x-nash-topic: internal
paths:
  /v1/notification-triggers:
    post:
      tags:
        - Notifications
      summary: Create Notification Trigger
      description: >-
        Create a notification trigger on the authenticated organization. The
        request body is a discriminated union on `type`: each trigger type (see
        GET /v1/notification-triggers/templates) has its own typed `parameters`
        shape in the OpenAPI schema. An invalid `type` returns a 400 listing all
        valid types. Use the `Nash-Org-Id` header to scope creation to a
        specific org (e.g. a child org).
      operationId: create_notification_trigger_v1_notification_triggers_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNotificationTriggerInput'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationTriggerResponse'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
components:
  schemas:
    CreateNotificationTriggerInput:
      title: CreateNotificationTriggerInput
      oneOf:
        - $ref: '#/components/schemas/CreateDeliveryStatusTransitionTrigger'
        - $ref: '#/components/schemas/CreateDriverGeolocationTrigger'
        - $ref: '#/components/schemas/CreateTaskReassignmentTrigger'
        - $ref: '#/components/schemas/CreateDeliveryIncidentReportTrigger'
        - $ref: '#/components/schemas/CreateStuckStatusTrigger'
        - $ref: '#/components/schemas/CreateStatusChangedTooQuicklyTrigger'
        - $ref: '#/components/schemas/CreateDriverLocationVsDeliveryStatusTrigger'
        - $ref: '#/components/schemas/CreateDropoffDelayedTrigger'
        - $ref: '#/components/schemas/CreatePickupDelayedTrigger'
        - $ref: '#/components/schemas/CreateOrderNeedsAttentionTrigger'
        - $ref: '#/components/schemas/CreateAutodispatchFailedTrigger'
        - $ref: '#/components/schemas/CreateAddressValidationFailedTrigger'
        - $ref: '#/components/schemas/CreateOrderReadyToFulfillTrigger'
        - $ref: '#/components/schemas/CreateJobCreationFailedTrigger'
        - $ref: '#/components/schemas/CreateTaskHealthStatusTrigger'
        - $ref: '#/components/schemas/CreateTasksAttemptsExhaustedTrigger'
        - $ref: '#/components/schemas/CreateDeliveryCancellationFailedTrigger'
        - $ref: '#/components/schemas/CreateInternalDriverNotAssignedTrigger'
        - $ref: '#/components/schemas/CreateNashAiInvalidPodTrigger'
        - $ref: '#/components/schemas/CreateDeliveryCompletedTooEarlyTrigger'
        - $ref: '#/components/schemas/CreateStatusTriggeredTooEarlyTrigger'
        - $ref: '#/components/schemas/CreateOrderNotDispatchedCloseToPickupTrigger'
        - $ref: '#/components/schemas/CreateRefundRequestTrigger'
        - $ref: '#/components/schemas/CreateOptimizationOrderUnassignedTrigger'
        - $ref: '#/components/schemas/CreateZoneGeolocationTrigger'
        - $ref: '#/components/schemas/CreateApiBasedTrigger'
        - $ref: '#/components/schemas/CreateOptimizationActionStatusTrigger'
        - $ref: '#/components/schemas/CreateDriverStackingTrigger'
        - $ref: '#/components/schemas/CreateTimeElapsedSinceStatusTrigger'
        - $ref: '#/components/schemas/CreateActivityStatusTransitionTrigger'
        - $ref: '#/components/schemas/CreateDemoTrigger'
        - $ref: '#/components/schemas/CreateCustomEventListenerTrigger'
        - $ref: '#/components/schemas/CreateProofOfDeliveryUploadedTrigger'
        - $ref: '#/components/schemas/CreateCourierUpdatedTrigger'
        - $ref: '#/components/schemas/CreateTimingUpdatedTrigger'
        - $ref: '#/components/schemas/CreateAiConversationCompletedTrigger'
        - $ref: '#/components/schemas/CreateDeliveryWindowBookedTimeoutTrigger'
        - $ref: '#/components/schemas/CreateDeliveryNoteAddedTrigger'
        - $ref: '#/components/schemas/CreateOrderModifiedTrigger'
        - $ref: '#/components/schemas/CreateRouteStatusTransitionTrigger'
        - $ref: '#/components/schemas/CreateOrderPickupStartTimeTrigger'
        - $ref: '#/components/schemas/CreateOrderPickupEndTimeTrigger'
        - $ref: '#/components/schemas/CreateOrderDropoffStartTimeTrigger'
        - $ref: '#/components/schemas/CreateOrderDropoffEndTimeTrigger'
      description: |-
        Root serializer for POST /v1/notification-triggers.

        Thin wrapper over the ``type``-discriminated union so flask-openapi3 can
        consume it as a body type; callers send the trigger object directly at
        the top level of the JSON body.
      discriminator:
        propertyName: type
        mapping:
          activity_status_transition:
            $ref: '#/components/schemas/CreateActivityStatusTransitionTrigger'
          address_validation_failed:
            $ref: '#/components/schemas/CreateAddressValidationFailedTrigger'
          ai_conversation_completed:
            $ref: '#/components/schemas/CreateAiConversationCompletedTrigger'
          api_based:
            $ref: '#/components/schemas/CreateApiBasedTrigger'
          autodispatch_failed:
            $ref: '#/components/schemas/CreateAutodispatchFailedTrigger'
          courier_updated:
            $ref: '#/components/schemas/CreateCourierUpdatedTrigger'
          custom_event_listener:
            $ref: '#/components/schemas/CreateCustomEventListenerTrigger'
          delivery_cancellation_failed:
            $ref: '#/components/schemas/CreateDeliveryCancellationFailedTrigger'
          delivery_completed_too_early:
            $ref: '#/components/schemas/CreateDeliveryCompletedTooEarlyTrigger'
          delivery_incident_report:
            $ref: '#/components/schemas/CreateDeliveryIncidentReportTrigger'
          delivery_note_added:
            $ref: '#/components/schemas/CreateDeliveryNoteAddedTrigger'
          delivery_status_transition:
            $ref: '#/components/schemas/CreateDeliveryStatusTransitionTrigger'
          delivery_window_booked_timeout:
            $ref: '#/components/schemas/CreateDeliveryWindowBookedTimeoutTrigger'
          demo:
            $ref: '#/components/schemas/CreateDemoTrigger'
          driver_geolocation:
            $ref: '#/components/schemas/CreateDriverGeolocationTrigger'
          driver_location_vs_delivery_status:
            $ref: '#/components/schemas/CreateDriverLocationVsDeliveryStatusTrigger'
          driver_stacking:
            $ref: '#/components/schemas/CreateDriverStackingTrigger'
          dropoff_delayed:
            $ref: '#/components/schemas/CreateDropoffDelayedTrigger'
          internal_driver_not_assigned:
            $ref: '#/components/schemas/CreateInternalDriverNotAssignedTrigger'
          job_creation_failed:
            $ref: '#/components/schemas/CreateJobCreationFailedTrigger'
          nash_ai_invalid_pod:
            $ref: '#/components/schemas/CreateNashAiInvalidPodTrigger'
          optimization_action_status:
            $ref: '#/components/schemas/CreateOptimizationActionStatusTrigger'
          optimization_order_unassigned:
            $ref: '#/components/schemas/CreateOptimizationOrderUnassignedTrigger'
          order_dropoff_end_time:
            $ref: '#/components/schemas/CreateOrderDropoffEndTimeTrigger'
          order_dropoff_start_time:
            $ref: '#/components/schemas/CreateOrderDropoffStartTimeTrigger'
          order_modified:
            $ref: '#/components/schemas/CreateOrderModifiedTrigger'
          order_needs_attention:
            $ref: '#/components/schemas/CreateOrderNeedsAttentionTrigger'
          order_not_dispatched_close_to_pickup:
            $ref: '#/components/schemas/CreateOrderNotDispatchedCloseToPickupTrigger'
          order_pickup_end_time:
            $ref: '#/components/schemas/CreateOrderPickupEndTimeTrigger'
          order_pickup_start_time:
            $ref: '#/components/schemas/CreateOrderPickupStartTimeTrigger'
          order_ready_to_fulfill:
            $ref: '#/components/schemas/CreateOrderReadyToFulfillTrigger'
          pickup_delayed:
            $ref: '#/components/schemas/CreatePickupDelayedTrigger'
          proof_of_delivery_uploaded:
            $ref: '#/components/schemas/CreateProofOfDeliveryUploadedTrigger'
          refund_request:
            $ref: '#/components/schemas/CreateRefundRequestTrigger'
          route_status_transition:
            $ref: '#/components/schemas/CreateRouteStatusTransitionTrigger'
          status_changed_too_quickly:
            $ref: '#/components/schemas/CreateStatusChangedTooQuicklyTrigger'
          status_triggered_too_early:
            $ref: '#/components/schemas/CreateStatusTriggeredTooEarlyTrigger'
          stuck_status:
            $ref: '#/components/schemas/CreateStuckStatusTrigger'
          task_health_status:
            $ref: '#/components/schemas/CreateTaskHealthStatusTrigger'
          task_reassignment:
            $ref: '#/components/schemas/CreateTaskReassignmentTrigger'
          tasks_attempts_exhausted:
            $ref: '#/components/schemas/CreateTasksAttemptsExhaustedTrigger'
          time_elapsed_since_status:
            $ref: '#/components/schemas/CreateTimeElapsedSinceStatusTrigger'
          timing_updated:
            $ref: '#/components/schemas/CreateTimingUpdatedTrigger'
          zone_geolocation:
            $ref: '#/components/schemas/CreateZoneGeolocationTrigger'
    NotificationTriggerResponse:
      title: NotificationTriggerResponse
      required:
        - id
        - type
        - name
        - enabled
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Notification trigger ID
        type:
          title: Type
          type: string
          description: >-
            Trigger type slug, matching a template from GET
            /v1/notification-triggers/templates, e.g.
            'tasks_attempts_exhausted'.
        name:
          title: Name
          type: string
          description: Human-readable name of this trigger instance
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Trigger description
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            Notification group IDs that receive notifications when this trigger
            fires.
      description: A notification trigger configured on an organization.
    NashValidationError:
      title: NashValidationError
      required:
        - error
        - response_status
        - RequestID
      type: object
      properties:
        error:
          $ref: '#/components/schemas/NashErrorDetails'
        response_status:
          title: Response Status
          type: string
        RequestID:
          title: Requestid
          type: string
    CreateDeliveryStatusTransitionTrigger:
      title: CreateDeliveryStatusTransitionTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: delivery_status_transition
        parameters:
          $ref: '#/components/schemas/DeliveryStatusTransitionParams'
    CreateDriverGeolocationTrigger:
      title: CreateDriverGeolocationTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: driver_geolocation
        parameters:
          title: Parameters
          oneOf:
            - $ref: '#/components/schemas/DriverGeolocationWithinParams'
            - $ref: '#/components/schemas/DriverGeolocationGreaterThanParams'
            - $ref: '#/components/schemas/DriverGeolocationStoppedForParams'
          discriminator:
            propertyName: condition
            mapping:
              greater_than:
                $ref: '#/components/schemas/DriverGeolocationGreaterThanParams'
              stopped_for:
                $ref: '#/components/schemas/DriverGeolocationStoppedForParams'
              within:
                $ref: '#/components/schemas/DriverGeolocationWithinParams'
    CreateTaskReassignmentTrigger:
      title: CreateTaskReassignmentTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: task_reassignment
        parameters:
          $ref: '#/components/schemas/TaskReassignmentParams'
    CreateDeliveryIncidentReportTrigger:
      title: CreateDeliveryIncidentReportTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: delivery_incident_report
        parameters:
          $ref: '#/components/schemas/DeliveryIncidentReportParams'
    CreateStuckStatusTrigger:
      title: CreateStuckStatusTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: stuck_status
        parameters:
          $ref: '#/components/schemas/StuckStatusParams'
    CreateStatusChangedTooQuicklyTrigger:
      title: CreateStatusChangedTooQuicklyTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: status_changed_too_quickly
        parameters:
          $ref: '#/components/schemas/StatusesChangedTooQuicklyParams'
    CreateDriverLocationVsDeliveryStatusTrigger:
      title: CreateDriverLocationVsDeliveryStatusTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: driver_location_vs_delivery_status
        parameters:
          $ref: '#/components/schemas/DriverLocationVsDeliveryStatusParams'
    CreateDropoffDelayedTrigger:
      title: CreateDropoffDelayedTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: dropoff_delayed
        parameters:
          $ref: '#/components/schemas/DropoffDelayedParams'
    CreatePickupDelayedTrigger:
      title: CreatePickupDelayedTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: pickup_delayed
        parameters:
          $ref: '#/components/schemas/PickupDelayedParams'
    CreateOrderNeedsAttentionTrigger:
      title: CreateOrderNeedsAttentionTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: order_needs_attention
        parameters:
          $ref: '#/components/schemas/OrderNeedsAttentionParams'
    CreateAutodispatchFailedTrigger:
      title: CreateAutodispatchFailedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: autodispatch_failed
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateAddressValidationFailedTrigger:
      title: CreateAddressValidationFailedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: address_validation_failed
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateOrderReadyToFulfillTrigger:
      title: CreateOrderReadyToFulfillTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: order_ready_to_fulfill
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateJobCreationFailedTrigger:
      title: CreateJobCreationFailedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: job_creation_failed
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateTaskHealthStatusTrigger:
      title: CreateTaskHealthStatusTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: task_health_status
        parameters:
          $ref: '#/components/schemas/TaskHealthStatusParams'
    CreateTasksAttemptsExhaustedTrigger:
      title: CreateTasksAttemptsExhaustedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: tasks_attempts_exhausted
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateDeliveryCancellationFailedTrigger:
      title: CreateDeliveryCancellationFailedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: delivery_cancellation_failed
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateInternalDriverNotAssignedTrigger:
      title: CreateInternalDriverNotAssignedTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: internal_driver_not_assigned
        parameters:
          $ref: '#/components/schemas/InternalDriverNotAssignedParams'
    CreateNashAiInvalidPodTrigger:
      title: CreateNashAiInvalidPodTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: nash_ai_invalid_pod
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateDeliveryCompletedTooEarlyTrigger:
      title: CreateDeliveryCompletedTooEarlyTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: delivery_completed_too_early
        parameters:
          $ref: '#/components/schemas/DeliveryCompletedTooEarlyParams'
    CreateStatusTriggeredTooEarlyTrigger:
      title: CreateStatusTriggeredTooEarlyTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: status_triggered_too_early
        parameters:
          $ref: '#/components/schemas/StatusTriggeredTooEarlyParams'
    CreateOrderNotDispatchedCloseToPickupTrigger:
      title: CreateOrderNotDispatchedCloseToPickupTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: order_not_dispatched_close_to_pickup
        parameters:
          $ref: '#/components/schemas/OrderNotDispatchedParams'
    CreateRefundRequestTrigger:
      title: CreateRefundRequestTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: refund_request
        parameters:
          $ref: '#/components/schemas/RefundRequestParams'
    CreateOptimizationOrderUnassignedTrigger:
      title: CreateOptimizationOrderUnassignedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: optimization_order_unassigned
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateZoneGeolocationTrigger:
      title: CreateZoneGeolocationTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: zone_geolocation
        parameters:
          $ref: '#/components/schemas/ZoneGeolocationParams'
    CreateApiBasedTrigger:
      title: CreateApiBasedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: api_based
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateOptimizationActionStatusTrigger:
      title: CreateOptimizationActionStatusTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: optimization_action_status
        parameters:
          $ref: '#/components/schemas/OptimizationActionStatusParams'
    CreateDriverStackingTrigger:
      title: CreateDriverStackingTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: driver_stacking
        parameters:
          $ref: '#/components/schemas/DriverStackingParams'
    CreateTimeElapsedSinceStatusTrigger:
      title: CreateTimeElapsedSinceStatusTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: time_elapsed_since_status
        parameters:
          $ref: '#/components/schemas/TimeElapsedSinceStatusParams'
    CreateActivityStatusTransitionTrigger:
      title: CreateActivityStatusTransitionTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: activity_status_transition
        parameters:
          $ref: '#/components/schemas/ActivityStatusTransitionParams'
    CreateDemoTrigger:
      title: CreateDemoTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: demo
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateCustomEventListenerTrigger:
      title: CreateCustomEventListenerTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: custom_event_listener
        parameters:
          $ref: '#/components/schemas/CustomEventListenerParams'
    CreateProofOfDeliveryUploadedTrigger:
      title: CreateProofOfDeliveryUploadedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: proof_of_delivery_uploaded
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateCourierUpdatedTrigger:
      title: CreateCourierUpdatedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: courier_updated
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateTimingUpdatedTrigger:
      title: CreateTimingUpdatedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: timing_updated
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateAiConversationCompletedTrigger:
      title: CreateAiConversationCompletedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: ai_conversation_completed
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateDeliveryWindowBookedTimeoutTrigger:
      title: CreateDeliveryWindowBookedTimeoutTrigger
      required:
        - name
        - notificationGroupIds
        - type
        - parameters
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: delivery_window_booked_timeout
        parameters:
          $ref: '#/components/schemas/DeliveryWindowBookedTimeoutParams'
    CreateDeliveryNoteAddedTrigger:
      title: CreateDeliveryNoteAddedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: delivery_note_added
        parameters:
          $ref: '#/components/schemas/_NoParams'
    CreateOrderModifiedTrigger:
      title: CreateOrderModifiedTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: order_modified
        parameters:
          anyOf:
            - $ref: '#/components/schemas/OrderModifiedParams'
            - type: 'null'
          default: null
    CreateRouteStatusTransitionTrigger:
      title: CreateRouteStatusTransitionTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: route_status_transition
        parameters:
          anyOf:
            - $ref: '#/components/schemas/RouteStatusTransitionParams'
            - type: 'null'
          default: null
    CreateOrderPickupStartTimeTrigger:
      title: CreateOrderPickupStartTimeTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: order_pickup_start_time
        parameters:
          $ref: '#/components/schemas/OrderTimeParams'
    CreateOrderPickupEndTimeTrigger:
      title: CreateOrderPickupEndTimeTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: order_pickup_end_time
        parameters:
          $ref: '#/components/schemas/OrderTimeParams'
    CreateOrderDropoffStartTimeTrigger:
      title: CreateOrderDropoffStartTimeTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: order_dropoff_start_time
        parameters:
          $ref: '#/components/schemas/OrderTimeParams'
    CreateOrderDropoffEndTimeTrigger:
      title: CreateOrderDropoffEndTimeTrigger
      required:
        - name
        - notificationGroupIds
        - type
      type: object
      properties:
        name:
          title: Name
          minLength: 1
          type: string
          description: Human-readable name for this trigger instance.
        notificationGroupIds:
          title: Notificationgroupids
          type: array
          items:
            type: string
          description: >-
            IDs of the notification groups that will receive notifications when
            this trigger fires.
        description:
          title: Description
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description of the trigger.
          default: null
        enabled:
          title: Enabled
          type: boolean
          description: Whether the trigger is enabled on creation. Defaults to true.
          default: true
        message:
          title: Message
          anyOf:
            - type: string
            - type: 'null'
          description: Optional custom message body.
          default: null
        flag:
          title: Flag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether firing this trigger should also flag the job for operator
            attention.
          default: null
        autoResolveFlag:
          title: Autoresolveflag
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, a flag raised by this trigger resolves automatically when
            the flag condition clears.
          default: null
        optionsGroupIds:
          title: Optionsgroupids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Options groups that scope when this trigger applies.
          default: null
        contractIds:
          title: Contractids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: Contract IDs that scope when this trigger applies.
          default: null
        isInternal:
          title: Isinternal
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the trigger is for internal use only (not exposed to
            customers).
          default: null
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            Zone IDs that scope when this trigger applies (separate from
            zone-geolocation parameters).
          default: null
        customEventName:
          title: Customeventname
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: >-
            For triggers that emit a custom event when fired, the name of that
            event.
          default: null
        conditionalLogic:
          title: Conditionallogic
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Optional AND/OR conditional tree that gates when the trigger fires.
            Shape mirrors the Zod ConditionalStatement schema in nash-ui;
            currently passed through as JSON. A follow-up will type this
            explicitly.
          default: null
        type:
          title: Type
          type: string
          const: order_dropoff_end_time
        parameters:
          $ref: '#/components/schemas/OrderTimeParams'
    NashErrorDetails:
      title: NashErrorDetails
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: string
        message:
          title: Message
          type: string
        details:
          title: Details
          anyOf:
            - type: object
              additionalProperties: true
            - type: 'null'
          description: >-
            Structured error context; shape depends on `code`. For
            `VALIDATION_ERRORS` (HTTP 422) it is `{"fields": [{"loc": [...],
            "msg": "...", "type": "..."}]}` — one entry per invalid field, where
            `loc` is the field path, `msg` the human-readable message, and
            `type` the machine-readable error type (e.g. `string_type`,
            `missing`).
          default: null
    DeliveryStatusTransitionParams:
      title: DeliveryStatusTransitionParams
      type: object
      anyOf:
        - required:
            - deliveryStatus
          properties:
            deliveryStatus:
              minLength: 1
              type: string
        - required:
            - deliveryStatuses
          properties:
            deliveryStatuses:
              minItems: 1
              type: array
      properties:
        deliveryStatus:
          title: Deliverystatus
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          description: Legacy single delivery status that triggers the notification.
          default: null
        deliveryStatuses:
          title: Deliverystatuses
          anyOf:
            - minItems: 1
              type: array
              items:
                minLength: 1
                type: string
            - type: 'null'
          description: >-
            Delivery statuses that independently trigger the notification. This
            list takes precedence over deliveryStatus when both are supplied.
          default: null
        sendScheduledMessage:
          title: Sendscheduledmessage
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            If true, schedule the message to send at a later time instead of
            firing immediately.
          default: null
        scheduledSendDeltaMinutes:
          title: Scheduledsenddeltaminutes
          anyOf:
            - maximum: 4320
              minimum: 15
              type: integer
            - type: 'null'
          description: >-
            Minutes after the status transition to send the scheduled message
            (15 min to 3 days).
          default: null
    DriverGeolocationWithinParams:
      title: DriverGeolocationWithinParams
      required:
        - metricValue
        - deliveryStatus
        - location
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
          description: Numeric threshold for the condition.
        deliveryStatus:
          title: Deliverystatus
          minLength: 1
          type: string
          description: Delivery status this rule applies to.
        hasCancellationReason:
          title: Hascancellationreason
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
        firstTaskOnly:
          title: Firsttaskonly
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
        statusHistoryIncludes:
          title: Statushistoryincludes
          anyOf:
            - type: string
            - type: 'null'
          default: null
        statusHistoryDoesNotInclude:
          title: Statushistorydoesnotinclude
          anyOf:
            - type: string
            - type: 'null'
          default: null
        condition:
          title: Condition
          type: string
          default: within
          const: within
        metricName:
          title: Metricname
          enum:
            - minutes
            - miles
            - kilometers
          type: string
          default: minutes
        location:
          title: Location
          enum:
            - pickup_location
            - dropoff_location
          type: string
    DriverGeolocationGreaterThanParams:
      title: DriverGeolocationGreaterThanParams
      required:
        - metricValue
        - deliveryStatus
        - location
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
          description: Numeric threshold for the condition.
        deliveryStatus:
          title: Deliverystatus
          minLength: 1
          type: string
          description: Delivery status this rule applies to.
        hasCancellationReason:
          title: Hascancellationreason
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
        firstTaskOnly:
          title: Firsttaskonly
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
        statusHistoryIncludes:
          title: Statushistoryincludes
          anyOf:
            - type: string
            - type: 'null'
          default: null
        statusHistoryDoesNotInclude:
          title: Statushistorydoesnotinclude
          anyOf:
            - type: string
            - type: 'null'
          default: null
        condition:
          title: Condition
          type: string
          default: greater_than
          const: greater_than
        metricName:
          title: Metricname
          enum:
            - minutes
            - miles
            - kilometers
          type: string
          default: minutes
        location:
          title: Location
          enum:
            - pickup_location
            - dropoff_location
          type: string
    DriverGeolocationStoppedForParams:
      title: DriverGeolocationStoppedForParams
      required:
        - metricValue
        - deliveryStatus
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
          description: Numeric threshold for the condition.
        deliveryStatus:
          title: Deliverystatus
          minLength: 1
          type: string
          description: Delivery status this rule applies to.
        hasCancellationReason:
          title: Hascancellationreason
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
        firstTaskOnly:
          title: Firsttaskonly
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
        statusHistoryIncludes:
          title: Statushistoryincludes
          anyOf:
            - type: string
            - type: 'null'
          default: null
        statusHistoryDoesNotInclude:
          title: Statushistorydoesnotinclude
          anyOf:
            - type: string
            - type: 'null'
          default: null
        condition:
          title: Condition
          type: string
          default: stopped_for
          const: stopped_for
        metricName:
          title: Metricname
          type: string
          default: minutes
          const: minutes
    TaskReassignmentParams:
      title: TaskReassignmentParams
      required:
        - metricValue
        - sendOnEveryTaskReassignment
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
        metricName:
          title: Metricname
          type: string
          default: number_of_times
          const: number_of_times
        sendOnEveryTaskReassignment:
          title: Sendoneverytaskreassignment
          type: boolean
    DeliveryIncidentReportParams:
      title: DeliveryIncidentReportParams
      type: object
      properties:
        dirType:
          title: Dirtype
          enum:
            - all
            - refund_request
          type: string
          default: all
        dirCreated:
          title: Dircreated
          type: boolean
          default: false
        dirResolved:
          title: Dirresolved
          type: boolean
          default: false
    StuckStatusParams:
      title: StuckStatusParams
      required:
        - metricValue
        - deliveryStatus
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
        metricName:
          title: Metricname
          anyOf:
            - enum:
                - hours
                - minutes
              type: string
            - type: 'null'
          default: null
        deliveryStatus:
          title: Deliverystatus
          minLength: 1
          type: string
        activateBeforePickup:
          title: Activatebeforepickup
          type: boolean
          default: false
        metricValue2:
          title: Metricvalue2
          anyOf:
            - type: number
            - type: 'null'
          default: null
        metricName2:
          title: Metricname2
          anyOf:
            - enum:
                - hours
                - minutes
              type: string
            - type: 'null'
          default: null
    StatusesChangedTooQuicklyParams:
      title: StatusesChangedTooQuicklyParams
      required:
        - metricValue
        - deliveryStatus1
        - deliveryStatus2
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
        metricName:
          title: Metricname
          type: string
          default: seconds
          const: seconds
        deliveryStatus1:
          title: Deliverystatus1
          minLength: 1
          type: string
        deliveryStatus2:
          title: Deliverystatus2
          minLength: 1
          type: string
    DriverLocationVsDeliveryStatusParams:
      title: DriverLocationVsDeliveryStatusParams
      required:
        - metricValue
        - deliveryStatus
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
        metricName:
          title: Metricname
          type: string
          default: miles
          const: miles
        deliveryStatus:
          title: Deliverystatus
          minLength: 1
          type: string
    DropoffDelayedParams:
      title: DropoffDelayedParams
      required:
        - metricValue
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
        metricName:
          title: Metricname
          type: string
          default: minutes
          const: minutes
    PickupDelayedParams:
      title: PickupDelayedParams
      required:
        - metricValue
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
        metricName:
          title: Metricname
          type: string
          default: minutes
          const: minutes
    OrderNeedsAttentionParams:
      title: OrderNeedsAttentionParams
      type: object
      properties:
        onlyOrdersWithDeliveryWindows:
          title: Onlyorderswithdeliverywindows
          type: boolean
          default: false
    _NoParams:
      title: _NoParams
      type: object
      properties: {}
      description: Empty parameters object for triggers that take no configuration.
    TaskHealthStatusParams:
      title: TaskHealthStatusParams
      required:
        - status
        - healthStatus
      type: object
      properties:
        status:
          title: Status
          minLength: 1
          type: string
        healthStatus:
          title: Healthstatus
          minLength: 1
          type: string
    InternalDriverNotAssignedParams:
      title: InternalDriverNotAssignedParams
      required:
        - minutes
      type: object
      properties:
        minutes:
          title: Minutes
          type: number
        referenceStatus:
          title: Referencestatus
          enum:
            - job_created
            - pickup_start_time
          type: string
          default: job_created
    DeliveryCompletedTooEarlyParams:
      title: DeliveryCompletedTooEarlyParams
      required:
        - metricValue
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
    StatusTriggeredTooEarlyParams:
      title: StatusTriggeredTooEarlyParams
      required:
        - metricValue
        - deliveryStatus
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
        deliveryStatus:
          title: Deliverystatus
          minLength: 1
          type: string
    OrderNotDispatchedParams:
      title: OrderNotDispatchedParams
      required:
        - metricValue
      type: object
      properties:
        metricValue:
          title: Metricvalue
          type: number
    RefundRequestParams:
      title: RefundRequestParams
      required:
        - statuses
      type: object
      properties:
        statuses:
          title: Statuses
          type: array
          items:
            enum:
              - under_review
              - needs_attention
              - cancelled
              - approved
              - denied
              - nash_approved
            type: string
    ZoneGeolocationParams:
      title: ZoneGeolocationParams
      type: object
      properties:
        zoneIds:
          title: Zoneids
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          default: null
    OptimizationActionStatusParams:
      title: OptimizationActionStatusParams
      required:
        - optimizationActionStatus
      type: object
      properties:
        optimizationActionStatus:
          title: Optimizationactionstatus
          enum:
            - failed
            - success
            - skipped
          type: string
    DriverStackingParams:
      title: DriverStackingParams
      type: object
      properties:
        annotateAllDeliveries:
          title: Annotatealldeliveries
          type: boolean
          default: false
        matchCourierAcrossProviders:
          title: Matchcourieracrossproviders
          type: boolean
          default: false
    TimeElapsedSinceStatusParams:
      title: TimeElapsedSinceStatusParams
      required:
        - deliveryStatus
        - deliveryStatusArray
      type: object
      properties:
        checkAfterMinutes:
          title: Checkafterminutes
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          default: null
        deliveryStatus:
          title: Deliverystatus
          minLength: 1
          type: string
        statusCondition:
          title: Statuscondition
          enum:
            - in
            - not_in
          type: string
          default: not_in
        deliveryStatusArray:
          title: Deliverystatusarray
          type: array
          items:
            type: string
    ActivityStatusTransitionParams:
      title: ActivityStatusTransitionParams
      required:
        - activityStatus
        - activityActions
      type: object
      properties:
        activityStatus:
          $ref: '#/components/schemas/ActivityStatus'
        activityActions:
          title: Activityactions
          type: array
          items:
            $ref: '#/components/schemas/ActivityAction'
    CustomEventListenerParams:
      title: CustomEventListenerParams
      required:
        - eventNames
      type: object
      properties:
        eventNames:
          title: Eventnames
          minItems: 1
          type: array
          items:
            type: string
    DeliveryWindowBookedTimeoutParams:
      title: DeliveryWindowBookedTimeoutParams
      required:
        - timeoutMinutes
      type: object
      properties:
        timeoutMinutes:
          title: Timeoutminutes
          minimum: 1
          type: integer
    OrderModifiedParams:
      title: OrderModifiedParams
      required:
        - modifiedFields
      type: object
      properties:
        modifiedFields:
          title: Modifiedfields
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/OrderModifiedField'
          description: >-
            Order fields whose modification fires the trigger. The trigger fires
            when any of the selected fields changes on an order. Select one,
            several, or all fields.
    RouteStatusTransitionParams:
      title: RouteStatusTransitionParams
      type: object
      properties:
        routeStatus:
          anyOf:
            - $ref: '#/components/schemas/RouteStatus'
            - type: 'null'
          description: >-
            Fire only when a route transitions INTO this status. Omit to fire on
            every transition.
          default: null
        routeStatuses:
          title: Routestatuses
          anyOf:
            - minItems: 1
              type: array
              items:
                $ref: '#/components/schemas/RouteStatus'
            - type: 'null'
          description: >-
            Fire only when a route transitions into one of these statuses. Omit
            to fire on every transition; an empty list is rejected (the handler
            treats a falsy list as no scope, so an empty list would silently
            fire on every transition rather than none).
          default: null
    OrderTimeParams:
      title: OrderTimeParams
      type: object
      properties:
        direction:
          title: Direction
          enum:
            - before
            - at
            - after
          type: string
          default: at
        offsetMinutes:
          title: Offsetminutes
          minimum: 0
          type: integer
          default: 0
      description: >-
        Offset from an Order window milestone.


        ``direction="at"`` fires exactly on the milestone; ``before``/``after``

        shift it by ``offset_minutes``. Amount-plus-direction rather than a
        signed

        integer so the builder can render a number box and a dropdown without
        the

        sign ambiguity.
    ActivityStatus:
      title: ActivityStatus
      enum:
        - QUEUED
        - IN_PROGRESS
        - SUCCESS
        - FAILED
        - CANCELLED
        - SKIPPED
        - SCHEDULED
      type: string
      description: Status of an activity.
    ActivityAction:
      title: ActivityAction
      enum:
        - act_dispatch_optimized_orders
        - act_optimize_orders
        - act_store_catalog_sync_run
        - act_store_catalog_sync_file
        - act_optimize_routes
        - act_post_dispatch_reoptimize
        - act_manifest_orders
        - act_orders_bulk_operation
        - act_orders_bulk_action
        - act_process_csv_upload
        - act_dispatch_routes
        - act_dispatch_delivery_window_orders
        - act_dispatch_and_manifest_batch
        - act_dispatch_and_manifest_chunk
        - generate_refund_ai_analysis_report
        - generate_customer_feedback_report
        - generate_report
        - act_harness_experiment
      type: string
    OrderModifiedField:
      title: OrderModifiedField
      enum:
        - pickup_time
        - dropoff_time
        - pickup_location
        - dropoff_location
        - pickup_contact
        - dropoff_contact
        - pickup_instructions
        - dropoff_instructions
        - items
        - tip
        - order_value
      type: string
      description: Order fields selectable for the order_modified workflow trigger.
    RouteStatus:
      title: RouteStatus
      enum:
        - created
        - assigned
        - started
        - in_progress
        - completed
        - failed
        - canceled
      type: string
      description: Status enum for Routes.

````