{
  "openapi": "3.1.0",
  "info": {
    "title": "FlowRelay Agent Operations API",
    "version": "1.0.0-milestone-6b",
    "description": "Setup, plan, grant, endpoint, event, diagnostics, replay, billing handoff, and CLI-facing operations for scoped agents. Machine-facing responses identify the current platform edition, starting with FlowRelay for Shopify Flow. MCP Agent Operations access uses this same contract when enabled. Mutations reuse action-preview controls, confirmation, idempotency, usage metering, audit, redaction, and refusal reasons."
  },
  "tags": [
    {
      "name": "Bootstrap",
      "description": "Manifest, grant, and setup discovery for agents."
    },
    {
      "name": "Setup",
      "description": "Endpoint setup, sender handoff, and Shopify Flow setup support."
    },
    {
      "name": "Events",
      "description": "Receipt and event-history reads."
    },
    {
      "name": "Recovery",
      "description": "Replay and recovery-oriented operations."
    },
    {
      "name": "Diagnostics",
      "description": "Redacted diagnostics sharing."
    },
    {
      "name": "Support",
      "description": "Structured support and expansion intake for scoped agents."
    },
    {
      "name": "Billing",
      "description": "Plan, usage, and human billing handoff reads."
    },
    {
      "name": "Reliability",
      "description": "Redacted reliability health summaries."
    },
    {
      "name": "MCP",
      "description": "Remote HTTP MCP Agent Operations transport."
    },
    {
      "name": "Safety",
      "description": "Human-only boundaries, previews, confirmations, and redaction rules."
    }
  ],
  "paths": {
    "/agent/v1/manifest": {
      "get": {
        "summary": "Read the Agent Operations API manifest.",
        "responses": {
          "200": {
            "description": "Agent Operations API manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentOperationsManifest"
                }
              }
            }
          }
        },
        "operationId": "getAgentOperationsManifest",
        "tags": [
          "Bootstrap"
        ],
        "description": "Public bootstrap manifest for FlowRelay Agent Operations. Agents should read this first to confirm the Shopify Flow platform identity, canonical docs URLs, safety boundaries, quickstart steps, capability metadata, and route names.\n\nRequired scopes: none.\n\nAccess: public. Effect: read_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/reference/api/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/reference/api/",
          "requiredScopes": [],
          "access": "public",
          "effect": "read_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/mcp": {
      "post": {
        "summary": "Connect to FlowRelay MCP Agent Operations access.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "MCP streamable HTTP JSON-RPC request frame."
              },
              "examples": {
                "initialize": {
                  "summary": "Initialize an MCP session",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": "initialize-1",
                    "method": "initialize",
                    "params": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "MCP streamable HTTP response frame.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "202": {
            "description": "MCP stream accepted when the client or session protocol uses an async response."
          },
          "401": {
            "description": "Missing or invalid Agent Access bearer token."
          },
          "503": {
            "description": "Code Mode loader unavailable; API and CLI surfaces remain available.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "const": "mcp_code_mode_unavailable"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "connectMcpAgentOperations",
        "tags": [
          "MCP",
          "Safety"
        ],
        "description": "Connect to the remote HTTP MCP Agent Operations surface. MCP uses the same bearer grant, OpenAPI contract, route handlers, scopes, confirmations, idempotency rules, audit records, metering, and redaction as the Agent Operations API and CLI. Code Mode exposes search and execute over the OpenAPI contract, but execute may not call the MCP transport endpoint itself.\n\nRequired scopes: none.\n\nAccess: agent_grant. Effect: mcp_agent_operations_access. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/reference/mcp/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/reference/mcp/",
          "requiredScopes": [],
          "access": "agent_grant",
          "effect": "mcp_agent_operations_access",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/setup-state": {
      "get": {
        "summary": "Read store setup state for human UI and scoped agents.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Current setup state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupState"
                }
              }
            }
          }
        },
        "operationId": "getSetupState",
        "tags": [
          "Bootstrap",
          "Setup"
        ],
        "description": "Read current setup state, endpoint summaries, trigger readiness, checklist state, and next recommended actions for the authorizing Shopify store. Use this before creating or changing endpoints.\n\nRequired scopes: setup:read.\n\nAccess: agent_grant. Effect: read_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/getting-started/first-event/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/getting-started/first-event/",
          "requiredScopes": [
            "setup:read"
          ],
          "access": "agent_grant",
          "effect": "read_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/plan-usage": {
      "get": {
        "summary": "Read current FlowRelay plan, billing status, usage, and enforcement state.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Current plan and usage state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUsageState"
                }
              }
            }
          }
        },
        "operationId": "getPlanUsage",
        "tags": [
          "Billing"
        ],
        "description": "Read current plan, billing status, published usage meters, and enforcement state. This route is read-only and cannot approve or create Shopify charges.\n\nRequired scopes: setup:read.\n\nAccess: agent_grant. Effect: read_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/operate/usage-limits/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/operate/usage-limits/",
          "requiredScopes": [
            "setup:read"
          ],
          "access": "agent_grant",
          "effect": "read_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/billing-handoff": {
      "get": {
        "summary": "Prepare a human Shopify billing approval handoff without creating or approving a charge.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Billing state, app billing deep link, and paid plan options.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingHandoffRead"
                }
              }
            }
          }
        },
        "operationId": "getBillingHandoff",
        "tags": [
          "Billing",
          "Safety"
        ],
        "description": "Prepare a human billing handoff by returning billing status, available plan options, and the FlowRelay app billing location. Shopify billing approval remains human-only.\n\nRequired scopes: setup:read.\n\nAccess: agent_grant. Effect: handoff_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/reference/api/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/reference/api/",
          "requiredScopes": [
            "setup:read"
          ],
          "access": "agent_grant",
          "effect": "handoff_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/grant": {
      "get": {
        "summary": "Read the current agent grant, scopes, expiration, and safety guidance.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Current grant introspection without token hash or full token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentGrantIntrospectionRead"
                }
              }
            }
          }
        },
        "operationId": "getCurrentAgentGrant",
        "tags": [
          "Bootstrap",
          "Safety"
        ],
        "description": "Read the current grant, authority tier, scopes, expiration, revocation state, and safety guidance. This never returns the full grant token or token hash.\n\nRequired scopes: none.\n\nAccess: agent_grant. Effect: read_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/agent-access/grants-and-scopes/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/agent-access/grants-and-scopes/",
          "requiredScopes": [],
          "access": "agent_grant",
          "effect": "read_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/event-result": {
      "get": {
        "summary": "Read the latest endpoint event result for setup validation.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "endpointId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional FlowRelay endpoint ID. When omitted, the latest result for the store is returned."
          },
          {
            "name": "eventId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional FlowRelay event ID. When supplied, the scoped event result is returned only if it belongs to the authorizing store."
          }
        ],
        "responses": {
          "200": {
            "description": "Latest or requested endpoint event result, or null when no event is known for the store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentEventResultRead"
                }
              }
            }
          }
        },
        "operationId": "getLatestEventResult",
        "tags": [
          "Setup",
          "Events"
        ],
        "description": "Read the latest or requested event result for setup validation. Delivered means FlowRelay handed the trigger to Shopify Flow, not that downstream Flow branches or actions completed.\n\nRequired scopes: event:read.\n\nAccess: agent_grant. Effect: read_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/operate/receipts/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/operate/receipts/",
          "requiredScopes": [
            "event:read"
          ],
          "access": "agent_grant",
          "effect": "read_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/events": {
      "get": {
        "summary": "List recent retained events with narrow filters.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "endpointId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "terminalOutcome",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stableErrorCode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow text search across receipt ID, correlation ID, external event ID, event type, endpoint name, and source label."
          }
        ],
        "responses": {
          "200": {
            "description": "Retained event summaries for the authorizing store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentEventListRead"
                }
              }
            }
          }
        },
        "operationId": "listEvents",
        "tags": [
          "Events"
        ],
        "description": "List retained store-scoped event summaries with safe filters for receipt triage. Results are redacted and capped; raw event bodies and authentication material are not returned.\n\nRequired scopes: event:read.\n\nAccess: agent_grant. Effect: read_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/operate/event-history/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/operate/event-history/",
          "requiredScopes": [
            "event:read"
          ],
          "access": "agent_grant",
          "effect": "read_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/events/{eventId}": {
      "get": {
        "summary": "Read one event detail with replay history for the authorizing store.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "FlowRelay event ID. A null event is returned if it does not belong to the authorizing store."
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped event detail, including safe replay attempt history, or null when no event is known for the store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentEventDetailRead"
                }
              }
            }
          }
        },
        "operationId": "getEventDetail",
        "tags": [
          "Events",
          "Recovery"
        ],
        "description": "Read one event receipt, route-decision facts, handoff context, recovery guidance, replay history, and diagnostics state for the authorizing store.\n\nRequired scopes: event:read.\n\nAccess: agent_grant. Effect: read_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/operate/receipts/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/operate/receipts/",
          "requiredScopes": [
            "event:read"
          ],
          "access": "agent_grant",
          "effect": "read_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/reliability/tenant": {
      "get": {
        "summary": "Summarize store-scoped FlowRelay reliability health for a bounded window.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "windowHours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 720
            },
            "description": "Trailing window in hours. Defaults to 24 and is capped at 30 days."
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Optional explicit ISO window start."
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Optional explicit ISO window end. Defaults to request time."
          }
        ],
        "responses": {
          "200": {
            "description": "Store-scoped reliability health derived from retained event and replay facts. No raw event bodies or secrets are returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReliabilityHealthSummary"
                }
              }
            }
          }
        },
        "operationId": "getTenantReliabilityHealth",
        "tags": [
          "Reliability"
        ],
        "description": "Read store-scoped reliability health derived from retained event and replay facts. Use safeNextAction values as guidance, not permission to duplicate-deliver events.\n\nRequired scopes: event:read.\n\nAccess: agent_grant. Effect: read_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/operate/event-history/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/operate/event-history/",
          "requiredScopes": [
            "event:read"
          ],
          "access": "agent_grant",
          "effect": "read_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/reliability/destination": {
      "get": {
        "summary": "Summarize Shopify Flow handoff health by endpoint or trigger variant.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "endpointId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "FlowRelay endpoint ID. Pass either endpointId or triggerVariant."
          },
          {
            "name": "triggerVariant",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Shopify Flow trigger variant. Pass either endpointId or triggerVariant."
          },
          {
            "name": "windowHours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 720
            },
            "description": "Trailing window in hours. Defaults to 24 and is capped at 30 days."
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Endpoint or trigger-variant reliability health derived from retained event and replay facts. No raw event bodies or secrets are returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReliabilityHealthSummary"
                }
              }
            }
          }
        },
        "operationId": "getDestinationReliabilityHealth",
        "tags": [
          "Reliability"
        ],
        "description": "Read Shopify Flow handoff health by endpoint or trigger variant. Destination is Shopify Flow for this edition, not a generic multi-destination router.\n\nRequired scopes: event:read.\n\nAccess: agent_grant. Effect: read_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/operate/event-history/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/operate/event-history/",
          "requiredScopes": [
            "event:read"
          ],
          "access": "agent_grant",
          "effect": "read_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/endpoints/{endpointId}": {
      "get": {
        "summary": "Read one endpoint detail for the authorizing store without full secrets.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "FlowRelay endpoint ID. A null endpoint is returned if it does not belong to the authorizing store."
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped endpoint detail, or null when no endpoint is known for the store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentEndpointDetailRead"
                }
              }
            }
          }
        },
        "operationId": "getEndpointDetail",
        "tags": [
          "Setup"
        ],
        "description": "Read endpoint detail, setup recipe, sender instructions, recent endpoint events, and safe diagnostics state without exposing full endpoint secrets.\n\nRequired scopes: setup:read.\n\nAccess: agent_grant. Effect: read_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/setup/endpoints/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/setup/endpoints/",
          "requiredScopes": [
            "setup:read"
          ],
          "access": "agent_grant",
          "effect": "read_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/endpoints/{endpointId}/edit-intents": {
      "post": {
        "summary": "Preview or execute one governed endpoint edit.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndpointEditIntentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Endpoint edit preview or execution result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointActionIntentResponse"
                }
              }
            }
          }
        },
        "operationId": "createEndpointEditIntent",
        "tags": [
          "Setup",
          "Safety"
        ],
        "description": "Preview or execute a governed endpoint edit. Use the trigger mapping reference before changing triggerVariant, resourceIdPath, or relatedResourceIdPath. Edits cannot change endpoint URL, public ID, authentication mode, header name, or secret.\n\nRequired scopes: setup:read, endpoint:write.\n\nAccess: agent_grant. Effect: preview_or_execute. Confirmation required: yes.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/setup/trigger-variants-and-event-mapping/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/setup/trigger-variants-and-event-mapping/",
          "requiredScopes": [
            "setup:read",
            "endpoint:write"
          ],
          "access": "agent_grant",
          "effect": "preview_or_execute",
          "requiresConfirmation": true,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/endpoints/{endpointId}/delete-intents": {
      "post": {
        "summary": "Preview or execute permanent delete for one archived endpoint.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndpointSimpleIntentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Endpoint delete preview or execution result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointActionIntentResponse"
                }
              }
            }
          }
        },
        "operationId": "createEndpointDeleteIntent",
        "tags": [
          "Setup",
          "Safety"
        ],
        "description": "Preview or execute permanent delete for an archived endpoint through action-preview controls. Historical receipts stay visible and the endpoint URL stops accepting events.\n\nRequired scopes: setup:read, endpoint:delete.\n\nAccess: agent_grant. Effect: preview_or_execute. Confirmation required: yes.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/reference/action-intents/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/reference/action-intents/",
          "requiredScopes": [
            "setup:read",
            "endpoint:delete"
          ],
          "access": "agent_grant",
          "effect": "preview_or_execute",
          "requiresConfirmation": true,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/endpoints/{endpointId}/secret-rotation-intents": {
      "post": {
        "summary": "Preview or execute one governed endpoint secret rotation.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndpointSimpleIntentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Secret rotation preview or execution result. Execution returns the new secret once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointActionIntentResponse"
                }
              }
            }
          }
        },
        "operationId": "createSecretRotationIntent",
        "tags": [
          "Setup",
          "Safety"
        ],
        "description": "Preview or execute endpoint secret rotation. Execute returns the new secret once; audit records only safe metadata such as last4.\n\nRequired scopes: setup:read, secret:rotate.\n\nAccess: agent_grant. Effect: preview_or_execute. Confirmation required: yes.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/reference/action-intents/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/reference/action-intents/",
          "requiredScopes": [
            "setup:read",
            "secret:rotate"
          ],
          "access": "agent_grant",
          "effect": "preview_or_execute",
          "requiresConfirmation": true,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/endpoints/{endpointId}/test-intents": {
      "post": {
        "summary": "Preview endpoint sender-test instructions. Execute returns a sender handoff refusal.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndpointSimpleIntentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Endpoint test preview or explicit handoff refusal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointActionIntentResponse"
                }
              }
            }
          }
        },
        "operationId": "createEndpointTestIntent",
        "tags": [
          "Setup"
        ],
        "description": "Preview endpoint sender-test instructions. Execute returns an explicit handoff refusal because FlowRelay does not send signed endpoint traffic for agents.\n\nRequired scopes: setup:read, endpoint:test.\n\nAccess: agent_grant. Effect: handoff_only. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/getting-started/first-event/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/getting-started/first-event/",
          "requiredScopes": [
            "setup:read",
            "endpoint:test"
          ],
          "access": "agent_grant",
          "effect": "handoff_only",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/endpoints": {
      "post": {
        "summary": "Create one endpoint for the authorizing store.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentEndpointCreateRequest"
              },
              "examples": {
                "first_event_endpoint": {
                  "summary": "Create a generic endpoint",
                  "value": {
                    "triggerVariant": "generic",
                    "name": "ERP shipment updates",
                    "sourceLabel": "ERP",
                    "defaultEventType": "shipment.updated",
                    "eventTypePath": "type",
                    "externalEventIdPath": "id",
                    "occurredAtPath": "occurred_at",
                    "summaryPath": "summary",
                    "resourceIdPath": null,
                    "relatedResourceIdPath": null,
                    "requiredPayloadPaths": [
                      "id",
                      "type"
                    ],
                    "authMode": "hmac_sha256_header",
                    "headerName": "X-FlowRelay-Signature",
                    "idempotencyKey": "setup-endpoint-erp-shipment-001"
                  }
                },
                "order_endpoint": {
                  "summary": "Create an order endpoint with a native resource path",
                  "value": {
                    "triggerVariant": "order",
                    "name": "Warehouse order ready",
                    "sourceLabel": "Warehouse",
                    "defaultEventType": "warehouse.order.ready",
                    "eventTypePath": "event.type",
                    "externalEventIdPath": "event.id",
                    "occurredAtPath": "event.occurred_at",
                    "summaryPath": "event.summary",
                    "resourceIdPath": "order.id",
                    "relatedResourceIdPath": null,
                    "requiredPayloadPaths": [
                      "order.id"
                    ],
                    "authMode": "hmac_sha256_header",
                    "headerName": "X-FlowRelay-Signature",
                    "idempotencyKey": "setup-endpoint-warehouse-order-001"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Endpoint created with one-time secret reveal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericEndpointCreateResult"
                }
              }
            }
          }
        },
        "operationId": "createEndpoint",
        "tags": [
          "Setup"
        ],
        "description": "Create one endpoint for the authorizing store. Read the trigger mapping reference before choosing triggerVariant, resourceIdPath, or relatedResourceIdPath. The endpoint secret is revealed once in the response and must be placed only in the sender's secret manager.\n\nRequired scopes: setup:read, endpoint:write.\n\nAccess: agent_grant. Effect: create_resource. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/setup/trigger-variants-and-event-mapping/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/setup/trigger-variants-and-event-mapping/",
          "requiredScopes": [
            "setup:read",
            "endpoint:write"
          ],
          "access": "agent_grant",
          "effect": "create_resource",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/events/{eventId}/replay-intents": {
      "post": {
        "summary": "Preview or execute one approved replay for a retained event.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "FlowRelay event ID scoped to the authorizing store."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "state"
                ],
                "properties": {
                  "state": {
                    "enum": [
                      "preview",
                      "execute"
                    ]
                  },
                  "idempotencyKey": {
                    "type": "string"
                  },
                  "confirmed": {
                    "type": "boolean",
                    "description": "Required true for execute. Preview must run first with the same idempotency key."
                  }
                }
              },
              "examples": {
                "preview_replay": {
                  "summary": "Preview replay before any side effect",
                  "value": {
                    "state": "preview",
                    "idempotencyKey": "replay-preview-flr_evt_123"
                  }
                },
                "execute_replay": {
                  "summary": "Execute only after preview and explicit confirmation",
                  "value": {
                    "state": "execute",
                    "idempotencyKey": "replay-preview-flr_evt_123",
                    "confirmed": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replay preview or execution result. Execution queues one replay attempt or returns FLR_REPLAY_NOT_AVAILABLE with a reason.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentReplayIntentResponse"
                }
              }
            }
          }
        },
        "operationId": "createReplayIntent",
        "tags": [
          "Recovery",
          "Safety"
        ],
        "description": "Preview or execute replay for a retained event. Execute requires prior preview, explicit confirmation, and an idempotency key because Shopify Flow side effects may run again.\n\nRequired scopes: event:read, replay:execute.\n\nAccess: agent_grant. Effect: preview_or_execute. Confirmation required: yes.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/recover/replay/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/recover/replay/",
          "requiredScopes": [
            "event:read",
            "replay:execute"
          ],
          "access": "agent_grant",
          "effect": "preview_or_execute",
          "requiresConfirmation": true,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/diagnostics-share-intents": {
      "post": {
        "summary": "Preview or create one redacted diagnostics share.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "state",
                  "scope"
                ],
                "properties": {
                  "state": {
                    "enum": [
                      "preview",
                      "execute"
                    ]
                  },
                  "idempotencyKey": {
                    "type": "string"
                  },
                  "confirmed": {
                    "type": "boolean"
                  },
                  "includeMaskedPayloadSample": {
                    "type": "boolean"
                  },
                  "issueDescription": {
                    "type": "string"
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "type",
                          "endpointId"
                        ],
                        "properties": {
                          "type": {
                            "const": "endpoint"
                          },
                          "endpointId": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "type",
                          "endpointId",
                          "eventId"
                        ],
                        "properties": {
                          "type": {
                            "const": "event"
                          },
                          "endpointId": {
                            "type": "string"
                          },
                          "eventId": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                }
              },
              "examples": {
                "preview_event_diagnostics": {
                  "summary": "Preview event diagnostics without a payload sample",
                  "value": {
                    "state": "preview",
                    "idempotencyKey": "diagnostics-preview-flr_evt_123",
                    "includeMaskedPayloadSample": false,
                    "issueDescription": "Merchant wants support to inspect why the event did not reach Delivered.",
                    "scope": {
                      "type": "event",
                      "endpointId": "flr_end_123",
                      "eventId": "flr_evt_123"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagnostics preview or created share result. Submit support separately through support-request-intents.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDiagnosticsShareIntentResponse"
                }
              }
            }
          }
        },
        "operationId": "createDiagnosticsShareIntent",
        "tags": [
          "Diagnostics",
          "Safety"
        ],
        "description": "Preview or create a redacted diagnostics share. This does not auto-submit support and defaults to no redacted event-body sample.\n\nRequired scopes: setup:read, event:read, diagnostics:create.\n\nAccess: agent_grant. Effect: preview_or_execute. Confirmation required: yes.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/recover/diagnostics/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/recover/diagnostics/",
          "requiredScopes": [
            "setup:read",
            "event:read",
            "diagnostics:create"
          ],
          "access": "agent_grant",
          "effect": "preview_or_execute",
          "requiresConfirmation": true,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/support-request-intents": {
      "post": {
        "summary": "Preview or submit one structured support request.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "state",
                  "category",
                  "summary",
                  "supportConsent",
                  "idempotencyKey"
                ],
                "properties": {
                  "state": {
                    "enum": [
                      "preview",
                      "submit"
                    ]
                  },
                  "category": {
                    "enum": [
                      "setup",
                      "incident",
                      "billing",
                      "security",
                      "privacy",
                      "compliance",
                      "product_question",
                      "partner_handoff"
                    ]
                  },
                  "urgency": {
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "urgent"
                    ]
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 12,
                    "maxLength": 2000
                  },
                  "supportConsent": {
                    "type": "boolean",
                    "description": "Required true before submit. Preview may be used to inspect redaction and warnings first."
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 160
                  },
                  "contactEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "diagnosticsShareId": {
                    "type": "string"
                  },
                  "eventId": {
                    "type": "string"
                  },
                  "endpointId": {
                    "type": "string"
                  },
                  "stableErrorCode": {
                    "type": "string"
                  },
                  "noDiagnosticsReason": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "replyRequested": {
                    "type": "boolean"
                  }
                }
              },
              "examples": {
                "preview_support_request": {
                  "summary": "Preview a support request before submission",
                  "value": {
                    "state": "preview",
                    "category": "incident",
                    "urgency": "high",
                    "summary": "External ERP shipment update was accepted but the merchant expected a Shopify Flow branch to run.",
                    "diagnosticsShareId": "flr_shr_123",
                    "eventId": "flr_evt_123",
                    "endpointId": "flr_end_123",
                    "stableErrorCode": "FLR_FLOW_HANDOFF_FAILED",
                    "supportConsent": true,
                    "idempotencyKey": "support-preview-flr_evt_123"
                  }
                },
                "submit_support_request": {
                  "summary": "Submit after preview and consent",
                  "value": {
                    "state": "submit",
                    "category": "incident",
                    "urgency": "high",
                    "summary": "External ERP shipment update was accepted but the merchant expected a Shopify Flow branch to run.",
                    "diagnosticsShareId": "flr_shr_123",
                    "eventId": "flr_evt_123",
                    "endpointId": "flr_end_123",
                    "stableErrorCode": "FLR_FLOW_HANDOFF_FAILED",
                    "supportConsent": true,
                    "idempotencyKey": "support-submit-flr_evt_123"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Support request preview.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSupportRequestResponse"
                }
              }
            }
          },
          "201": {
            "description": "Support request recorded in FlowRelay and mirrored to the support conversation tool when available.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSupportRequestResponse"
                }
              }
            }
          }
        },
        "operationId": "createSupportRequestIntent",
        "tags": [
          "Support",
          "Safety"
        ],
        "description": "Preview or submit a structured FlowRelay support request with safe links to diagnostics, events, endpoints, and support codes. FlowRelay keeps the request record, diagnostic links, grant context, audit trail, and status history tied to the installed store.\n\nRequired scopes: setup:read, support:request.\n\nAccess: agent_grant. Effect: preview_or_execute. Confirmation required: yes.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/agent-access/support-and-expansion-requests/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/agent-access/support-and-expansion-requests/",
          "requiredScopes": [
            "setup:read",
            "support:request"
          ],
          "access": "agent_grant",
          "effect": "preview_or_execute",
          "requiresConfirmation": true,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    },
    "/agent/v1/expansion-requests": {
      "post": {
        "summary": "Submit one non-binding expansion request.",
        "security": [
          {
            "agentBearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expansionType",
                  "flowrelayFit",
                  "triggeringContext",
                  "flowrelayReason",
                  "requestedPlatform",
                  "requestedCapability",
                  "useCase",
                  "idempotencyKey"
                ],
                "properties": {
                  "expansionType": {
                    "enum": [
                      "native_edition",
                      "multi_platform_event_flow",
                      "existing_edition_capability",
                      "trigger_lane",
                      "sender_source_guidance",
                      "agency_multi_store",
                      "agent_operations_capability",
                      "operational_memory_capability",
                      "automated_work_exception_handling",
                      "billing_model",
                      "other_flowrelay_adjacent"
                    ],
                    "description": "Classifies the demand signal. Use other_flowrelay_adjacent only for review when no narrower FlowRelay category fits."
                  },
                  "flowrelayFit": {
                    "enum": [
                      "native_event_reliability",
                      "multi_platform_event_reliability",
                      "event_handoff_recovery",
                      "replay_diagnostics",
                      "operational_memory",
                      "exception_recovery",
                      "agent_operability",
                      "multi_install_governance",
                      "billing_entitlement",
                      "unclear"
                    ],
                    "description": "Why this belongs near FlowRelay instead of a generic product wishlist. Use unclear only to flag review, not roadmap priority."
                  },
                  "triggeringContext": {
                    "enum": [
                      "merchant_requested",
                      "blocked_current_task",
                      "flowrelay_refusal_suggested",
                      "support_case_pattern"
                    ],
                    "description": "The real context that caused the agent to submit the request."
                  },
                  "flowrelayReason": {
                    "type": "string",
                    "minLength": 24,
                    "maxLength": 1000,
                    "description": "Short concrete explanation of the FlowRelay relevance, such as reliable event handoff, recovery, diagnostics, governed agent operation, multi-install governance, or billing entitlement."
                  },
                  "requestedPlatform": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 80,
                    "pattern": "^[a-z0-9][a-z0-9_-]*$"
                  },
                  "requestedCapability": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 240
                  },
                  "useCase": {
                    "type": "string",
                    "minLength": 12,
                    "maxLength": 2000
                  },
                  "businessImpact": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 1000
                  },
                  "urgency": {
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "urgent"
                    ]
                  },
                  "estimatedEventVolume": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "operatingContext": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "willingnessToPay": {
                    "type": "string",
                    "maxLength": 240
                  },
                  "linkedSupportRequestId": {
                    "type": "string"
                  },
                  "linkedDiagnosticsShareId": {
                    "type": "string"
                  },
                  "contactEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "replyRequested": {
                    "type": "boolean"
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 160
                  }
                }
              },
              "examples": {
                "submit_expansion_request": {
                  "summary": "Record FlowRelay-adjacent native-edition demand",
                  "value": {
                    "expansionType": "native_edition",
                    "flowrelayFit": "event_handoff_recovery",
                    "triggeringContext": "merchant_requested",
                    "flowrelayReason": "The merchant needs reliable event handoff and recovery for Notion automations that receive operational updates.",
                    "requestedPlatform": "notion",
                    "requestedCapability": "Native edition demand for Notion workflow handoff receipts and recovery",
                    "useCase": "The merchant wants external fulfillment updates to reach Notion automations with FlowRelay-style receipts, replay context, and diagnostics instead of one-off webhook glue.",
                    "businessImpact": "Would reduce manual investigation when Notion automations miss a business-critical update.",
                    "urgency": "normal",
                    "estimatedEventVolume": "About 5,000 events per month",
                    "idempotencyKey": "expansion-notion-handoff-recovery-001"
                  }
                },
                "submit_multi_platform_event_flow_request": {
                  "summary": "Record multi-platform event reliability demand",
                  "value": {
                    "expansionType": "multi_platform_event_flow",
                    "flowrelayFit": "multi_platform_event_reliability",
                    "triggeringContext": "blocked_current_task",
                    "flowrelayReason": "The agency operates Shopify Flow and Wix Automations and needs one governed reliability view for event handoffs, receipts, replay context, and diagnostics.",
                    "requestedPlatform": "shopify_wix",
                    "requestedCapability": "Multi-platform event reliability view across Shopify Flow and Wix Automations",
                    "useCase": "An operator needs to diagnose whether an accepted storefront event reached the intended native automation system and what recovery path is safe.",
                    "businessImpact": "Reduces cross-platform exception triage without creating a generic workflow builder.",
                    "urgency": "normal",
                    "estimatedEventVolume": "About 20,000 events per month across two installed editions",
                    "idempotencyKey": "expansion-shopify-wix-event-flow-001"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Expansion request recorded as a demand signal, not a product commitment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpansionRequestSubmitResponse"
                }
              }
            }
          }
        },
        "operationId": "createExpansionRequest",
        "tags": [
          "Support"
        ],
        "description": "Submit a non-binding expansion request when a real merchant task or explicit merchant ask reveals FlowRelay-adjacent native-edition, multi-platform event reliability, operational-memory, automated-work exception, recovery, governance, agent-operability, or billing demand. The request must explain the concrete FlowRelay fit. Expansion requests are requests for review, not commitments.\n\nRequired scopes: expansion:request.\n\nAccess: agent_grant. Effect: create_resource. Confirmation required: no.\n\nNo raw event bodies are returned by Agent Operations reads.\n\nNo full endpoint secrets are returned except one-time create or rotation execute responses.\n\nNo Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.\n\nDiagnostics shares are preview-first and redacted before sharing.",
        "externalDocs": {
          "description": "FlowRelay docs for this operation",
          "url": "https://docs.flowrelay.app/agent-access/support-and-expansion-requests/"
        },
        "x-flowrelay": {
          "docsUrl": "https://docs.flowrelay.app/agent-access/support-and-expansion-requests/",
          "requiredScopes": [
            "expansion:request"
          ],
          "access": "agent_grant",
          "effect": "create_resource",
          "requiresConfirmation": false,
          "safety": [
            "No raw event bodies are returned by Agent Operations reads.",
            "No full endpoint secrets are returned except one-time create or rotation execute responses.",
            "No Shopify tokens, Shopify session payloads, database URLs, HMAC values, or full authentication headers are returned.",
            "Diagnostics shares are preview-first and redacted before sharing."
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "agentBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Store-scoped FlowRelay agent access grant token. Tokens expire, can be revoked, and are shown only once when created."
      }
    },
    "schemas": {
      "ActionIntent": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "actionIntentId": {
            "type": "string",
            "minLength": 1
          },
          "installationId": {
            "type": "string",
            "minLength": 1
          },
          "actionType": {
            "type": "string",
            "enum": [
              "create_endpoint",
              "replay_event",
              "rotate_secret",
              "delete_endpoint",
              "create_diagnostics_share",
              "test_endpoint",
              "edit_endpoint_mapping",
              "submit_support_request",
              "submit_expansion_request"
            ]
          },
          "target": {
            "type": "object",
            "properties": {
              "targetType": {
                "type": "string",
                "enum": [
                  "endpoint",
                  "event",
                  "diagnostics_share",
                  "support_request",
                  "expansion_request",
                  "store"
                ]
              },
              "targetId": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "targetType",
              "targetId"
            ],
            "additionalProperties": false
          },
          "actor": {
            "type": "object",
            "properties": {
              "actorType": {
                "type": "string",
                "enum": [
                  "shopify_user",
                  "flowrelay_support",
                  "internal_agent",
                  "merchant_authorized_agent",
                  "browser_fallback_agent"
                ]
              },
              "actorId": {
                "type": "string",
                "minLength": 1
              },
              "actorEmail": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              "displayName": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "actorType",
              "actorId"
            ],
            "additionalProperties": false
          },
          "authorizingPrincipal": {
            "type": "object",
            "properties": {
              "installationId": {
                "type": "string",
                "minLength": 1
              },
              "shopDomain": {
                "type": "string",
                "minLength": 1
              },
              "shopifyUserId": {
                "type": "string",
                "minLength": 1
              },
              "email": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              }
            },
            "required": [
              "installationId",
              "shopDomain"
            ],
            "additionalProperties": false
          },
          "delegatedActor": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "clientName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientVersion": {
                    "type": "string",
                    "minLength": 1
                  },
                  "operatorHint": {
                    "type": "string",
                    "minLength": 1
                  },
                  "metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "agentAccessGrantId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "clientKind": {
            "type": "string",
            "enum": [
              "human_ui",
              "agent_api",
              "mcp_facade",
              "browser_fallback",
              "internal_tool"
            ]
          },
          "approvalState": {
            "type": "string",
            "enum": [
              "proposed",
              "approved",
              "executing",
              "executed",
              "failed",
              "refused",
              "expired"
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 8
          },
          "proposedPayload": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "previewResult": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "executionResult": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "structuredRefusalReason": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "scope_missing",
                      "grant_expired",
                      "grant_revoked",
                      "target_not_found",
                      "replay_not_available",
                      "validation_failed",
                      "idempotency_conflict",
                      "action_not_allowed",
                      "internal_error"
                    ]
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1
                  },
                  "retryable": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "approvedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "executedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "schemaVersion",
          "actionIntentId",
          "installationId",
          "actionType",
          "target",
          "actor",
          "authorizingPrincipal",
          "delegatedActor",
          "agentAccessGrantId",
          "clientKind",
          "approvalState",
          "idempotencyKey",
          "proposedPayload",
          "previewResult",
          "executionResult",
          "structuredRefusalReason",
          "createdAt",
          "approvedAt",
          "executedAt",
          "expiresAt"
        ],
        "additionalProperties": false
      },
      "AgentAccessGrant": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "grantId": {
            "type": "string",
            "minLength": 1
          },
          "installationId": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "purpose": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 240
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "expired"
            ]
          },
          "authorityTier": {
            "type": "string",
            "enum": [
              "observer",
              "operator",
              "recovery_operator",
              "admin_assistant"
            ]
          },
          "scopes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "setup:read",
                "endpoint:write",
                "endpoint:delete",
                "endpoint:test",
                "event:read",
                "replay:execute",
                "secret:rotate",
                "diagnostics:create",
                "support:request",
                "expansion:request"
              ]
            }
          },
          "tokenHash": {
            "type": "string",
            "minLength": 32
          },
          "tokenLast4": {
            "type": "string",
            "minLength": 4,
            "maxLength": 4
          },
          "createdByShopifyUserId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "createdByEmail": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedByShopifyUserId": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedByEmail": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "delegatedActorHint": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "expiryMode": {
            "type": "string",
            "enum": [
              "expires_at",
              "never_expires"
            ]
          },
          "acknowledgementRequired": {
            "type": "boolean"
          },
          "acknowledgementPhrase": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "acknowledgedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schemaVersion",
          "grantId",
          "installationId",
          "label",
          "purpose",
          "status",
          "authorityTier",
          "scopes",
          "tokenHash",
          "tokenLast4",
          "createdByShopifyUserId",
          "createdByEmail",
          "revokedByShopifyUserId",
          "revokedByEmail",
          "delegatedActorHint",
          "expiryMode",
          "acknowledgementRequired",
          "acknowledgementPhrase",
          "acknowledgedAt",
          "createdAt",
          "lastUsedAt",
          "expiresAt",
          "revokedAt"
        ],
        "additionalProperties": false
      },
      "AgentAccessGrantCreateResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "grantId": {
            "type": "string",
            "minLength": 1
          },
          "installationId": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "purpose": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 240
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "expired"
            ]
          },
          "authorityTier": {
            "type": "string",
            "enum": [
              "observer",
              "operator",
              "recovery_operator",
              "admin_assistant"
            ]
          },
          "scopes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "setup:read",
                "endpoint:write",
                "endpoint:delete",
                "endpoint:test",
                "event:read",
                "replay:execute",
                "secret:rotate",
                "diagnostics:create",
                "support:request",
                "expansion:request"
              ]
            }
          },
          "tokenLast4": {
            "type": "string",
            "minLength": 4,
            "maxLength": 4
          },
          "createdByShopifyUserId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "createdByEmail": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedByShopifyUserId": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedByEmail": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "delegatedActorHint": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "expiryMode": {
            "type": "string",
            "enum": [
              "expires_at",
              "never_expires"
            ]
          },
          "acknowledgementRequired": {
            "type": "boolean"
          },
          "acknowledgementPhrase": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "acknowledgedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "oneTimeToken": {
            "type": "string",
            "minLength": 24
          }
        },
        "required": [
          "schemaVersion",
          "grantId",
          "installationId",
          "label",
          "purpose",
          "status",
          "authorityTier",
          "scopes",
          "tokenLast4",
          "createdByShopifyUserId",
          "createdByEmail",
          "revokedByShopifyUserId",
          "revokedByEmail",
          "delegatedActorHint",
          "expiryMode",
          "acknowledgementRequired",
          "acknowledgementPhrase",
          "acknowledgedAt",
          "createdAt",
          "lastUsedAt",
          "expiresAt",
          "revokedAt",
          "oneTimeToken"
        ],
        "additionalProperties": false
      },
      "AgentAccessGrantSafeSummary": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "grantId": {
            "type": "string",
            "minLength": 1
          },
          "installationId": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "purpose": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 240
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "expired"
            ]
          },
          "authorityTier": {
            "type": "string",
            "enum": [
              "observer",
              "operator",
              "recovery_operator",
              "admin_assistant"
            ]
          },
          "scopes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "setup:read",
                "endpoint:write",
                "endpoint:delete",
                "endpoint:test",
                "event:read",
                "replay:execute",
                "secret:rotate",
                "diagnostics:create",
                "support:request",
                "expansion:request"
              ]
            }
          },
          "tokenLast4": {
            "type": "string",
            "minLength": 4,
            "maxLength": 4
          },
          "createdByShopifyUserId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "createdByEmail": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedByShopifyUserId": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedByEmail": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "delegatedActorHint": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "expiryMode": {
            "type": "string",
            "enum": [
              "expires_at",
              "never_expires"
            ]
          },
          "acknowledgementRequired": {
            "type": "boolean"
          },
          "acknowledgementPhrase": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "acknowledgedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "current": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "schemaVersion",
          "grantId",
          "installationId",
          "label",
          "purpose",
          "status",
          "authorityTier",
          "scopes",
          "tokenLast4",
          "createdByShopifyUserId",
          "createdByEmail",
          "revokedByShopifyUserId",
          "revokedByEmail",
          "delegatedActorHint",
          "expiryMode",
          "acknowledgementRequired",
          "acknowledgementPhrase",
          "acknowledgedAt",
          "createdAt",
          "lastUsedAt",
          "expiresAt",
          "revokedAt",
          "current"
        ],
        "additionalProperties": false
      },
      "AgentDiagnosticsShareIntentResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "state": {
                "type": "string",
                "const": "preview"
              },
              "preview": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "actionIntentId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "shareId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "endpoint"
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "endpointId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "event"
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "eventId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "type",
                          "endpointId",
                          "eventId"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "manifest": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "redactionPolicyVersion": {
                        "type": "string",
                        "const": "flowrelay_diagnostics_redaction_v1"
                      },
                      "shareId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "expiresAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "endpoint"
                              },
                              "endpointId": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "endpointId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "event"
                              },
                              "endpointId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "eventId": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "endpointId",
                              "eventId"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "store": {
                        "type": "object",
                        "properties": {
                          "installationId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shopDomain": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "installationId",
                          "shopDomain"
                        ],
                        "additionalProperties": false
                      },
                      "appVersion": {
                        "type": "string",
                        "minLength": 1
                      },
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "terminalOutcome": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "delivered",
                              "failed",
                              "no_workflow",
                              "duplicate_suppressed",
                              "rejected"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "runbook": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "stableErrorCode": {
                                "type": "string",
                                "enum": [
                                  "FLR_ENDPOINT_UNKNOWN",
                                  "FLR_ENDPOINT_DELETED",
                                  "FLR_AUTH_HEADER_MISSING",
                                  "FLR_AUTH_FAILED",
                                  "FLR_PAYLOAD_INVALID_JSON",
                                  "FLR_PAYLOAD_TOO_LARGE",
                                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                                  "FLR_NO_ENABLED_WORKFLOW",
                                  "FLR_DUPLICATE_SUPPRESSED",
                                  "FLR_FLOW_HANDOFF_FAILED",
                                  "FLR_PLAN_LIMIT_REACHED",
                                  "FLR_REPLAY_NOT_AVAILABLE",
                                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                  "FLR_DIAGNOSTICS_FAILED"
                                ]
                              },
                              "slug": {
                                "type": "string",
                                "minLength": 1
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1
                              },
                              "operatorCopy": {
                                "type": "string",
                                "minLength": 1
                              },
                              "operatorSummary": {
                                "type": "string",
                                "minLength": 1
                              },
                              "likelyCause": {
                                "type": "string",
                                "minLength": 1
                              },
                              "nextAction": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "stableErrorCode",
                              "slug",
                              "title",
                              "operatorCopy",
                              "operatorSummary",
                              "likelyCause",
                              "nextAction"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "correlationId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^flr_corr_[a-f0-9-]{36}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "endpointSnapshot": {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointPublicId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceLabel": {
                            "type": "string",
                            "minLength": 1
                          },
                          "triggerVariant": {
                            "type": "string",
                            "enum": [
                              "generic",
                              "order",
                              "customer",
                              "product",
                              "inventory",
                              "fulfillment",
                              "return_refund",
                              "company_b2b"
                            ]
                          },
                          "auth": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "hmac_sha256_header",
                                  "static_header_secret"
                                ]
                              },
                              "headerName": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9-]+$"
                              },
                              "secretLast4": {
                                "type": "string",
                                "minLength": 4,
                                "maxLength": 4
                              }
                            },
                            "required": [
                              "mode",
                              "headerName",
                              "secretLast4"
                            ],
                            "additionalProperties": false
                          },
                          "mapping": {
                            "type": "object",
                            "properties": {
                              "defaultEventType": {
                                "type": "string",
                                "minLength": 1
                              },
                              "eventTypePath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalEventIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "occurredAtPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "summaryPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "relatedResourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "requiredPayloadPaths": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            "required": [
                              "defaultEventType",
                              "eventTypePath",
                              "externalEventIdPath",
                              "occurredAtPath",
                              "summaryPath",
                              "resourceIdPath",
                              "relatedResourceIdPath",
                              "requiredPayloadPaths"
                            ],
                            "additionalProperties": false
                          },
                          "capturedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "endpointId",
                          "endpointPublicId",
                          "endpointUrl",
                          "name",
                          "sourceLabel",
                          "triggerVariant",
                          "auth",
                          "mapping",
                          "capturedAt"
                        ],
                        "additionalProperties": false
                      },
                      "timeline": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schemaVersion": {
                                "type": "number",
                                "const": 1
                              },
                              "eventId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "correlationId": {
                                "type": "string",
                                "pattern": "^flr_corr_[a-f0-9-]{36}$"
                              },
                              "endpointSnapshot": {
                                "type": "object",
                                "properties": {
                                  "schemaVersion": {
                                    "type": "number",
                                    "const": 1
                                  },
                                  "endpointId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "endpointPublicId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "endpointUrl": {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "sourceLabel": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "triggerVariant": {
                                    "type": "string",
                                    "enum": [
                                      "generic",
                                      "order",
                                      "customer",
                                      "product",
                                      "inventory",
                                      "fulfillment",
                                      "return_refund",
                                      "company_b2b"
                                    ]
                                  },
                                  "auth": {
                                    "type": "object",
                                    "properties": {
                                      "mode": {
                                        "type": "string",
                                        "enum": [
                                          "hmac_sha256_header",
                                          "static_header_secret"
                                        ]
                                      },
                                      "headerName": {
                                        "type": "string",
                                        "pattern": "^[A-Za-z0-9-]+$"
                                      },
                                      "secretLast4": {
                                        "type": "string",
                                        "minLength": 4,
                                        "maxLength": 4
                                      }
                                    },
                                    "required": [
                                      "mode",
                                      "headerName",
                                      "secretLast4"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "mapping": {
                                    "type": "object",
                                    "properties": {
                                      "defaultEventType": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "eventTypePath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "externalEventIdPath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "occurredAtPath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "summaryPath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "resourceIdPath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "relatedResourceIdPath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "requiredPayloadPaths": {
                                        "maxItems": 5,
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      }
                                    },
                                    "required": [
                                      "defaultEventType",
                                      "eventTypePath",
                                      "externalEventIdPath",
                                      "occurredAtPath",
                                      "summaryPath",
                                      "resourceIdPath",
                                      "relatedResourceIdPath",
                                      "requiredPayloadPaths"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "capturedAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                  }
                                },
                                "required": [
                                  "schemaVersion",
                                  "endpointId",
                                  "endpointPublicId",
                                  "endpointUrl",
                                  "name",
                                  "sourceLabel",
                                  "triggerVariant",
                                  "auth",
                                  "mapping",
                                  "capturedAt"
                                ],
                                "additionalProperties": false
                              },
                              "terminalOutcome": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "accepted",
                                      "delivered",
                                      "failed",
                                      "no_workflow",
                                      "duplicate_suppressed",
                                      "rejected"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stableErrorCode": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "FLR_ENDPOINT_UNKNOWN",
                                      "FLR_ENDPOINT_DELETED",
                                      "FLR_AUTH_HEADER_MISSING",
                                      "FLR_AUTH_FAILED",
                                      "FLR_PAYLOAD_INVALID_JSON",
                                      "FLR_PAYLOAD_TOO_LARGE",
                                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                                      "FLR_NO_ENABLED_WORKFLOW",
                                      "FLR_DUPLICATE_SUPPRESSED",
                                      "FLR_FLOW_HANDOFF_FAILED",
                                      "FLR_PLAN_LIMIT_REACHED",
                                      "FLR_REPLAY_NOT_AVAILABLE",
                                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                      "FLR_DIAGNOSTICS_FAILED"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "entries": {
                                "minItems": 1,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "at": {
                                      "type": "string",
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                    },
                                    "step": {
                                      "type": "string",
                                      "enum": [
                                        "received",
                                        "authenticated",
                                        "stored",
                                        "queued",
                                        "mapping",
                                        "duplicate_check",
                                        "readiness_check",
                                        "flow_handoff",
                                        "terminal",
                                        "replay_started",
                                        "replay_terminal",
                                        "diagnostics_shared"
                                      ]
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "info",
                                        "success",
                                        "warning",
                                        "error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "stableErrorCode": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "FLR_ENDPOINT_UNKNOWN",
                                            "FLR_ENDPOINT_DELETED",
                                            "FLR_AUTH_HEADER_MISSING",
                                            "FLR_AUTH_FAILED",
                                            "FLR_PAYLOAD_INVALID_JSON",
                                            "FLR_PAYLOAD_TOO_LARGE",
                                            "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                            "FLR_MAPPING_INVALID_RESOURCE_ID",
                                            "FLR_NO_ENABLED_WORKFLOW",
                                            "FLR_DUPLICATE_SUPPRESSED",
                                            "FLR_FLOW_HANDOFF_FAILED",
                                            "FLR_PLAN_LIMIT_REACHED",
                                            "FLR_REPLAY_NOT_AVAILABLE",
                                            "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                            "FLR_DIAGNOSTICS_FAILED"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "metadata": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {}
                                    }
                                  },
                                  "required": [
                                    "at",
                                    "step",
                                    "status",
                                    "message",
                                    "stableErrorCode"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "schemaVersion",
                              "eventId",
                              "correlationId",
                              "endpointSnapshot",
                              "terminalOutcome",
                              "stableErrorCode",
                              "entries"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reliabilityExplanation": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schemaVersion": {
                                "type": "number",
                                "const": 1
                              },
                              "eventId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "queued",
                                  "processing",
                                  "delivered",
                                  "failed",
                                  "no_workflow",
                                  "duplicate_suppressed",
                                  "reconciliation_pending",
                                  "manual_review_required",
                                  "replay_unavailable"
                                ]
                              },
                              "summary": {
                                "type": "string",
                                "minLength": 1
                              },
                              "safeNextAction": {
                                "type": "string",
                                "enum": [
                                  "wait",
                                  "fix_endpoint_mapping",
                                  "enable_shopify_flow",
                                  "preview_replay",
                                  "share_diagnostics",
                                  "manual_review",
                                  "resend_from_source",
                                  "contact_support"
                                ]
                              },
                              "operatorCopy": {
                                "type": "string",
                                "minLength": 1
                              },
                              "agentCopy": {
                                "type": "string",
                                "minLength": 1
                              },
                              "routeDecision": {
                                "type": "object",
                                "properties": {
                                  "schemaVersion": {
                                    "type": "number",
                                    "const": 1
                                  },
                                  "eventId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "correlationId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "platformKey": {
                                    "type": "string",
                                    "const": "shopify_flow"
                                  },
                                  "routeKind": {
                                    "type": "string",
                                    "enum": [
                                      "normal_event",
                                      "replay"
                                    ]
                                  },
                                  "endpointId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "triggerVariant": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "generic",
                                          "order",
                                          "customer",
                                          "product",
                                          "inventory",
                                          "fulfillment",
                                          "return_refund",
                                          "company_b2b"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "policyVersion": {
                                    "type": "string",
                                    "const": "shopify_flow_v1_endpoint_snapshot"
                                  },
                                  "decisions": {
                                    "minItems": 1,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "step": {
                                          "type": "string",
                                          "enum": [
                                            "receipt_accepted",
                                            "endpoint_snapshot_selected",
                                            "mapping_evaluated",
                                            "dedupe_evaluated",
                                            "readiness_evaluated",
                                            "handoff_evaluated",
                                            "reconciliation_evaluated",
                                            "terminal_recorded"
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "accepted",
                                            "skipped",
                                            "blocked",
                                            "succeeded",
                                            "failed",
                                            "manual_review_required"
                                          ]
                                        },
                                        "stableErrorCode": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "FLR_ENDPOINT_UNKNOWN",
                                                "FLR_ENDPOINT_DELETED",
                                                "FLR_AUTH_HEADER_MISSING",
                                                "FLR_AUTH_FAILED",
                                                "FLR_PAYLOAD_INVALID_JSON",
                                                "FLR_PAYLOAD_TOO_LARGE",
                                                "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                                "FLR_MAPPING_INVALID_RESOURCE_ID",
                                                "FLR_NO_ENABLED_WORKFLOW",
                                                "FLR_DUPLICATE_SUPPRESSED",
                                                "FLR_FLOW_HANDOFF_FAILED",
                                                "FLR_PLAN_LIMIT_REACHED",
                                                "FLR_REPLAY_NOT_AVAILABLE",
                                                "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                                "FLR_DIAGNOSTICS_FAILED"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "reason": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "at": {
                                          "type": "string",
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                        }
                                      },
                                      "required": [
                                        "step",
                                        "status",
                                        "stableErrorCode",
                                        "reason",
                                        "at"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "schemaVersion",
                                  "eventId",
                                  "correlationId",
                                  "platformKey",
                                  "routeKind",
                                  "endpointId",
                                  "triggerVariant",
                                  "policyVersion",
                                  "decisions"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "schemaVersion",
                              "eventId",
                              "state",
                              "summary",
                              "safeNextAction",
                              "operatorCopy",
                              "agentCopy",
                              "routeDecision"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "recentEvents": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "schemaVersion": {
                              "type": "number",
                              "const": 1
                            },
                            "receiptId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "eventId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "correlationId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "endpointId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "endpointName": {
                              "type": "string",
                              "minLength": 1
                            },
                            "sourceLabel": {
                              "type": "string",
                              "minLength": 1
                            },
                            "receivedAt": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "terminalOutcome": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "accepted",
                                    "delivered",
                                    "failed",
                                    "no_workflow",
                                    "duplicate_suppressed",
                                    "rejected"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stableErrorCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "FLR_ENDPOINT_UNKNOWN",
                                    "FLR_ENDPOINT_DELETED",
                                    "FLR_AUTH_HEADER_MISSING",
                                    "FLR_AUTH_FAILED",
                                    "FLR_PAYLOAD_INVALID_JSON",
                                    "FLR_PAYLOAD_TOO_LARGE",
                                    "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                    "FLR_MAPPING_INVALID_RESOURCE_ID",
                                    "FLR_NO_ENABLED_WORKFLOW",
                                    "FLR_DUPLICATE_SUPPRESSED",
                                    "FLR_FLOW_HANDOFF_FAILED",
                                    "FLR_PLAN_LIMIT_REACHED",
                                    "FLR_REPLAY_NOT_AVAILABLE",
                                    "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                    "FLR_DIAGNOSTICS_FAILED"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "resolvedEventType": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "resolvedExternalEventId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "replay": {
                              "type": "object",
                              "properties": {
                                "eligible": {
                                  "type": "boolean"
                                },
                                "rawBodyExpiresAt": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "copy": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "eligible",
                                "rawBodyExpiresAt",
                                "copy"
                              ],
                              "additionalProperties": false
                            },
                            "endpointConfigSummary": {
                              "type": "object",
                              "properties": {
                                "endpointId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "endpointPublicId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sourceLabel": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "triggerVariant": {
                                  "type": "string",
                                  "enum": [
                                    "generic",
                                    "order",
                                    "customer",
                                    "product",
                                    "inventory",
                                    "fulfillment",
                                    "return_refund",
                                    "company_b2b"
                                  ]
                                },
                                "authMode": {
                                  "type": "string",
                                  "enum": [
                                    "hmac_sha256_header",
                                    "static_header_secret"
                                  ]
                                },
                                "headerName": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9-]+$"
                                },
                                "secretLast4": {
                                  "type": "string",
                                  "minLength": 4,
                                  "maxLength": 4
                                },
                                "defaultEventType": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "eventTypePath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalEventIdPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "occurredAtPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "summaryPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "resourceIdPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "relatedResourceIdPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "requiredPayloadPaths": {
                                  "maxItems": 5,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "capturedAt": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "endpointId",
                                "endpointPublicId",
                                "name",
                                "sourceLabel",
                                "triggerVariant",
                                "authMode",
                                "headerName",
                                "secretLast4",
                                "defaultEventType",
                                "eventTypePath",
                                "externalEventIdPath",
                                "occurredAtPath",
                                "summaryPath",
                                "resourceIdPath",
                                "relatedResourceIdPath",
                                "requiredPayloadPaths",
                                "capturedAt"
                              ],
                              "additionalProperties": false
                            },
                            "recoveryCopy": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "operatorCopy": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "agentCopy": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "replayable": {
                                      "anyOf": [
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "string",
                                          "const": "not_applicable"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "title",
                                    "operatorCopy",
                                    "agentCopy",
                                    "replayable"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deliveredCopy": {
                              "type": "string",
                              "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
                            }
                          },
                          "required": [
                            "schemaVersion",
                            "receiptId",
                            "eventId",
                            "correlationId",
                            "endpointId",
                            "endpointName",
                            "sourceLabel",
                            "receivedAt",
                            "completedAt",
                            "terminalOutcome",
                            "stableErrorCode",
                            "resolvedEventType",
                            "resolvedExternalEventId",
                            "replay",
                            "endpointConfigSummary",
                            "recoveryCopy",
                            "deliveredCopy"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "replayAttempts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "schemaVersion": {
                              "type": "number",
                              "const": 1
                            },
                            "replayAttemptId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalEventId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "endpointId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "actionIntentId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "correlationId": {
                              "type": "string",
                              "pattern": "^flr_corr_[a-f0-9-]{36}$"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "processing",
                                "delivered",
                                "failed",
                                "no_workflow",
                                "not_available"
                              ]
                            },
                            "stableErrorCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "FLR_ENDPOINT_UNKNOWN",
                                    "FLR_ENDPOINT_DELETED",
                                    "FLR_AUTH_HEADER_MISSING",
                                    "FLR_AUTH_FAILED",
                                    "FLR_PAYLOAD_INVALID_JSON",
                                    "FLR_PAYLOAD_TOO_LARGE",
                                    "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                    "FLR_MAPPING_INVALID_RESOURCE_ID",
                                    "FLR_NO_ENABLED_WORKFLOW",
                                    "FLR_DUPLICATE_SUPPRESSED",
                                    "FLR_FLOW_HANDOFF_FAILED",
                                    "FLR_PLAN_LIMIT_REACHED",
                                    "FLR_REPLAY_NOT_AVAILABLE",
                                    "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                    "FLR_DIAGNOSTICS_FAILED"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "triggeredBy": {
                              "type": "object",
                              "properties": {
                                "actorType": {
                                  "type": "string",
                                  "enum": [
                                    "shopify_user",
                                    "flowrelay_support",
                                    "internal_agent",
                                    "merchant_authorized_agent",
                                    "browser_fallback_agent"
                                  ]
                                },
                                "actorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "actorEmail": {
                                  "type": "string",
                                  "format": "email",
                                  "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                                },
                                "displayName": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "actorType",
                                "actorId"
                              ],
                              "additionalProperties": false
                            },
                            "currentEndpointSnapshot": {
                              "type": "object",
                              "properties": {
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "endpointId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "endpointPublicId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "endpointUrl": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sourceLabel": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "triggerVariant": {
                                  "type": "string",
                                  "enum": [
                                    "generic",
                                    "order",
                                    "customer",
                                    "product",
                                    "inventory",
                                    "fulfillment",
                                    "return_refund",
                                    "company_b2b"
                                  ]
                                },
                                "auth": {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "enum": [
                                        "hmac_sha256_header",
                                        "static_header_secret"
                                      ]
                                    },
                                    "headerName": {
                                      "type": "string",
                                      "pattern": "^[A-Za-z0-9-]+$"
                                    },
                                    "secretLast4": {
                                      "type": "string",
                                      "minLength": 4,
                                      "maxLength": 4
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "headerName",
                                    "secretLast4"
                                  ],
                                  "additionalProperties": false
                                },
                                "mapping": {
                                  "type": "object",
                                  "properties": {
                                    "defaultEventType": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "eventTypePath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "externalEventIdPath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "occurredAtPath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "summaryPath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "resourceIdPath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "relatedResourceIdPath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "requiredPayloadPaths": {
                                      "maxItems": 5,
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    }
                                  },
                                  "required": [
                                    "defaultEventType",
                                    "eventTypePath",
                                    "externalEventIdPath",
                                    "occurredAtPath",
                                    "summaryPath",
                                    "resourceIdPath",
                                    "relatedResourceIdPath",
                                    "requiredPayloadPaths"
                                  ],
                                  "additionalProperties": false
                                },
                                "capturedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "schemaVersion",
                                "endpointId",
                                "endpointPublicId",
                                "endpointUrl",
                                "name",
                                "sourceLabel",
                                "triggerVariant",
                                "auth",
                                "mapping",
                                "capturedAt"
                              ],
                              "additionalProperties": false
                            },
                            "currentTriggerAvailability": {
                              "type": "object",
                              "properties": {
                                "triggerVariant": {
                                  "type": "string",
                                  "enum": [
                                    "generic",
                                    "order",
                                    "customer",
                                    "product",
                                    "inventory",
                                    "fulfillment",
                                    "return_refund",
                                    "company_b2b"
                                  ]
                                },
                                "hasEnabledFlow": {
                                  "type": "boolean"
                                },
                                "lastCallbackAt": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "triggerVariant",
                                "hasEnabledFlow",
                                "lastCallbackAt"
                              ],
                              "additionalProperties": false
                            },
                            "startedAt": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "schemaVersion",
                            "replayAttemptId",
                            "originalEventId",
                            "endpointId",
                            "actionIntentId",
                            "correlationId",
                            "status",
                            "stableErrorCode",
                            "triggeredBy",
                            "currentEndpointSnapshot",
                            "currentTriggerAvailability",
                            "startedAt",
                            "completedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "redactedHeaders": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "mappingResults": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "replayEligibility": {
                        "type": "object",
                        "properties": {
                          "replayable": {
                            "type": "boolean"
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "replayable",
                          "reason"
                        ],
                        "additionalProperties": false
                      },
                      "includeMaskedPayloadSample": {
                        "type": "boolean"
                      },
                      "maskedPayloadSample": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 16384
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "issueDescription": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 1000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdBy": {
                        "type": "object",
                        "properties": {
                          "actorType": {
                            "type": "string",
                            "enum": [
                              "shopify_user",
                              "flowrelay_support",
                              "internal_agent",
                              "merchant_authorized_agent",
                              "browser_fallback_agent"
                            ]
                          },
                          "actorId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "actorEmail": {
                            "type": "string",
                            "format": "email",
                            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          },
                          "displayName": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "actorType",
                          "actorId"
                        ],
                        "additionalProperties": false
                      },
                      "actionIntent": {
                        "type": "object",
                        "properties": {
                          "actionIntentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "clientKind": {
                            "type": "string",
                            "enum": [
                              "human_ui",
                              "agent_api",
                              "mcp_facade",
                              "browser_fallback",
                              "internal_tool"
                            ]
                          },
                          "approvalState": {
                            "type": "string",
                            "enum": [
                              "proposed",
                              "executed"
                            ]
                          }
                        },
                        "required": [
                          "actionIntentId",
                          "clientKind",
                          "approvalState"
                        ],
                        "additionalProperties": false
                      },
                      "supportSummaryText": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "redactionPolicyVersion",
                      "shareId",
                      "createdAt",
                      "expiresAt",
                      "scope",
                      "store",
                      "appVersion",
                      "triggerVariant",
                      "stableErrorCode",
                      "terminalOutcome",
                      "runbook",
                      "correlationId",
                      "endpointSnapshot",
                      "timeline",
                      "reliabilityExplanation",
                      "recentEvents",
                      "replayAttempts",
                      "redactedHeaders",
                      "mappingResults",
                      "replayEligibility",
                      "includeMaskedPayloadSample",
                      "maskedPayloadSample",
                      "issueDescription",
                      "createdBy",
                      "actionIntent",
                      "supportSummaryText"
                    ],
                    "additionalProperties": false
                  },
                  "factsIncluded": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "payloadSampleEligibility": {
                    "type": "object",
                    "properties": {
                      "eligible": {
                        "type": "boolean"
                      },
                      "reason": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "eligible",
                      "reason"
                    ],
                    "additionalProperties": false
                  },
                  "requiresExplicitConfirmation": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "schemaVersion",
                  "actionIntentId",
                  "idempotencyKey",
                  "shareId",
                  "scope",
                  "manifest",
                  "factsIncluded",
                  "payloadSampleEligibility",
                  "requiresExplicitConfirmation"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "schemaVersion",
              "state",
              "preview"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "state": {
                "type": "string",
                "const": "execute"
              },
              "execution": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "actionIntentId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "share": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "shareId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "endpoint"
                              },
                              "endpointId": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "endpointId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "event"
                              },
                              "endpointId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "eventId": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "endpointId",
                              "eventId"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "includeMaskedPayloadSample": {
                        "type": "boolean"
                      },
                      "summaryText": {
                        "type": "string",
                        "minLength": 1
                      },
                      "createdByEmail": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "email",
                            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "shareId",
                      "scope",
                      "stableErrorCode",
                      "includeMaskedPayloadSample",
                      "summaryText",
                      "createdByEmail",
                      "createdAt"
                    ],
                    "additionalProperties": false
                  },
                  "manifest": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "redactionPolicyVersion": {
                        "type": "string",
                        "const": "flowrelay_diagnostics_redaction_v1"
                      },
                      "shareId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "expiresAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "endpoint"
                              },
                              "endpointId": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "endpointId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "event"
                              },
                              "endpointId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "eventId": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "type",
                              "endpointId",
                              "eventId"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "store": {
                        "type": "object",
                        "properties": {
                          "installationId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shopDomain": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "installationId",
                          "shopDomain"
                        ],
                        "additionalProperties": false
                      },
                      "appVersion": {
                        "type": "string",
                        "minLength": 1
                      },
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "terminalOutcome": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "delivered",
                              "failed",
                              "no_workflow",
                              "duplicate_suppressed",
                              "rejected"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "runbook": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "stableErrorCode": {
                                "type": "string",
                                "enum": [
                                  "FLR_ENDPOINT_UNKNOWN",
                                  "FLR_ENDPOINT_DELETED",
                                  "FLR_AUTH_HEADER_MISSING",
                                  "FLR_AUTH_FAILED",
                                  "FLR_PAYLOAD_INVALID_JSON",
                                  "FLR_PAYLOAD_TOO_LARGE",
                                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                                  "FLR_NO_ENABLED_WORKFLOW",
                                  "FLR_DUPLICATE_SUPPRESSED",
                                  "FLR_FLOW_HANDOFF_FAILED",
                                  "FLR_PLAN_LIMIT_REACHED",
                                  "FLR_REPLAY_NOT_AVAILABLE",
                                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                  "FLR_DIAGNOSTICS_FAILED"
                                ]
                              },
                              "slug": {
                                "type": "string",
                                "minLength": 1
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1
                              },
                              "operatorCopy": {
                                "type": "string",
                                "minLength": 1
                              },
                              "operatorSummary": {
                                "type": "string",
                                "minLength": 1
                              },
                              "likelyCause": {
                                "type": "string",
                                "minLength": 1
                              },
                              "nextAction": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "stableErrorCode",
                              "slug",
                              "title",
                              "operatorCopy",
                              "operatorSummary",
                              "likelyCause",
                              "nextAction"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "correlationId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^flr_corr_[a-f0-9-]{36}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "endpointSnapshot": {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointPublicId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceLabel": {
                            "type": "string",
                            "minLength": 1
                          },
                          "triggerVariant": {
                            "type": "string",
                            "enum": [
                              "generic",
                              "order",
                              "customer",
                              "product",
                              "inventory",
                              "fulfillment",
                              "return_refund",
                              "company_b2b"
                            ]
                          },
                          "auth": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "hmac_sha256_header",
                                  "static_header_secret"
                                ]
                              },
                              "headerName": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9-]+$"
                              },
                              "secretLast4": {
                                "type": "string",
                                "minLength": 4,
                                "maxLength": 4
                              }
                            },
                            "required": [
                              "mode",
                              "headerName",
                              "secretLast4"
                            ],
                            "additionalProperties": false
                          },
                          "mapping": {
                            "type": "object",
                            "properties": {
                              "defaultEventType": {
                                "type": "string",
                                "minLength": 1
                              },
                              "eventTypePath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalEventIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "occurredAtPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "summaryPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "relatedResourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "requiredPayloadPaths": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            "required": [
                              "defaultEventType",
                              "eventTypePath",
                              "externalEventIdPath",
                              "occurredAtPath",
                              "summaryPath",
                              "resourceIdPath",
                              "relatedResourceIdPath",
                              "requiredPayloadPaths"
                            ],
                            "additionalProperties": false
                          },
                          "capturedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "endpointId",
                          "endpointPublicId",
                          "endpointUrl",
                          "name",
                          "sourceLabel",
                          "triggerVariant",
                          "auth",
                          "mapping",
                          "capturedAt"
                        ],
                        "additionalProperties": false
                      },
                      "timeline": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schemaVersion": {
                                "type": "number",
                                "const": 1
                              },
                              "eventId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "correlationId": {
                                "type": "string",
                                "pattern": "^flr_corr_[a-f0-9-]{36}$"
                              },
                              "endpointSnapshot": {
                                "type": "object",
                                "properties": {
                                  "schemaVersion": {
                                    "type": "number",
                                    "const": 1
                                  },
                                  "endpointId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "endpointPublicId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "endpointUrl": {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "sourceLabel": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "triggerVariant": {
                                    "type": "string",
                                    "enum": [
                                      "generic",
                                      "order",
                                      "customer",
                                      "product",
                                      "inventory",
                                      "fulfillment",
                                      "return_refund",
                                      "company_b2b"
                                    ]
                                  },
                                  "auth": {
                                    "type": "object",
                                    "properties": {
                                      "mode": {
                                        "type": "string",
                                        "enum": [
                                          "hmac_sha256_header",
                                          "static_header_secret"
                                        ]
                                      },
                                      "headerName": {
                                        "type": "string",
                                        "pattern": "^[A-Za-z0-9-]+$"
                                      },
                                      "secretLast4": {
                                        "type": "string",
                                        "minLength": 4,
                                        "maxLength": 4
                                      }
                                    },
                                    "required": [
                                      "mode",
                                      "headerName",
                                      "secretLast4"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "mapping": {
                                    "type": "object",
                                    "properties": {
                                      "defaultEventType": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "eventTypePath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "externalEventIdPath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "occurredAtPath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "summaryPath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "resourceIdPath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "relatedResourceIdPath": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "requiredPayloadPaths": {
                                        "maxItems": 5,
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      }
                                    },
                                    "required": [
                                      "defaultEventType",
                                      "eventTypePath",
                                      "externalEventIdPath",
                                      "occurredAtPath",
                                      "summaryPath",
                                      "resourceIdPath",
                                      "relatedResourceIdPath",
                                      "requiredPayloadPaths"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "capturedAt": {
                                    "type": "string",
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                  }
                                },
                                "required": [
                                  "schemaVersion",
                                  "endpointId",
                                  "endpointPublicId",
                                  "endpointUrl",
                                  "name",
                                  "sourceLabel",
                                  "triggerVariant",
                                  "auth",
                                  "mapping",
                                  "capturedAt"
                                ],
                                "additionalProperties": false
                              },
                              "terminalOutcome": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "accepted",
                                      "delivered",
                                      "failed",
                                      "no_workflow",
                                      "duplicate_suppressed",
                                      "rejected"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "stableErrorCode": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "FLR_ENDPOINT_UNKNOWN",
                                      "FLR_ENDPOINT_DELETED",
                                      "FLR_AUTH_HEADER_MISSING",
                                      "FLR_AUTH_FAILED",
                                      "FLR_PAYLOAD_INVALID_JSON",
                                      "FLR_PAYLOAD_TOO_LARGE",
                                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                                      "FLR_NO_ENABLED_WORKFLOW",
                                      "FLR_DUPLICATE_SUPPRESSED",
                                      "FLR_FLOW_HANDOFF_FAILED",
                                      "FLR_PLAN_LIMIT_REACHED",
                                      "FLR_REPLAY_NOT_AVAILABLE",
                                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                      "FLR_DIAGNOSTICS_FAILED"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "entries": {
                                "minItems": 1,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "at": {
                                      "type": "string",
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                    },
                                    "step": {
                                      "type": "string",
                                      "enum": [
                                        "received",
                                        "authenticated",
                                        "stored",
                                        "queued",
                                        "mapping",
                                        "duplicate_check",
                                        "readiness_check",
                                        "flow_handoff",
                                        "terminal",
                                        "replay_started",
                                        "replay_terminal",
                                        "diagnostics_shared"
                                      ]
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "info",
                                        "success",
                                        "warning",
                                        "error"
                                      ]
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "stableErrorCode": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "FLR_ENDPOINT_UNKNOWN",
                                            "FLR_ENDPOINT_DELETED",
                                            "FLR_AUTH_HEADER_MISSING",
                                            "FLR_AUTH_FAILED",
                                            "FLR_PAYLOAD_INVALID_JSON",
                                            "FLR_PAYLOAD_TOO_LARGE",
                                            "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                            "FLR_MAPPING_INVALID_RESOURCE_ID",
                                            "FLR_NO_ENABLED_WORKFLOW",
                                            "FLR_DUPLICATE_SUPPRESSED",
                                            "FLR_FLOW_HANDOFF_FAILED",
                                            "FLR_PLAN_LIMIT_REACHED",
                                            "FLR_REPLAY_NOT_AVAILABLE",
                                            "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                            "FLR_DIAGNOSTICS_FAILED"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "metadata": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {}
                                    }
                                  },
                                  "required": [
                                    "at",
                                    "step",
                                    "status",
                                    "message",
                                    "stableErrorCode"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "schemaVersion",
                              "eventId",
                              "correlationId",
                              "endpointSnapshot",
                              "terminalOutcome",
                              "stableErrorCode",
                              "entries"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reliabilityExplanation": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schemaVersion": {
                                "type": "number",
                                "const": 1
                              },
                              "eventId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "queued",
                                  "processing",
                                  "delivered",
                                  "failed",
                                  "no_workflow",
                                  "duplicate_suppressed",
                                  "reconciliation_pending",
                                  "manual_review_required",
                                  "replay_unavailable"
                                ]
                              },
                              "summary": {
                                "type": "string",
                                "minLength": 1
                              },
                              "safeNextAction": {
                                "type": "string",
                                "enum": [
                                  "wait",
                                  "fix_endpoint_mapping",
                                  "enable_shopify_flow",
                                  "preview_replay",
                                  "share_diagnostics",
                                  "manual_review",
                                  "resend_from_source",
                                  "contact_support"
                                ]
                              },
                              "operatorCopy": {
                                "type": "string",
                                "minLength": 1
                              },
                              "agentCopy": {
                                "type": "string",
                                "minLength": 1
                              },
                              "routeDecision": {
                                "type": "object",
                                "properties": {
                                  "schemaVersion": {
                                    "type": "number",
                                    "const": 1
                                  },
                                  "eventId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "correlationId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "platformKey": {
                                    "type": "string",
                                    "const": "shopify_flow"
                                  },
                                  "routeKind": {
                                    "type": "string",
                                    "enum": [
                                      "normal_event",
                                      "replay"
                                    ]
                                  },
                                  "endpointId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "triggerVariant": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "generic",
                                          "order",
                                          "customer",
                                          "product",
                                          "inventory",
                                          "fulfillment",
                                          "return_refund",
                                          "company_b2b"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "policyVersion": {
                                    "type": "string",
                                    "const": "shopify_flow_v1_endpoint_snapshot"
                                  },
                                  "decisions": {
                                    "minItems": 1,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "step": {
                                          "type": "string",
                                          "enum": [
                                            "receipt_accepted",
                                            "endpoint_snapshot_selected",
                                            "mapping_evaluated",
                                            "dedupe_evaluated",
                                            "readiness_evaluated",
                                            "handoff_evaluated",
                                            "reconciliation_evaluated",
                                            "terminal_recorded"
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "accepted",
                                            "skipped",
                                            "blocked",
                                            "succeeded",
                                            "failed",
                                            "manual_review_required"
                                          ]
                                        },
                                        "stableErrorCode": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "FLR_ENDPOINT_UNKNOWN",
                                                "FLR_ENDPOINT_DELETED",
                                                "FLR_AUTH_HEADER_MISSING",
                                                "FLR_AUTH_FAILED",
                                                "FLR_PAYLOAD_INVALID_JSON",
                                                "FLR_PAYLOAD_TOO_LARGE",
                                                "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                                "FLR_MAPPING_INVALID_RESOURCE_ID",
                                                "FLR_NO_ENABLED_WORKFLOW",
                                                "FLR_DUPLICATE_SUPPRESSED",
                                                "FLR_FLOW_HANDOFF_FAILED",
                                                "FLR_PLAN_LIMIT_REACHED",
                                                "FLR_REPLAY_NOT_AVAILABLE",
                                                "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                                "FLR_DIAGNOSTICS_FAILED"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "reason": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "at": {
                                          "type": "string",
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                        }
                                      },
                                      "required": [
                                        "step",
                                        "status",
                                        "stableErrorCode",
                                        "reason",
                                        "at"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "schemaVersion",
                                  "eventId",
                                  "correlationId",
                                  "platformKey",
                                  "routeKind",
                                  "endpointId",
                                  "triggerVariant",
                                  "policyVersion",
                                  "decisions"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "schemaVersion",
                              "eventId",
                              "state",
                              "summary",
                              "safeNextAction",
                              "operatorCopy",
                              "agentCopy",
                              "routeDecision"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "recentEvents": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "schemaVersion": {
                              "type": "number",
                              "const": 1
                            },
                            "receiptId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "eventId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "correlationId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "endpointId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "endpointName": {
                              "type": "string",
                              "minLength": 1
                            },
                            "sourceLabel": {
                              "type": "string",
                              "minLength": 1
                            },
                            "receivedAt": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "terminalOutcome": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "accepted",
                                    "delivered",
                                    "failed",
                                    "no_workflow",
                                    "duplicate_suppressed",
                                    "rejected"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stableErrorCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "FLR_ENDPOINT_UNKNOWN",
                                    "FLR_ENDPOINT_DELETED",
                                    "FLR_AUTH_HEADER_MISSING",
                                    "FLR_AUTH_FAILED",
                                    "FLR_PAYLOAD_INVALID_JSON",
                                    "FLR_PAYLOAD_TOO_LARGE",
                                    "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                    "FLR_MAPPING_INVALID_RESOURCE_ID",
                                    "FLR_NO_ENABLED_WORKFLOW",
                                    "FLR_DUPLICATE_SUPPRESSED",
                                    "FLR_FLOW_HANDOFF_FAILED",
                                    "FLR_PLAN_LIMIT_REACHED",
                                    "FLR_REPLAY_NOT_AVAILABLE",
                                    "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                    "FLR_DIAGNOSTICS_FAILED"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "resolvedEventType": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "resolvedExternalEventId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "replay": {
                              "type": "object",
                              "properties": {
                                "eligible": {
                                  "type": "boolean"
                                },
                                "rawBodyExpiresAt": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "copy": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "eligible",
                                "rawBodyExpiresAt",
                                "copy"
                              ],
                              "additionalProperties": false
                            },
                            "endpointConfigSummary": {
                              "type": "object",
                              "properties": {
                                "endpointId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "endpointPublicId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sourceLabel": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "triggerVariant": {
                                  "type": "string",
                                  "enum": [
                                    "generic",
                                    "order",
                                    "customer",
                                    "product",
                                    "inventory",
                                    "fulfillment",
                                    "return_refund",
                                    "company_b2b"
                                  ]
                                },
                                "authMode": {
                                  "type": "string",
                                  "enum": [
                                    "hmac_sha256_header",
                                    "static_header_secret"
                                  ]
                                },
                                "headerName": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9-]+$"
                                },
                                "secretLast4": {
                                  "type": "string",
                                  "minLength": 4,
                                  "maxLength": 4
                                },
                                "defaultEventType": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "eventTypePath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalEventIdPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "occurredAtPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "summaryPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "resourceIdPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "relatedResourceIdPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "requiredPayloadPaths": {
                                  "maxItems": 5,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                },
                                "capturedAt": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "endpointId",
                                "endpointPublicId",
                                "name",
                                "sourceLabel",
                                "triggerVariant",
                                "authMode",
                                "headerName",
                                "secretLast4",
                                "defaultEventType",
                                "eventTypePath",
                                "externalEventIdPath",
                                "occurredAtPath",
                                "summaryPath",
                                "resourceIdPath",
                                "relatedResourceIdPath",
                                "requiredPayloadPaths",
                                "capturedAt"
                              ],
                              "additionalProperties": false
                            },
                            "recoveryCopy": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "operatorCopy": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "agentCopy": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "replayable": {
                                      "anyOf": [
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "string",
                                          "const": "not_applicable"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "title",
                                    "operatorCopy",
                                    "agentCopy",
                                    "replayable"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "deliveredCopy": {
                              "type": "string",
                              "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
                            }
                          },
                          "required": [
                            "schemaVersion",
                            "receiptId",
                            "eventId",
                            "correlationId",
                            "endpointId",
                            "endpointName",
                            "sourceLabel",
                            "receivedAt",
                            "completedAt",
                            "terminalOutcome",
                            "stableErrorCode",
                            "resolvedEventType",
                            "resolvedExternalEventId",
                            "replay",
                            "endpointConfigSummary",
                            "recoveryCopy",
                            "deliveredCopy"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "replayAttempts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "schemaVersion": {
                              "type": "number",
                              "const": 1
                            },
                            "replayAttemptId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalEventId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "endpointId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "actionIntentId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "correlationId": {
                              "type": "string",
                              "pattern": "^flr_corr_[a-f0-9-]{36}$"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "processing",
                                "delivered",
                                "failed",
                                "no_workflow",
                                "not_available"
                              ]
                            },
                            "stableErrorCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "FLR_ENDPOINT_UNKNOWN",
                                    "FLR_ENDPOINT_DELETED",
                                    "FLR_AUTH_HEADER_MISSING",
                                    "FLR_AUTH_FAILED",
                                    "FLR_PAYLOAD_INVALID_JSON",
                                    "FLR_PAYLOAD_TOO_LARGE",
                                    "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                    "FLR_MAPPING_INVALID_RESOURCE_ID",
                                    "FLR_NO_ENABLED_WORKFLOW",
                                    "FLR_DUPLICATE_SUPPRESSED",
                                    "FLR_FLOW_HANDOFF_FAILED",
                                    "FLR_PLAN_LIMIT_REACHED",
                                    "FLR_REPLAY_NOT_AVAILABLE",
                                    "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                    "FLR_DIAGNOSTICS_FAILED"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "triggeredBy": {
                              "type": "object",
                              "properties": {
                                "actorType": {
                                  "type": "string",
                                  "enum": [
                                    "shopify_user",
                                    "flowrelay_support",
                                    "internal_agent",
                                    "merchant_authorized_agent",
                                    "browser_fallback_agent"
                                  ]
                                },
                                "actorId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "actorEmail": {
                                  "type": "string",
                                  "format": "email",
                                  "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                                },
                                "displayName": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "actorType",
                                "actorId"
                              ],
                              "additionalProperties": false
                            },
                            "currentEndpointSnapshot": {
                              "type": "object",
                              "properties": {
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "endpointId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "endpointPublicId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "endpointUrl": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "sourceLabel": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "triggerVariant": {
                                  "type": "string",
                                  "enum": [
                                    "generic",
                                    "order",
                                    "customer",
                                    "product",
                                    "inventory",
                                    "fulfillment",
                                    "return_refund",
                                    "company_b2b"
                                  ]
                                },
                                "auth": {
                                  "type": "object",
                                  "properties": {
                                    "mode": {
                                      "type": "string",
                                      "enum": [
                                        "hmac_sha256_header",
                                        "static_header_secret"
                                      ]
                                    },
                                    "headerName": {
                                      "type": "string",
                                      "pattern": "^[A-Za-z0-9-]+$"
                                    },
                                    "secretLast4": {
                                      "type": "string",
                                      "minLength": 4,
                                      "maxLength": 4
                                    }
                                  },
                                  "required": [
                                    "mode",
                                    "headerName",
                                    "secretLast4"
                                  ],
                                  "additionalProperties": false
                                },
                                "mapping": {
                                  "type": "object",
                                  "properties": {
                                    "defaultEventType": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "eventTypePath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "externalEventIdPath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "occurredAtPath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "summaryPath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "resourceIdPath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "relatedResourceIdPath": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "requiredPayloadPaths": {
                                      "maxItems": 5,
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    }
                                  },
                                  "required": [
                                    "defaultEventType",
                                    "eventTypePath",
                                    "externalEventIdPath",
                                    "occurredAtPath",
                                    "summaryPath",
                                    "resourceIdPath",
                                    "relatedResourceIdPath",
                                    "requiredPayloadPaths"
                                  ],
                                  "additionalProperties": false
                                },
                                "capturedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "schemaVersion",
                                "endpointId",
                                "endpointPublicId",
                                "endpointUrl",
                                "name",
                                "sourceLabel",
                                "triggerVariant",
                                "auth",
                                "mapping",
                                "capturedAt"
                              ],
                              "additionalProperties": false
                            },
                            "currentTriggerAvailability": {
                              "type": "object",
                              "properties": {
                                "triggerVariant": {
                                  "type": "string",
                                  "enum": [
                                    "generic",
                                    "order",
                                    "customer",
                                    "product",
                                    "inventory",
                                    "fulfillment",
                                    "return_refund",
                                    "company_b2b"
                                  ]
                                },
                                "hasEnabledFlow": {
                                  "type": "boolean"
                                },
                                "lastCallbackAt": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "triggerVariant",
                                "hasEnabledFlow",
                                "lastCallbackAt"
                              ],
                              "additionalProperties": false
                            },
                            "startedAt": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "schemaVersion",
                            "replayAttemptId",
                            "originalEventId",
                            "endpointId",
                            "actionIntentId",
                            "correlationId",
                            "status",
                            "stableErrorCode",
                            "triggeredBy",
                            "currentEndpointSnapshot",
                            "currentTriggerAvailability",
                            "startedAt",
                            "completedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "redactedHeaders": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "mappingResults": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "replayEligibility": {
                        "type": "object",
                        "properties": {
                          "replayable": {
                            "type": "boolean"
                          },
                          "reason": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "replayable",
                          "reason"
                        ],
                        "additionalProperties": false
                      },
                      "includeMaskedPayloadSample": {
                        "type": "boolean"
                      },
                      "maskedPayloadSample": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 16384
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "issueDescription": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 1000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "createdBy": {
                        "type": "object",
                        "properties": {
                          "actorType": {
                            "type": "string",
                            "enum": [
                              "shopify_user",
                              "flowrelay_support",
                              "internal_agent",
                              "merchant_authorized_agent",
                              "browser_fallback_agent"
                            ]
                          },
                          "actorId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "actorEmail": {
                            "type": "string",
                            "format": "email",
                            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                          },
                          "displayName": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "actorType",
                          "actorId"
                        ],
                        "additionalProperties": false
                      },
                      "actionIntent": {
                        "type": "object",
                        "properties": {
                          "actionIntentId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "clientKind": {
                            "type": "string",
                            "enum": [
                              "human_ui",
                              "agent_api",
                              "mcp_facade",
                              "browser_fallback",
                              "internal_tool"
                            ]
                          },
                          "approvalState": {
                            "type": "string",
                            "enum": [
                              "proposed",
                              "executed"
                            ]
                          }
                        },
                        "required": [
                          "actionIntentId",
                          "clientKind",
                          "approvalState"
                        ],
                        "additionalProperties": false
                      },
                      "supportSummaryText": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "redactionPolicyVersion",
                      "shareId",
                      "createdAt",
                      "expiresAt",
                      "scope",
                      "store",
                      "appVersion",
                      "triggerVariant",
                      "stableErrorCode",
                      "terminalOutcome",
                      "runbook",
                      "correlationId",
                      "endpointSnapshot",
                      "timeline",
                      "reliabilityExplanation",
                      "recentEvents",
                      "replayAttempts",
                      "redactedHeaders",
                      "mappingResults",
                      "replayEligibility",
                      "includeMaskedPayloadSample",
                      "maskedPayloadSample",
                      "issueDescription",
                      "createdBy",
                      "actionIntent",
                      "supportSummaryText"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "schemaVersion",
                  "actionIntentId",
                  "idempotencyKey",
                  "share",
                  "manifest"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "schemaVersion",
              "state",
              "execution"
            ],
            "additionalProperties": false
          }
        ]
      },
      "AgentEndpointCreateRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "triggerVariant": {
            "default": "generic",
            "type": "string",
            "enum": [
              "generic",
              "order",
              "customer",
              "product",
              "inventory",
              "fulfillment",
              "return_refund",
              "company_b2b"
            ],
            "description": "Shopify Flow trigger variant API value. Read the trigger mapping reference before choosing between generic, native resource, and related-resource variants."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "sourceLabel": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "defaultEventType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "description": "Fallback event type used when eventTypePath is blank or not present in the sender payload."
          },
          "eventTypePath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Simple JSON path where FlowRelay can read the sender event type."
          },
          "externalEventIdPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Simple JSON path for the sender's stable event ID, used for correlation and duplicate handling."
          },
          "occurredAtPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Simple JSON path for the sender's original event timestamp."
          },
          "summaryPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Simple JSON path for a short operator-readable event summary."
          },
          "resourceIdPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Required only for order, customer, and product variants. Points to the Shopify ID or GID in the sender payload."
          },
          "relatedResourceIdPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Required only for inventory, fulfillment, return_refund, and company_b2b variants. Points to the related resource identifier shown as text context in Flow."
          },
          "requiredPayloadPaths": {
            "default": [],
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
            },
            "description": "Up to five simple JSON paths that must be present before FlowRelay hands the event to Shopify Flow."
          },
          "authMode": {
            "default": "hmac_sha256_header",
            "type": "string",
            "enum": [
              "hmac_sha256_header",
              "static_header_secret"
            ]
          },
          "headerName": {
            "default": "X-FlowRelay-Signature",
            "type": "string",
            "pattern": "^[A-Za-z0-9-]+$"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 8
          }
        },
        "required": [
          "triggerVariant",
          "name",
          "sourceLabel",
          "defaultEventType",
          "eventTypePath",
          "externalEventIdPath",
          "occurredAtPath",
          "summaryPath",
          "resourceIdPath",
          "relatedResourceIdPath",
          "requiredPayloadPaths",
          "authMode",
          "headerName"
        ],
        "additionalProperties": false
      },
      "AgentEndpointDetailRead": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointPublicId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "deleted"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceLabel": {
                    "type": "string",
                    "minLength": 1
                  },
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "triggerLabel": {
                    "type": "string",
                    "minLength": 1
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "hmac_sha256_header",
                          "static_header_secret"
                        ]
                      },
                      "headerName": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]+$"
                      },
                      "secretLast4": {
                        "type": "string",
                        "minLength": 4,
                        "maxLength": 4
                      }
                    },
                    "required": [
                      "mode",
                      "headerName",
                      "secretLast4"
                    ],
                    "additionalProperties": false
                  },
                  "mapping": {
                    "type": "object",
                    "properties": {
                      "defaultEventType": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "eventTypePath": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160,
                            "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventIdPath": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160,
                            "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAtPath": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160,
                            "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summaryPath": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160,
                            "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resourceIdPath": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160,
                            "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceIdPath": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160,
                            "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "requiredPayloadPaths": {
                        "default": [],
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160,
                          "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                        }
                      }
                    },
                    "required": [
                      "defaultEventType",
                      "eventTypePath",
                      "externalEventIdPath",
                      "occurredAtPath",
                      "summaryPath",
                      "resourceIdPath",
                      "relatedResourceIdPath",
                      "requiredPayloadPaths"
                    ],
                    "additionalProperties": false
                  },
                  "readiness": {
                    "type": "object",
                    "properties": {
                      "lifecycleImplemented": {
                        "type": "boolean"
                      },
                      "ingestImplemented": {
                        "type": "boolean"
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "setup_only",
                          "ready_for_test",
                          "blocked"
                        ]
                      },
                      "summary": {
                        "type": "string",
                        "minLength": 1
                      },
                      "detail": {
                        "type": "string",
                        "minLength": 1
                      },
                      "hasEnabledFlow": {
                        "type": "boolean"
                      },
                      "lastCallbackAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "lifecycleImplemented",
                      "ingestImplemented",
                      "state",
                      "summary",
                      "detail",
                      "hasEnabledFlow",
                      "lastCallbackAt"
                    ],
                    "additionalProperties": false
                  },
                  "flowSetupRecipe": {
                    "type": "object",
                    "properties": {
                      "trigger": {
                        "type": "object",
                        "properties": {
                          "triggerVariant": {
                            "type": "string",
                            "enum": [
                              "generic",
                              "order",
                              "customer",
                              "product",
                              "inventory",
                              "fulfillment",
                              "return_refund",
                              "company_b2b"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1
                          },
                          "handle": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "triggerVariant",
                          "label",
                          "handle"
                        ],
                        "additionalProperties": false
                      },
                      "steps": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "conditionHints": {
                        "type": "object",
                        "properties": {
                          "sourceLabel": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "eventType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "sourceLabel",
                          "eventType"
                        ],
                        "additionalProperties": false
                      },
                      "operatorCopy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "trigger",
                      "steps",
                      "conditionHints",
                      "operatorCopy"
                    ],
                    "additionalProperties": false
                  },
                  "senderSetupInstructions": {
                    "type": "object",
                    "properties": {
                      "endpointUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "method": {
                        "type": "string",
                        "const": "POST"
                      },
                      "contentType": {
                        "type": "string",
                        "const": "application/json"
                      },
                      "authMode": {
                        "type": "string",
                        "enum": [
                          "hmac_sha256_header",
                          "static_header_secret"
                        ]
                      },
                      "headerName": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]+$"
                      },
                      "signingInstructions": {
                        "type": "string",
                        "minLength": 1
                      },
                      "testInstructions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "endpointUrl",
                      "method",
                      "contentType",
                      "authMode",
                      "headerName",
                      "signingInstructions",
                      "testInstructions"
                    ],
                    "additionalProperties": false
                  },
                  "recentEvents": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        },
                        "receiptId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "eventId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "correlationId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointName": {
                          "type": "string",
                          "minLength": 1
                        },
                        "sourceLabel": {
                          "type": "string",
                          "minLength": 1
                        },
                        "receivedAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "terminalOutcome": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "accepted",
                                "delivered",
                                "failed",
                                "no_workflow",
                                "duplicate_suppressed",
                                "rejected"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "stableErrorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "FLR_ENDPOINT_UNKNOWN",
                                "FLR_ENDPOINT_DELETED",
                                "FLR_AUTH_HEADER_MISSING",
                                "FLR_AUTH_FAILED",
                                "FLR_PAYLOAD_INVALID_JSON",
                                "FLR_PAYLOAD_TOO_LARGE",
                                "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                "FLR_MAPPING_INVALID_RESOURCE_ID",
                                "FLR_NO_ENABLED_WORKFLOW",
                                "FLR_DUPLICATE_SUPPRESSED",
                                "FLR_FLOW_HANDOFF_FAILED",
                                "FLR_PLAN_LIMIT_REACHED",
                                "FLR_REPLAY_NOT_AVAILABLE",
                                "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                "FLR_DIAGNOSTICS_FAILED"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "resolvedEventType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "resolvedExternalEventId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replay": {
                          "type": "object",
                          "properties": {
                            "eligible": {
                              "type": "boolean"
                            },
                            "rawBodyExpiresAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "copy": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "eligible",
                            "rawBodyExpiresAt",
                            "copy"
                          ],
                          "additionalProperties": false
                        },
                        "endpointConfigSummary": {
                          "type": "object",
                          "properties": {
                            "endpointId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "endpointPublicId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "sourceLabel": {
                              "type": "string",
                              "minLength": 1
                            },
                            "triggerVariant": {
                              "type": "string",
                              "enum": [
                                "generic",
                                "order",
                                "customer",
                                "product",
                                "inventory",
                                "fulfillment",
                                "return_refund",
                                "company_b2b"
                              ]
                            },
                            "authMode": {
                              "type": "string",
                              "enum": [
                                "hmac_sha256_header",
                                "static_header_secret"
                              ]
                            },
                            "headerName": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9-]+$"
                            },
                            "secretLast4": {
                              "type": "string",
                              "minLength": 4,
                              "maxLength": 4
                            },
                            "defaultEventType": {
                              "type": "string",
                              "minLength": 1
                            },
                            "eventTypePath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalEventIdPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "occurredAtPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "summaryPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "resourceIdPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "relatedResourceIdPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "requiredPayloadPaths": {
                              "maxItems": 5,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "capturedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "endpointId",
                            "endpointPublicId",
                            "name",
                            "sourceLabel",
                            "triggerVariant",
                            "authMode",
                            "headerName",
                            "secretLast4",
                            "defaultEventType",
                            "eventTypePath",
                            "externalEventIdPath",
                            "occurredAtPath",
                            "summaryPath",
                            "resourceIdPath",
                            "relatedResourceIdPath",
                            "requiredPayloadPaths",
                            "capturedAt"
                          ],
                          "additionalProperties": false
                        },
                        "recoveryCopy": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "title": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "operatorCopy": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "agentCopy": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "replayable": {
                                  "anyOf": [
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "string",
                                      "const": "not_applicable"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "title",
                                "operatorCopy",
                                "agentCopy",
                                "replayable"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "deliveredCopy": {
                          "type": "string",
                          "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "receiptId",
                        "eventId",
                        "correlationId",
                        "endpointId",
                        "endpointName",
                        "sourceLabel",
                        "receivedAt",
                        "completedAt",
                        "terminalOutcome",
                        "stableErrorCode",
                        "resolvedEventType",
                        "resolvedExternalEventId",
                        "replay",
                        "endpointConfigSummary",
                        "recoveryCopy",
                        "deliveredCopy"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "diagnosticsShares": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        },
                        "shareId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "endpoint"
                                },
                                "endpointId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "type",
                                "endpointId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "event"
                                },
                                "endpointId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "eventId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "type",
                                "endpointId",
                                "eventId"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "stableErrorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "FLR_ENDPOINT_UNKNOWN",
                                "FLR_ENDPOINT_DELETED",
                                "FLR_AUTH_HEADER_MISSING",
                                "FLR_AUTH_FAILED",
                                "FLR_PAYLOAD_INVALID_JSON",
                                "FLR_PAYLOAD_TOO_LARGE",
                                "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                "FLR_MAPPING_INVALID_RESOURCE_ID",
                                "FLR_NO_ENABLED_WORKFLOW",
                                "FLR_DUPLICATE_SUPPRESSED",
                                "FLR_FLOW_HANDOFF_FAILED",
                                "FLR_PLAN_LIMIT_REACHED",
                                "FLR_REPLAY_NOT_AVAILABLE",
                                "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                "FLR_DIAGNOSTICS_FAILED"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "includeMaskedPayloadSample": {
                          "type": "boolean"
                        },
                        "summaryText": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdByEmail": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "email",
                              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "shareId",
                        "scope",
                        "stableErrorCode",
                        "includeMaskedPayloadSample",
                        "summaryText",
                        "createdByEmail",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "deliveredCopy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "deletedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schemaVersion",
                  "endpointId",
                  "endpointPublicId",
                  "endpointUrl",
                  "status",
                  "name",
                  "sourceLabel",
                  "triggerVariant",
                  "triggerLabel",
                  "auth",
                  "mapping",
                  "readiness",
                  "flowSetupRecipe",
                  "senderSetupInstructions",
                  "recentEvents",
                  "diagnosticsShares",
                  "deliveredCopy",
                  "createdAt",
                  "updatedAt",
                  "deletedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schemaVersion",
          "endpoint"
        ],
        "additionalProperties": false
      },
      "AgentEventDetailRead": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "event": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "receiptId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "eventId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "correlationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceLabel": {
                    "type": "string",
                    "minLength": 1
                  },
                  "receivedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "completedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "terminalOutcome": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "accepted",
                          "delivered",
                          "failed",
                          "no_workflow",
                          "duplicate_suppressed",
                          "rejected"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stableErrorCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "FLR_ENDPOINT_UNKNOWN",
                          "FLR_ENDPOINT_DELETED",
                          "FLR_AUTH_HEADER_MISSING",
                          "FLR_AUTH_FAILED",
                          "FLR_PAYLOAD_INVALID_JSON",
                          "FLR_PAYLOAD_TOO_LARGE",
                          "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                          "FLR_MAPPING_INVALID_RESOURCE_ID",
                          "FLR_NO_ENABLED_WORKFLOW",
                          "FLR_DUPLICATE_SUPPRESSED",
                          "FLR_FLOW_HANDOFF_FAILED",
                          "FLR_PLAN_LIMIT_REACHED",
                          "FLR_REPLAY_NOT_AVAILABLE",
                          "FLR_DIAGNOSTICS_UNAUTHORIZED",
                          "FLR_DIAGNOSTICS_FAILED"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "resolvedEventType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "resolvedExternalEventId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "replay": {
                    "type": "object",
                    "properties": {
                      "eligible": {
                        "type": "boolean"
                      },
                      "rawBodyExpiresAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "copy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "eligible",
                      "rawBodyExpiresAt",
                      "copy"
                    ],
                    "additionalProperties": false
                  },
                  "endpointConfigSummary": {
                    "type": "object",
                    "properties": {
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "endpointPublicId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "sourceLabel": {
                        "type": "string",
                        "minLength": 1
                      },
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "authMode": {
                        "type": "string",
                        "enum": [
                          "hmac_sha256_header",
                          "static_header_secret"
                        ]
                      },
                      "headerName": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]+$"
                      },
                      "secretLast4": {
                        "type": "string",
                        "minLength": 4,
                        "maxLength": 4
                      },
                      "defaultEventType": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventTypePath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAtPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summaryPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "requiredPayloadPaths": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "capturedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "endpointId",
                      "endpointPublicId",
                      "name",
                      "sourceLabel",
                      "triggerVariant",
                      "authMode",
                      "headerName",
                      "secretLast4",
                      "defaultEventType",
                      "eventTypePath",
                      "externalEventIdPath",
                      "occurredAtPath",
                      "summaryPath",
                      "resourceIdPath",
                      "relatedResourceIdPath",
                      "requiredPayloadPaths",
                      "capturedAt"
                    ],
                    "additionalProperties": false
                  },
                  "recoveryCopy": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1
                          },
                          "operatorCopy": {
                            "type": "string",
                            "minLength": 1
                          },
                          "agentCopy": {
                            "type": "string",
                            "minLength": 1
                          },
                          "replayable": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "string",
                                "const": "not_applicable"
                              }
                            ]
                          }
                        },
                        "required": [
                          "title",
                          "operatorCopy",
                          "agentCopy",
                          "replayable"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "deliveredCopy": {
                    "type": "string",
                    "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
                  },
                  "receiptContext": {
                    "type": "object",
                    "properties": {
                      "platform": {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "platformKey": {
                            "type": "string",
                            "minLength": 1
                          },
                          "platformName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "editionName": {
                            "type": "string",
                            "minLength": 1
                          },
                          "automationSystem": {
                            "type": "string",
                            "minLength": 1
                          },
                          "billingProvider": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "platformKey",
                          "platformName",
                          "editionName",
                          "automationSystem",
                          "billingProvider"
                        ],
                        "additionalProperties": false
                      },
                      "store": {
                        "type": "object",
                        "properties": {
                          "installationId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "shopDomain": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "installationId",
                          "shopDomain"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "platform",
                      "store"
                    ],
                    "additionalProperties": false
                  },
                  "endpointSnapshot": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointPublicId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceLabel": {
                            "type": "string",
                            "minLength": 1
                          },
                          "triggerVariant": {
                            "type": "string",
                            "enum": [
                              "generic",
                              "order",
                              "customer",
                              "product",
                              "inventory",
                              "fulfillment",
                              "return_refund",
                              "company_b2b"
                            ]
                          },
                          "auth": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "hmac_sha256_header",
                                  "static_header_secret"
                                ]
                              },
                              "headerName": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9-]+$"
                              },
                              "secretLast4": {
                                "type": "string",
                                "minLength": 4,
                                "maxLength": 4
                              }
                            },
                            "required": [
                              "mode",
                              "headerName",
                              "secretLast4"
                            ],
                            "additionalProperties": false
                          },
                          "mapping": {
                            "type": "object",
                            "properties": {
                              "defaultEventType": {
                                "type": "string",
                                "minLength": 1
                              },
                              "eventTypePath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalEventIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "occurredAtPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "summaryPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "relatedResourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "requiredPayloadPaths": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            "required": [
                              "defaultEventType",
                              "eventTypePath",
                              "externalEventIdPath",
                              "occurredAtPath",
                              "summaryPath",
                              "resourceIdPath",
                              "relatedResourceIdPath",
                              "requiredPayloadPaths"
                            ],
                            "additionalProperties": false
                          },
                          "capturedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "endpointId",
                          "endpointPublicId",
                          "endpointUrl",
                          "name",
                          "sourceLabel",
                          "triggerVariant",
                          "auth",
                          "mapping",
                          "capturedAt"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "sourceLabel": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventType": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summary": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "request": {
                        "type": "object",
                        "properties": {
                          "contentType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "contentLengthBytes": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "bodySha256": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "bodySha256Algorithm": {
                            "type": "string",
                            "const": "sha256"
                          },
                          "retentionState": {
                            "type": "string",
                            "enum": [
                              "retained",
                              "expired",
                              "not_retained"
                            ]
                          },
                          "rawBodyExpiresAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replayEligible": {
                            "type": "boolean"
                          },
                          "copy": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "contentType",
                          "contentLengthBytes",
                          "bodySha256",
                          "bodySha256Algorithm",
                          "retentionState",
                          "rawBodyExpiresAt",
                          "replayEligible",
                          "copy"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "sourceLabel",
                      "eventType",
                      "externalEventId",
                      "occurredAt",
                      "summary",
                      "request"
                    ],
                    "additionalProperties": false
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "configuredMode": {
                        "type": "string",
                        "enum": [
                          "hmac_sha256_header",
                          "static_header_secret"
                        ]
                      },
                      "headerName": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]+$"
                      },
                      "secretLast4": {
                        "type": "string",
                        "minLength": 4,
                        "maxLength": 4
                      },
                      "authHeaderPresent": {
                        "type": "boolean"
                      },
                      "outcome": {
                        "type": "string",
                        "enum": [
                          "verified",
                          "missing_header",
                          "failed",
                          "not_evaluated"
                        ]
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "copy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "configuredMode",
                      "headerName",
                      "secretLast4",
                      "authHeaderPresent",
                      "outcome",
                      "stableErrorCode",
                      "copy"
                    ],
                    "additionalProperties": false
                  },
                  "mapping": {
                    "type": "object",
                    "properties": {
                      "outcome": {
                        "type": "string",
                        "enum": [
                          "resolved",
                          "failed",
                          "not_evaluated"
                        ]
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "defaultEventType": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventTypePath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAtPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summaryPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "requiredPayloadPaths": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "resolved": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "eventType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "externalEventId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "occurredAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "summary": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resourceLegacyId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "relatedResourceType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "relatedResourceId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "source",
                          "eventType",
                          "externalEventId",
                          "occurredAt",
                          "summary",
                          "resourceLegacyId",
                          "relatedResourceType",
                          "relatedResourceId"
                        ],
                        "additionalProperties": false
                      },
                      "copy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "outcome",
                      "stableErrorCode",
                      "defaultEventType",
                      "eventTypePath",
                      "externalEventIdPath",
                      "occurredAtPath",
                      "summaryPath",
                      "resourceIdPath",
                      "relatedResourceIdPath",
                      "requiredPayloadPaths",
                      "resolved",
                      "copy"
                    ],
                    "additionalProperties": false
                  },
                  "readinessAtHandoff": {
                    "type": "object",
                    "properties": {
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "evaluated": {
                        "type": "boolean"
                      },
                      "hasEnabledFlow": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "lastCallbackAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "copy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "triggerVariant",
                      "evaluated",
                      "hasEnabledFlow",
                      "lastCallbackAt",
                      "stableErrorCode",
                      "copy"
                    ],
                    "additionalProperties": false
                  },
                  "resolved": {
                    "type": "object",
                    "properties": {
                      "source": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "eventType": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summary": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resourceLegacyId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceType": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "source",
                      "eventType",
                      "externalEventId",
                      "occurredAt",
                      "summary",
                      "resourceLegacyId",
                      "relatedResourceType",
                      "relatedResourceId"
                    ],
                    "additionalProperties": false
                  },
                  "flowHandoff": {
                    "type": "object",
                    "properties": {
                      "calledShopifyFlow": {
                        "type": "boolean"
                      },
                      "copy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "calledShopifyFlow",
                      "copy"
                    ],
                    "additionalProperties": false
                  },
                  "handoff": {
                    "type": "object",
                    "properties": {
                      "calledShopifyFlow": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "outcome": {
                        "type": "string",
                        "enum": [
                          "succeeded",
                          "failed",
                          "skipped",
                          "pending",
                          "unknown"
                        ]
                      },
                      "terminalOutcome": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "delivered",
                              "failed",
                              "no_workflow",
                              "duplicate_suppressed",
                              "rejected"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "terminalLatencyMs": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "copy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "calledShopifyFlow",
                      "outcome",
                      "terminalOutcome",
                      "stableErrorCode",
                      "terminalLatencyMs",
                      "copy"
                    ],
                    "additionalProperties": false
                  },
                  "audit": {
                    "type": "object",
                    "properties": {
                      "ingestActor": {
                        "type": "object",
                        "properties": {
                          "actorType": {
                            "type": "string",
                            "const": "external_sender"
                          },
                          "sourceLabel": {
                            "type": "string",
                            "minLength": 1
                          },
                          "authenticatedBy": {
                            "type": "string",
                            "enum": [
                              "hmac_sha256_header",
                              "static_header_secret"
                            ]
                          },
                          "authOutcome": {
                            "type": "string",
                            "enum": [
                              "verified",
                              "missing_header",
                              "failed",
                              "not_evaluated"
                            ]
                          }
                        },
                        "required": [
                          "actorType",
                          "sourceLabel",
                          "authenticatedBy",
                          "authOutcome"
                        ],
                        "additionalProperties": false
                      },
                      "actionIntentId": {
                        "type": "null"
                      },
                      "agentAccessGrantId": {
                        "type": "null"
                      },
                      "idempotencyKey": {
                        "type": "null"
                      },
                      "copy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "ingestActor",
                      "actionIntentId",
                      "agentAccessGrantId",
                      "idempotencyKey",
                      "copy"
                    ],
                    "additionalProperties": false
                  },
                  "processingTrace": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        "step": {
                          "type": "string",
                          "enum": [
                            "received",
                            "authenticated",
                            "stored",
                            "queued",
                            "mapping",
                            "duplicate_check",
                            "readiness_check",
                            "flow_handoff",
                            "terminal",
                            "replay_started",
                            "replay_terminal",
                            "diagnostics_shared"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "info",
                            "success",
                            "warning",
                            "error"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "stableErrorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "FLR_ENDPOINT_UNKNOWN",
                                "FLR_ENDPOINT_DELETED",
                                "FLR_AUTH_HEADER_MISSING",
                                "FLR_AUTH_FAILED",
                                "FLR_PAYLOAD_INVALID_JSON",
                                "FLR_PAYLOAD_TOO_LARGE",
                                "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                "FLR_MAPPING_INVALID_RESOURCE_ID",
                                "FLR_NO_ENABLED_WORKFLOW",
                                "FLR_DUPLICATE_SUPPRESSED",
                                "FLR_FLOW_HANDOFF_FAILED",
                                "FLR_PLAN_LIMIT_REACHED",
                                "FLR_REPLAY_NOT_AVAILABLE",
                                "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                "FLR_DIAGNOSTICS_FAILED"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metadata": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "at",
                        "step",
                        "status",
                        "message",
                        "stableErrorCode"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "replayAttempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        },
                        "replayAttemptId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "originalEventId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "actionIntentId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "correlationId": {
                          "type": "string",
                          "pattern": "^flr_corr_[a-f0-9-]{36}$"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "processing",
                            "delivered",
                            "failed",
                            "no_workflow",
                            "not_available"
                          ]
                        },
                        "stableErrorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "FLR_ENDPOINT_UNKNOWN",
                                "FLR_ENDPOINT_DELETED",
                                "FLR_AUTH_HEADER_MISSING",
                                "FLR_AUTH_FAILED",
                                "FLR_PAYLOAD_INVALID_JSON",
                                "FLR_PAYLOAD_TOO_LARGE",
                                "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                "FLR_MAPPING_INVALID_RESOURCE_ID",
                                "FLR_NO_ENABLED_WORKFLOW",
                                "FLR_DUPLICATE_SUPPRESSED",
                                "FLR_FLOW_HANDOFF_FAILED",
                                "FLR_PLAN_LIMIT_REACHED",
                                "FLR_REPLAY_NOT_AVAILABLE",
                                "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                "FLR_DIAGNOSTICS_FAILED"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "triggeredBy": {
                          "type": "object",
                          "properties": {
                            "actorType": {
                              "type": "string",
                              "enum": [
                                "shopify_user",
                                "flowrelay_support",
                                "internal_agent",
                                "merchant_authorized_agent",
                                "browser_fallback_agent"
                              ]
                            },
                            "actorId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "actorEmail": {
                              "type": "string",
                              "format": "email",
                              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "actorType",
                            "actorId"
                          ],
                          "additionalProperties": false
                        },
                        "currentEndpointSnapshot": {
                          "type": "object",
                          "properties": {
                            "schemaVersion": {
                              "type": "number",
                              "const": 1
                            },
                            "endpointId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "endpointPublicId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "endpointUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "sourceLabel": {
                              "type": "string",
                              "minLength": 1
                            },
                            "triggerVariant": {
                              "type": "string",
                              "enum": [
                                "generic",
                                "order",
                                "customer",
                                "product",
                                "inventory",
                                "fulfillment",
                                "return_refund",
                                "company_b2b"
                              ]
                            },
                            "auth": {
                              "type": "object",
                              "properties": {
                                "mode": {
                                  "type": "string",
                                  "enum": [
                                    "hmac_sha256_header",
                                    "static_header_secret"
                                  ]
                                },
                                "headerName": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9-]+$"
                                },
                                "secretLast4": {
                                  "type": "string",
                                  "minLength": 4,
                                  "maxLength": 4
                                }
                              },
                              "required": [
                                "mode",
                                "headerName",
                                "secretLast4"
                              ],
                              "additionalProperties": false
                            },
                            "mapping": {
                              "type": "object",
                              "properties": {
                                "defaultEventType": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "eventTypePath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "externalEventIdPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "occurredAtPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "summaryPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "resourceIdPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "relatedResourceIdPath": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "requiredPayloadPaths": {
                                  "maxItems": 5,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1
                                  }
                                }
                              },
                              "required": [
                                "defaultEventType",
                                "eventTypePath",
                                "externalEventIdPath",
                                "occurredAtPath",
                                "summaryPath",
                                "resourceIdPath",
                                "relatedResourceIdPath",
                                "requiredPayloadPaths"
                              ],
                              "additionalProperties": false
                            },
                            "capturedAt": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            }
                          },
                          "required": [
                            "schemaVersion",
                            "endpointId",
                            "endpointPublicId",
                            "endpointUrl",
                            "name",
                            "sourceLabel",
                            "triggerVariant",
                            "auth",
                            "mapping",
                            "capturedAt"
                          ],
                          "additionalProperties": false
                        },
                        "currentTriggerAvailability": {
                          "type": "object",
                          "properties": {
                            "triggerVariant": {
                              "type": "string",
                              "enum": [
                                "generic",
                                "order",
                                "customer",
                                "product",
                                "inventory",
                                "fulfillment",
                                "return_refund",
                                "company_b2b"
                              ]
                            },
                            "hasEnabledFlow": {
                              "type": "boolean"
                            },
                            "lastCallbackAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "triggerVariant",
                            "hasEnabledFlow",
                            "lastCallbackAt"
                          ],
                          "additionalProperties": false
                        },
                        "startedAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "replayAttemptId",
                        "originalEventId",
                        "endpointId",
                        "actionIntentId",
                        "correlationId",
                        "status",
                        "stableErrorCode",
                        "triggeredBy",
                        "currentEndpointSnapshot",
                        "currentTriggerAvailability",
                        "startedAt",
                        "completedAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "diagnosticsShares": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        },
                        "shareId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "endpoint"
                                },
                                "endpointId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "type",
                                "endpointId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "event"
                                },
                                "endpointId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "eventId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "type",
                                "endpointId",
                                "eventId"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "stableErrorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "FLR_ENDPOINT_UNKNOWN",
                                "FLR_ENDPOINT_DELETED",
                                "FLR_AUTH_HEADER_MISSING",
                                "FLR_AUTH_FAILED",
                                "FLR_PAYLOAD_INVALID_JSON",
                                "FLR_PAYLOAD_TOO_LARGE",
                                "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                "FLR_MAPPING_INVALID_RESOURCE_ID",
                                "FLR_NO_ENABLED_WORKFLOW",
                                "FLR_DUPLICATE_SUPPRESSED",
                                "FLR_FLOW_HANDOFF_FAILED",
                                "FLR_PLAN_LIMIT_REACHED",
                                "FLR_REPLAY_NOT_AVAILABLE",
                                "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                "FLR_DIAGNOSTICS_FAILED"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "includeMaskedPayloadSample": {
                          "type": "boolean"
                        },
                        "summaryText": {
                          "type": "string",
                          "minLength": 1
                        },
                        "createdByEmail": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "email",
                              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "shareId",
                        "scope",
                        "stableErrorCode",
                        "includeMaskedPayloadSample",
                        "summaryText",
                        "createdByEmail",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "reliabilityExplanation": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "eventId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "queued",
                          "processing",
                          "delivered",
                          "failed",
                          "no_workflow",
                          "duplicate_suppressed",
                          "reconciliation_pending",
                          "manual_review_required",
                          "replay_unavailable"
                        ]
                      },
                      "summary": {
                        "type": "string",
                        "minLength": 1
                      },
                      "safeNextAction": {
                        "type": "string",
                        "enum": [
                          "wait",
                          "fix_endpoint_mapping",
                          "enable_shopify_flow",
                          "preview_replay",
                          "share_diagnostics",
                          "manual_review",
                          "resend_from_source",
                          "contact_support"
                        ]
                      },
                      "operatorCopy": {
                        "type": "string",
                        "minLength": 1
                      },
                      "agentCopy": {
                        "type": "string",
                        "minLength": 1
                      },
                      "routeDecision": {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "eventId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "correlationId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "platformKey": {
                            "type": "string",
                            "const": "shopify_flow"
                          },
                          "routeKind": {
                            "type": "string",
                            "enum": [
                              "normal_event",
                              "replay"
                            ]
                          },
                          "endpointId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "triggerVariant": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "generic",
                                  "order",
                                  "customer",
                                  "product",
                                  "inventory",
                                  "fulfillment",
                                  "return_refund",
                                  "company_b2b"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "policyVersion": {
                            "type": "string",
                            "const": "shopify_flow_v1_endpoint_snapshot"
                          },
                          "decisions": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "step": {
                                  "type": "string",
                                  "enum": [
                                    "receipt_accepted",
                                    "endpoint_snapshot_selected",
                                    "mapping_evaluated",
                                    "dedupe_evaluated",
                                    "readiness_evaluated",
                                    "handoff_evaluated",
                                    "reconciliation_evaluated",
                                    "terminal_recorded"
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "accepted",
                                    "skipped",
                                    "blocked",
                                    "succeeded",
                                    "failed",
                                    "manual_review_required"
                                  ]
                                },
                                "stableErrorCode": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "FLR_ENDPOINT_UNKNOWN",
                                        "FLR_ENDPOINT_DELETED",
                                        "FLR_AUTH_HEADER_MISSING",
                                        "FLR_AUTH_FAILED",
                                        "FLR_PAYLOAD_INVALID_JSON",
                                        "FLR_PAYLOAD_TOO_LARGE",
                                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                                        "FLR_NO_ENABLED_WORKFLOW",
                                        "FLR_DUPLICATE_SUPPRESSED",
                                        "FLR_FLOW_HANDOFF_FAILED",
                                        "FLR_PLAN_LIMIT_REACHED",
                                        "FLR_REPLAY_NOT_AVAILABLE",
                                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                        "FLR_DIAGNOSTICS_FAILED"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "step",
                                "status",
                                "stableErrorCode",
                                "reason",
                                "at"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "eventId",
                          "correlationId",
                          "platformKey",
                          "routeKind",
                          "endpointId",
                          "triggerVariant",
                          "policyVersion",
                          "decisions"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "eventId",
                      "state",
                      "summary",
                      "safeNextAction",
                      "operatorCopy",
                      "agentCopy",
                      "routeDecision"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "schemaVersion",
                  "receiptId",
                  "eventId",
                  "correlationId",
                  "endpointId",
                  "endpointName",
                  "sourceLabel",
                  "receivedAt",
                  "completedAt",
                  "terminalOutcome",
                  "stableErrorCode",
                  "resolvedEventType",
                  "resolvedExternalEventId",
                  "replay",
                  "endpointConfigSummary",
                  "recoveryCopy",
                  "deliveredCopy",
                  "receiptContext",
                  "endpointSnapshot",
                  "source",
                  "auth",
                  "mapping",
                  "readinessAtHandoff",
                  "resolved",
                  "flowHandoff",
                  "handoff",
                  "audit",
                  "processingTrace",
                  "replayAttempts",
                  "diagnosticsShares",
                  "reliabilityExplanation"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schemaVersion",
          "event"
        ],
        "additionalProperties": false
      },
      "AgentEventListRead": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "receiptId": {
                  "type": "string",
                  "minLength": 1
                },
                "eventId": {
                  "type": "string",
                  "minLength": 1
                },
                "correlationId": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointId": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointName": {
                  "type": "string",
                  "minLength": 1
                },
                "sourceLabel": {
                  "type": "string",
                  "minLength": 1
                },
                "receivedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "completedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "terminalOutcome": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "delivered",
                        "failed",
                        "no_workflow",
                        "duplicate_suppressed",
                        "rejected"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "stableErrorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FLR_ENDPOINT_UNKNOWN",
                        "FLR_ENDPOINT_DELETED",
                        "FLR_AUTH_HEADER_MISSING",
                        "FLR_AUTH_FAILED",
                        "FLR_PAYLOAD_INVALID_JSON",
                        "FLR_PAYLOAD_TOO_LARGE",
                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                        "FLR_NO_ENABLED_WORKFLOW",
                        "FLR_DUPLICATE_SUPPRESSED",
                        "FLR_FLOW_HANDOFF_FAILED",
                        "FLR_PLAN_LIMIT_REACHED",
                        "FLR_REPLAY_NOT_AVAILABLE",
                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                        "FLR_DIAGNOSTICS_FAILED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedEventType": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedExternalEventId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "replay": {
                  "type": "object",
                  "properties": {
                    "eligible": {
                      "type": "boolean"
                    },
                    "rawBodyExpiresAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "copy": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "eligible",
                    "rawBodyExpiresAt",
                    "copy"
                  ],
                  "additionalProperties": false
                },
                "endpointConfigSummary": {
                  "type": "object",
                  "properties": {
                    "endpointId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointPublicId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "sourceLabel": {
                      "type": "string",
                      "minLength": 1
                    },
                    "triggerVariant": {
                      "type": "string",
                      "enum": [
                        "generic",
                        "order",
                        "customer",
                        "product",
                        "inventory",
                        "fulfillment",
                        "return_refund",
                        "company_b2b"
                      ]
                    },
                    "authMode": {
                      "type": "string",
                      "enum": [
                        "hmac_sha256_header",
                        "static_header_secret"
                      ]
                    },
                    "headerName": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9-]+$"
                    },
                    "secretLast4": {
                      "type": "string",
                      "minLength": 4,
                      "maxLength": 4
                    },
                    "defaultEventType": {
                      "type": "string",
                      "minLength": 1
                    },
                    "eventTypePath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalEventIdPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "occurredAtPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "summaryPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "resourceIdPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "relatedResourceIdPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "requiredPayloadPaths": {
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "capturedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "endpointId",
                    "endpointPublicId",
                    "name",
                    "sourceLabel",
                    "triggerVariant",
                    "authMode",
                    "headerName",
                    "secretLast4",
                    "defaultEventType",
                    "eventTypePath",
                    "externalEventIdPath",
                    "occurredAtPath",
                    "summaryPath",
                    "resourceIdPath",
                    "relatedResourceIdPath",
                    "requiredPayloadPaths",
                    "capturedAt"
                  ],
                  "additionalProperties": false
                },
                "recoveryCopy": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "operatorCopy": {
                          "type": "string",
                          "minLength": 1
                        },
                        "agentCopy": {
                          "type": "string",
                          "minLength": 1
                        },
                        "replayable": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "const": "not_applicable"
                            }
                          ]
                        }
                      },
                      "required": [
                        "title",
                        "operatorCopy",
                        "agentCopy",
                        "replayable"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "deliveredCopy": {
                  "type": "string",
                  "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
                }
              },
              "required": [
                "schemaVersion",
                "receiptId",
                "eventId",
                "correlationId",
                "endpointId",
                "endpointName",
                "sourceLabel",
                "receivedAt",
                "completedAt",
                "terminalOutcome",
                "stableErrorCode",
                "resolvedEventType",
                "resolvedExternalEventId",
                "replay",
                "endpointConfigSummary",
                "recoveryCopy",
                "deliveredCopy"
              ],
              "additionalProperties": false
            }
          },
          "filters": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "retentionDays": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "endpointId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "terminalOutcome": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "delivered",
                      "failed",
                      "no_workflow",
                      "duplicate_suppressed",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "stableErrorCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "query": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "limit",
              "retentionDays",
              "endpointId",
              "terminalOutcome",
              "stableErrorCode",
              "query"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schemaVersion",
          "events",
          "filters"
        ],
        "additionalProperties": false
      },
      "AgentEventResultRead": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "result": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "receiptId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "eventId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "correlationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceLabel": {
                    "type": "string",
                    "minLength": 1
                  },
                  "receivedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "completedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "terminalOutcome": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "accepted",
                          "delivered",
                          "failed",
                          "no_workflow",
                          "duplicate_suppressed",
                          "rejected"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stableErrorCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "FLR_ENDPOINT_UNKNOWN",
                          "FLR_ENDPOINT_DELETED",
                          "FLR_AUTH_HEADER_MISSING",
                          "FLR_AUTH_FAILED",
                          "FLR_PAYLOAD_INVALID_JSON",
                          "FLR_PAYLOAD_TOO_LARGE",
                          "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                          "FLR_MAPPING_INVALID_RESOURCE_ID",
                          "FLR_NO_ENABLED_WORKFLOW",
                          "FLR_DUPLICATE_SUPPRESSED",
                          "FLR_FLOW_HANDOFF_FAILED",
                          "FLR_PLAN_LIMIT_REACHED",
                          "FLR_REPLAY_NOT_AVAILABLE",
                          "FLR_DIAGNOSTICS_UNAUTHORIZED",
                          "FLR_DIAGNOSTICS_FAILED"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "resolvedEventType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "resolvedExternalEventId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "replay": {
                    "type": "object",
                    "properties": {
                      "eligible": {
                        "type": "boolean"
                      },
                      "rawBodyExpiresAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "copy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "eligible",
                      "rawBodyExpiresAt",
                      "copy"
                    ],
                    "additionalProperties": false
                  },
                  "endpointConfigSummary": {
                    "type": "object",
                    "properties": {
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "endpointPublicId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "sourceLabel": {
                        "type": "string",
                        "minLength": 1
                      },
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "authMode": {
                        "type": "string",
                        "enum": [
                          "hmac_sha256_header",
                          "static_header_secret"
                        ]
                      },
                      "headerName": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]+$"
                      },
                      "secretLast4": {
                        "type": "string",
                        "minLength": 4,
                        "maxLength": 4
                      },
                      "defaultEventType": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventTypePath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAtPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summaryPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "requiredPayloadPaths": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "capturedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "endpointId",
                      "endpointPublicId",
                      "name",
                      "sourceLabel",
                      "triggerVariant",
                      "authMode",
                      "headerName",
                      "secretLast4",
                      "defaultEventType",
                      "eventTypePath",
                      "externalEventIdPath",
                      "occurredAtPath",
                      "summaryPath",
                      "resourceIdPath",
                      "relatedResourceIdPath",
                      "requiredPayloadPaths",
                      "capturedAt"
                    ],
                    "additionalProperties": false
                  },
                  "recoveryCopy": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1
                          },
                          "operatorCopy": {
                            "type": "string",
                            "minLength": 1
                          },
                          "agentCopy": {
                            "type": "string",
                            "minLength": 1
                          },
                          "replayable": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "string",
                                "const": "not_applicable"
                              }
                            ]
                          }
                        },
                        "required": [
                          "title",
                          "operatorCopy",
                          "agentCopy",
                          "replayable"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "deliveredCopy": {
                    "type": "string",
                    "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
                  }
                },
                "required": [
                  "schemaVersion",
                  "receiptId",
                  "eventId",
                  "correlationId",
                  "endpointId",
                  "endpointName",
                  "sourceLabel",
                  "receivedAt",
                  "completedAt",
                  "terminalOutcome",
                  "stableErrorCode",
                  "resolvedEventType",
                  "resolvedExternalEventId",
                  "replay",
                  "endpointConfigSummary",
                  "recoveryCopy",
                  "deliveredCopy"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schemaVersion",
          "result"
        ],
        "additionalProperties": false
      },
      "AgentGrantIntrospectionRead": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "platform": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "platformKey": {
                "type": "string",
                "minLength": 1
              },
              "platformName": {
                "type": "string",
                "minLength": 1
              },
              "editionName": {
                "type": "string",
                "minLength": 1
              },
              "automationSystem": {
                "type": "string",
                "minLength": 1
              },
              "billingProvider": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "schemaVersion",
              "platformKey",
              "platformName",
              "editionName",
              "automationSystem",
              "billingProvider"
            ],
            "additionalProperties": false
          },
          "grant": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "grantId": {
                "type": "string",
                "minLength": 1
              },
              "installationId": {
                "type": "string",
                "minLength": 1
              },
              "label": {
                "type": "string",
                "minLength": 1
              },
              "purpose": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "revoked",
                  "expired"
                ]
              },
              "authorityTier": {
                "type": "string",
                "enum": [
                  "observer",
                  "operator",
                  "recovery_operator",
                  "admin_assistant"
                ]
              },
              "scopes": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "setup:read",
                    "endpoint:write",
                    "endpoint:delete",
                    "endpoint:test",
                    "event:read",
                    "replay:execute",
                    "secret:rotate",
                    "diagnostics:create",
                    "support:request",
                    "expansion:request"
                  ]
                }
              },
              "tokenLast4": {
                "type": "string",
                "minLength": 4,
                "maxLength": 4
              },
              "createdByShopifyUserId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdByEmail": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revokedByShopifyUserId": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revokedByEmail": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "delegatedActorHint": {
                "anyOf": [
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expiryMode": {
                "type": "string",
                "enum": [
                  "expires_at",
                  "never_expires"
                ]
              },
              "acknowledgementRequired": {
                "type": "boolean"
              },
              "acknowledgementPhrase": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "acknowledgedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "lastUsedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expiresAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revokedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "current": {
                "default": false,
                "type": "boolean"
              }
            },
            "required": [
              "schemaVersion",
              "grantId",
              "installationId",
              "label",
              "purpose",
              "status",
              "authorityTier",
              "scopes",
              "tokenLast4",
              "createdByShopifyUserId",
              "createdByEmail",
              "revokedByShopifyUserId",
              "revokedByEmail",
              "delegatedActorHint",
              "expiryMode",
              "acknowledgementRequired",
              "acknowledgementPhrase",
              "acknowledgedAt",
              "createdAt",
              "lastUsedAt",
              "expiresAt",
              "revokedAt",
              "current"
            ],
            "additionalProperties": false
          },
          "guidance": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "schemaVersion",
          "platform",
          "grant",
          "guidance"
        ],
        "additionalProperties": false
      },
      "AgentOperationsManifest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "name": {
            "type": "string",
            "const": "FlowRelay Agent Operations API"
          },
          "version": {
            "type": "string",
            "const": "v1"
          },
          "platform": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "platformKey": {
                "type": "string",
                "minLength": 1
              },
              "platformName": {
                "type": "string",
                "minLength": 1
              },
              "editionName": {
                "type": "string",
                "minLength": 1
              },
              "automationSystem": {
                "type": "string",
                "minLength": 1
              },
              "billingProvider": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "schemaVersion",
              "platformKey",
              "platformName",
              "editionName",
              "automationSystem",
              "billingProvider"
            ],
            "additionalProperties": false
          },
          "docs": {
            "type": "object",
            "properties": {
              "docsHome": {
                "type": "string",
                "format": "uri"
              },
              "gettingStarted": {
                "type": "string",
                "format": "uri"
              },
              "firstEvent": {
                "type": "string",
                "format": "uri"
              },
              "agentAccess": {
                "type": "string",
                "format": "uri"
              },
              "grantsAndScopes": {
                "type": "string",
                "format": "uri"
              },
              "agentOrientation": {
                "type": "string",
                "format": "uri"
              },
              "agentMissionPlaybooks": {
                "type": "string",
                "format": "uri"
              },
              "availabilityAndRefusals": {
                "type": "string",
                "format": "uri"
              },
              "triggerMapping": {
                "type": "string",
                "format": "uri"
              },
              "usageLimits": {
                "type": "string",
                "format": "uri"
              },
              "skillsReference": {
                "type": "string",
                "format": "uri"
              },
              "operatorSkill": {
                "type": "string",
                "format": "uri"
              },
              "apiReference": {
                "type": "string",
                "format": "uri"
              },
              "cliReference": {
                "type": "string",
                "format": "uri"
              },
              "mcpReference": {
                "type": "string",
                "format": "uri"
              },
              "actionIntents": {
                "type": "string",
                "format": "uri"
              },
              "errorCodes": {
                "type": "string",
                "format": "uri"
              },
              "openApi": {
                "type": "string",
                "format": "uri"
              },
              "llms": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "docsHome",
              "gettingStarted",
              "firstEvent",
              "agentAccess",
              "grantsAndScopes",
              "agentOrientation",
              "apiReference",
              "cliReference",
              "mcpReference",
              "actionIntents",
              "errorCodes",
              "openApi",
              "llms"
            ],
            "additionalProperties": false
          },
          "quickstart": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "enum": [
                    "read_manifest",
                    "inspect_grant",
                    "inspect_setup_state",
                    "check_plan_usage",
                    "create_endpoint",
                    "enable_shopify_flow_trigger",
                    "send_test_event",
                    "check_event_result"
                  ]
                },
                "title": {
                  "type": "string",
                  "minLength": 1
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "route": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cli": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "docsUrl": {
                  "type": "string",
                  "format": "uri"
                },
                "requiresAgentToken": {
                  "type": "boolean"
                }
              },
              "required": [
                "key",
                "title",
                "description",
                "route",
                "cli",
                "docsUrl",
                "requiresAgentToken"
              ],
              "additionalProperties": false
            }
          },
          "safety": {
            "type": "object",
            "properties": {
              "neverRequest": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "humanOnly": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "governedActionsRequire": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "mcp": {
                "type": "object",
                "properties": {
                  "transport": {
                    "type": "string",
                    "minLength": 1
                  },
                  "codeMode": {
                    "type": "boolean",
                    "const": true
                  },
                  "exposedTools": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "search",
                        "execute"
                      ]
                    }
                  },
                  "outboundNetwork": {
                    "type": "string",
                    "const": "disabled"
                  },
                  "authLocation": {
                    "type": "string",
                    "const": "host_request_handler"
                  }
                },
                "required": [
                  "transport",
                  "codeMode",
                  "exposedTools",
                  "outboundNetwork",
                  "authLocation"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "neverRequest",
              "humanOnly",
              "governedActionsRequire",
              "mcp"
            ],
            "additionalProperties": false
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "setup_state_read",
                "plan_usage_read",
                "billing_handoff",
                "agent_grant_read",
                "endpoint_read",
                "endpoint_create",
                "endpoint_edit_intent",
                "endpoint_delete_intent",
                "endpoint_test_intent",
                "event_list_read",
                "event_read",
                "reliability_health_read",
                "replay_intent",
                "secret_rotation_intent",
                "diagnostics_share_intent",
                "support_request_intent",
                "expansion_request_submit",
                "mcp_agent_operations_access"
              ]
            }
          },
          "capabilityDetails": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "capability": {
                  "type": "string",
                  "enum": [
                    "setup_state_read",
                    "plan_usage_read",
                    "billing_handoff",
                    "agent_grant_read",
                    "endpoint_read",
                    "endpoint_create",
                    "endpoint_edit_intent",
                    "endpoint_delete_intent",
                    "endpoint_test_intent",
                    "event_list_read",
                    "event_read",
                    "reliability_health_read",
                    "replay_intent",
                    "secret_rotation_intent",
                    "diagnostics_share_intent",
                    "support_request_intent",
                    "expansion_request_submit",
                    "mcp_agent_operations_access"
                  ]
                },
                "title": {
                  "type": "string",
                  "minLength": 1
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "route": {
                  "type": "string",
                  "minLength": 1
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "GET",
                    "POST"
                  ]
                },
                "requiredScopes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "access": {
                  "type": "string",
                  "enum": [
                    "public",
                    "agent_grant"
                  ]
                },
                "effect": {
                  "type": "string",
                  "enum": [
                    "read_only",
                    "create_resource",
                    "preview_or_execute",
                    "handoff_only",
                    "mcp_agent_operations_access"
                  ]
                },
                "requiresConfirmation": {
                  "type": "boolean"
                },
                "docsUrl": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "capability",
                "title",
                "description",
                "route",
                "method",
                "requiredScopes",
                "access",
                "effect",
                "requiresConfirmation",
                "docsUrl"
              ],
              "additionalProperties": false
            }
          },
          "requiredScopes": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "routes": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "schemaVersion",
          "name",
          "version",
          "platform",
          "docs",
          "quickstart",
          "safety",
          "capabilities",
          "capabilityDetails",
          "requiredScopes",
          "routes"
        ],
        "additionalProperties": false
      },
      "AgentReplayIntentResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "state": {
                "type": "string",
                "const": "preview"
              },
              "preview": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "actionIntentId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "originalEventId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "receiptId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "available": {
                    "type": "boolean"
                  },
                  "stableErrorCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "FLR_ENDPOINT_UNKNOWN",
                          "FLR_ENDPOINT_DELETED",
                          "FLR_AUTH_HEADER_MISSING",
                          "FLR_AUTH_FAILED",
                          "FLR_PAYLOAD_INVALID_JSON",
                          "FLR_PAYLOAD_TOO_LARGE",
                          "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                          "FLR_MAPPING_INVALID_RESOURCE_ID",
                          "FLR_NO_ENABLED_WORKFLOW",
                          "FLR_DUPLICATE_SUPPRESSED",
                          "FLR_FLOW_HANDOFF_FAILED",
                          "FLR_PLAN_LIMIT_REACHED",
                          "FLR_REPLAY_NOT_AVAILABLE",
                          "FLR_DIAGNOSTICS_UNAUTHORIZED",
                          "FLR_DIAGNOSTICS_FAILED"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "warningCopy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "originalEndpointSnapshot": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointPublicId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceLabel": {
                            "type": "string",
                            "minLength": 1
                          },
                          "triggerVariant": {
                            "type": "string",
                            "enum": [
                              "generic",
                              "order",
                              "customer",
                              "product",
                              "inventory",
                              "fulfillment",
                              "return_refund",
                              "company_b2b"
                            ]
                          },
                          "auth": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "hmac_sha256_header",
                                  "static_header_secret"
                                ]
                              },
                              "headerName": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9-]+$"
                              },
                              "secretLast4": {
                                "type": "string",
                                "minLength": 4,
                                "maxLength": 4
                              }
                            },
                            "required": [
                              "mode",
                              "headerName",
                              "secretLast4"
                            ],
                            "additionalProperties": false
                          },
                          "mapping": {
                            "type": "object",
                            "properties": {
                              "defaultEventType": {
                                "type": "string",
                                "minLength": 1
                              },
                              "eventTypePath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalEventIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "occurredAtPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "summaryPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "relatedResourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "requiredPayloadPaths": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            "required": [
                              "defaultEventType",
                              "eventTypePath",
                              "externalEventIdPath",
                              "occurredAtPath",
                              "summaryPath",
                              "resourceIdPath",
                              "relatedResourceIdPath",
                              "requiredPayloadPaths"
                            ],
                            "additionalProperties": false
                          },
                          "capturedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "endpointId",
                          "endpointPublicId",
                          "endpointUrl",
                          "name",
                          "sourceLabel",
                          "triggerVariant",
                          "auth",
                          "mapping",
                          "capturedAt"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currentEndpointSnapshot": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointPublicId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceLabel": {
                            "type": "string",
                            "minLength": 1
                          },
                          "triggerVariant": {
                            "type": "string",
                            "enum": [
                              "generic",
                              "order",
                              "customer",
                              "product",
                              "inventory",
                              "fulfillment",
                              "return_refund",
                              "company_b2b"
                            ]
                          },
                          "auth": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "hmac_sha256_header",
                                  "static_header_secret"
                                ]
                              },
                              "headerName": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9-]+$"
                              },
                              "secretLast4": {
                                "type": "string",
                                "minLength": 4,
                                "maxLength": 4
                              }
                            },
                            "required": [
                              "mode",
                              "headerName",
                              "secretLast4"
                            ],
                            "additionalProperties": false
                          },
                          "mapping": {
                            "type": "object",
                            "properties": {
                              "defaultEventType": {
                                "type": "string",
                                "minLength": 1
                              },
                              "eventTypePath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalEventIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "occurredAtPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "summaryPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "relatedResourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "requiredPayloadPaths": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            "required": [
                              "defaultEventType",
                              "eventTypePath",
                              "externalEventIdPath",
                              "occurredAtPath",
                              "summaryPath",
                              "resourceIdPath",
                              "relatedResourceIdPath",
                              "requiredPayloadPaths"
                            ],
                            "additionalProperties": false
                          },
                          "capturedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "endpointId",
                          "endpointPublicId",
                          "endpointUrl",
                          "name",
                          "sourceLabel",
                          "triggerVariant",
                          "auth",
                          "mapping",
                          "capturedAt"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "configDifferences": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "minLength": 1
                        },
                        "originalValue": {
                          "type": "string"
                        },
                        "currentValue": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field",
                        "originalValue",
                        "currentValue"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "currentTriggerAvailability": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "triggerVariant": {
                            "type": "string",
                            "enum": [
                              "generic",
                              "order",
                              "customer",
                              "product",
                              "inventory",
                              "fulfillment",
                              "return_refund",
                              "company_b2b"
                            ]
                          },
                          "hasEnabledFlow": {
                            "type": "boolean"
                          },
                          "lastCallbackAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "triggerVariant",
                          "hasEnabledFlow",
                          "lastCallbackAt"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mappingPreview": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "ok": {
                            "type": "boolean"
                          },
                          "stableErrorCode": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "FLR_ENDPOINT_UNKNOWN",
                                  "FLR_ENDPOINT_DELETED",
                                  "FLR_AUTH_HEADER_MISSING",
                                  "FLR_AUTH_FAILED",
                                  "FLR_PAYLOAD_INVALID_JSON",
                                  "FLR_PAYLOAD_TOO_LARGE",
                                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                                  "FLR_NO_ENABLED_WORKFLOW",
                                  "FLR_DUPLICATE_SUPPRESSED",
                                  "FLR_FLOW_HANDOFF_FAILED",
                                  "FLR_PLAN_LIMIT_REACHED",
                                  "FLR_REPLAY_NOT_AVAILABLE",
                                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                  "FLR_DIAGNOSTICS_FAILED"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "copy": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "ok",
                          "stableErrorCode",
                          "copy"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "duplicateSuppression": {
                    "type": "object",
                    "properties": {
                      "bypassed": {
                        "type": "boolean",
                        "const": true
                      },
                      "copy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "bypassed",
                      "copy"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "schemaVersion",
                  "actionIntentId",
                  "idempotencyKey",
                  "originalEventId",
                  "receiptId",
                  "available",
                  "stableErrorCode",
                  "reason",
                  "warningCopy",
                  "originalEndpointSnapshot",
                  "currentEndpointSnapshot",
                  "configDifferences",
                  "currentTriggerAvailability",
                  "mappingPreview",
                  "duplicateSuppression"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "schemaVersion",
              "state",
              "preview"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "state": {
                "type": "string",
                "const": "execute"
              },
              "execution": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "actionIntentId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "originalEventId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "replayAttemptId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "not_available"
                    ]
                  },
                  "stableErrorCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "FLR_ENDPOINT_UNKNOWN",
                          "FLR_ENDPOINT_DELETED",
                          "FLR_AUTH_HEADER_MISSING",
                          "FLR_AUTH_FAILED",
                          "FLR_PAYLOAD_INVALID_JSON",
                          "FLR_PAYLOAD_TOO_LARGE",
                          "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                          "FLR_MAPPING_INVALID_RESOURCE_ID",
                          "FLR_NO_ENABLED_WORKFLOW",
                          "FLR_DUPLICATE_SUPPRESSED",
                          "FLR_FLOW_HANDOFF_FAILED",
                          "FLR_PLAN_LIMIT_REACHED",
                          "FLR_REPLAY_NOT_AVAILABLE",
                          "FLR_DIAGNOSTICS_UNAUTHORIZED",
                          "FLR_DIAGNOSTICS_FAILED"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "preview": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "actionIntentId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "idempotencyKey": {
                        "type": "string",
                        "minLength": 1
                      },
                      "originalEventId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "receiptId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "available": {
                        "type": "boolean"
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reason": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "warningCopy": {
                        "type": "string",
                        "minLength": 1
                      },
                      "originalEndpointSnapshot": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schemaVersion": {
                                "type": "number",
                                "const": 1
                              },
                              "endpointId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "endpointPublicId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "endpointUrl": {
                                "type": "string",
                                "format": "uri"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "sourceLabel": {
                                "type": "string",
                                "minLength": 1
                              },
                              "triggerVariant": {
                                "type": "string",
                                "enum": [
                                  "generic",
                                  "order",
                                  "customer",
                                  "product",
                                  "inventory",
                                  "fulfillment",
                                  "return_refund",
                                  "company_b2b"
                                ]
                              },
                              "auth": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "hmac_sha256_header",
                                      "static_header_secret"
                                    ]
                                  },
                                  "headerName": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z0-9-]+$"
                                  },
                                  "secretLast4": {
                                    "type": "string",
                                    "minLength": 4,
                                    "maxLength": 4
                                  }
                                },
                                "required": [
                                  "mode",
                                  "headerName",
                                  "secretLast4"
                                ],
                                "additionalProperties": false
                              },
                              "mapping": {
                                "type": "object",
                                "properties": {
                                  "defaultEventType": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "eventTypePath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "externalEventIdPath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "occurredAtPath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "summaryPath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "resourceIdPath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "relatedResourceIdPath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "requiredPayloadPaths": {
                                    "maxItems": 5,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  }
                                },
                                "required": [
                                  "defaultEventType",
                                  "eventTypePath",
                                  "externalEventIdPath",
                                  "occurredAtPath",
                                  "summaryPath",
                                  "resourceIdPath",
                                  "relatedResourceIdPath",
                                  "requiredPayloadPaths"
                                ],
                                "additionalProperties": false
                              },
                              "capturedAt": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "required": [
                              "schemaVersion",
                              "endpointId",
                              "endpointPublicId",
                              "endpointUrl",
                              "name",
                              "sourceLabel",
                              "triggerVariant",
                              "auth",
                              "mapping",
                              "capturedAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "currentEndpointSnapshot": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schemaVersion": {
                                "type": "number",
                                "const": 1
                              },
                              "endpointId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "endpointPublicId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "endpointUrl": {
                                "type": "string",
                                "format": "uri"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "sourceLabel": {
                                "type": "string",
                                "minLength": 1
                              },
                              "triggerVariant": {
                                "type": "string",
                                "enum": [
                                  "generic",
                                  "order",
                                  "customer",
                                  "product",
                                  "inventory",
                                  "fulfillment",
                                  "return_refund",
                                  "company_b2b"
                                ]
                              },
                              "auth": {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "enum": [
                                      "hmac_sha256_header",
                                      "static_header_secret"
                                    ]
                                  },
                                  "headerName": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z0-9-]+$"
                                  },
                                  "secretLast4": {
                                    "type": "string",
                                    "minLength": 4,
                                    "maxLength": 4
                                  }
                                },
                                "required": [
                                  "mode",
                                  "headerName",
                                  "secretLast4"
                                ],
                                "additionalProperties": false
                              },
                              "mapping": {
                                "type": "object",
                                "properties": {
                                  "defaultEventType": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "eventTypePath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "externalEventIdPath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "occurredAtPath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "summaryPath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "resourceIdPath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "relatedResourceIdPath": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "requiredPayloadPaths": {
                                    "maxItems": 5,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  }
                                },
                                "required": [
                                  "defaultEventType",
                                  "eventTypePath",
                                  "externalEventIdPath",
                                  "occurredAtPath",
                                  "summaryPath",
                                  "resourceIdPath",
                                  "relatedResourceIdPath",
                                  "requiredPayloadPaths"
                                ],
                                "additionalProperties": false
                              },
                              "capturedAt": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              }
                            },
                            "required": [
                              "schemaVersion",
                              "endpointId",
                              "endpointPublicId",
                              "endpointUrl",
                              "name",
                              "sourceLabel",
                              "triggerVariant",
                              "auth",
                              "mapping",
                              "capturedAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "configDifferences": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string",
                              "minLength": 1
                            },
                            "originalValue": {
                              "type": "string"
                            },
                            "currentValue": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "field",
                            "originalValue",
                            "currentValue"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "currentTriggerAvailability": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "triggerVariant": {
                                "type": "string",
                                "enum": [
                                  "generic",
                                  "order",
                                  "customer",
                                  "product",
                                  "inventory",
                                  "fulfillment",
                                  "return_refund",
                                  "company_b2b"
                                ]
                              },
                              "hasEnabledFlow": {
                                "type": "boolean"
                              },
                              "lastCallbackAt": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "triggerVariant",
                              "hasEnabledFlow",
                              "lastCallbackAt"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "mappingPreview": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "ok": {
                                "type": "boolean"
                              },
                              "stableErrorCode": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "FLR_ENDPOINT_UNKNOWN",
                                      "FLR_ENDPOINT_DELETED",
                                      "FLR_AUTH_HEADER_MISSING",
                                      "FLR_AUTH_FAILED",
                                      "FLR_PAYLOAD_INVALID_JSON",
                                      "FLR_PAYLOAD_TOO_LARGE",
                                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                                      "FLR_NO_ENABLED_WORKFLOW",
                                      "FLR_DUPLICATE_SUPPRESSED",
                                      "FLR_FLOW_HANDOFF_FAILED",
                                      "FLR_PLAN_LIMIT_REACHED",
                                      "FLR_REPLAY_NOT_AVAILABLE",
                                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                      "FLR_DIAGNOSTICS_FAILED"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "copy": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "ok",
                              "stableErrorCode",
                              "copy"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "duplicateSuppression": {
                        "type": "object",
                        "properties": {
                          "bypassed": {
                            "type": "boolean",
                            "const": true
                          },
                          "copy": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "bypassed",
                          "copy"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "actionIntentId",
                      "idempotencyKey",
                      "originalEventId",
                      "receiptId",
                      "available",
                      "stableErrorCode",
                      "reason",
                      "warningCopy",
                      "originalEndpointSnapshot",
                      "currentEndpointSnapshot",
                      "configDifferences",
                      "currentTriggerAvailability",
                      "mappingPreview",
                      "duplicateSuppression"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "schemaVersion",
                  "actionIntentId",
                  "idempotencyKey",
                  "originalEventId",
                  "replayAttemptId",
                  "status",
                  "stableErrorCode",
                  "reason",
                  "preview"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "schemaVersion",
              "state",
              "execution"
            ],
            "additionalProperties": false
          }
        ]
      },
      "AgentSupportRequestResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "state": {
                "type": "string",
                "const": "preview"
              },
              "request": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "setup",
                      "incident",
                      "billing",
                      "security",
                      "privacy",
                      "compliance",
                      "product_question",
                      "partner_handoff"
                    ]
                  },
                  "urgency": {
                    "default": "normal",
                    "type": "string",
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "urgent"
                    ]
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 12,
                    "maxLength": 2000
                  },
                  "supportConsent": {
                    "type": "boolean"
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 160
                  },
                  "contactEmail": {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "diagnosticsShareId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 140
                  },
                  "eventId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 140
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 140
                  },
                  "stableErrorCode": {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  "noDiagnosticsReason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "replyRequested": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "category",
                  "urgency",
                  "summary",
                  "supportConsent",
                  "idempotencyKey",
                  "replyRequested"
                ],
                "additionalProperties": false
              },
              "redactedSummary": {
                "type": "string",
                "minLength": 1
              },
              "factsIncluded": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "requiresSupportConsent": {
                "type": "boolean",
                "const": true
              }
            },
            "required": [
              "schemaVersion",
              "state",
              "request",
              "redactedSummary",
              "factsIncluded",
              "warnings",
              "requiresSupportConsent"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "state": {
                "type": "string",
                "const": "submit"
              },
              "supportRequest": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "supportRequestId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "platform": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "platformKey": {
                        "type": "string",
                        "minLength": 1
                      },
                      "platformName": {
                        "type": "string",
                        "minLength": 1
                      },
                      "editionName": {
                        "type": "string",
                        "minLength": 1
                      },
                      "automationSystem": {
                        "type": "string",
                        "minLength": 1
                      },
                      "billingProvider": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "platformKey",
                      "platformName",
                      "editionName",
                      "automationSystem",
                      "billingProvider"
                    ],
                    "additionalProperties": false
                  },
                  "requesterType": {
                    "type": "string",
                    "enum": [
                      "human",
                      "agent",
                      "email",
                      "system"
                    ]
                  },
                  "sourceChannel": {
                    "type": "string",
                    "enum": [
                      "in_app",
                      "agent_api",
                      "email",
                      "shopify_support_relay",
                      "internal"
                    ]
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "setup",
                      "incident",
                      "billing",
                      "security",
                      "privacy",
                      "compliance",
                      "product_question",
                      "partner_handoff"
                    ]
                  },
                  "urgency": {
                    "type": "string",
                    "enum": [
                      "low",
                      "normal",
                      "high",
                      "urgent"
                    ]
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 1
                  },
                  "contactEmail": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "email",
                        "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "diagnosticsShareId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "eventId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "endpointId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stableErrorCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "FLR_ENDPOINT_UNKNOWN",
                          "FLR_ENDPOINT_DELETED",
                          "FLR_AUTH_HEADER_MISSING",
                          "FLR_AUTH_FAILED",
                          "FLR_PAYLOAD_INVALID_JSON",
                          "FLR_PAYLOAD_TOO_LARGE",
                          "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                          "FLR_MAPPING_INVALID_RESOURCE_ID",
                          "FLR_NO_ENABLED_WORKFLOW",
                          "FLR_DUPLICATE_SUPPRESSED",
                          "FLR_FLOW_HANDOFF_FAILED",
                          "FLR_PLAN_LIMIT_REACHED",
                          "FLR_REPLAY_NOT_AVAILABLE",
                          "FLR_DIAGNOSTICS_UNAUTHORIZED",
                          "FLR_DIAGNOSTICS_FAILED"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "redactionPolicyVersion": {
                    "type": "string",
                    "minLength": 1
                  },
                  "supportConsent": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "new",
                      "triaged",
                      "waiting_on_customer",
                      "waiting_on_flowrelay",
                      "resolved",
                      "closed",
                      "spam_or_invalid"
                    ]
                  },
                  "externalProvider": {
                    "type": "string",
                    "enum": [
                      "none",
                      "manual",
                      "helpscout",
                      "cloudflare_email_service",
                      "cloudflare_agentic_inbox"
                    ]
                  },
                  "externalTicketId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalTicketUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "schemaVersion",
                  "supportRequestId",
                  "platform",
                  "requesterType",
                  "sourceChannel",
                  "category",
                  "urgency",
                  "summary",
                  "contactEmail",
                  "diagnosticsShareId",
                  "eventId",
                  "endpointId",
                  "stableErrorCode",
                  "redactionPolicyVersion",
                  "supportConsent",
                  "status",
                  "externalProvider",
                  "externalTicketId",
                  "externalTicketUrl",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": false
              },
              "workspaceDelivery": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "none",
                      "manual",
                      "helpscout",
                      "cloudflare_email_service",
                      "cloudflare_agentic_inbox"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "not_configured",
                      "skipped",
                      "created",
                      "failed"
                    ]
                  },
                  "externalTicketId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalTicketUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "provider",
                  "status",
                  "externalTicketId",
                  "externalTicketUrl",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "schemaVersion",
              "state",
              "supportRequest",
              "workspaceDelivery"
            ],
            "additionalProperties": false
          }
        ]
      },
      "BillingHandoffRead": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "platform": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "platformKey": {
                "type": "string",
                "minLength": 1
              },
              "platformName": {
                "type": "string",
                "minLength": 1
              },
              "editionName": {
                "type": "string",
                "minLength": 1
              },
              "automationSystem": {
                "type": "string",
                "minLength": 1
              },
              "billingProvider": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "schemaVersion",
              "platformKey",
              "platformName",
              "editionName",
              "automationSystem",
              "billingProvider"
            ],
            "additionalProperties": false
          },
          "planUsage": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "platform": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "platformKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "platformName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "editionName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "automationSystem": {
                    "type": "string",
                    "minLength": 1
                  },
                  "billingProvider": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "schemaVersion",
                  "platformKey",
                  "platformName",
                  "editionName",
                  "automationSystem",
                  "billingProvider"
                ],
                "additionalProperties": false
              },
              "plan": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "enum": [
                      "free_test",
                      "starter",
                      "growth",
                      "scale"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "effectivePlanKey": {
                    "type": "string",
                    "enum": [
                      "free_test",
                      "starter",
                      "growth",
                      "scale"
                    ]
                  },
                  "selectedPlanKey": {
                    "type": "string",
                    "enum": [
                      "free_test",
                      "starter",
                      "growth",
                      "scale"
                    ]
                  },
                  "limits": {
                    "type": "object",
                    "properties": {
                      "acceptedEventsMonthly": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "retentionDays": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "diagnosticsSharesMonthly": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "replayExecutionsMonthly": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "simpleAgentReadsMonthly": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "richAgentReadsMonthly": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "actionIntentsMonthly": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "executedActionsMonthly": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "acceptedEventsMonthly",
                      "retentionDays",
                      "diagnosticsSharesMonthly",
                      "replayExecutionsMonthly",
                      "simpleAgentReadsMonthly",
                      "richAgentReadsMonthly",
                      "actionIntentsMonthly",
                      "executedActionsMonthly"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "key",
                  "name",
                  "effectivePlanKey",
                  "selectedPlanKey",
                  "limits"
                ],
                "additionalProperties": false
              },
              "billing": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "free",
                      "requires_approval",
                      "pending_approval",
                      "active",
                      "test_active",
                      "declined",
                      "expired",
                      "frozen",
                      "canceled",
                      "canceled_grace",
                      "uninstalled",
                      "reconcile_pending"
                    ]
                  },
                  "interval": {
                    "type": "string",
                    "enum": [
                      "free",
                      "monthly",
                      "annual"
                    ]
                  },
                  "isTest": {
                    "type": "boolean"
                  },
                  "isTestMode": {
                    "type": "boolean"
                  },
                  "shopifyChargeId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currentPeriodStart": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "currentPeriodEnd": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "syncedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "approvalRequired": {
                    "type": "boolean"
                  },
                  "approvalCopy": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "status",
                  "interval",
                  "isTest",
                  "isTestMode",
                  "shopifyChargeId",
                  "currentPeriodStart",
                  "currentPeriodEnd",
                  "syncedAt",
                  "approvalRequired",
                  "approvalCopy"
                ],
                "additionalProperties": false
              },
              "usage": {
                "type": "object",
                "properties": {
                  "periodStart": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "periodEnd": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "acceptedEvents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "deliveredEvents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "failedEvents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "simpleAgentReads": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "richAgentReads": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "actionIntents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "executedActions": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "replayAttempts": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "diagnosticsShares": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "retainedPayloadBytes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "periodStart",
                  "periodEnd",
                  "acceptedEvents",
                  "deliveredEvents",
                  "failedEvents",
                  "simpleAgentReads",
                  "richAgentReads",
                  "actionIntents",
                  "executedActions",
                  "replayAttempts",
                  "diagnosticsShares",
                  "retainedPayloadBytes"
                ],
                "additionalProperties": false
              },
              "meters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "enum": [
                        "acceptedEvents",
                        "simpleAgentReads",
                        "richAgentReads",
                        "actionIntents",
                        "executedActions",
                        "replayAttempts",
                        "diagnosticsShares"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "used": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "limit": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "percentUsed": {
                      "type": "number",
                      "minimum": 0
                    },
                    "level": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "warning",
                        "grace",
                        "limit_reached"
                      ]
                    },
                    "copy": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "used",
                    "limit",
                    "percentUsed",
                    "level",
                    "copy"
                  ],
                  "additionalProperties": false
                }
              },
              "eventGrace": {
                "type": "object",
                "properties": {
                  "eligible": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "not_applicable",
                      "inactive",
                      "active",
                      "exhausted"
                    ]
                  },
                  "includedLimit": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "graceAllowance": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "totalAllowed": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "graceUsed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "graceRemaining": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "deadline": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "nextAction": {
                    "type": "string",
                    "enum": [
                      "none",
                      "monitor_usage",
                      "prepare_billing_handoff",
                      "upgrade_or_request_capacity",
                      "wait_for_next_period"
                    ]
                  },
                  "copy": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "eligible",
                  "status",
                  "includedLimit",
                  "graceAllowance",
                  "totalAllowed",
                  "graceUsed",
                  "graceRemaining",
                  "deadline",
                  "nextAction",
                  "copy"
                ],
                "additionalProperties": false
              },
              "enforcement": {
                "type": "object",
                "properties": {
                  "canAcceptEvents": {
                    "type": "boolean"
                  },
                  "canExecuteGovernedActions": {
                    "type": "boolean"
                  },
                  "eventLimitReached": {
                    "type": "boolean"
                  },
                  "governedActionLimitReached": {
                    "type": "boolean"
                  },
                  "eventIntakeStatus": {
                    "type": "string",
                    "enum": [
                      "ok",
                      "warning",
                      "grace_active",
                      "blocked"
                    ]
                  },
                  "governedActionStatus": {
                    "type": "string",
                    "enum": [
                      "ok",
                      "warning",
                      "blocked"
                    ]
                  },
                  "copy": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "canAcceptEvents",
                  "canExecuteGovernedActions",
                  "eventLimitReached",
                  "governedActionLimitReached",
                  "eventIntakeStatus",
                  "governedActionStatus",
                  "copy"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "schemaVersion",
              "platform",
              "plan",
              "billing",
              "usage",
              "meters",
              "eventGrace",
              "enforcement"
            ],
            "additionalProperties": false
          },
          "handoff": {
            "type": "object",
            "properties": {
              "appBillingUrl": {
                "type": "string",
                "minLength": 1
              },
              "approvalRequired": {
                "type": "boolean"
              },
              "nextAction": {
                "type": "string",
                "enum": [
                  "none",
                  "open_billing_page",
                  "prepare_upgrade_or_add_on",
                  "contact_support_for_custom_plan"
                ]
              },
              "copy": {
                "type": "string",
                "minLength": 1
              },
              "silentApprovalAllowed": {
                "type": "boolean",
                "const": false
              }
            },
            "required": [
              "appBillingUrl",
              "approvalRequired",
              "nextAction",
              "copy",
              "silentApprovalAllowed"
            ],
            "additionalProperties": false
          },
          "planOptions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "variantKey": {
                  "type": "string",
                  "minLength": 1
                },
                "planKey": {
                  "type": "string",
                  "enum": [
                    "free_test",
                    "starter",
                    "growth",
                    "scale"
                  ]
                },
                "interval": {
                  "type": "string",
                  "enum": [
                    "free",
                    "monthly",
                    "annual"
                  ]
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "priceUsd": {
                  "type": "number",
                  "minimum": 0
                },
                "currencyCode": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "variantKey",
                "planKey",
                "interval",
                "name",
                "priceUsd",
                "currencyCode"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "schemaVersion",
          "platform",
          "planUsage",
          "handoff",
          "planOptions"
        ],
        "additionalProperties": false
      },
      "DiagnosticsPreviewResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "actionIntentId": {
            "type": "string",
            "minLength": 1
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1
          },
          "shareId": {
            "type": "string",
            "minLength": 1
          },
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "endpoint"
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "type",
                  "endpointId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "event"
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "eventId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "type",
                  "endpointId",
                  "eventId"
                ],
                "additionalProperties": false
              }
            ]
          },
          "manifest": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "redactionPolicyVersion": {
                "type": "string",
                "const": "flowrelay_diagnostics_redaction_v1"
              },
              "shareId": {
                "type": "string",
                "minLength": 1
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "endpoint"
                      },
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "type",
                      "endpointId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "event"
                      },
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventId": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "type",
                      "endpointId",
                      "eventId"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "store": {
                "type": "object",
                "properties": {
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "shopDomain": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "installationId",
                  "shopDomain"
                ],
                "additionalProperties": false
              },
              "appVersion": {
                "type": "string",
                "minLength": 1
              },
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "stableErrorCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "terminalOutcome": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "delivered",
                      "failed",
                      "no_workflow",
                      "duplicate_suppressed",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runbook": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "stableErrorCode": {
                        "type": "string",
                        "enum": [
                          "FLR_ENDPOINT_UNKNOWN",
                          "FLR_ENDPOINT_DELETED",
                          "FLR_AUTH_HEADER_MISSING",
                          "FLR_AUTH_FAILED",
                          "FLR_PAYLOAD_INVALID_JSON",
                          "FLR_PAYLOAD_TOO_LARGE",
                          "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                          "FLR_MAPPING_INVALID_RESOURCE_ID",
                          "FLR_NO_ENABLED_WORKFLOW",
                          "FLR_DUPLICATE_SUPPRESSED",
                          "FLR_FLOW_HANDOFF_FAILED",
                          "FLR_PLAN_LIMIT_REACHED",
                          "FLR_REPLAY_NOT_AVAILABLE",
                          "FLR_DIAGNOSTICS_UNAUTHORIZED",
                          "FLR_DIAGNOSTICS_FAILED"
                        ]
                      },
                      "slug": {
                        "type": "string",
                        "minLength": 1
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1
                      },
                      "operatorCopy": {
                        "type": "string",
                        "minLength": 1
                      },
                      "operatorSummary": {
                        "type": "string",
                        "minLength": 1
                      },
                      "likelyCause": {
                        "type": "string",
                        "minLength": 1
                      },
                      "nextAction": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "stableErrorCode",
                      "slug",
                      "title",
                      "operatorCopy",
                      "operatorSummary",
                      "likelyCause",
                      "nextAction"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "correlationId": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^flr_corr_[a-f0-9-]{36}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "endpointSnapshot": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointPublicId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceLabel": {
                    "type": "string",
                    "minLength": 1
                  },
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "hmac_sha256_header",
                          "static_header_secret"
                        ]
                      },
                      "headerName": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]+$"
                      },
                      "secretLast4": {
                        "type": "string",
                        "minLength": 4,
                        "maxLength": 4
                      }
                    },
                    "required": [
                      "mode",
                      "headerName",
                      "secretLast4"
                    ],
                    "additionalProperties": false
                  },
                  "mapping": {
                    "type": "object",
                    "properties": {
                      "defaultEventType": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventTypePath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAtPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summaryPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "requiredPayloadPaths": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "defaultEventType",
                      "eventTypePath",
                      "externalEventIdPath",
                      "occurredAtPath",
                      "summaryPath",
                      "resourceIdPath",
                      "relatedResourceIdPath",
                      "requiredPayloadPaths"
                    ],
                    "additionalProperties": false
                  },
                  "capturedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "schemaVersion",
                  "endpointId",
                  "endpointPublicId",
                  "endpointUrl",
                  "name",
                  "sourceLabel",
                  "triggerVariant",
                  "auth",
                  "mapping",
                  "capturedAt"
                ],
                "additionalProperties": false
              },
              "timeline": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "eventId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "correlationId": {
                        "type": "string",
                        "pattern": "^flr_corr_[a-f0-9-]{36}$"
                      },
                      "endpointSnapshot": {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointPublicId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceLabel": {
                            "type": "string",
                            "minLength": 1
                          },
                          "triggerVariant": {
                            "type": "string",
                            "enum": [
                              "generic",
                              "order",
                              "customer",
                              "product",
                              "inventory",
                              "fulfillment",
                              "return_refund",
                              "company_b2b"
                            ]
                          },
                          "auth": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "hmac_sha256_header",
                                  "static_header_secret"
                                ]
                              },
                              "headerName": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9-]+$"
                              },
                              "secretLast4": {
                                "type": "string",
                                "minLength": 4,
                                "maxLength": 4
                              }
                            },
                            "required": [
                              "mode",
                              "headerName",
                              "secretLast4"
                            ],
                            "additionalProperties": false
                          },
                          "mapping": {
                            "type": "object",
                            "properties": {
                              "defaultEventType": {
                                "type": "string",
                                "minLength": 1
                              },
                              "eventTypePath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalEventIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "occurredAtPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "summaryPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "relatedResourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "requiredPayloadPaths": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            "required": [
                              "defaultEventType",
                              "eventTypePath",
                              "externalEventIdPath",
                              "occurredAtPath",
                              "summaryPath",
                              "resourceIdPath",
                              "relatedResourceIdPath",
                              "requiredPayloadPaths"
                            ],
                            "additionalProperties": false
                          },
                          "capturedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "endpointId",
                          "endpointPublicId",
                          "endpointUrl",
                          "name",
                          "sourceLabel",
                          "triggerVariant",
                          "auth",
                          "mapping",
                          "capturedAt"
                        ],
                        "additionalProperties": false
                      },
                      "terminalOutcome": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "delivered",
                              "failed",
                              "no_workflow",
                              "duplicate_suppressed",
                              "rejected"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "entries": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "at": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            "step": {
                              "type": "string",
                              "enum": [
                                "received",
                                "authenticated",
                                "stored",
                                "queued",
                                "mapping",
                                "duplicate_check",
                                "readiness_check",
                                "flow_handoff",
                                "terminal",
                                "replay_started",
                                "replay_terminal",
                                "diagnostics_shared"
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "info",
                                "success",
                                "warning",
                                "error"
                              ]
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1
                            },
                            "stableErrorCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "FLR_ENDPOINT_UNKNOWN",
                                    "FLR_ENDPOINT_DELETED",
                                    "FLR_AUTH_HEADER_MISSING",
                                    "FLR_AUTH_FAILED",
                                    "FLR_PAYLOAD_INVALID_JSON",
                                    "FLR_PAYLOAD_TOO_LARGE",
                                    "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                    "FLR_MAPPING_INVALID_RESOURCE_ID",
                                    "FLR_NO_ENABLED_WORKFLOW",
                                    "FLR_DUPLICATE_SUPPRESSED",
                                    "FLR_FLOW_HANDOFF_FAILED",
                                    "FLR_PLAN_LIMIT_REACHED",
                                    "FLR_REPLAY_NOT_AVAILABLE",
                                    "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                    "FLR_DIAGNOSTICS_FAILED"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "metadata": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "at",
                            "step",
                            "status",
                            "message",
                            "stableErrorCode"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "eventId",
                      "correlationId",
                      "endpointSnapshot",
                      "terminalOutcome",
                      "stableErrorCode",
                      "entries"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reliabilityExplanation": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "eventId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "queued",
                          "processing",
                          "delivered",
                          "failed",
                          "no_workflow",
                          "duplicate_suppressed",
                          "reconciliation_pending",
                          "manual_review_required",
                          "replay_unavailable"
                        ]
                      },
                      "summary": {
                        "type": "string",
                        "minLength": 1
                      },
                      "safeNextAction": {
                        "type": "string",
                        "enum": [
                          "wait",
                          "fix_endpoint_mapping",
                          "enable_shopify_flow",
                          "preview_replay",
                          "share_diagnostics",
                          "manual_review",
                          "resend_from_source",
                          "contact_support"
                        ]
                      },
                      "operatorCopy": {
                        "type": "string",
                        "minLength": 1
                      },
                      "agentCopy": {
                        "type": "string",
                        "minLength": 1
                      },
                      "routeDecision": {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "eventId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "correlationId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "platformKey": {
                            "type": "string",
                            "const": "shopify_flow"
                          },
                          "routeKind": {
                            "type": "string",
                            "enum": [
                              "normal_event",
                              "replay"
                            ]
                          },
                          "endpointId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "triggerVariant": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "generic",
                                  "order",
                                  "customer",
                                  "product",
                                  "inventory",
                                  "fulfillment",
                                  "return_refund",
                                  "company_b2b"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "policyVersion": {
                            "type": "string",
                            "const": "shopify_flow_v1_endpoint_snapshot"
                          },
                          "decisions": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "step": {
                                  "type": "string",
                                  "enum": [
                                    "receipt_accepted",
                                    "endpoint_snapshot_selected",
                                    "mapping_evaluated",
                                    "dedupe_evaluated",
                                    "readiness_evaluated",
                                    "handoff_evaluated",
                                    "reconciliation_evaluated",
                                    "terminal_recorded"
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "accepted",
                                    "skipped",
                                    "blocked",
                                    "succeeded",
                                    "failed",
                                    "manual_review_required"
                                  ]
                                },
                                "stableErrorCode": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "FLR_ENDPOINT_UNKNOWN",
                                        "FLR_ENDPOINT_DELETED",
                                        "FLR_AUTH_HEADER_MISSING",
                                        "FLR_AUTH_FAILED",
                                        "FLR_PAYLOAD_INVALID_JSON",
                                        "FLR_PAYLOAD_TOO_LARGE",
                                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                                        "FLR_NO_ENABLED_WORKFLOW",
                                        "FLR_DUPLICATE_SUPPRESSED",
                                        "FLR_FLOW_HANDOFF_FAILED",
                                        "FLR_PLAN_LIMIT_REACHED",
                                        "FLR_REPLAY_NOT_AVAILABLE",
                                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                        "FLR_DIAGNOSTICS_FAILED"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "step",
                                "status",
                                "stableErrorCode",
                                "reason",
                                "at"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "eventId",
                          "correlationId",
                          "platformKey",
                          "routeKind",
                          "endpointId",
                          "triggerVariant",
                          "policyVersion",
                          "decisions"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "eventId",
                      "state",
                      "summary",
                      "safeNextAction",
                      "operatorCopy",
                      "agentCopy",
                      "routeDecision"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "recentEvents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "schemaVersion": {
                      "type": "number",
                      "const": 1
                    },
                    "receiptId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "eventId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "correlationId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointName": {
                      "type": "string",
                      "minLength": 1
                    },
                    "sourceLabel": {
                      "type": "string",
                      "minLength": 1
                    },
                    "receivedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "terminalOutcome": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "accepted",
                            "delivered",
                            "failed",
                            "no_workflow",
                            "duplicate_suppressed",
                            "rejected"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stableErrorCode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "FLR_ENDPOINT_UNKNOWN",
                            "FLR_ENDPOINT_DELETED",
                            "FLR_AUTH_HEADER_MISSING",
                            "FLR_AUTH_FAILED",
                            "FLR_PAYLOAD_INVALID_JSON",
                            "FLR_PAYLOAD_TOO_LARGE",
                            "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                            "FLR_MAPPING_INVALID_RESOURCE_ID",
                            "FLR_NO_ENABLED_WORKFLOW",
                            "FLR_DUPLICATE_SUPPRESSED",
                            "FLR_FLOW_HANDOFF_FAILED",
                            "FLR_PLAN_LIMIT_REACHED",
                            "FLR_REPLAY_NOT_AVAILABLE",
                            "FLR_DIAGNOSTICS_UNAUTHORIZED",
                            "FLR_DIAGNOSTICS_FAILED"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "resolvedEventType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "resolvedExternalEventId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "replay": {
                      "type": "object",
                      "properties": {
                        "eligible": {
                          "type": "boolean"
                        },
                        "rawBodyExpiresAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "copy": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "eligible",
                        "rawBodyExpiresAt",
                        "copy"
                      ],
                      "additionalProperties": false
                    },
                    "endpointConfigSummary": {
                      "type": "object",
                      "properties": {
                        "endpointId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointPublicId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "sourceLabel": {
                          "type": "string",
                          "minLength": 1
                        },
                        "triggerVariant": {
                          "type": "string",
                          "enum": [
                            "generic",
                            "order",
                            "customer",
                            "product",
                            "inventory",
                            "fulfillment",
                            "return_refund",
                            "company_b2b"
                          ]
                        },
                        "authMode": {
                          "type": "string",
                          "enum": [
                            "hmac_sha256_header",
                            "static_header_secret"
                          ]
                        },
                        "headerName": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9-]+$"
                        },
                        "secretLast4": {
                          "type": "string",
                          "minLength": 4,
                          "maxLength": 4
                        },
                        "defaultEventType": {
                          "type": "string",
                          "minLength": 1
                        },
                        "eventTypePath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "externalEventIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "occurredAtPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "summaryPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "resourceIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "relatedResourceIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "requiredPayloadPaths": {
                          "maxItems": 5,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "capturedAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "endpointId",
                        "endpointPublicId",
                        "name",
                        "sourceLabel",
                        "triggerVariant",
                        "authMode",
                        "headerName",
                        "secretLast4",
                        "defaultEventType",
                        "eventTypePath",
                        "externalEventIdPath",
                        "occurredAtPath",
                        "summaryPath",
                        "resourceIdPath",
                        "relatedResourceIdPath",
                        "requiredPayloadPaths",
                        "capturedAt"
                      ],
                      "additionalProperties": false
                    },
                    "recoveryCopy": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string",
                              "minLength": 1
                            },
                            "operatorCopy": {
                              "type": "string",
                              "minLength": 1
                            },
                            "agentCopy": {
                              "type": "string",
                              "minLength": 1
                            },
                            "replayable": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "string",
                                  "const": "not_applicable"
                                }
                              ]
                            }
                          },
                          "required": [
                            "title",
                            "operatorCopy",
                            "agentCopy",
                            "replayable"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "deliveredCopy": {
                      "type": "string",
                      "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
                    }
                  },
                  "required": [
                    "schemaVersion",
                    "receiptId",
                    "eventId",
                    "correlationId",
                    "endpointId",
                    "endpointName",
                    "sourceLabel",
                    "receivedAt",
                    "completedAt",
                    "terminalOutcome",
                    "stableErrorCode",
                    "resolvedEventType",
                    "resolvedExternalEventId",
                    "replay",
                    "endpointConfigSummary",
                    "recoveryCopy",
                    "deliveredCopy"
                  ],
                  "additionalProperties": false
                }
              },
              "replayAttempts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "schemaVersion": {
                      "type": "number",
                      "const": 1
                    },
                    "replayAttemptId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "originalEventId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "actionIntentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "correlationId": {
                      "type": "string",
                      "pattern": "^flr_corr_[a-f0-9-]{36}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "processing",
                        "delivered",
                        "failed",
                        "no_workflow",
                        "not_available"
                      ]
                    },
                    "stableErrorCode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "FLR_ENDPOINT_UNKNOWN",
                            "FLR_ENDPOINT_DELETED",
                            "FLR_AUTH_HEADER_MISSING",
                            "FLR_AUTH_FAILED",
                            "FLR_PAYLOAD_INVALID_JSON",
                            "FLR_PAYLOAD_TOO_LARGE",
                            "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                            "FLR_MAPPING_INVALID_RESOURCE_ID",
                            "FLR_NO_ENABLED_WORKFLOW",
                            "FLR_DUPLICATE_SUPPRESSED",
                            "FLR_FLOW_HANDOFF_FAILED",
                            "FLR_PLAN_LIMIT_REACHED",
                            "FLR_REPLAY_NOT_AVAILABLE",
                            "FLR_DIAGNOSTICS_UNAUTHORIZED",
                            "FLR_DIAGNOSTICS_FAILED"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "triggeredBy": {
                      "type": "object",
                      "properties": {
                        "actorType": {
                          "type": "string",
                          "enum": [
                            "shopify_user",
                            "flowrelay_support",
                            "internal_agent",
                            "merchant_authorized_agent",
                            "browser_fallback_agent"
                          ]
                        },
                        "actorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "actorEmail": {
                          "type": "string",
                          "format": "email",
                          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                        },
                        "displayName": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "actorType",
                        "actorId"
                      ],
                      "additionalProperties": false
                    },
                    "currentEndpointSnapshot": {
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        },
                        "endpointId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointPublicId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "sourceLabel": {
                          "type": "string",
                          "minLength": 1
                        },
                        "triggerVariant": {
                          "type": "string",
                          "enum": [
                            "generic",
                            "order",
                            "customer",
                            "product",
                            "inventory",
                            "fulfillment",
                            "return_refund",
                            "company_b2b"
                          ]
                        },
                        "auth": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "hmac_sha256_header",
                                "static_header_secret"
                              ]
                            },
                            "headerName": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9-]+$"
                            },
                            "secretLast4": {
                              "type": "string",
                              "minLength": 4,
                              "maxLength": 4
                            }
                          },
                          "required": [
                            "mode",
                            "headerName",
                            "secretLast4"
                          ],
                          "additionalProperties": false
                        },
                        "mapping": {
                          "type": "object",
                          "properties": {
                            "defaultEventType": {
                              "type": "string",
                              "minLength": 1
                            },
                            "eventTypePath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalEventIdPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "occurredAtPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "summaryPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "resourceIdPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "relatedResourceIdPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "requiredPayloadPaths": {
                              "maxItems": 5,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          "required": [
                            "defaultEventType",
                            "eventTypePath",
                            "externalEventIdPath",
                            "occurredAtPath",
                            "summaryPath",
                            "resourceIdPath",
                            "relatedResourceIdPath",
                            "requiredPayloadPaths"
                          ],
                          "additionalProperties": false
                        },
                        "capturedAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "endpointId",
                        "endpointPublicId",
                        "endpointUrl",
                        "name",
                        "sourceLabel",
                        "triggerVariant",
                        "auth",
                        "mapping",
                        "capturedAt"
                      ],
                      "additionalProperties": false
                    },
                    "currentTriggerAvailability": {
                      "type": "object",
                      "properties": {
                        "triggerVariant": {
                          "type": "string",
                          "enum": [
                            "generic",
                            "order",
                            "customer",
                            "product",
                            "inventory",
                            "fulfillment",
                            "return_refund",
                            "company_b2b"
                          ]
                        },
                        "hasEnabledFlow": {
                          "type": "boolean"
                        },
                        "lastCallbackAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "triggerVariant",
                        "hasEnabledFlow",
                        "lastCallbackAt"
                      ],
                      "additionalProperties": false
                    },
                    "startedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "schemaVersion",
                    "replayAttemptId",
                    "originalEventId",
                    "endpointId",
                    "actionIntentId",
                    "correlationId",
                    "status",
                    "stableErrorCode",
                    "triggeredBy",
                    "currentEndpointSnapshot",
                    "currentTriggerAvailability",
                    "startedAt",
                    "completedAt"
                  ],
                  "additionalProperties": false
                }
              },
              "redactedHeaders": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "mappingResults": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "replayEligibility": {
                "type": "object",
                "properties": {
                  "replayable": {
                    "type": "boolean"
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "replayable",
                  "reason"
                ],
                "additionalProperties": false
              },
              "includeMaskedPayloadSample": {
                "type": "boolean"
              },
              "maskedPayloadSample": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 16384
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "issueDescription": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdBy": {
                "type": "object",
                "properties": {
                  "actorType": {
                    "type": "string",
                    "enum": [
                      "shopify_user",
                      "flowrelay_support",
                      "internal_agent",
                      "merchant_authorized_agent",
                      "browser_fallback_agent"
                    ]
                  },
                  "actorId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "actorEmail": {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "displayName": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "actorType",
                  "actorId"
                ],
                "additionalProperties": false
              },
              "actionIntent": {
                "type": "object",
                "properties": {
                  "actionIntentId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientKind": {
                    "type": "string",
                    "enum": [
                      "human_ui",
                      "agent_api",
                      "mcp_facade",
                      "browser_fallback",
                      "internal_tool"
                    ]
                  },
                  "approvalState": {
                    "type": "string",
                    "enum": [
                      "proposed",
                      "executed"
                    ]
                  }
                },
                "required": [
                  "actionIntentId",
                  "clientKind",
                  "approvalState"
                ],
                "additionalProperties": false
              },
              "supportSummaryText": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "schemaVersion",
              "redactionPolicyVersion",
              "shareId",
              "createdAt",
              "expiresAt",
              "scope",
              "store",
              "appVersion",
              "triggerVariant",
              "stableErrorCode",
              "terminalOutcome",
              "runbook",
              "correlationId",
              "endpointSnapshot",
              "timeline",
              "reliabilityExplanation",
              "recentEvents",
              "replayAttempts",
              "redactedHeaders",
              "mappingResults",
              "replayEligibility",
              "includeMaskedPayloadSample",
              "maskedPayloadSample",
              "issueDescription",
              "createdBy",
              "actionIntent",
              "supportSummaryText"
            ],
            "additionalProperties": false
          },
          "factsIncluded": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "payloadSampleEligibility": {
            "type": "object",
            "properties": {
              "eligible": {
                "type": "boolean"
              },
              "reason": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "eligible",
              "reason"
            ],
            "additionalProperties": false
          },
          "requiresExplicitConfirmation": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "schemaVersion",
          "actionIntentId",
          "idempotencyKey",
          "shareId",
          "scope",
          "manifest",
          "factsIncluded",
          "payloadSampleEligibility",
          "requiresExplicitConfirmation"
        ],
        "additionalProperties": false
      },
      "DiagnosticsManifest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "redactionPolicyVersion": {
            "type": "string",
            "const": "flowrelay_diagnostics_redaction_v1"
          },
          "shareId": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "endpoint"
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "type",
                  "endpointId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "event"
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "eventId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "type",
                  "endpointId",
                  "eventId"
                ],
                "additionalProperties": false
              }
            ]
          },
          "store": {
            "type": "object",
            "properties": {
              "installationId": {
                "type": "string",
                "minLength": 1
              },
              "shopDomain": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "installationId",
              "shopDomain"
            ],
            "additionalProperties": false
          },
          "appVersion": {
            "type": "string",
            "minLength": 1
          },
          "triggerVariant": {
            "type": "string",
            "enum": [
              "generic",
              "order",
              "customer",
              "product",
              "inventory",
              "fulfillment",
              "return_refund",
              "company_b2b"
            ]
          },
          "stableErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "FLR_ENDPOINT_UNKNOWN",
                  "FLR_ENDPOINT_DELETED",
                  "FLR_AUTH_HEADER_MISSING",
                  "FLR_AUTH_FAILED",
                  "FLR_PAYLOAD_INVALID_JSON",
                  "FLR_PAYLOAD_TOO_LARGE",
                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                  "FLR_NO_ENABLED_WORKFLOW",
                  "FLR_DUPLICATE_SUPPRESSED",
                  "FLR_FLOW_HANDOFF_FAILED",
                  "FLR_PLAN_LIMIT_REACHED",
                  "FLR_REPLAY_NOT_AVAILABLE",
                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                  "FLR_DIAGNOSTICS_FAILED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "terminalOutcome": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "accepted",
                  "delivered",
                  "failed",
                  "no_workflow",
                  "duplicate_suppressed",
                  "rejected"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "runbook": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "stableErrorCode": {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1
                  },
                  "operatorCopy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "operatorSummary": {
                    "type": "string",
                    "minLength": 1
                  },
                  "likelyCause": {
                    "type": "string",
                    "minLength": 1
                  },
                  "nextAction": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "stableErrorCode",
                  "slug",
                  "title",
                  "operatorCopy",
                  "operatorSummary",
                  "likelyCause",
                  "nextAction"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "correlationId": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^flr_corr_[a-f0-9-]{36}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "endpointSnapshot": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "endpointId": {
                "type": "string",
                "minLength": 1
              },
              "endpointPublicId": {
                "type": "string",
                "minLength": 1
              },
              "endpointUrl": {
                "type": "string",
                "format": "uri"
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "sourceLabel": {
                "type": "string",
                "minLength": 1
              },
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "auth": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "hmac_sha256_header",
                      "static_header_secret"
                    ]
                  },
                  "headerName": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9-]+$"
                  },
                  "secretLast4": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 4
                  }
                },
                "required": [
                  "mode",
                  "headerName",
                  "secretLast4"
                ],
                "additionalProperties": false
              },
              "mapping": {
                "type": "object",
                "properties": {
                  "defaultEventType": {
                    "type": "string",
                    "minLength": 1
                  },
                  "eventTypePath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalEventIdPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "occurredAtPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "summaryPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "resourceIdPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "relatedResourceIdPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requiredPayloadPaths": {
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "defaultEventType",
                  "eventTypePath",
                  "externalEventIdPath",
                  "occurredAtPath",
                  "summaryPath",
                  "resourceIdPath",
                  "relatedResourceIdPath",
                  "requiredPayloadPaths"
                ],
                "additionalProperties": false
              },
              "capturedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "schemaVersion",
              "endpointId",
              "endpointPublicId",
              "endpointUrl",
              "name",
              "sourceLabel",
              "triggerVariant",
              "auth",
              "mapping",
              "capturedAt"
            ],
            "additionalProperties": false
          },
          "timeline": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "eventId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "correlationId": {
                    "type": "string",
                    "pattern": "^flr_corr_[a-f0-9-]{36}$"
                  },
                  "endpointSnapshot": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "endpointPublicId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "endpointUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "sourceLabel": {
                        "type": "string",
                        "minLength": 1
                      },
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "auth": {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "hmac_sha256_header",
                              "static_header_secret"
                            ]
                          },
                          "headerName": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9-]+$"
                          },
                          "secretLast4": {
                            "type": "string",
                            "minLength": 4,
                            "maxLength": 4
                          }
                        },
                        "required": [
                          "mode",
                          "headerName",
                          "secretLast4"
                        ],
                        "additionalProperties": false
                      },
                      "mapping": {
                        "type": "object",
                        "properties": {
                          "defaultEventType": {
                            "type": "string",
                            "minLength": 1
                          },
                          "eventTypePath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "externalEventIdPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "occurredAtPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "summaryPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resourceIdPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "relatedResourceIdPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "requiredPayloadPaths": {
                            "maxItems": 5,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        },
                        "required": [
                          "defaultEventType",
                          "eventTypePath",
                          "externalEventIdPath",
                          "occurredAtPath",
                          "summaryPath",
                          "resourceIdPath",
                          "relatedResourceIdPath",
                          "requiredPayloadPaths"
                        ],
                        "additionalProperties": false
                      },
                      "capturedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "endpointId",
                      "endpointPublicId",
                      "endpointUrl",
                      "name",
                      "sourceLabel",
                      "triggerVariant",
                      "auth",
                      "mapping",
                      "capturedAt"
                    ],
                    "additionalProperties": false
                  },
                  "terminalOutcome": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "accepted",
                          "delivered",
                          "failed",
                          "no_workflow",
                          "duplicate_suppressed",
                          "rejected"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stableErrorCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "FLR_ENDPOINT_UNKNOWN",
                          "FLR_ENDPOINT_DELETED",
                          "FLR_AUTH_HEADER_MISSING",
                          "FLR_AUTH_FAILED",
                          "FLR_PAYLOAD_INVALID_JSON",
                          "FLR_PAYLOAD_TOO_LARGE",
                          "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                          "FLR_MAPPING_INVALID_RESOURCE_ID",
                          "FLR_NO_ENABLED_WORKFLOW",
                          "FLR_DUPLICATE_SUPPRESSED",
                          "FLR_FLOW_HANDOFF_FAILED",
                          "FLR_PLAN_LIMIT_REACHED",
                          "FLR_REPLAY_NOT_AVAILABLE",
                          "FLR_DIAGNOSTICS_UNAUTHORIZED",
                          "FLR_DIAGNOSTICS_FAILED"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "entries": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        "step": {
                          "type": "string",
                          "enum": [
                            "received",
                            "authenticated",
                            "stored",
                            "queued",
                            "mapping",
                            "duplicate_check",
                            "readiness_check",
                            "flow_handoff",
                            "terminal",
                            "replay_started",
                            "replay_terminal",
                            "diagnostics_shared"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "info",
                            "success",
                            "warning",
                            "error"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "stableErrorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "FLR_ENDPOINT_UNKNOWN",
                                "FLR_ENDPOINT_DELETED",
                                "FLR_AUTH_HEADER_MISSING",
                                "FLR_AUTH_FAILED",
                                "FLR_PAYLOAD_INVALID_JSON",
                                "FLR_PAYLOAD_TOO_LARGE",
                                "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                "FLR_MAPPING_INVALID_RESOURCE_ID",
                                "FLR_NO_ENABLED_WORKFLOW",
                                "FLR_DUPLICATE_SUPPRESSED",
                                "FLR_FLOW_HANDOFF_FAILED",
                                "FLR_PLAN_LIMIT_REACHED",
                                "FLR_REPLAY_NOT_AVAILABLE",
                                "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                "FLR_DIAGNOSTICS_FAILED"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metadata": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "at",
                        "step",
                        "status",
                        "message",
                        "stableErrorCode"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "schemaVersion",
                  "eventId",
                  "correlationId",
                  "endpointSnapshot",
                  "terminalOutcome",
                  "stableErrorCode",
                  "entries"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "reliabilityExplanation": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "eventId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "processing",
                      "delivered",
                      "failed",
                      "no_workflow",
                      "duplicate_suppressed",
                      "reconciliation_pending",
                      "manual_review_required",
                      "replay_unavailable"
                    ]
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 1
                  },
                  "safeNextAction": {
                    "type": "string",
                    "enum": [
                      "wait",
                      "fix_endpoint_mapping",
                      "enable_shopify_flow",
                      "preview_replay",
                      "share_diagnostics",
                      "manual_review",
                      "resend_from_source",
                      "contact_support"
                    ]
                  },
                  "operatorCopy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "agentCopy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "routeDecision": {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "eventId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "correlationId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "platformKey": {
                        "type": "string",
                        "const": "shopify_flow"
                      },
                      "routeKind": {
                        "type": "string",
                        "enum": [
                          "normal_event",
                          "replay"
                        ]
                      },
                      "endpointId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "triggerVariant": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "generic",
                              "order",
                              "customer",
                              "product",
                              "inventory",
                              "fulfillment",
                              "return_refund",
                              "company_b2b"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "policyVersion": {
                        "type": "string",
                        "const": "shopify_flow_v1_endpoint_snapshot"
                      },
                      "decisions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "step": {
                              "type": "string",
                              "enum": [
                                "receipt_accepted",
                                "endpoint_snapshot_selected",
                                "mapping_evaluated",
                                "dedupe_evaluated",
                                "readiness_evaluated",
                                "handoff_evaluated",
                                "reconciliation_evaluated",
                                "terminal_recorded"
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "accepted",
                                "skipped",
                                "blocked",
                                "succeeded",
                                "failed",
                                "manual_review_required"
                              ]
                            },
                            "stableErrorCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "FLR_ENDPOINT_UNKNOWN",
                                    "FLR_ENDPOINT_DELETED",
                                    "FLR_AUTH_HEADER_MISSING",
                                    "FLR_AUTH_FAILED",
                                    "FLR_PAYLOAD_INVALID_JSON",
                                    "FLR_PAYLOAD_TOO_LARGE",
                                    "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                    "FLR_MAPPING_INVALID_RESOURCE_ID",
                                    "FLR_NO_ENABLED_WORKFLOW",
                                    "FLR_DUPLICATE_SUPPRESSED",
                                    "FLR_FLOW_HANDOFF_FAILED",
                                    "FLR_PLAN_LIMIT_REACHED",
                                    "FLR_REPLAY_NOT_AVAILABLE",
                                    "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                    "FLR_DIAGNOSTICS_FAILED"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reason": {
                              "type": "string",
                              "minLength": 1
                            },
                            "at": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            }
                          },
                          "required": [
                            "step",
                            "status",
                            "stableErrorCode",
                            "reason",
                            "at"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "eventId",
                      "correlationId",
                      "platformKey",
                      "routeKind",
                      "endpointId",
                      "triggerVariant",
                      "policyVersion",
                      "decisions"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "schemaVersion",
                  "eventId",
                  "state",
                  "summary",
                  "safeNextAction",
                  "operatorCopy",
                  "agentCopy",
                  "routeDecision"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "recentEvents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "receiptId": {
                  "type": "string",
                  "minLength": 1
                },
                "eventId": {
                  "type": "string",
                  "minLength": 1
                },
                "correlationId": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointId": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointName": {
                  "type": "string",
                  "minLength": 1
                },
                "sourceLabel": {
                  "type": "string",
                  "minLength": 1
                },
                "receivedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "completedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "terminalOutcome": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "delivered",
                        "failed",
                        "no_workflow",
                        "duplicate_suppressed",
                        "rejected"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "stableErrorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FLR_ENDPOINT_UNKNOWN",
                        "FLR_ENDPOINT_DELETED",
                        "FLR_AUTH_HEADER_MISSING",
                        "FLR_AUTH_FAILED",
                        "FLR_PAYLOAD_INVALID_JSON",
                        "FLR_PAYLOAD_TOO_LARGE",
                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                        "FLR_NO_ENABLED_WORKFLOW",
                        "FLR_DUPLICATE_SUPPRESSED",
                        "FLR_FLOW_HANDOFF_FAILED",
                        "FLR_PLAN_LIMIT_REACHED",
                        "FLR_REPLAY_NOT_AVAILABLE",
                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                        "FLR_DIAGNOSTICS_FAILED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedEventType": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedExternalEventId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "replay": {
                  "type": "object",
                  "properties": {
                    "eligible": {
                      "type": "boolean"
                    },
                    "rawBodyExpiresAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "copy": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "eligible",
                    "rawBodyExpiresAt",
                    "copy"
                  ],
                  "additionalProperties": false
                },
                "endpointConfigSummary": {
                  "type": "object",
                  "properties": {
                    "endpointId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointPublicId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "sourceLabel": {
                      "type": "string",
                      "minLength": 1
                    },
                    "triggerVariant": {
                      "type": "string",
                      "enum": [
                        "generic",
                        "order",
                        "customer",
                        "product",
                        "inventory",
                        "fulfillment",
                        "return_refund",
                        "company_b2b"
                      ]
                    },
                    "authMode": {
                      "type": "string",
                      "enum": [
                        "hmac_sha256_header",
                        "static_header_secret"
                      ]
                    },
                    "headerName": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9-]+$"
                    },
                    "secretLast4": {
                      "type": "string",
                      "minLength": 4,
                      "maxLength": 4
                    },
                    "defaultEventType": {
                      "type": "string",
                      "minLength": 1
                    },
                    "eventTypePath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalEventIdPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "occurredAtPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "summaryPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "resourceIdPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "relatedResourceIdPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "requiredPayloadPaths": {
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "capturedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "endpointId",
                    "endpointPublicId",
                    "name",
                    "sourceLabel",
                    "triggerVariant",
                    "authMode",
                    "headerName",
                    "secretLast4",
                    "defaultEventType",
                    "eventTypePath",
                    "externalEventIdPath",
                    "occurredAtPath",
                    "summaryPath",
                    "resourceIdPath",
                    "relatedResourceIdPath",
                    "requiredPayloadPaths",
                    "capturedAt"
                  ],
                  "additionalProperties": false
                },
                "recoveryCopy": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "operatorCopy": {
                          "type": "string",
                          "minLength": 1
                        },
                        "agentCopy": {
                          "type": "string",
                          "minLength": 1
                        },
                        "replayable": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "const": "not_applicable"
                            }
                          ]
                        }
                      },
                      "required": [
                        "title",
                        "operatorCopy",
                        "agentCopy",
                        "replayable"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "deliveredCopy": {
                  "type": "string",
                  "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
                }
              },
              "required": [
                "schemaVersion",
                "receiptId",
                "eventId",
                "correlationId",
                "endpointId",
                "endpointName",
                "sourceLabel",
                "receivedAt",
                "completedAt",
                "terminalOutcome",
                "stableErrorCode",
                "resolvedEventType",
                "resolvedExternalEventId",
                "replay",
                "endpointConfigSummary",
                "recoveryCopy",
                "deliveredCopy"
              ],
              "additionalProperties": false
            }
          },
          "replayAttempts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "replayAttemptId": {
                  "type": "string",
                  "minLength": 1
                },
                "originalEventId": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointId": {
                  "type": "string",
                  "minLength": 1
                },
                "actionIntentId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "correlationId": {
                  "type": "string",
                  "pattern": "^flr_corr_[a-f0-9-]{36}$"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "processing",
                    "delivered",
                    "failed",
                    "no_workflow",
                    "not_available"
                  ]
                },
                "stableErrorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FLR_ENDPOINT_UNKNOWN",
                        "FLR_ENDPOINT_DELETED",
                        "FLR_AUTH_HEADER_MISSING",
                        "FLR_AUTH_FAILED",
                        "FLR_PAYLOAD_INVALID_JSON",
                        "FLR_PAYLOAD_TOO_LARGE",
                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                        "FLR_NO_ENABLED_WORKFLOW",
                        "FLR_DUPLICATE_SUPPRESSED",
                        "FLR_FLOW_HANDOFF_FAILED",
                        "FLR_PLAN_LIMIT_REACHED",
                        "FLR_REPLAY_NOT_AVAILABLE",
                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                        "FLR_DIAGNOSTICS_FAILED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "triggeredBy": {
                  "type": "object",
                  "properties": {
                    "actorType": {
                      "type": "string",
                      "enum": [
                        "shopify_user",
                        "flowrelay_support",
                        "internal_agent",
                        "merchant_authorized_agent",
                        "browser_fallback_agent"
                      ]
                    },
                    "actorId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "actorEmail": {
                      "type": "string",
                      "format": "email",
                      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                    },
                    "displayName": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "actorType",
                    "actorId"
                  ],
                  "additionalProperties": false
                },
                "currentEndpointSnapshot": {
                  "type": "object",
                  "properties": {
                    "schemaVersion": {
                      "type": "number",
                      "const": 1
                    },
                    "endpointId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointPublicId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "sourceLabel": {
                      "type": "string",
                      "minLength": 1
                    },
                    "triggerVariant": {
                      "type": "string",
                      "enum": [
                        "generic",
                        "order",
                        "customer",
                        "product",
                        "inventory",
                        "fulfillment",
                        "return_refund",
                        "company_b2b"
                      ]
                    },
                    "auth": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hmac_sha256_header",
                            "static_header_secret"
                          ]
                        },
                        "headerName": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9-]+$"
                        },
                        "secretLast4": {
                          "type": "string",
                          "minLength": 4,
                          "maxLength": 4
                        }
                      },
                      "required": [
                        "mode",
                        "headerName",
                        "secretLast4"
                      ],
                      "additionalProperties": false
                    },
                    "mapping": {
                      "type": "object",
                      "properties": {
                        "defaultEventType": {
                          "type": "string",
                          "minLength": 1
                        },
                        "eventTypePath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "externalEventIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "occurredAtPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "summaryPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "resourceIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "relatedResourceIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "requiredPayloadPaths": {
                          "maxItems": 5,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "required": [
                        "defaultEventType",
                        "eventTypePath",
                        "externalEventIdPath",
                        "occurredAtPath",
                        "summaryPath",
                        "resourceIdPath",
                        "relatedResourceIdPath",
                        "requiredPayloadPaths"
                      ],
                      "additionalProperties": false
                    },
                    "capturedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "schemaVersion",
                    "endpointId",
                    "endpointPublicId",
                    "endpointUrl",
                    "name",
                    "sourceLabel",
                    "triggerVariant",
                    "auth",
                    "mapping",
                    "capturedAt"
                  ],
                  "additionalProperties": false
                },
                "currentTriggerAvailability": {
                  "type": "object",
                  "properties": {
                    "triggerVariant": {
                      "type": "string",
                      "enum": [
                        "generic",
                        "order",
                        "customer",
                        "product",
                        "inventory",
                        "fulfillment",
                        "return_refund",
                        "company_b2b"
                      ]
                    },
                    "hasEnabledFlow": {
                      "type": "boolean"
                    },
                    "lastCallbackAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "triggerVariant",
                    "hasEnabledFlow",
                    "lastCallbackAt"
                  ],
                  "additionalProperties": false
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "completedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "schemaVersion",
                "replayAttemptId",
                "originalEventId",
                "endpointId",
                "actionIntentId",
                "correlationId",
                "status",
                "stableErrorCode",
                "triggeredBy",
                "currentEndpointSnapshot",
                "currentTriggerAvailability",
                "startedAt",
                "completedAt"
              ],
              "additionalProperties": false
            }
          },
          "redactedHeaders": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "mappingResults": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "replayEligibility": {
            "type": "object",
            "properties": {
              "replayable": {
                "type": "boolean"
              },
              "reason": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "replayable",
              "reason"
            ],
            "additionalProperties": false
          },
          "includeMaskedPayloadSample": {
            "type": "boolean"
          },
          "maskedPayloadSample": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 16384
              },
              {
                "type": "null"
              }
            ]
          },
          "issueDescription": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "actorType": {
                "type": "string",
                "enum": [
                  "shopify_user",
                  "flowrelay_support",
                  "internal_agent",
                  "merchant_authorized_agent",
                  "browser_fallback_agent"
                ]
              },
              "actorId": {
                "type": "string",
                "minLength": 1
              },
              "actorEmail": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              "displayName": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "actorType",
              "actorId"
            ],
            "additionalProperties": false
          },
          "actionIntent": {
            "type": "object",
            "properties": {
              "actionIntentId": {
                "type": "string",
                "minLength": 1
              },
              "clientKind": {
                "type": "string",
                "enum": [
                  "human_ui",
                  "agent_api",
                  "mcp_facade",
                  "browser_fallback",
                  "internal_tool"
                ]
              },
              "approvalState": {
                "type": "string",
                "enum": [
                  "proposed",
                  "executed"
                ]
              }
            },
            "required": [
              "actionIntentId",
              "clientKind",
              "approvalState"
            ],
            "additionalProperties": false
          },
          "supportSummaryText": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "schemaVersion",
          "redactionPolicyVersion",
          "shareId",
          "createdAt",
          "expiresAt",
          "scope",
          "store",
          "appVersion",
          "triggerVariant",
          "stableErrorCode",
          "terminalOutcome",
          "runbook",
          "correlationId",
          "endpointSnapshot",
          "timeline",
          "reliabilityExplanation",
          "recentEvents",
          "replayAttempts",
          "redactedHeaders",
          "mappingResults",
          "replayEligibility",
          "includeMaskedPayloadSample",
          "maskedPayloadSample",
          "issueDescription",
          "createdBy",
          "actionIntent",
          "supportSummaryText"
        ],
        "additionalProperties": false
      },
      "DiagnosticsShareResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "actionIntentId": {
            "type": "string",
            "minLength": 1
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1
          },
          "share": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "shareId": {
                "type": "string",
                "minLength": 1
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "endpoint"
                      },
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "type",
                      "endpointId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "event"
                      },
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventId": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "type",
                      "endpointId",
                      "eventId"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "stableErrorCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "includeMaskedPayloadSample": {
                "type": "boolean"
              },
              "summaryText": {
                "type": "string",
                "minLength": 1
              },
              "createdByEmail": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "schemaVersion",
              "shareId",
              "scope",
              "stableErrorCode",
              "includeMaskedPayloadSample",
              "summaryText",
              "createdByEmail",
              "createdAt"
            ],
            "additionalProperties": false
          },
          "manifest": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "redactionPolicyVersion": {
                "type": "string",
                "const": "flowrelay_diagnostics_redaction_v1"
              },
              "shareId": {
                "type": "string",
                "minLength": 1
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "endpoint"
                      },
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "type",
                      "endpointId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "event"
                      },
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventId": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "type",
                      "endpointId",
                      "eventId"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "store": {
                "type": "object",
                "properties": {
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "shopDomain": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "installationId",
                  "shopDomain"
                ],
                "additionalProperties": false
              },
              "appVersion": {
                "type": "string",
                "minLength": 1
              },
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "stableErrorCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "terminalOutcome": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "delivered",
                      "failed",
                      "no_workflow",
                      "duplicate_suppressed",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runbook": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "stableErrorCode": {
                        "type": "string",
                        "enum": [
                          "FLR_ENDPOINT_UNKNOWN",
                          "FLR_ENDPOINT_DELETED",
                          "FLR_AUTH_HEADER_MISSING",
                          "FLR_AUTH_FAILED",
                          "FLR_PAYLOAD_INVALID_JSON",
                          "FLR_PAYLOAD_TOO_LARGE",
                          "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                          "FLR_MAPPING_INVALID_RESOURCE_ID",
                          "FLR_NO_ENABLED_WORKFLOW",
                          "FLR_DUPLICATE_SUPPRESSED",
                          "FLR_FLOW_HANDOFF_FAILED",
                          "FLR_PLAN_LIMIT_REACHED",
                          "FLR_REPLAY_NOT_AVAILABLE",
                          "FLR_DIAGNOSTICS_UNAUTHORIZED",
                          "FLR_DIAGNOSTICS_FAILED"
                        ]
                      },
                      "slug": {
                        "type": "string",
                        "minLength": 1
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1
                      },
                      "operatorCopy": {
                        "type": "string",
                        "minLength": 1
                      },
                      "operatorSummary": {
                        "type": "string",
                        "minLength": 1
                      },
                      "likelyCause": {
                        "type": "string",
                        "minLength": 1
                      },
                      "nextAction": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "stableErrorCode",
                      "slug",
                      "title",
                      "operatorCopy",
                      "operatorSummary",
                      "likelyCause",
                      "nextAction"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "correlationId": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^flr_corr_[a-f0-9-]{36}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "endpointSnapshot": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointPublicId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceLabel": {
                    "type": "string",
                    "minLength": 1
                  },
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "hmac_sha256_header",
                          "static_header_secret"
                        ]
                      },
                      "headerName": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]+$"
                      },
                      "secretLast4": {
                        "type": "string",
                        "minLength": 4,
                        "maxLength": 4
                      }
                    },
                    "required": [
                      "mode",
                      "headerName",
                      "secretLast4"
                    ],
                    "additionalProperties": false
                  },
                  "mapping": {
                    "type": "object",
                    "properties": {
                      "defaultEventType": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventTypePath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAtPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summaryPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "requiredPayloadPaths": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "defaultEventType",
                      "eventTypePath",
                      "externalEventIdPath",
                      "occurredAtPath",
                      "summaryPath",
                      "resourceIdPath",
                      "relatedResourceIdPath",
                      "requiredPayloadPaths"
                    ],
                    "additionalProperties": false
                  },
                  "capturedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "schemaVersion",
                  "endpointId",
                  "endpointPublicId",
                  "endpointUrl",
                  "name",
                  "sourceLabel",
                  "triggerVariant",
                  "auth",
                  "mapping",
                  "capturedAt"
                ],
                "additionalProperties": false
              },
              "timeline": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "eventId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "correlationId": {
                        "type": "string",
                        "pattern": "^flr_corr_[a-f0-9-]{36}$"
                      },
                      "endpointSnapshot": {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointPublicId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "endpointUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sourceLabel": {
                            "type": "string",
                            "minLength": 1
                          },
                          "triggerVariant": {
                            "type": "string",
                            "enum": [
                              "generic",
                              "order",
                              "customer",
                              "product",
                              "inventory",
                              "fulfillment",
                              "return_refund",
                              "company_b2b"
                            ]
                          },
                          "auth": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "hmac_sha256_header",
                                  "static_header_secret"
                                ]
                              },
                              "headerName": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9-]+$"
                              },
                              "secretLast4": {
                                "type": "string",
                                "minLength": 4,
                                "maxLength": 4
                              }
                            },
                            "required": [
                              "mode",
                              "headerName",
                              "secretLast4"
                            ],
                            "additionalProperties": false
                          },
                          "mapping": {
                            "type": "object",
                            "properties": {
                              "defaultEventType": {
                                "type": "string",
                                "minLength": 1
                              },
                              "eventTypePath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "externalEventIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "occurredAtPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "summaryPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "relatedResourceIdPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "requiredPayloadPaths": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            },
                            "required": [
                              "defaultEventType",
                              "eventTypePath",
                              "externalEventIdPath",
                              "occurredAtPath",
                              "summaryPath",
                              "resourceIdPath",
                              "relatedResourceIdPath",
                              "requiredPayloadPaths"
                            ],
                            "additionalProperties": false
                          },
                          "capturedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "endpointId",
                          "endpointPublicId",
                          "endpointUrl",
                          "name",
                          "sourceLabel",
                          "triggerVariant",
                          "auth",
                          "mapping",
                          "capturedAt"
                        ],
                        "additionalProperties": false
                      },
                      "terminalOutcome": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "delivered",
                              "failed",
                              "no_workflow",
                              "duplicate_suppressed",
                              "rejected"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "entries": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "at": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            "step": {
                              "type": "string",
                              "enum": [
                                "received",
                                "authenticated",
                                "stored",
                                "queued",
                                "mapping",
                                "duplicate_check",
                                "readiness_check",
                                "flow_handoff",
                                "terminal",
                                "replay_started",
                                "replay_terminal",
                                "diagnostics_shared"
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "info",
                                "success",
                                "warning",
                                "error"
                              ]
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1
                            },
                            "stableErrorCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "FLR_ENDPOINT_UNKNOWN",
                                    "FLR_ENDPOINT_DELETED",
                                    "FLR_AUTH_HEADER_MISSING",
                                    "FLR_AUTH_FAILED",
                                    "FLR_PAYLOAD_INVALID_JSON",
                                    "FLR_PAYLOAD_TOO_LARGE",
                                    "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                    "FLR_MAPPING_INVALID_RESOURCE_ID",
                                    "FLR_NO_ENABLED_WORKFLOW",
                                    "FLR_DUPLICATE_SUPPRESSED",
                                    "FLR_FLOW_HANDOFF_FAILED",
                                    "FLR_PLAN_LIMIT_REACHED",
                                    "FLR_REPLAY_NOT_AVAILABLE",
                                    "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                    "FLR_DIAGNOSTICS_FAILED"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "metadata": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "at",
                            "step",
                            "status",
                            "message",
                            "stableErrorCode"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "eventId",
                      "correlationId",
                      "endpointSnapshot",
                      "terminalOutcome",
                      "stableErrorCode",
                      "entries"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reliabilityExplanation": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "eventId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "queued",
                          "processing",
                          "delivered",
                          "failed",
                          "no_workflow",
                          "duplicate_suppressed",
                          "reconciliation_pending",
                          "manual_review_required",
                          "replay_unavailable"
                        ]
                      },
                      "summary": {
                        "type": "string",
                        "minLength": 1
                      },
                      "safeNextAction": {
                        "type": "string",
                        "enum": [
                          "wait",
                          "fix_endpoint_mapping",
                          "enable_shopify_flow",
                          "preview_replay",
                          "share_diagnostics",
                          "manual_review",
                          "resend_from_source",
                          "contact_support"
                        ]
                      },
                      "operatorCopy": {
                        "type": "string",
                        "minLength": 1
                      },
                      "agentCopy": {
                        "type": "string",
                        "minLength": 1
                      },
                      "routeDecision": {
                        "type": "object",
                        "properties": {
                          "schemaVersion": {
                            "type": "number",
                            "const": 1
                          },
                          "eventId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "correlationId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "platformKey": {
                            "type": "string",
                            "const": "shopify_flow"
                          },
                          "routeKind": {
                            "type": "string",
                            "enum": [
                              "normal_event",
                              "replay"
                            ]
                          },
                          "endpointId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "triggerVariant": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "generic",
                                  "order",
                                  "customer",
                                  "product",
                                  "inventory",
                                  "fulfillment",
                                  "return_refund",
                                  "company_b2b"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "policyVersion": {
                            "type": "string",
                            "const": "shopify_flow_v1_endpoint_snapshot"
                          },
                          "decisions": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "step": {
                                  "type": "string",
                                  "enum": [
                                    "receipt_accepted",
                                    "endpoint_snapshot_selected",
                                    "mapping_evaluated",
                                    "dedupe_evaluated",
                                    "readiness_evaluated",
                                    "handoff_evaluated",
                                    "reconciliation_evaluated",
                                    "terminal_recorded"
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "accepted",
                                    "skipped",
                                    "blocked",
                                    "succeeded",
                                    "failed",
                                    "manual_review_required"
                                  ]
                                },
                                "stableErrorCode": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "FLR_ENDPOINT_UNKNOWN",
                                        "FLR_ENDPOINT_DELETED",
                                        "FLR_AUTH_HEADER_MISSING",
                                        "FLR_AUTH_FAILED",
                                        "FLR_PAYLOAD_INVALID_JSON",
                                        "FLR_PAYLOAD_TOO_LARGE",
                                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                                        "FLR_NO_ENABLED_WORKFLOW",
                                        "FLR_DUPLICATE_SUPPRESSED",
                                        "FLR_FLOW_HANDOFF_FAILED",
                                        "FLR_PLAN_LIMIT_REACHED",
                                        "FLR_REPLAY_NOT_AVAILABLE",
                                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                        "FLR_DIAGNOSTICS_FAILED"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                }
                              },
                              "required": [
                                "step",
                                "status",
                                "stableErrorCode",
                                "reason",
                                "at"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "schemaVersion",
                          "eventId",
                          "correlationId",
                          "platformKey",
                          "routeKind",
                          "endpointId",
                          "triggerVariant",
                          "policyVersion",
                          "decisions"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "eventId",
                      "state",
                      "summary",
                      "safeNextAction",
                      "operatorCopy",
                      "agentCopy",
                      "routeDecision"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "recentEvents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "schemaVersion": {
                      "type": "number",
                      "const": 1
                    },
                    "receiptId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "eventId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "correlationId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointName": {
                      "type": "string",
                      "minLength": 1
                    },
                    "sourceLabel": {
                      "type": "string",
                      "minLength": 1
                    },
                    "receivedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "terminalOutcome": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "accepted",
                            "delivered",
                            "failed",
                            "no_workflow",
                            "duplicate_suppressed",
                            "rejected"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stableErrorCode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "FLR_ENDPOINT_UNKNOWN",
                            "FLR_ENDPOINT_DELETED",
                            "FLR_AUTH_HEADER_MISSING",
                            "FLR_AUTH_FAILED",
                            "FLR_PAYLOAD_INVALID_JSON",
                            "FLR_PAYLOAD_TOO_LARGE",
                            "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                            "FLR_MAPPING_INVALID_RESOURCE_ID",
                            "FLR_NO_ENABLED_WORKFLOW",
                            "FLR_DUPLICATE_SUPPRESSED",
                            "FLR_FLOW_HANDOFF_FAILED",
                            "FLR_PLAN_LIMIT_REACHED",
                            "FLR_REPLAY_NOT_AVAILABLE",
                            "FLR_DIAGNOSTICS_UNAUTHORIZED",
                            "FLR_DIAGNOSTICS_FAILED"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "resolvedEventType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "resolvedExternalEventId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "replay": {
                      "type": "object",
                      "properties": {
                        "eligible": {
                          "type": "boolean"
                        },
                        "rawBodyExpiresAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "copy": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "eligible",
                        "rawBodyExpiresAt",
                        "copy"
                      ],
                      "additionalProperties": false
                    },
                    "endpointConfigSummary": {
                      "type": "object",
                      "properties": {
                        "endpointId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointPublicId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "sourceLabel": {
                          "type": "string",
                          "minLength": 1
                        },
                        "triggerVariant": {
                          "type": "string",
                          "enum": [
                            "generic",
                            "order",
                            "customer",
                            "product",
                            "inventory",
                            "fulfillment",
                            "return_refund",
                            "company_b2b"
                          ]
                        },
                        "authMode": {
                          "type": "string",
                          "enum": [
                            "hmac_sha256_header",
                            "static_header_secret"
                          ]
                        },
                        "headerName": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9-]+$"
                        },
                        "secretLast4": {
                          "type": "string",
                          "minLength": 4,
                          "maxLength": 4
                        },
                        "defaultEventType": {
                          "type": "string",
                          "minLength": 1
                        },
                        "eventTypePath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "externalEventIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "occurredAtPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "summaryPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "resourceIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "relatedResourceIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "requiredPayloadPaths": {
                          "maxItems": 5,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "capturedAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "endpointId",
                        "endpointPublicId",
                        "name",
                        "sourceLabel",
                        "triggerVariant",
                        "authMode",
                        "headerName",
                        "secretLast4",
                        "defaultEventType",
                        "eventTypePath",
                        "externalEventIdPath",
                        "occurredAtPath",
                        "summaryPath",
                        "resourceIdPath",
                        "relatedResourceIdPath",
                        "requiredPayloadPaths",
                        "capturedAt"
                      ],
                      "additionalProperties": false
                    },
                    "recoveryCopy": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string",
                              "minLength": 1
                            },
                            "operatorCopy": {
                              "type": "string",
                              "minLength": 1
                            },
                            "agentCopy": {
                              "type": "string",
                              "minLength": 1
                            },
                            "replayable": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "string",
                                  "const": "not_applicable"
                                }
                              ]
                            }
                          },
                          "required": [
                            "title",
                            "operatorCopy",
                            "agentCopy",
                            "replayable"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "deliveredCopy": {
                      "type": "string",
                      "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
                    }
                  },
                  "required": [
                    "schemaVersion",
                    "receiptId",
                    "eventId",
                    "correlationId",
                    "endpointId",
                    "endpointName",
                    "sourceLabel",
                    "receivedAt",
                    "completedAt",
                    "terminalOutcome",
                    "stableErrorCode",
                    "resolvedEventType",
                    "resolvedExternalEventId",
                    "replay",
                    "endpointConfigSummary",
                    "recoveryCopy",
                    "deliveredCopy"
                  ],
                  "additionalProperties": false
                }
              },
              "replayAttempts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "schemaVersion": {
                      "type": "number",
                      "const": 1
                    },
                    "replayAttemptId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "originalEventId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "actionIntentId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "correlationId": {
                      "type": "string",
                      "pattern": "^flr_corr_[a-f0-9-]{36}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "processing",
                        "delivered",
                        "failed",
                        "no_workflow",
                        "not_available"
                      ]
                    },
                    "stableErrorCode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "FLR_ENDPOINT_UNKNOWN",
                            "FLR_ENDPOINT_DELETED",
                            "FLR_AUTH_HEADER_MISSING",
                            "FLR_AUTH_FAILED",
                            "FLR_PAYLOAD_INVALID_JSON",
                            "FLR_PAYLOAD_TOO_LARGE",
                            "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                            "FLR_MAPPING_INVALID_RESOURCE_ID",
                            "FLR_NO_ENABLED_WORKFLOW",
                            "FLR_DUPLICATE_SUPPRESSED",
                            "FLR_FLOW_HANDOFF_FAILED",
                            "FLR_PLAN_LIMIT_REACHED",
                            "FLR_REPLAY_NOT_AVAILABLE",
                            "FLR_DIAGNOSTICS_UNAUTHORIZED",
                            "FLR_DIAGNOSTICS_FAILED"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "triggeredBy": {
                      "type": "object",
                      "properties": {
                        "actorType": {
                          "type": "string",
                          "enum": [
                            "shopify_user",
                            "flowrelay_support",
                            "internal_agent",
                            "merchant_authorized_agent",
                            "browser_fallback_agent"
                          ]
                        },
                        "actorId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "actorEmail": {
                          "type": "string",
                          "format": "email",
                          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                        },
                        "displayName": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "actorType",
                        "actorId"
                      ],
                      "additionalProperties": false
                    },
                    "currentEndpointSnapshot": {
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        },
                        "endpointId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointPublicId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "endpointUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "sourceLabel": {
                          "type": "string",
                          "minLength": 1
                        },
                        "triggerVariant": {
                          "type": "string",
                          "enum": [
                            "generic",
                            "order",
                            "customer",
                            "product",
                            "inventory",
                            "fulfillment",
                            "return_refund",
                            "company_b2b"
                          ]
                        },
                        "auth": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "hmac_sha256_header",
                                "static_header_secret"
                              ]
                            },
                            "headerName": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9-]+$"
                            },
                            "secretLast4": {
                              "type": "string",
                              "minLength": 4,
                              "maxLength": 4
                            }
                          },
                          "required": [
                            "mode",
                            "headerName",
                            "secretLast4"
                          ],
                          "additionalProperties": false
                        },
                        "mapping": {
                          "type": "object",
                          "properties": {
                            "defaultEventType": {
                              "type": "string",
                              "minLength": 1
                            },
                            "eventTypePath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalEventIdPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "occurredAtPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "summaryPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "resourceIdPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "relatedResourceIdPath": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "requiredPayloadPaths": {
                              "maxItems": 5,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          "required": [
                            "defaultEventType",
                            "eventTypePath",
                            "externalEventIdPath",
                            "occurredAtPath",
                            "summaryPath",
                            "resourceIdPath",
                            "relatedResourceIdPath",
                            "requiredPayloadPaths"
                          ],
                          "additionalProperties": false
                        },
                        "capturedAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "endpointId",
                        "endpointPublicId",
                        "endpointUrl",
                        "name",
                        "sourceLabel",
                        "triggerVariant",
                        "auth",
                        "mapping",
                        "capturedAt"
                      ],
                      "additionalProperties": false
                    },
                    "currentTriggerAvailability": {
                      "type": "object",
                      "properties": {
                        "triggerVariant": {
                          "type": "string",
                          "enum": [
                            "generic",
                            "order",
                            "customer",
                            "product",
                            "inventory",
                            "fulfillment",
                            "return_refund",
                            "company_b2b"
                          ]
                        },
                        "hasEnabledFlow": {
                          "type": "boolean"
                        },
                        "lastCallbackAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "triggerVariant",
                        "hasEnabledFlow",
                        "lastCallbackAt"
                      ],
                      "additionalProperties": false
                    },
                    "startedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "completedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "schemaVersion",
                    "replayAttemptId",
                    "originalEventId",
                    "endpointId",
                    "actionIntentId",
                    "correlationId",
                    "status",
                    "stableErrorCode",
                    "triggeredBy",
                    "currentEndpointSnapshot",
                    "currentTriggerAvailability",
                    "startedAt",
                    "completedAt"
                  ],
                  "additionalProperties": false
                }
              },
              "redactedHeaders": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "mappingResults": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "replayEligibility": {
                "type": "object",
                "properties": {
                  "replayable": {
                    "type": "boolean"
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "replayable",
                  "reason"
                ],
                "additionalProperties": false
              },
              "includeMaskedPayloadSample": {
                "type": "boolean"
              },
              "maskedPayloadSample": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 16384
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "issueDescription": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdBy": {
                "type": "object",
                "properties": {
                  "actorType": {
                    "type": "string",
                    "enum": [
                      "shopify_user",
                      "flowrelay_support",
                      "internal_agent",
                      "merchant_authorized_agent",
                      "browser_fallback_agent"
                    ]
                  },
                  "actorId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "actorEmail": {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "displayName": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "actorType",
                  "actorId"
                ],
                "additionalProperties": false
              },
              "actionIntent": {
                "type": "object",
                "properties": {
                  "actionIntentId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "clientKind": {
                    "type": "string",
                    "enum": [
                      "human_ui",
                      "agent_api",
                      "mcp_facade",
                      "browser_fallback",
                      "internal_tool"
                    ]
                  },
                  "approvalState": {
                    "type": "string",
                    "enum": [
                      "proposed",
                      "executed"
                    ]
                  }
                },
                "required": [
                  "actionIntentId",
                  "clientKind",
                  "approvalState"
                ],
                "additionalProperties": false
              },
              "supportSummaryText": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "schemaVersion",
              "redactionPolicyVersion",
              "shareId",
              "createdAt",
              "expiresAt",
              "scope",
              "store",
              "appVersion",
              "triggerVariant",
              "stableErrorCode",
              "terminalOutcome",
              "runbook",
              "correlationId",
              "endpointSnapshot",
              "timeline",
              "reliabilityExplanation",
              "recentEvents",
              "replayAttempts",
              "redactedHeaders",
              "mappingResults",
              "replayEligibility",
              "includeMaskedPayloadSample",
              "maskedPayloadSample",
              "issueDescription",
              "createdBy",
              "actionIntent",
              "supportSummaryText"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schemaVersion",
          "actionIntentId",
          "idempotencyKey",
          "share",
          "manifest"
        ],
        "additionalProperties": false
      },
      "DiagnosticsShareSummary": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "shareId": {
            "type": "string",
            "minLength": 1
          },
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "endpoint"
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "type",
                  "endpointId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "event"
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "eventId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "type",
                  "endpointId",
                  "eventId"
                ],
                "additionalProperties": false
              }
            ]
          },
          "stableErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "FLR_ENDPOINT_UNKNOWN",
                  "FLR_ENDPOINT_DELETED",
                  "FLR_AUTH_HEADER_MISSING",
                  "FLR_AUTH_FAILED",
                  "FLR_PAYLOAD_INVALID_JSON",
                  "FLR_PAYLOAD_TOO_LARGE",
                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                  "FLR_NO_ENABLED_WORKFLOW",
                  "FLR_DUPLICATE_SUPPRESSED",
                  "FLR_FLOW_HANDOFF_FAILED",
                  "FLR_PLAN_LIMIT_REACHED",
                  "FLR_REPLAY_NOT_AVAILABLE",
                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                  "FLR_DIAGNOSTICS_FAILED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "includeMaskedPayloadSample": {
            "type": "boolean"
          },
          "summaryText": {
            "type": "string",
            "minLength": 1
          },
          "createdByEmail": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "schemaVersion",
          "shareId",
          "scope",
          "stableErrorCode",
          "includeMaskedPayloadSample",
          "summaryText",
          "createdByEmail",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "EndpointActionIntentResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "preview",
              "execute"
            ]
          },
          "actionIntentId": {
            "type": "string",
            "minLength": 1
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 8
          },
          "preview": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "execution": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schemaVersion",
          "state",
          "actionIntentId",
          "idempotencyKey",
          "preview",
          "execution"
        ],
        "additionalProperties": false
      },
      "EndpointEditIntentRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "preview",
              "execute"
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 8
          },
          "confirmed": {
            "type": "boolean"
          },
          "edit": {
            "type": "object",
            "properties": {
              "triggerVariant": {
                "default": "generic",
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "sourceLabel": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "defaultEventType": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "eventTypePath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "externalEventIdPath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredAtPath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "summaryPath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resourceIdPath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "relatedResourceIdPath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requiredPayloadPaths": {
                "default": [],
                "maxItems": 5,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                }
              }
            },
            "required": [
              "triggerVariant",
              "name",
              "sourceLabel",
              "defaultEventType",
              "eventTypePath",
              "externalEventIdPath",
              "occurredAtPath",
              "summaryPath",
              "resourceIdPath",
              "relatedResourceIdPath",
              "requiredPayloadPaths"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "state"
        ],
        "additionalProperties": false
      },
      "EndpointSimpleIntentRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "preview",
              "execute"
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 8
          },
          "confirmed": {
            "type": "boolean"
          }
        },
        "required": [
          "state"
        ],
        "additionalProperties": false
      },
      "GenericEndpointDetail": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "endpointId": {
            "type": "string",
            "minLength": 1
          },
          "endpointPublicId": {
            "type": "string",
            "minLength": 1
          },
          "endpointUrl": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "deleted"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "sourceLabel": {
            "type": "string",
            "minLength": 1
          },
          "triggerVariant": {
            "type": "string",
            "enum": [
              "generic",
              "order",
              "customer",
              "product",
              "inventory",
              "fulfillment",
              "return_refund",
              "company_b2b"
            ]
          },
          "triggerLabel": {
            "type": "string",
            "minLength": 1
          },
          "auth": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "hmac_sha256_header",
                  "static_header_secret"
                ]
              },
              "headerName": {
                "type": "string",
                "pattern": "^[A-Za-z0-9-]+$"
              },
              "secretLast4": {
                "type": "string",
                "minLength": 4,
                "maxLength": 4
              }
            },
            "required": [
              "mode",
              "headerName",
              "secretLast4"
            ],
            "additionalProperties": false
          },
          "mapping": {
            "type": "object",
            "properties": {
              "defaultEventType": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "eventTypePath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "externalEventIdPath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredAtPath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "summaryPath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resourceIdPath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "relatedResourceIdPath": {
                "default": null,
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requiredPayloadPaths": {
                "default": [],
                "maxItems": 5,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
                }
              }
            },
            "required": [
              "defaultEventType",
              "eventTypePath",
              "externalEventIdPath",
              "occurredAtPath",
              "summaryPath",
              "resourceIdPath",
              "relatedResourceIdPath",
              "requiredPayloadPaths"
            ],
            "additionalProperties": false
          },
          "readiness": {
            "type": "object",
            "properties": {
              "lifecycleImplemented": {
                "type": "boolean"
              },
              "ingestImplemented": {
                "type": "boolean"
              },
              "state": {
                "type": "string",
                "enum": [
                  "setup_only",
                  "ready_for_test",
                  "blocked"
                ]
              },
              "summary": {
                "type": "string",
                "minLength": 1
              },
              "detail": {
                "type": "string",
                "minLength": 1
              },
              "hasEnabledFlow": {
                "type": "boolean"
              },
              "lastCallbackAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "lifecycleImplemented",
              "ingestImplemented",
              "state",
              "summary",
              "detail",
              "hasEnabledFlow",
              "lastCallbackAt"
            ],
            "additionalProperties": false
          },
          "flowSetupRecipe": {
            "type": "object",
            "properties": {
              "trigger": {
                "type": "object",
                "properties": {
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1
                  },
                  "handle": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "triggerVariant",
                  "label",
                  "handle"
                ],
                "additionalProperties": false
              },
              "steps": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "conditionHints": {
                "type": "object",
                "properties": {
                  "sourceLabel": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "eventType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "sourceLabel",
                  "eventType"
                ],
                "additionalProperties": false
              },
              "operatorCopy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "trigger",
              "steps",
              "conditionHints",
              "operatorCopy"
            ],
            "additionalProperties": false
          },
          "senderSetupInstructions": {
            "type": "object",
            "properties": {
              "endpointUrl": {
                "type": "string",
                "format": "uri"
              },
              "method": {
                "type": "string",
                "const": "POST"
              },
              "contentType": {
                "type": "string",
                "const": "application/json"
              },
              "authMode": {
                "type": "string",
                "enum": [
                  "hmac_sha256_header",
                  "static_header_secret"
                ]
              },
              "headerName": {
                "type": "string",
                "pattern": "^[A-Za-z0-9-]+$"
              },
              "signingInstructions": {
                "type": "string",
                "minLength": 1
              },
              "testInstructions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "endpointUrl",
              "method",
              "contentType",
              "authMode",
              "headerName",
              "signingInstructions",
              "testInstructions"
            ],
            "additionalProperties": false
          },
          "recentEvents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "receiptId": {
                  "type": "string",
                  "minLength": 1
                },
                "eventId": {
                  "type": "string",
                  "minLength": 1
                },
                "correlationId": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointId": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointName": {
                  "type": "string",
                  "minLength": 1
                },
                "sourceLabel": {
                  "type": "string",
                  "minLength": 1
                },
                "receivedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "completedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "terminalOutcome": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "delivered",
                        "failed",
                        "no_workflow",
                        "duplicate_suppressed",
                        "rejected"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "stableErrorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FLR_ENDPOINT_UNKNOWN",
                        "FLR_ENDPOINT_DELETED",
                        "FLR_AUTH_HEADER_MISSING",
                        "FLR_AUTH_FAILED",
                        "FLR_PAYLOAD_INVALID_JSON",
                        "FLR_PAYLOAD_TOO_LARGE",
                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                        "FLR_NO_ENABLED_WORKFLOW",
                        "FLR_DUPLICATE_SUPPRESSED",
                        "FLR_FLOW_HANDOFF_FAILED",
                        "FLR_PLAN_LIMIT_REACHED",
                        "FLR_REPLAY_NOT_AVAILABLE",
                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                        "FLR_DIAGNOSTICS_FAILED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedEventType": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedExternalEventId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "replay": {
                  "type": "object",
                  "properties": {
                    "eligible": {
                      "type": "boolean"
                    },
                    "rawBodyExpiresAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "copy": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "eligible",
                    "rawBodyExpiresAt",
                    "copy"
                  ],
                  "additionalProperties": false
                },
                "endpointConfigSummary": {
                  "type": "object",
                  "properties": {
                    "endpointId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointPublicId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "sourceLabel": {
                      "type": "string",
                      "minLength": 1
                    },
                    "triggerVariant": {
                      "type": "string",
                      "enum": [
                        "generic",
                        "order",
                        "customer",
                        "product",
                        "inventory",
                        "fulfillment",
                        "return_refund",
                        "company_b2b"
                      ]
                    },
                    "authMode": {
                      "type": "string",
                      "enum": [
                        "hmac_sha256_header",
                        "static_header_secret"
                      ]
                    },
                    "headerName": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9-]+$"
                    },
                    "secretLast4": {
                      "type": "string",
                      "minLength": 4,
                      "maxLength": 4
                    },
                    "defaultEventType": {
                      "type": "string",
                      "minLength": 1
                    },
                    "eventTypePath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "externalEventIdPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "occurredAtPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "summaryPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "resourceIdPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "relatedResourceIdPath": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "requiredPayloadPaths": {
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "capturedAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "endpointId",
                    "endpointPublicId",
                    "name",
                    "sourceLabel",
                    "triggerVariant",
                    "authMode",
                    "headerName",
                    "secretLast4",
                    "defaultEventType",
                    "eventTypePath",
                    "externalEventIdPath",
                    "occurredAtPath",
                    "summaryPath",
                    "resourceIdPath",
                    "relatedResourceIdPath",
                    "requiredPayloadPaths",
                    "capturedAt"
                  ],
                  "additionalProperties": false
                },
                "recoveryCopy": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1
                        },
                        "operatorCopy": {
                          "type": "string",
                          "minLength": 1
                        },
                        "agentCopy": {
                          "type": "string",
                          "minLength": 1
                        },
                        "replayable": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "string",
                              "const": "not_applicable"
                            }
                          ]
                        }
                      },
                      "required": [
                        "title",
                        "operatorCopy",
                        "agentCopy",
                        "replayable"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "deliveredCopy": {
                  "type": "string",
                  "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
                }
              },
              "required": [
                "schemaVersion",
                "receiptId",
                "eventId",
                "correlationId",
                "endpointId",
                "endpointName",
                "sourceLabel",
                "receivedAt",
                "completedAt",
                "terminalOutcome",
                "stableErrorCode",
                "resolvedEventType",
                "resolvedExternalEventId",
                "replay",
                "endpointConfigSummary",
                "recoveryCopy",
                "deliveredCopy"
              ],
              "additionalProperties": false
            }
          },
          "diagnosticsShares": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "shareId": {
                  "type": "string",
                  "minLength": 1
                },
                "scope": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "endpoint"
                        },
                        "endpointId": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "type",
                        "endpointId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "event"
                        },
                        "endpointId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "eventId": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "type",
                        "endpointId",
                        "eventId"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "stableErrorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FLR_ENDPOINT_UNKNOWN",
                        "FLR_ENDPOINT_DELETED",
                        "FLR_AUTH_HEADER_MISSING",
                        "FLR_AUTH_FAILED",
                        "FLR_PAYLOAD_INVALID_JSON",
                        "FLR_PAYLOAD_TOO_LARGE",
                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                        "FLR_NO_ENABLED_WORKFLOW",
                        "FLR_DUPLICATE_SUPPRESSED",
                        "FLR_FLOW_HANDOFF_FAILED",
                        "FLR_PLAN_LIMIT_REACHED",
                        "FLR_REPLAY_NOT_AVAILABLE",
                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                        "FLR_DIAGNOSTICS_FAILED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "includeMaskedPayloadSample": {
                  "type": "boolean"
                },
                "summaryText": {
                  "type": "string",
                  "minLength": 1
                },
                "createdByEmail": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "email",
                      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "schemaVersion",
                "shareId",
                "scope",
                "stableErrorCode",
                "includeMaskedPayloadSample",
                "summaryText",
                "createdByEmail",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "deliveredCopy": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "deletedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schemaVersion",
          "endpointId",
          "endpointPublicId",
          "endpointUrl",
          "status",
          "name",
          "sourceLabel",
          "triggerVariant",
          "triggerLabel",
          "auth",
          "mapping",
          "readiness",
          "flowSetupRecipe",
          "senderSetupInstructions",
          "recentEvents",
          "diagnosticsShares",
          "deliveredCopy",
          "createdAt",
          "updatedAt",
          "deletedAt"
        ],
        "additionalProperties": false
      },
      "GenericEndpointEditRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "triggerVariant": {
            "default": "generic",
            "type": "string",
            "enum": [
              "generic",
              "order",
              "customer",
              "product",
              "inventory",
              "fulfillment",
              "return_refund",
              "company_b2b"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "sourceLabel": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "defaultEventType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "eventTypePath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "externalEventIdPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "occurredAtPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "summaryPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "resourceIdPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "relatedResourceIdPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "requiredPayloadPaths": {
            "default": [],
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
            }
          }
        },
        "required": [
          "triggerVariant",
          "name",
          "sourceLabel",
          "defaultEventType",
          "eventTypePath",
          "externalEventIdPath",
          "occurredAtPath",
          "summaryPath",
          "resourceIdPath",
          "relatedResourceIdPath",
          "requiredPayloadPaths"
        ],
        "additionalProperties": false
      },
      "GenericEndpointMappingFields": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "defaultEventType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "eventTypePath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "externalEventIdPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "occurredAtPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "summaryPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ]
          },
          "resourceIdPath": {
            "type": "null"
          },
          "relatedResourceIdPath": {
            "type": "null"
          },
          "requiredPayloadPaths": {
            "default": [],
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
            }
          }
        },
        "required": [
          "defaultEventType",
          "eventTypePath",
          "externalEventIdPath",
          "occurredAtPath",
          "summaryPath",
          "resourceIdPath",
          "relatedResourceIdPath",
          "requiredPayloadPaths"
        ],
        "additionalProperties": false
      },
      "EndpointConfigSnapshot": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "endpointId": {
            "type": "string",
            "minLength": 1
          },
          "endpointPublicId": {
            "type": "string",
            "minLength": 1
          },
          "endpointUrl": {
            "type": "string",
            "format": "uri"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "sourceLabel": {
            "type": "string",
            "minLength": 1
          },
          "triggerVariant": {
            "type": "string",
            "enum": [
              "generic",
              "order",
              "customer",
              "product",
              "inventory",
              "fulfillment",
              "return_refund",
              "company_b2b"
            ]
          },
          "auth": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "hmac_sha256_header",
                  "static_header_secret"
                ]
              },
              "headerName": {
                "type": "string",
                "pattern": "^[A-Za-z0-9-]+$"
              },
              "secretLast4": {
                "type": "string",
                "minLength": 4,
                "maxLength": 4
              }
            },
            "required": [
              "mode",
              "headerName",
              "secretLast4"
            ],
            "additionalProperties": false
          },
          "mapping": {
            "type": "object",
            "properties": {
              "defaultEventType": {
                "type": "string",
                "minLength": 1
              },
              "eventTypePath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "externalEventIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredAtPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "summaryPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resourceIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "relatedResourceIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requiredPayloadPaths": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "defaultEventType",
              "eventTypePath",
              "externalEventIdPath",
              "occurredAtPath",
              "summaryPath",
              "resourceIdPath",
              "relatedResourceIdPath",
              "requiredPayloadPaths"
            ],
            "additionalProperties": false
          },
          "capturedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "schemaVersion",
          "endpointId",
          "endpointPublicId",
          "endpointUrl",
          "name",
          "sourceLabel",
          "triggerVariant",
          "auth",
          "mapping",
          "capturedAt"
        ],
        "additionalProperties": false
      },
      "EventTimeline": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "eventId": {
            "type": "string",
            "minLength": 1
          },
          "correlationId": {
            "type": "string",
            "pattern": "^flr_corr_[a-f0-9-]{36}$"
          },
          "endpointSnapshot": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "endpointId": {
                "type": "string",
                "minLength": 1
              },
              "endpointPublicId": {
                "type": "string",
                "minLength": 1
              },
              "endpointUrl": {
                "type": "string",
                "format": "uri"
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "sourceLabel": {
                "type": "string",
                "minLength": 1
              },
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "auth": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "hmac_sha256_header",
                      "static_header_secret"
                    ]
                  },
                  "headerName": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9-]+$"
                  },
                  "secretLast4": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 4
                  }
                },
                "required": [
                  "mode",
                  "headerName",
                  "secretLast4"
                ],
                "additionalProperties": false
              },
              "mapping": {
                "type": "object",
                "properties": {
                  "defaultEventType": {
                    "type": "string",
                    "minLength": 1
                  },
                  "eventTypePath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalEventIdPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "occurredAtPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "summaryPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "resourceIdPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "relatedResourceIdPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requiredPayloadPaths": {
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "defaultEventType",
                  "eventTypePath",
                  "externalEventIdPath",
                  "occurredAtPath",
                  "summaryPath",
                  "resourceIdPath",
                  "relatedResourceIdPath",
                  "requiredPayloadPaths"
                ],
                "additionalProperties": false
              },
              "capturedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "schemaVersion",
              "endpointId",
              "endpointPublicId",
              "endpointUrl",
              "name",
              "sourceLabel",
              "triggerVariant",
              "auth",
              "mapping",
              "capturedAt"
            ],
            "additionalProperties": false
          },
          "terminalOutcome": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "accepted",
                  "delivered",
                  "failed",
                  "no_workflow",
                  "duplicate_suppressed",
                  "rejected"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "stableErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "FLR_ENDPOINT_UNKNOWN",
                  "FLR_ENDPOINT_DELETED",
                  "FLR_AUTH_HEADER_MISSING",
                  "FLR_AUTH_FAILED",
                  "FLR_PAYLOAD_INVALID_JSON",
                  "FLR_PAYLOAD_TOO_LARGE",
                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                  "FLR_NO_ENABLED_WORKFLOW",
                  "FLR_DUPLICATE_SUPPRESSED",
                  "FLR_FLOW_HANDOFF_FAILED",
                  "FLR_PLAN_LIMIT_REACHED",
                  "FLR_REPLAY_NOT_AVAILABLE",
                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                  "FLR_DIAGNOSTICS_FAILED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "entries": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "step": {
                  "type": "string",
                  "enum": [
                    "received",
                    "authenticated",
                    "stored",
                    "queued",
                    "mapping",
                    "duplicate_check",
                    "readiness_check",
                    "flow_handoff",
                    "terminal",
                    "replay_started",
                    "replay_terminal",
                    "diagnostics_shared"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "info",
                    "success",
                    "warning",
                    "error"
                  ]
                },
                "message": {
                  "type": "string",
                  "minLength": 1
                },
                "stableErrorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FLR_ENDPOINT_UNKNOWN",
                        "FLR_ENDPOINT_DELETED",
                        "FLR_AUTH_HEADER_MISSING",
                        "FLR_AUTH_FAILED",
                        "FLR_PAYLOAD_INVALID_JSON",
                        "FLR_PAYLOAD_TOO_LARGE",
                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                        "FLR_NO_ENABLED_WORKFLOW",
                        "FLR_DUPLICATE_SUPPRESSED",
                        "FLR_FLOW_HANDOFF_FAILED",
                        "FLR_PLAN_LIMIT_REACHED",
                        "FLR_REPLAY_NOT_AVAILABLE",
                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                        "FLR_DIAGNOSTICS_FAILED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "metadata": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "at",
                "step",
                "status",
                "message",
                "stableErrorCode"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "schemaVersion",
          "eventId",
          "correlationId",
          "endpointSnapshot",
          "terminalOutcome",
          "stableErrorCode",
          "entries"
        ],
        "additionalProperties": false
      },
      "EventRouteDecision": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "eventId": {
            "type": "string",
            "minLength": 1
          },
          "correlationId": {
            "type": "string",
            "minLength": 1
          },
          "platformKey": {
            "type": "string",
            "const": "shopify_flow"
          },
          "routeKind": {
            "type": "string",
            "enum": [
              "normal_event",
              "replay"
            ]
          },
          "endpointId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "triggerVariant": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "policyVersion": {
            "type": "string",
            "const": "shopify_flow_v1_endpoint_snapshot"
          },
          "decisions": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "step": {
                  "type": "string",
                  "enum": [
                    "receipt_accepted",
                    "endpoint_snapshot_selected",
                    "mapping_evaluated",
                    "dedupe_evaluated",
                    "readiness_evaluated",
                    "handoff_evaluated",
                    "reconciliation_evaluated",
                    "terminal_recorded"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "accepted",
                    "skipped",
                    "blocked",
                    "succeeded",
                    "failed",
                    "manual_review_required"
                  ]
                },
                "stableErrorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FLR_ENDPOINT_UNKNOWN",
                        "FLR_ENDPOINT_DELETED",
                        "FLR_AUTH_HEADER_MISSING",
                        "FLR_AUTH_FAILED",
                        "FLR_PAYLOAD_INVALID_JSON",
                        "FLR_PAYLOAD_TOO_LARGE",
                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                        "FLR_NO_ENABLED_WORKFLOW",
                        "FLR_DUPLICATE_SUPPRESSED",
                        "FLR_FLOW_HANDOFF_FAILED",
                        "FLR_PLAN_LIMIT_REACHED",
                        "FLR_REPLAY_NOT_AVAILABLE",
                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                        "FLR_DIAGNOSTICS_FAILED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason": {
                  "type": "string",
                  "minLength": 1
                },
                "at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "step",
                "status",
                "stableErrorCode",
                "reason",
                "at"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "schemaVersion",
          "eventId",
          "correlationId",
          "platformKey",
          "routeKind",
          "endpointId",
          "triggerVariant",
          "policyVersion",
          "decisions"
        ],
        "additionalProperties": false
      },
      "EventVisibilityDetail": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "receiptId": {
            "type": "string",
            "minLength": 1
          },
          "eventId": {
            "type": "string",
            "minLength": 1
          },
          "correlationId": {
            "type": "string",
            "minLength": 1
          },
          "endpointId": {
            "type": "string",
            "minLength": 1
          },
          "endpointName": {
            "type": "string",
            "minLength": 1
          },
          "sourceLabel": {
            "type": "string",
            "minLength": 1
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "terminalOutcome": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "accepted",
                  "delivered",
                  "failed",
                  "no_workflow",
                  "duplicate_suppressed",
                  "rejected"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "stableErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "FLR_ENDPOINT_UNKNOWN",
                  "FLR_ENDPOINT_DELETED",
                  "FLR_AUTH_HEADER_MISSING",
                  "FLR_AUTH_FAILED",
                  "FLR_PAYLOAD_INVALID_JSON",
                  "FLR_PAYLOAD_TOO_LARGE",
                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                  "FLR_NO_ENABLED_WORKFLOW",
                  "FLR_DUPLICATE_SUPPRESSED",
                  "FLR_FLOW_HANDOFF_FAILED",
                  "FLR_PLAN_LIMIT_REACHED",
                  "FLR_REPLAY_NOT_AVAILABLE",
                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                  "FLR_DIAGNOSTICS_FAILED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "resolvedEventType": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "resolvedExternalEventId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "replay": {
            "type": "object",
            "properties": {
              "eligible": {
                "type": "boolean"
              },
              "rawBodyExpiresAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "eligible",
              "rawBodyExpiresAt",
              "copy"
            ],
            "additionalProperties": false
          },
          "endpointConfigSummary": {
            "type": "object",
            "properties": {
              "endpointId": {
                "type": "string",
                "minLength": 1
              },
              "endpointPublicId": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "sourceLabel": {
                "type": "string",
                "minLength": 1
              },
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "authMode": {
                "type": "string",
                "enum": [
                  "hmac_sha256_header",
                  "static_header_secret"
                ]
              },
              "headerName": {
                "type": "string",
                "pattern": "^[A-Za-z0-9-]+$"
              },
              "secretLast4": {
                "type": "string",
                "minLength": 4,
                "maxLength": 4
              },
              "defaultEventType": {
                "type": "string",
                "minLength": 1
              },
              "eventTypePath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "externalEventIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredAtPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "summaryPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resourceIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "relatedResourceIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requiredPayloadPaths": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "capturedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "endpointId",
              "endpointPublicId",
              "name",
              "sourceLabel",
              "triggerVariant",
              "authMode",
              "headerName",
              "secretLast4",
              "defaultEventType",
              "eventTypePath",
              "externalEventIdPath",
              "occurredAtPath",
              "summaryPath",
              "resourceIdPath",
              "relatedResourceIdPath",
              "requiredPayloadPaths",
              "capturedAt"
            ],
            "additionalProperties": false
          },
          "recoveryCopy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1
                  },
                  "operatorCopy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "agentCopy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "replayable": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "const": "not_applicable"
                      }
                    ]
                  }
                },
                "required": [
                  "title",
                  "operatorCopy",
                  "agentCopy",
                  "replayable"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "deliveredCopy": {
            "type": "string",
            "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
          },
          "receiptContext": {
            "type": "object",
            "properties": {
              "platform": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "platformKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "platformName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "editionName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "automationSystem": {
                    "type": "string",
                    "minLength": 1
                  },
                  "billingProvider": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "schemaVersion",
                  "platformKey",
                  "platformName",
                  "editionName",
                  "automationSystem",
                  "billingProvider"
                ],
                "additionalProperties": false
              },
              "store": {
                "type": "object",
                "properties": {
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "shopDomain": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "installationId",
                  "shopDomain"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "platform",
              "store"
            ],
            "additionalProperties": false
          },
          "endpointSnapshot": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointPublicId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceLabel": {
                    "type": "string",
                    "minLength": 1
                  },
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "hmac_sha256_header",
                          "static_header_secret"
                        ]
                      },
                      "headerName": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]+$"
                      },
                      "secretLast4": {
                        "type": "string",
                        "minLength": 4,
                        "maxLength": 4
                      }
                    },
                    "required": [
                      "mode",
                      "headerName",
                      "secretLast4"
                    ],
                    "additionalProperties": false
                  },
                  "mapping": {
                    "type": "object",
                    "properties": {
                      "defaultEventType": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventTypePath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAtPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summaryPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "requiredPayloadPaths": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "defaultEventType",
                      "eventTypePath",
                      "externalEventIdPath",
                      "occurredAtPath",
                      "summaryPath",
                      "resourceIdPath",
                      "relatedResourceIdPath",
                      "requiredPayloadPaths"
                    ],
                    "additionalProperties": false
                  },
                  "capturedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "schemaVersion",
                  "endpointId",
                  "endpointPublicId",
                  "endpointUrl",
                  "name",
                  "sourceLabel",
                  "triggerVariant",
                  "auth",
                  "mapping",
                  "capturedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "object",
            "properties": {
              "sourceLabel": {
                "type": "string",
                "minLength": 1
              },
              "eventType": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "externalEventId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "summary": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "request": {
                "type": "object",
                "properties": {
                  "contentType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "contentLengthBytes": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "bodySha256": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "bodySha256Algorithm": {
                    "type": "string",
                    "const": "sha256"
                  },
                  "retentionState": {
                    "type": "string",
                    "enum": [
                      "retained",
                      "expired",
                      "not_retained"
                    ]
                  },
                  "rawBodyExpiresAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "replayEligible": {
                    "type": "boolean"
                  },
                  "copy": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "contentType",
                  "contentLengthBytes",
                  "bodySha256",
                  "bodySha256Algorithm",
                  "retentionState",
                  "rawBodyExpiresAt",
                  "replayEligible",
                  "copy"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "sourceLabel",
              "eventType",
              "externalEventId",
              "occurredAt",
              "summary",
              "request"
            ],
            "additionalProperties": false
          },
          "auth": {
            "type": "object",
            "properties": {
              "configuredMode": {
                "type": "string",
                "enum": [
                  "hmac_sha256_header",
                  "static_header_secret"
                ]
              },
              "headerName": {
                "type": "string",
                "pattern": "^[A-Za-z0-9-]+$"
              },
              "secretLast4": {
                "type": "string",
                "minLength": 4,
                "maxLength": 4
              },
              "authHeaderPresent": {
                "type": "boolean"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "verified",
                  "missing_header",
                  "failed",
                  "not_evaluated"
                ]
              },
              "stableErrorCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "configuredMode",
              "headerName",
              "secretLast4",
              "authHeaderPresent",
              "outcome",
              "stableErrorCode",
              "copy"
            ],
            "additionalProperties": false
          },
          "mapping": {
            "type": "object",
            "properties": {
              "outcome": {
                "type": "string",
                "enum": [
                  "resolved",
                  "failed",
                  "not_evaluated"
                ]
              },
              "stableErrorCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "defaultEventType": {
                "type": "string",
                "minLength": 1
              },
              "eventTypePath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "externalEventIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredAtPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "summaryPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resourceIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "relatedResourceIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requiredPayloadPaths": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "resolved": {
                "type": "object",
                "properties": {
                  "source": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "eventType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalEventId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "occurredAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "summary": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "resourceLegacyId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "relatedResourceType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "relatedResourceId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "source",
                  "eventType",
                  "externalEventId",
                  "occurredAt",
                  "summary",
                  "resourceLegacyId",
                  "relatedResourceType",
                  "relatedResourceId"
                ],
                "additionalProperties": false
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "outcome",
              "stableErrorCode",
              "defaultEventType",
              "eventTypePath",
              "externalEventIdPath",
              "occurredAtPath",
              "summaryPath",
              "resourceIdPath",
              "relatedResourceIdPath",
              "requiredPayloadPaths",
              "resolved",
              "copy"
            ],
            "additionalProperties": false
          },
          "readinessAtHandoff": {
            "type": "object",
            "properties": {
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "evaluated": {
                "type": "boolean"
              },
              "hasEnabledFlow": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastCallbackAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "stableErrorCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "triggerVariant",
              "evaluated",
              "hasEnabledFlow",
              "lastCallbackAt",
              "stableErrorCode",
              "copy"
            ],
            "additionalProperties": false
          },
          "resolved": {
            "type": "object",
            "properties": {
              "source": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "eventType": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "externalEventId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "summary": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resourceLegacyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "relatedResourceType": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "relatedResourceId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "source",
              "eventType",
              "externalEventId",
              "occurredAt",
              "summary",
              "resourceLegacyId",
              "relatedResourceType",
              "relatedResourceId"
            ],
            "additionalProperties": false
          },
          "flowHandoff": {
            "type": "object",
            "properties": {
              "calledShopifyFlow": {
                "type": "boolean"
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "calledShopifyFlow",
              "copy"
            ],
            "additionalProperties": false
          },
          "handoff": {
            "type": "object",
            "properties": {
              "calledShopifyFlow": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "succeeded",
                  "failed",
                  "skipped",
                  "pending",
                  "unknown"
                ]
              },
              "terminalOutcome": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "delivered",
                      "failed",
                      "no_workflow",
                      "duplicate_suppressed",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "stableErrorCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "terminalLatencyMs": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "calledShopifyFlow",
              "outcome",
              "terminalOutcome",
              "stableErrorCode",
              "terminalLatencyMs",
              "copy"
            ],
            "additionalProperties": false
          },
          "audit": {
            "type": "object",
            "properties": {
              "ingestActor": {
                "type": "object",
                "properties": {
                  "actorType": {
                    "type": "string",
                    "const": "external_sender"
                  },
                  "sourceLabel": {
                    "type": "string",
                    "minLength": 1
                  },
                  "authenticatedBy": {
                    "type": "string",
                    "enum": [
                      "hmac_sha256_header",
                      "static_header_secret"
                    ]
                  },
                  "authOutcome": {
                    "type": "string",
                    "enum": [
                      "verified",
                      "missing_header",
                      "failed",
                      "not_evaluated"
                    ]
                  }
                },
                "required": [
                  "actorType",
                  "sourceLabel",
                  "authenticatedBy",
                  "authOutcome"
                ],
                "additionalProperties": false
              },
              "actionIntentId": {
                "type": "null"
              },
              "agentAccessGrantId": {
                "type": "null"
              },
              "idempotencyKey": {
                "type": "null"
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "ingestActor",
              "actionIntentId",
              "agentAccessGrantId",
              "idempotencyKey",
              "copy"
            ],
            "additionalProperties": false
          },
          "processingTrace": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "step": {
                  "type": "string",
                  "enum": [
                    "received",
                    "authenticated",
                    "stored",
                    "queued",
                    "mapping",
                    "duplicate_check",
                    "readiness_check",
                    "flow_handoff",
                    "terminal",
                    "replay_started",
                    "replay_terminal",
                    "diagnostics_shared"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "info",
                    "success",
                    "warning",
                    "error"
                  ]
                },
                "message": {
                  "type": "string",
                  "minLength": 1
                },
                "stableErrorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FLR_ENDPOINT_UNKNOWN",
                        "FLR_ENDPOINT_DELETED",
                        "FLR_AUTH_HEADER_MISSING",
                        "FLR_AUTH_FAILED",
                        "FLR_PAYLOAD_INVALID_JSON",
                        "FLR_PAYLOAD_TOO_LARGE",
                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                        "FLR_NO_ENABLED_WORKFLOW",
                        "FLR_DUPLICATE_SUPPRESSED",
                        "FLR_FLOW_HANDOFF_FAILED",
                        "FLR_PLAN_LIMIT_REACHED",
                        "FLR_REPLAY_NOT_AVAILABLE",
                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                        "FLR_DIAGNOSTICS_FAILED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "metadata": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "at",
                "step",
                "status",
                "message",
                "stableErrorCode"
              ],
              "additionalProperties": false
            }
          },
          "replayAttempts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "replayAttemptId": {
                  "type": "string",
                  "minLength": 1
                },
                "originalEventId": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointId": {
                  "type": "string",
                  "minLength": 1
                },
                "actionIntentId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "correlationId": {
                  "type": "string",
                  "pattern": "^flr_corr_[a-f0-9-]{36}$"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "processing",
                    "delivered",
                    "failed",
                    "no_workflow",
                    "not_available"
                  ]
                },
                "stableErrorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FLR_ENDPOINT_UNKNOWN",
                        "FLR_ENDPOINT_DELETED",
                        "FLR_AUTH_HEADER_MISSING",
                        "FLR_AUTH_FAILED",
                        "FLR_PAYLOAD_INVALID_JSON",
                        "FLR_PAYLOAD_TOO_LARGE",
                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                        "FLR_NO_ENABLED_WORKFLOW",
                        "FLR_DUPLICATE_SUPPRESSED",
                        "FLR_FLOW_HANDOFF_FAILED",
                        "FLR_PLAN_LIMIT_REACHED",
                        "FLR_REPLAY_NOT_AVAILABLE",
                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                        "FLR_DIAGNOSTICS_FAILED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "triggeredBy": {
                  "type": "object",
                  "properties": {
                    "actorType": {
                      "type": "string",
                      "enum": [
                        "shopify_user",
                        "flowrelay_support",
                        "internal_agent",
                        "merchant_authorized_agent",
                        "browser_fallback_agent"
                      ]
                    },
                    "actorId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "actorEmail": {
                      "type": "string",
                      "format": "email",
                      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                    },
                    "displayName": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "actorType",
                    "actorId"
                  ],
                  "additionalProperties": false
                },
                "currentEndpointSnapshot": {
                  "type": "object",
                  "properties": {
                    "schemaVersion": {
                      "type": "number",
                      "const": 1
                    },
                    "endpointId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointPublicId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "sourceLabel": {
                      "type": "string",
                      "minLength": 1
                    },
                    "triggerVariant": {
                      "type": "string",
                      "enum": [
                        "generic",
                        "order",
                        "customer",
                        "product",
                        "inventory",
                        "fulfillment",
                        "return_refund",
                        "company_b2b"
                      ]
                    },
                    "auth": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hmac_sha256_header",
                            "static_header_secret"
                          ]
                        },
                        "headerName": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9-]+$"
                        },
                        "secretLast4": {
                          "type": "string",
                          "minLength": 4,
                          "maxLength": 4
                        }
                      },
                      "required": [
                        "mode",
                        "headerName",
                        "secretLast4"
                      ],
                      "additionalProperties": false
                    },
                    "mapping": {
                      "type": "object",
                      "properties": {
                        "defaultEventType": {
                          "type": "string",
                          "minLength": 1
                        },
                        "eventTypePath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "externalEventIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "occurredAtPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "summaryPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "resourceIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "relatedResourceIdPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "requiredPayloadPaths": {
                          "maxItems": 5,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "required": [
                        "defaultEventType",
                        "eventTypePath",
                        "externalEventIdPath",
                        "occurredAtPath",
                        "summaryPath",
                        "resourceIdPath",
                        "relatedResourceIdPath",
                        "requiredPayloadPaths"
                      ],
                      "additionalProperties": false
                    },
                    "capturedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "schemaVersion",
                    "endpointId",
                    "endpointPublicId",
                    "endpointUrl",
                    "name",
                    "sourceLabel",
                    "triggerVariant",
                    "auth",
                    "mapping",
                    "capturedAt"
                  ],
                  "additionalProperties": false
                },
                "currentTriggerAvailability": {
                  "type": "object",
                  "properties": {
                    "triggerVariant": {
                      "type": "string",
                      "enum": [
                        "generic",
                        "order",
                        "customer",
                        "product",
                        "inventory",
                        "fulfillment",
                        "return_refund",
                        "company_b2b"
                      ]
                    },
                    "hasEnabledFlow": {
                      "type": "boolean"
                    },
                    "lastCallbackAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "triggerVariant",
                    "hasEnabledFlow",
                    "lastCallbackAt"
                  ],
                  "additionalProperties": false
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "completedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "schemaVersion",
                "replayAttemptId",
                "originalEventId",
                "endpointId",
                "actionIntentId",
                "correlationId",
                "status",
                "stableErrorCode",
                "triggeredBy",
                "currentEndpointSnapshot",
                "currentTriggerAvailability",
                "startedAt",
                "completedAt"
              ],
              "additionalProperties": false
            }
          },
          "diagnosticsShares": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "number",
                  "const": 1
                },
                "shareId": {
                  "type": "string",
                  "minLength": 1
                },
                "scope": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "endpoint"
                        },
                        "endpointId": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "type",
                        "endpointId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "event"
                        },
                        "endpointId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "eventId": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "type",
                        "endpointId",
                        "eventId"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "stableErrorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "FLR_ENDPOINT_UNKNOWN",
                        "FLR_ENDPOINT_DELETED",
                        "FLR_AUTH_HEADER_MISSING",
                        "FLR_AUTH_FAILED",
                        "FLR_PAYLOAD_INVALID_JSON",
                        "FLR_PAYLOAD_TOO_LARGE",
                        "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                        "FLR_MAPPING_INVALID_RESOURCE_ID",
                        "FLR_NO_ENABLED_WORKFLOW",
                        "FLR_DUPLICATE_SUPPRESSED",
                        "FLR_FLOW_HANDOFF_FAILED",
                        "FLR_PLAN_LIMIT_REACHED",
                        "FLR_REPLAY_NOT_AVAILABLE",
                        "FLR_DIAGNOSTICS_UNAUTHORIZED",
                        "FLR_DIAGNOSTICS_FAILED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "includeMaskedPayloadSample": {
                  "type": "boolean"
                },
                "summaryText": {
                  "type": "string",
                  "minLength": 1
                },
                "createdByEmail": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "email",
                      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "schemaVersion",
                "shareId",
                "scope",
                "stableErrorCode",
                "includeMaskedPayloadSample",
                "summaryText",
                "createdByEmail",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "reliabilityExplanation": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "eventId": {
                "type": "string",
                "minLength": 1
              },
              "state": {
                "type": "string",
                "enum": [
                  "queued",
                  "processing",
                  "delivered",
                  "failed",
                  "no_workflow",
                  "duplicate_suppressed",
                  "reconciliation_pending",
                  "manual_review_required",
                  "replay_unavailable"
                ]
              },
              "summary": {
                "type": "string",
                "minLength": 1
              },
              "safeNextAction": {
                "type": "string",
                "enum": [
                  "wait",
                  "fix_endpoint_mapping",
                  "enable_shopify_flow",
                  "preview_replay",
                  "share_diagnostics",
                  "manual_review",
                  "resend_from_source",
                  "contact_support"
                ]
              },
              "operatorCopy": {
                "type": "string",
                "minLength": 1
              },
              "agentCopy": {
                "type": "string",
                "minLength": 1
              },
              "routeDecision": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "eventId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "correlationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "platformKey": {
                    "type": "string",
                    "const": "shopify_flow"
                  },
                  "routeKind": {
                    "type": "string",
                    "enum": [
                      "normal_event",
                      "replay"
                    ]
                  },
                  "endpointId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "triggerVariant": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "policyVersion": {
                    "type": "string",
                    "const": "shopify_flow_v1_endpoint_snapshot"
                  },
                  "decisions": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "step": {
                          "type": "string",
                          "enum": [
                            "receipt_accepted",
                            "endpoint_snapshot_selected",
                            "mapping_evaluated",
                            "dedupe_evaluated",
                            "readiness_evaluated",
                            "handoff_evaluated",
                            "reconciliation_evaluated",
                            "terminal_recorded"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "accepted",
                            "skipped",
                            "blocked",
                            "succeeded",
                            "failed",
                            "manual_review_required"
                          ]
                        },
                        "stableErrorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "FLR_ENDPOINT_UNKNOWN",
                                "FLR_ENDPOINT_DELETED",
                                "FLR_AUTH_HEADER_MISSING",
                                "FLR_AUTH_FAILED",
                                "FLR_PAYLOAD_INVALID_JSON",
                                "FLR_PAYLOAD_TOO_LARGE",
                                "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                "FLR_MAPPING_INVALID_RESOURCE_ID",
                                "FLR_NO_ENABLED_WORKFLOW",
                                "FLR_DUPLICATE_SUPPRESSED",
                                "FLR_FLOW_HANDOFF_FAILED",
                                "FLR_PLAN_LIMIT_REACHED",
                                "FLR_REPLAY_NOT_AVAILABLE",
                                "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                "FLR_DIAGNOSTICS_FAILED"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        }
                      },
                      "required": [
                        "step",
                        "status",
                        "stableErrorCode",
                        "reason",
                        "at"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "schemaVersion",
                  "eventId",
                  "correlationId",
                  "platformKey",
                  "routeKind",
                  "endpointId",
                  "triggerVariant",
                  "policyVersion",
                  "decisions"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "schemaVersion",
              "eventId",
              "state",
              "summary",
              "safeNextAction",
              "operatorCopy",
              "agentCopy",
              "routeDecision"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schemaVersion",
          "receiptId",
          "eventId",
          "correlationId",
          "endpointId",
          "endpointName",
          "sourceLabel",
          "receivedAt",
          "completedAt",
          "terminalOutcome",
          "stableErrorCode",
          "resolvedEventType",
          "resolvedExternalEventId",
          "replay",
          "endpointConfigSummary",
          "recoveryCopy",
          "deliveredCopy",
          "receiptContext",
          "endpointSnapshot",
          "source",
          "auth",
          "mapping",
          "readinessAtHandoff",
          "resolved",
          "flowHandoff",
          "handoff",
          "audit",
          "processingTrace",
          "replayAttempts",
          "diagnosticsShares",
          "reliabilityExplanation"
        ],
        "additionalProperties": false
      },
      "EventVisibilityListItem": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "receiptId": {
            "type": "string",
            "minLength": 1
          },
          "eventId": {
            "type": "string",
            "minLength": 1
          },
          "correlationId": {
            "type": "string",
            "minLength": 1
          },
          "endpointId": {
            "type": "string",
            "minLength": 1
          },
          "endpointName": {
            "type": "string",
            "minLength": 1
          },
          "sourceLabel": {
            "type": "string",
            "minLength": 1
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "terminalOutcome": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "accepted",
                  "delivered",
                  "failed",
                  "no_workflow",
                  "duplicate_suppressed",
                  "rejected"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "stableErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "FLR_ENDPOINT_UNKNOWN",
                  "FLR_ENDPOINT_DELETED",
                  "FLR_AUTH_HEADER_MISSING",
                  "FLR_AUTH_FAILED",
                  "FLR_PAYLOAD_INVALID_JSON",
                  "FLR_PAYLOAD_TOO_LARGE",
                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                  "FLR_NO_ENABLED_WORKFLOW",
                  "FLR_DUPLICATE_SUPPRESSED",
                  "FLR_FLOW_HANDOFF_FAILED",
                  "FLR_PLAN_LIMIT_REACHED",
                  "FLR_REPLAY_NOT_AVAILABLE",
                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                  "FLR_DIAGNOSTICS_FAILED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "resolvedEventType": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "resolvedExternalEventId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "replay": {
            "type": "object",
            "properties": {
              "eligible": {
                "type": "boolean"
              },
              "rawBodyExpiresAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "eligible",
              "rawBodyExpiresAt",
              "copy"
            ],
            "additionalProperties": false
          },
          "endpointConfigSummary": {
            "type": "object",
            "properties": {
              "endpointId": {
                "type": "string",
                "minLength": 1
              },
              "endpointPublicId": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "sourceLabel": {
                "type": "string",
                "minLength": 1
              },
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "authMode": {
                "type": "string",
                "enum": [
                  "hmac_sha256_header",
                  "static_header_secret"
                ]
              },
              "headerName": {
                "type": "string",
                "pattern": "^[A-Za-z0-9-]+$"
              },
              "secretLast4": {
                "type": "string",
                "minLength": 4,
                "maxLength": 4
              },
              "defaultEventType": {
                "type": "string",
                "minLength": 1
              },
              "eventTypePath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "externalEventIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurredAtPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "summaryPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resourceIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "relatedResourceIdPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requiredPayloadPaths": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "capturedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "endpointId",
              "endpointPublicId",
              "name",
              "sourceLabel",
              "triggerVariant",
              "authMode",
              "headerName",
              "secretLast4",
              "defaultEventType",
              "eventTypePath",
              "externalEventIdPath",
              "occurredAtPath",
              "summaryPath",
              "resourceIdPath",
              "relatedResourceIdPath",
              "requiredPayloadPaths",
              "capturedAt"
            ],
            "additionalProperties": false
          },
          "recoveryCopy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1
                  },
                  "operatorCopy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "agentCopy": {
                    "type": "string",
                    "minLength": 1
                  },
                  "replayable": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "string",
                        "const": "not_applicable"
                      }
                    ]
                  }
                },
                "required": [
                  "title",
                  "operatorCopy",
                  "agentCopy",
                  "replayable"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "deliveredCopy": {
            "type": "string",
            "const": "Delivered means FlowRelay handed the trigger to Shopify Flow. It does not mean downstream workflow actions completed successfully."
          }
        },
        "required": [
          "schemaVersion",
          "receiptId",
          "eventId",
          "correlationId",
          "endpointId",
          "endpointName",
          "sourceLabel",
          "receivedAt",
          "completedAt",
          "terminalOutcome",
          "stableErrorCode",
          "resolvedEventType",
          "resolvedExternalEventId",
          "replay",
          "endpointConfigSummary",
          "recoveryCopy",
          "deliveredCopy"
        ],
        "additionalProperties": false
      },
      "GenericEndpointCreateRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "triggerVariant": {
            "default": "generic",
            "type": "string",
            "enum": [
              "generic",
              "order",
              "customer",
              "product",
              "inventory",
              "fulfillment",
              "return_refund",
              "company_b2b"
            ],
            "description": "Shopify Flow trigger variant API value. Read the trigger mapping reference before choosing between generic, native resource, and related-resource variants."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "sourceLabel": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "defaultEventType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "description": "Fallback event type used when eventTypePath is blank or not present in the sender payload."
          },
          "eventTypePath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Simple JSON path where FlowRelay can read the sender event type."
          },
          "externalEventIdPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Simple JSON path for the sender's stable event ID, used for correlation and duplicate handling."
          },
          "occurredAtPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Simple JSON path for the sender's original event timestamp."
          },
          "summaryPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Simple JSON path for a short operator-readable event summary."
          },
          "resourceIdPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Required only for order, customer, and product variants. Points to the Shopify ID or GID in the sender payload."
          },
          "relatedResourceIdPath": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Required only for inventory, fulfillment, return_refund, and company_b2b variants. Points to the related resource identifier shown as text context in Flow."
          },
          "requiredPayloadPaths": {
            "default": [],
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9_-]+(?:\\[\\d+\\])?(?:\\.[A-Za-z0-9_-]+(?:\\[\\d+\\])?)*$"
            },
            "description": "Up to five simple JSON paths that must be present before FlowRelay hands the event to Shopify Flow."
          },
          "authMode": {
            "default": "hmac_sha256_header",
            "type": "string",
            "enum": [
              "hmac_sha256_header",
              "static_header_secret"
            ]
          },
          "headerName": {
            "default": "X-FlowRelay-Signature",
            "type": "string",
            "pattern": "^[A-Za-z0-9-]+$"
          }
        },
        "required": [
          "triggerVariant",
          "name",
          "sourceLabel",
          "defaultEventType",
          "eventTypePath",
          "externalEventIdPath",
          "occurredAtPath",
          "summaryPath",
          "resourceIdPath",
          "relatedResourceIdPath",
          "requiredPayloadPaths",
          "authMode",
          "headerName"
        ],
        "additionalProperties": false
      },
      "GenericEndpointCreateResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "endpoint": {
            "type": "object",
            "properties": {
              "endpointId": {
                "type": "string",
                "minLength": 1
              },
              "endpointPublicId": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "sourceLabel": {
                "type": "string",
                "minLength": 1
              },
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "trigger": {
                "type": "object",
                "properties": {
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1
                  },
                  "handle": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "triggerVariant",
                  "label",
                  "handle"
                ],
                "additionalProperties": false
              },
              "endpointUrl": {
                "type": "string",
                "format": "uri"
              },
              "authMode": {
                "type": "string",
                "enum": [
                  "hmac_sha256_header",
                  "static_header_secret"
                ]
              },
              "headerName": {
                "type": "string",
                "pattern": "^[A-Za-z0-9-]+$"
              },
              "secret": {
                "type": "object",
                "properties": {
                  "last4": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 4
                  },
                  "oneTimeSecret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 24
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "last4",
                  "oneTimeSecret"
                ],
                "additionalProperties": false
              },
              "defaultEventType": {
                "type": "string",
                "minLength": 1
              },
              "latestResultState": {
                "default": "none",
                "type": "string",
                "enum": [
                  "none",
                  "accepted",
                  "delivered",
                  "failed"
                ]
              },
              "latestResult": {
                "default": null,
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "eventId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "receivedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "completedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "terminalOutcome": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "delivered",
                              "failed",
                              "no_workflow",
                              "duplicate_suppressed",
                              "rejected"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "eventId",
                      "receivedAt",
                      "completedAt",
                      "terminalOutcome",
                      "stableErrorCode"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "flowSetupRecipe": {
                "type": "object",
                "properties": {
                  "trigger": {
                    "type": "object",
                    "properties": {
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1
                      },
                      "handle": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "triggerVariant",
                      "label",
                      "handle"
                    ],
                    "additionalProperties": false
                  },
                  "steps": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "conditionHints": {
                    "type": "object",
                    "properties": {
                      "sourceLabel": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "eventType": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "sourceLabel",
                      "eventType"
                    ],
                    "additionalProperties": false
                  },
                  "operatorCopy": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "trigger",
                  "steps",
                  "conditionHints",
                  "operatorCopy"
                ],
                "additionalProperties": false
              },
              "senderSetupInstructions": {
                "type": "object",
                "properties": {
                  "endpointUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "method": {
                    "type": "string",
                    "const": "POST"
                  },
                  "contentType": {
                    "type": "string",
                    "const": "application/json"
                  },
                  "authMode": {
                    "type": "string",
                    "enum": [
                      "hmac_sha256_header",
                      "static_header_secret"
                    ]
                  },
                  "headerName": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9-]+$"
                  },
                  "signingInstructions": {
                    "type": "string",
                    "minLength": 1
                  },
                  "testInstructions": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "endpointUrl",
                  "method",
                  "contentType",
                  "authMode",
                  "headerName",
                  "signingInstructions",
                  "testInstructions"
                ],
                "additionalProperties": false
              },
              "readiness": {
                "type": "object",
                "properties": {
                  "lifecycleImplemented": {
                    "type": "boolean"
                  },
                  "ingestImplemented": {
                    "type": "boolean"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "setup_only",
                      "ready_for_test",
                      "blocked"
                    ]
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 1
                  },
                  "detail": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "lifecycleImplemented",
                  "ingestImplemented",
                  "state",
                  "summary",
                  "detail"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "endpointId",
              "endpointPublicId",
              "name",
              "sourceLabel",
              "triggerVariant",
              "trigger",
              "endpointUrl",
              "authMode",
              "headerName",
              "secret",
              "defaultEventType",
              "latestResultState",
              "latestResult",
              "flowSetupRecipe",
              "senderSetupInstructions",
              "readiness"
            ],
            "additionalProperties": false
          },
          "setupState": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "platform": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "platformKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "platformName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "editionName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "automationSystem": {
                    "type": "string",
                    "minLength": 1
                  },
                  "billingProvider": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "schemaVersion",
                  "platformKey",
                  "platformName",
                  "editionName",
                  "automationSystem",
                  "billingProvider"
                ],
                "additionalProperties": false
              },
              "store": {
                "type": "object",
                "properties": {
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "shopDomain": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "installationId",
                  "shopDomain"
                ],
                "additionalProperties": false
              },
              "genericTrigger": {
                "type": "object",
                "properties": {
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1
                  },
                  "handle": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "triggerVariant",
                  "label",
                  "handle"
                ],
                "additionalProperties": false
              },
              "defaultFlowSetupRecipe": {
                "type": "object",
                "properties": {
                  "trigger": {
                    "type": "object",
                    "properties": {
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1
                      },
                      "handle": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "triggerVariant",
                      "label",
                      "handle"
                    ],
                    "additionalProperties": false
                  },
                  "steps": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "conditionHints": {
                    "type": "object",
                    "properties": {
                      "sourceLabel": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "eventType": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "sourceLabel",
                      "eventType"
                    ],
                    "additionalProperties": false
                  },
                  "operatorCopy": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "trigger",
                  "steps",
                  "conditionHints",
                  "operatorCopy"
                ],
                "additionalProperties": false
              },
              "readiness": {
                "type": "object",
                "properties": {
                  "lifecycleImplemented": {
                    "type": "boolean"
                  },
                  "ingestImplemented": {
                    "type": "boolean"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "setup_only",
                      "ready_for_test",
                      "blocked"
                    ]
                  },
                  "summary": {
                    "type": "string",
                    "minLength": 1
                  },
                  "detail": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "lifecycleImplemented",
                  "ingestImplemented",
                  "state",
                  "summary",
                  "detail"
                ],
                "additionalProperties": false
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "enum": [
                        "create_endpoint",
                        "enable_flow_trigger",
                        "send_test_request",
                        "observe_first_result"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "not_started",
                        "ready",
                        "blocked",
                        "complete"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "key",
                    "state",
                    "summary"
                  ],
                  "additionalProperties": false
                }
              },
              "endpoints": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "endpointId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "endpointPublicId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "sourceLabel": {
                      "type": "string",
                      "minLength": 1
                    },
                    "triggerVariant": {
                      "type": "string",
                      "enum": [
                        "generic",
                        "order",
                        "customer",
                        "product",
                        "inventory",
                        "fulfillment",
                        "return_refund",
                        "company_b2b"
                      ]
                    },
                    "trigger": {
                      "type": "object",
                      "properties": {
                        "triggerVariant": {
                          "type": "string",
                          "enum": [
                            "generic",
                            "order",
                            "customer",
                            "product",
                            "inventory",
                            "fulfillment",
                            "return_refund",
                            "company_b2b"
                          ]
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1
                        },
                        "handle": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "triggerVariant",
                        "label",
                        "handle"
                      ],
                      "additionalProperties": false
                    },
                    "endpointUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "authMode": {
                      "type": "string",
                      "enum": [
                        "hmac_sha256_header",
                        "static_header_secret"
                      ]
                    },
                    "headerName": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9-]+$"
                    },
                    "secret": {
                      "type": "object",
                      "properties": {
                        "last4": {
                          "type": "string",
                          "minLength": 4,
                          "maxLength": 4
                        },
                        "oneTimeSecret": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 24
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "last4",
                        "oneTimeSecret"
                      ],
                      "additionalProperties": false
                    },
                    "defaultEventType": {
                      "type": "string",
                      "minLength": 1
                    },
                    "latestResultState": {
                      "default": "none",
                      "type": "string",
                      "enum": [
                        "none",
                        "accepted",
                        "delivered",
                        "failed"
                      ]
                    },
                    "latestResult": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "eventId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "receivedAt": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "terminalOutcome": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "accepted",
                                    "delivered",
                                    "failed",
                                    "no_workflow",
                                    "duplicate_suppressed",
                                    "rejected"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "stableErrorCode": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "FLR_ENDPOINT_UNKNOWN",
                                    "FLR_ENDPOINT_DELETED",
                                    "FLR_AUTH_HEADER_MISSING",
                                    "FLR_AUTH_FAILED",
                                    "FLR_PAYLOAD_INVALID_JSON",
                                    "FLR_PAYLOAD_TOO_LARGE",
                                    "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                    "FLR_MAPPING_INVALID_RESOURCE_ID",
                                    "FLR_NO_ENABLED_WORKFLOW",
                                    "FLR_DUPLICATE_SUPPRESSED",
                                    "FLR_FLOW_HANDOFF_FAILED",
                                    "FLR_PLAN_LIMIT_REACHED",
                                    "FLR_REPLAY_NOT_AVAILABLE",
                                    "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                    "FLR_DIAGNOSTICS_FAILED"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "eventId",
                            "receivedAt",
                            "completedAt",
                            "terminalOutcome",
                            "stableErrorCode"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "flowSetupRecipe": {
                      "type": "object",
                      "properties": {
                        "trigger": {
                          "type": "object",
                          "properties": {
                            "triggerVariant": {
                              "type": "string",
                              "enum": [
                                "generic",
                                "order",
                                "customer",
                                "product",
                                "inventory",
                                "fulfillment",
                                "return_refund",
                                "company_b2b"
                              ]
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1
                            },
                            "handle": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "triggerVariant",
                            "label",
                            "handle"
                          ],
                          "additionalProperties": false
                        },
                        "steps": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "conditionHints": {
                          "type": "object",
                          "properties": {
                            "sourceLabel": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "eventType": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "sourceLabel",
                            "eventType"
                          ],
                          "additionalProperties": false
                        },
                        "operatorCopy": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "trigger",
                        "steps",
                        "conditionHints",
                        "operatorCopy"
                      ],
                      "additionalProperties": false
                    },
                    "senderSetupInstructions": {
                      "type": "object",
                      "properties": {
                        "endpointUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "method": {
                          "type": "string",
                          "const": "POST"
                        },
                        "contentType": {
                          "type": "string",
                          "const": "application/json"
                        },
                        "authMode": {
                          "type": "string",
                          "enum": [
                            "hmac_sha256_header",
                            "static_header_secret"
                          ]
                        },
                        "headerName": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9-]+$"
                        },
                        "signingInstructions": {
                          "type": "string",
                          "minLength": 1
                        },
                        "testInstructions": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "required": [
                        "endpointUrl",
                        "method",
                        "contentType",
                        "authMode",
                        "headerName",
                        "signingInstructions",
                        "testInstructions"
                      ],
                      "additionalProperties": false
                    },
                    "readiness": {
                      "type": "object",
                      "properties": {
                        "lifecycleImplemented": {
                          "type": "boolean"
                        },
                        "ingestImplemented": {
                          "type": "boolean"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "setup_only",
                            "ready_for_test",
                            "blocked"
                          ]
                        },
                        "summary": {
                          "type": "string",
                          "minLength": 1
                        },
                        "detail": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "lifecycleImplemented",
                        "ingestImplemented",
                        "state",
                        "summary",
                        "detail"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "endpointId",
                    "endpointPublicId",
                    "name",
                    "sourceLabel",
                    "triggerVariant",
                    "trigger",
                    "endpointUrl",
                    "authMode",
                    "headerName",
                    "secret",
                    "defaultEventType",
                    "latestResultState",
                    "latestResult",
                    "flowSetupRecipe",
                    "senderSetupInstructions",
                    "readiness"
                  ],
                  "additionalProperties": false
                }
              },
              "triggerReadiness": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "triggerVariant": {
                      "type": "string",
                      "enum": [
                        "generic",
                        "order",
                        "customer",
                        "product",
                        "inventory",
                        "fulfillment",
                        "return_refund",
                        "company_b2b"
                      ]
                    },
                    "hasEnabledFlow": {
                      "type": "boolean"
                    },
                    "lastCallbackAt": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "triggerVariant",
                    "hasEnabledFlow",
                    "lastCallbackAt"
                  ],
                  "additionalProperties": false
                }
              },
              "nextRecommendedActions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "schemaVersion",
              "platform",
              "store",
              "genericTrigger",
              "defaultFlowSetupRecipe",
              "readiness",
              "checklist",
              "endpoints",
              "triggerReadiness",
              "nextRecommendedActions"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schemaVersion",
          "endpoint",
          "setupState"
        ],
        "additionalProperties": false
      },
      "PlanUsageState": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "platform": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "platformKey": {
                "type": "string",
                "minLength": 1
              },
              "platformName": {
                "type": "string",
                "minLength": 1
              },
              "editionName": {
                "type": "string",
                "minLength": 1
              },
              "automationSystem": {
                "type": "string",
                "minLength": 1
              },
              "billingProvider": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "schemaVersion",
              "platformKey",
              "platformName",
              "editionName",
              "automationSystem",
              "billingProvider"
            ],
            "additionalProperties": false
          },
          "plan": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "enum": [
                  "free_test",
                  "starter",
                  "growth",
                  "scale"
                ]
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "effectivePlanKey": {
                "type": "string",
                "enum": [
                  "free_test",
                  "starter",
                  "growth",
                  "scale"
                ]
              },
              "selectedPlanKey": {
                "type": "string",
                "enum": [
                  "free_test",
                  "starter",
                  "growth",
                  "scale"
                ]
              },
              "limits": {
                "type": "object",
                "properties": {
                  "acceptedEventsMonthly": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "retentionDays": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "diagnosticsSharesMonthly": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "replayExecutionsMonthly": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "simpleAgentReadsMonthly": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "richAgentReadsMonthly": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "actionIntentsMonthly": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "executedActionsMonthly": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "acceptedEventsMonthly",
                  "retentionDays",
                  "diagnosticsSharesMonthly",
                  "replayExecutionsMonthly",
                  "simpleAgentReadsMonthly",
                  "richAgentReadsMonthly",
                  "actionIntentsMonthly",
                  "executedActionsMonthly"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "key",
              "name",
              "effectivePlanKey",
              "selectedPlanKey",
              "limits"
            ],
            "additionalProperties": false
          },
          "billing": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "free",
                  "requires_approval",
                  "pending_approval",
                  "active",
                  "test_active",
                  "declined",
                  "expired",
                  "frozen",
                  "canceled",
                  "canceled_grace",
                  "uninstalled",
                  "reconcile_pending"
                ]
              },
              "interval": {
                "type": "string",
                "enum": [
                  "free",
                  "monthly",
                  "annual"
                ]
              },
              "isTest": {
                "type": "boolean"
              },
              "isTestMode": {
                "type": "boolean"
              },
              "shopifyChargeId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "currentPeriodStart": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "currentPeriodEnd": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "syncedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "approvalRequired": {
                "type": "boolean"
              },
              "approvalCopy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "status",
              "interval",
              "isTest",
              "isTestMode",
              "shopifyChargeId",
              "currentPeriodStart",
              "currentPeriodEnd",
              "syncedAt",
              "approvalRequired",
              "approvalCopy"
            ],
            "additionalProperties": false
          },
          "usage": {
            "type": "object",
            "properties": {
              "periodStart": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "periodEnd": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "acceptedEvents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "deliveredEvents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "failedEvents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "simpleAgentReads": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "richAgentReads": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "actionIntents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "executedActions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "replayAttempts": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "diagnosticsShares": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "retainedPayloadBytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "periodStart",
              "periodEnd",
              "acceptedEvents",
              "deliveredEvents",
              "failedEvents",
              "simpleAgentReads",
              "richAgentReads",
              "actionIntents",
              "executedActions",
              "replayAttempts",
              "diagnosticsShares",
              "retainedPayloadBytes"
            ],
            "additionalProperties": false
          },
          "meters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "enum": [
                    "acceptedEvents",
                    "simpleAgentReads",
                    "richAgentReads",
                    "actionIntents",
                    "executedActions",
                    "replayAttempts",
                    "diagnosticsShares"
                  ]
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "used": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "limit": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "percentUsed": {
                  "type": "number",
                  "minimum": 0
                },
                "level": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "warning",
                    "grace",
                    "limit_reached"
                  ]
                },
                "copy": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "key",
                "label",
                "used",
                "limit",
                "percentUsed",
                "level",
                "copy"
              ],
              "additionalProperties": false
            }
          },
          "eventGrace": {
            "type": "object",
            "properties": {
              "eligible": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "enum": [
                  "not_applicable",
                  "inactive",
                  "active",
                  "exhausted"
                ]
              },
              "includedLimit": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "graceAllowance": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "totalAllowed": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "graceUsed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "graceRemaining": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "deadline": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "nextAction": {
                "type": "string",
                "enum": [
                  "none",
                  "monitor_usage",
                  "prepare_billing_handoff",
                  "upgrade_or_request_capacity",
                  "wait_for_next_period"
                ]
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "eligible",
              "status",
              "includedLimit",
              "graceAllowance",
              "totalAllowed",
              "graceUsed",
              "graceRemaining",
              "deadline",
              "nextAction",
              "copy"
            ],
            "additionalProperties": false
          },
          "enforcement": {
            "type": "object",
            "properties": {
              "canAcceptEvents": {
                "type": "boolean"
              },
              "canExecuteGovernedActions": {
                "type": "boolean"
              },
              "eventLimitReached": {
                "type": "boolean"
              },
              "governedActionLimitReached": {
                "type": "boolean"
              },
              "eventIntakeStatus": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "grace_active",
                  "blocked"
                ]
              },
              "governedActionStatus": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "blocked"
                ]
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "canAcceptEvents",
              "canExecuteGovernedActions",
              "eventLimitReached",
              "governedActionLimitReached",
              "eventIntakeStatus",
              "governedActionStatus",
              "copy"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schemaVersion",
          "platform",
          "plan",
          "billing",
          "usage",
          "meters",
          "eventGrace",
          "enforcement"
        ],
        "additionalProperties": false
      },
      "PlatformIdentity": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "platformKey": {
            "type": "string",
            "minLength": 1
          },
          "platformName": {
            "type": "string",
            "minLength": 1
          },
          "editionName": {
            "type": "string",
            "minLength": 1
          },
          "automationSystem": {
            "type": "string",
            "minLength": 1
          },
          "billingProvider": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "schemaVersion",
          "platformKey",
          "platformName",
          "editionName",
          "automationSystem",
          "billingProvider"
        ],
        "additionalProperties": false
      },
      "ReliabilityExplanation": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "eventId": {
            "type": "string",
            "minLength": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "delivered",
              "failed",
              "no_workflow",
              "duplicate_suppressed",
              "reconciliation_pending",
              "manual_review_required",
              "replay_unavailable"
            ]
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "safeNextAction": {
            "type": "string",
            "enum": [
              "wait",
              "fix_endpoint_mapping",
              "enable_shopify_flow",
              "preview_replay",
              "share_diagnostics",
              "manual_review",
              "resend_from_source",
              "contact_support"
            ]
          },
          "operatorCopy": {
            "type": "string",
            "minLength": 1
          },
          "agentCopy": {
            "type": "string",
            "minLength": 1
          },
          "routeDecision": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "eventId": {
                "type": "string",
                "minLength": 1
              },
              "correlationId": {
                "type": "string",
                "minLength": 1
              },
              "platformKey": {
                "type": "string",
                "const": "shopify_flow"
              },
              "routeKind": {
                "type": "string",
                "enum": [
                  "normal_event",
                  "replay"
                ]
              },
              "endpointId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "triggerVariant": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "policyVersion": {
                "type": "string",
                "const": "shopify_flow_v1_endpoint_snapshot"
              },
              "decisions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "step": {
                      "type": "string",
                      "enum": [
                        "receipt_accepted",
                        "endpoint_snapshot_selected",
                        "mapping_evaluated",
                        "dedupe_evaluated",
                        "readiness_evaluated",
                        "handoff_evaluated",
                        "reconciliation_evaluated",
                        "terminal_recorded"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "skipped",
                        "blocked",
                        "succeeded",
                        "failed",
                        "manual_review_required"
                      ]
                    },
                    "stableErrorCode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "FLR_ENDPOINT_UNKNOWN",
                            "FLR_ENDPOINT_DELETED",
                            "FLR_AUTH_HEADER_MISSING",
                            "FLR_AUTH_FAILED",
                            "FLR_PAYLOAD_INVALID_JSON",
                            "FLR_PAYLOAD_TOO_LARGE",
                            "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                            "FLR_MAPPING_INVALID_RESOURCE_ID",
                            "FLR_NO_ENABLED_WORKFLOW",
                            "FLR_DUPLICATE_SUPPRESSED",
                            "FLR_FLOW_HANDOFF_FAILED",
                            "FLR_PLAN_LIMIT_REACHED",
                            "FLR_REPLAY_NOT_AVAILABLE",
                            "FLR_DIAGNOSTICS_UNAUTHORIZED",
                            "FLR_DIAGNOSTICS_FAILED"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "step",
                    "status",
                    "stableErrorCode",
                    "reason",
                    "at"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "schemaVersion",
              "eventId",
              "correlationId",
              "platformKey",
              "routeKind",
              "endpointId",
              "triggerVariant",
              "policyVersion",
              "decisions"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schemaVersion",
          "eventId",
          "state",
          "summary",
          "safeNextAction",
          "operatorCopy",
          "agentCopy",
          "routeDecision"
        ],
        "additionalProperties": false
      },
      "ReliabilityHealthSummary": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "platformKey": {
            "type": "string",
            "const": "shopify_flow"
          },
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "tenant"
                  },
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "installationId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "endpoint"
                  },
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "installationId",
                  "endpointId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "trigger_variant"
                  },
                  "installationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  }
                },
                "required": [
                  "kind",
                  "installationId",
                  "triggerVariant"
                ],
                "additionalProperties": false
              }
            ]
          },
          "windowStartedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "windowEndedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "acceptedEvents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "deliveredEvents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failedEvents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "noWorkflowEvents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "duplicateSuppressedEvents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "replayAttempts": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "replayDelivered": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "replayFailed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "reconciliationBacklog": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "oldestUndeliveredEventAgeSeconds": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "deliveryLatencyP95Ms": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "deliveryLatencyP99Ms": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "health": {
            "type": "string",
            "enum": [
              "healthy",
              "degraded",
              "blocked",
              "manual_review_required",
              "insufficient_data"
            ]
          },
          "safeNextAction": {
            "type": "string",
            "enum": [
              "wait",
              "inspect_events",
              "preview_replay",
              "manual_review",
              "contact_support"
            ]
          },
          "signals": {
            "type": "object",
            "properties": {
              "failedEventRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "replayFailureRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "manualReviewEvents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "failedEventRate",
              "replayFailureRate",
              "manualReviewEvents"
            ],
            "additionalProperties": false
          },
          "thresholds": {
            "type": "object",
            "properties": {
              "oldestUndeliveredWarningSeconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "oldestUndeliveredCriticalSeconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "failedEventRateWarning": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "failedEventRateCritical": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "replayFailureRateWarning": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "replayFailureRateCritical": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "reconciliationBacklogWarning": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "reconciliationBacklogCritical": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "manualReviewEventsCritical": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "oldestUndeliveredWarningSeconds",
              "oldestUndeliveredCriticalSeconds",
              "failedEventRateWarning",
              "failedEventRateCritical",
              "replayFailureRateWarning",
              "replayFailureRateCritical",
              "reconciliationBacklogWarning",
              "reconciliationBacklogCritical",
              "manualReviewEventsCritical"
            ],
            "additionalProperties": false
          },
          "explanation": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "schemaVersion",
          "platformKey",
          "scope",
          "windowStartedAt",
          "windowEndedAt",
          "acceptedEvents",
          "deliveredEvents",
          "failedEvents",
          "noWorkflowEvents",
          "duplicateSuppressedEvents",
          "replayAttempts",
          "replayDelivered",
          "replayFailed",
          "reconciliationBacklog",
          "oldestUndeliveredEventAgeSeconds",
          "deliveryLatencyP95Ms",
          "deliveryLatencyP99Ms",
          "health",
          "safeNextAction",
          "signals",
          "thresholds",
          "explanation"
        ],
        "additionalProperties": false
      },
      "ReplayAttempt": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "replayAttemptId": {
            "type": "string",
            "minLength": 1
          },
          "originalEventId": {
            "type": "string",
            "minLength": 1
          },
          "endpointId": {
            "type": "string",
            "minLength": 1
          },
          "actionIntentId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "correlationId": {
            "type": "string",
            "pattern": "^flr_corr_[a-f0-9-]{36}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "delivered",
              "failed",
              "no_workflow",
              "not_available"
            ]
          },
          "stableErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "FLR_ENDPOINT_UNKNOWN",
                  "FLR_ENDPOINT_DELETED",
                  "FLR_AUTH_HEADER_MISSING",
                  "FLR_AUTH_FAILED",
                  "FLR_PAYLOAD_INVALID_JSON",
                  "FLR_PAYLOAD_TOO_LARGE",
                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                  "FLR_NO_ENABLED_WORKFLOW",
                  "FLR_DUPLICATE_SUPPRESSED",
                  "FLR_FLOW_HANDOFF_FAILED",
                  "FLR_PLAN_LIMIT_REACHED",
                  "FLR_REPLAY_NOT_AVAILABLE",
                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                  "FLR_DIAGNOSTICS_FAILED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "triggeredBy": {
            "type": "object",
            "properties": {
              "actorType": {
                "type": "string",
                "enum": [
                  "shopify_user",
                  "flowrelay_support",
                  "internal_agent",
                  "merchant_authorized_agent",
                  "browser_fallback_agent"
                ]
              },
              "actorId": {
                "type": "string",
                "minLength": 1
              },
              "actorEmail": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              "displayName": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "actorType",
              "actorId"
            ],
            "additionalProperties": false
          },
          "currentEndpointSnapshot": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "endpointId": {
                "type": "string",
                "minLength": 1
              },
              "endpointPublicId": {
                "type": "string",
                "minLength": 1
              },
              "endpointUrl": {
                "type": "string",
                "format": "uri"
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "sourceLabel": {
                "type": "string",
                "minLength": 1
              },
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "auth": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "hmac_sha256_header",
                      "static_header_secret"
                    ]
                  },
                  "headerName": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9-]+$"
                  },
                  "secretLast4": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 4
                  }
                },
                "required": [
                  "mode",
                  "headerName",
                  "secretLast4"
                ],
                "additionalProperties": false
              },
              "mapping": {
                "type": "object",
                "properties": {
                  "defaultEventType": {
                    "type": "string",
                    "minLength": 1
                  },
                  "eventTypePath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalEventIdPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "occurredAtPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "summaryPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "resourceIdPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "relatedResourceIdPath": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requiredPayloadPaths": {
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "defaultEventType",
                  "eventTypePath",
                  "externalEventIdPath",
                  "occurredAtPath",
                  "summaryPath",
                  "resourceIdPath",
                  "relatedResourceIdPath",
                  "requiredPayloadPaths"
                ],
                "additionalProperties": false
              },
              "capturedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "schemaVersion",
              "endpointId",
              "endpointPublicId",
              "endpointUrl",
              "name",
              "sourceLabel",
              "triggerVariant",
              "auth",
              "mapping",
              "capturedAt"
            ],
            "additionalProperties": false
          },
          "currentTriggerAvailability": {
            "type": "object",
            "properties": {
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "hasEnabledFlow": {
                "type": "boolean"
              },
              "lastCallbackAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "triggerVariant",
              "hasEnabledFlow",
              "lastCallbackAt"
            ],
            "additionalProperties": false
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schemaVersion",
          "replayAttemptId",
          "originalEventId",
          "endpointId",
          "actionIntentId",
          "correlationId",
          "status",
          "stableErrorCode",
          "triggeredBy",
          "currentEndpointSnapshot",
          "currentTriggerAvailability",
          "startedAt",
          "completedAt"
        ],
        "additionalProperties": false
      },
      "ReplayExecutionResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "actionIntentId": {
            "type": "string",
            "minLength": 1
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1
          },
          "originalEventId": {
            "type": "string",
            "minLength": 1
          },
          "replayAttemptId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "not_available"
            ]
          },
          "stableErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "FLR_ENDPOINT_UNKNOWN",
                  "FLR_ENDPOINT_DELETED",
                  "FLR_AUTH_HEADER_MISSING",
                  "FLR_AUTH_FAILED",
                  "FLR_PAYLOAD_INVALID_JSON",
                  "FLR_PAYLOAD_TOO_LARGE",
                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                  "FLR_NO_ENABLED_WORKFLOW",
                  "FLR_DUPLICATE_SUPPRESSED",
                  "FLR_FLOW_HANDOFF_FAILED",
                  "FLR_PLAN_LIMIT_REACHED",
                  "FLR_REPLAY_NOT_AVAILABLE",
                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                  "FLR_DIAGNOSTICS_FAILED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "preview": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "actionIntentId": {
                "type": "string",
                "minLength": 1
              },
              "idempotencyKey": {
                "type": "string",
                "minLength": 1
              },
              "originalEventId": {
                "type": "string",
                "minLength": 1
              },
              "receiptId": {
                "type": "string",
                "minLength": 1
              },
              "available": {
                "type": "boolean"
              },
              "stableErrorCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "FLR_ENDPOINT_UNKNOWN",
                      "FLR_ENDPOINT_DELETED",
                      "FLR_AUTH_HEADER_MISSING",
                      "FLR_AUTH_FAILED",
                      "FLR_PAYLOAD_INVALID_JSON",
                      "FLR_PAYLOAD_TOO_LARGE",
                      "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                      "FLR_MAPPING_INVALID_RESOURCE_ID",
                      "FLR_NO_ENABLED_WORKFLOW",
                      "FLR_DUPLICATE_SUPPRESSED",
                      "FLR_FLOW_HANDOFF_FAILED",
                      "FLR_PLAN_LIMIT_REACHED",
                      "FLR_REPLAY_NOT_AVAILABLE",
                      "FLR_DIAGNOSTICS_UNAUTHORIZED",
                      "FLR_DIAGNOSTICS_FAILED"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reason": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warningCopy": {
                "type": "string",
                "minLength": 1
              },
              "originalEndpointSnapshot": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "endpointPublicId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "endpointUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "sourceLabel": {
                        "type": "string",
                        "minLength": 1
                      },
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "auth": {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "hmac_sha256_header",
                              "static_header_secret"
                            ]
                          },
                          "headerName": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9-]+$"
                          },
                          "secretLast4": {
                            "type": "string",
                            "minLength": 4,
                            "maxLength": 4
                          }
                        },
                        "required": [
                          "mode",
                          "headerName",
                          "secretLast4"
                        ],
                        "additionalProperties": false
                      },
                      "mapping": {
                        "type": "object",
                        "properties": {
                          "defaultEventType": {
                            "type": "string",
                            "minLength": 1
                          },
                          "eventTypePath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "externalEventIdPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "occurredAtPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "summaryPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resourceIdPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "relatedResourceIdPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "requiredPayloadPaths": {
                            "maxItems": 5,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        },
                        "required": [
                          "defaultEventType",
                          "eventTypePath",
                          "externalEventIdPath",
                          "occurredAtPath",
                          "summaryPath",
                          "resourceIdPath",
                          "relatedResourceIdPath",
                          "requiredPayloadPaths"
                        ],
                        "additionalProperties": false
                      },
                      "capturedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "endpointId",
                      "endpointPublicId",
                      "endpointUrl",
                      "name",
                      "sourceLabel",
                      "triggerVariant",
                      "auth",
                      "mapping",
                      "capturedAt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "currentEndpointSnapshot": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schemaVersion": {
                        "type": "number",
                        "const": 1
                      },
                      "endpointId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "endpointPublicId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "endpointUrl": {
                        "type": "string",
                        "format": "uri"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "sourceLabel": {
                        "type": "string",
                        "minLength": 1
                      },
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "auth": {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "hmac_sha256_header",
                              "static_header_secret"
                            ]
                          },
                          "headerName": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9-]+$"
                          },
                          "secretLast4": {
                            "type": "string",
                            "minLength": 4,
                            "maxLength": 4
                          }
                        },
                        "required": [
                          "mode",
                          "headerName",
                          "secretLast4"
                        ],
                        "additionalProperties": false
                      },
                      "mapping": {
                        "type": "object",
                        "properties": {
                          "defaultEventType": {
                            "type": "string",
                            "minLength": 1
                          },
                          "eventTypePath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "externalEventIdPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "occurredAtPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "summaryPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resourceIdPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "relatedResourceIdPath": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "requiredPayloadPaths": {
                            "maxItems": 5,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        },
                        "required": [
                          "defaultEventType",
                          "eventTypePath",
                          "externalEventIdPath",
                          "occurredAtPath",
                          "summaryPath",
                          "resourceIdPath",
                          "relatedResourceIdPath",
                          "requiredPayloadPaths"
                        ],
                        "additionalProperties": false
                      },
                      "capturedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      }
                    },
                    "required": [
                      "schemaVersion",
                      "endpointId",
                      "endpointPublicId",
                      "endpointUrl",
                      "name",
                      "sourceLabel",
                      "triggerVariant",
                      "auth",
                      "mapping",
                      "capturedAt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "configDifferences": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string",
                      "minLength": 1
                    },
                    "originalValue": {
                      "type": "string"
                    },
                    "currentValue": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "field",
                    "originalValue",
                    "currentValue"
                  ],
                  "additionalProperties": false
                }
              },
              "currentTriggerAvailability": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "triggerVariant": {
                        "type": "string",
                        "enum": [
                          "generic",
                          "order",
                          "customer",
                          "product",
                          "inventory",
                          "fulfillment",
                          "return_refund",
                          "company_b2b"
                        ]
                      },
                      "hasEnabledFlow": {
                        "type": "boolean"
                      },
                      "lastCallbackAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "triggerVariant",
                      "hasEnabledFlow",
                      "lastCallbackAt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "mappingPreview": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "ok": {
                        "type": "boolean"
                      },
                      "stableErrorCode": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "FLR_ENDPOINT_UNKNOWN",
                              "FLR_ENDPOINT_DELETED",
                              "FLR_AUTH_HEADER_MISSING",
                              "FLR_AUTH_FAILED",
                              "FLR_PAYLOAD_INVALID_JSON",
                              "FLR_PAYLOAD_TOO_LARGE",
                              "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                              "FLR_MAPPING_INVALID_RESOURCE_ID",
                              "FLR_NO_ENABLED_WORKFLOW",
                              "FLR_DUPLICATE_SUPPRESSED",
                              "FLR_FLOW_HANDOFF_FAILED",
                              "FLR_PLAN_LIMIT_REACHED",
                              "FLR_REPLAY_NOT_AVAILABLE",
                              "FLR_DIAGNOSTICS_UNAUTHORIZED",
                              "FLR_DIAGNOSTICS_FAILED"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "copy": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "ok",
                      "stableErrorCode",
                      "copy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "duplicateSuppression": {
                "type": "object",
                "properties": {
                  "bypassed": {
                    "type": "boolean",
                    "const": true
                  },
                  "copy": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "bypassed",
                  "copy"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "schemaVersion",
              "actionIntentId",
              "idempotencyKey",
              "originalEventId",
              "receiptId",
              "available",
              "stableErrorCode",
              "reason",
              "warningCopy",
              "originalEndpointSnapshot",
              "currentEndpointSnapshot",
              "configDifferences",
              "currentTriggerAvailability",
              "mappingPreview",
              "duplicateSuppression"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schemaVersion",
          "actionIntentId",
          "idempotencyKey",
          "originalEventId",
          "replayAttemptId",
          "status",
          "stableErrorCode",
          "reason",
          "preview"
        ],
        "additionalProperties": false
      },
      "ReplayPreviewResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "actionIntentId": {
            "type": "string",
            "minLength": 1
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1
          },
          "originalEventId": {
            "type": "string",
            "minLength": 1
          },
          "receiptId": {
            "type": "string",
            "minLength": 1
          },
          "available": {
            "type": "boolean"
          },
          "stableErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "FLR_ENDPOINT_UNKNOWN",
                  "FLR_ENDPOINT_DELETED",
                  "FLR_AUTH_HEADER_MISSING",
                  "FLR_AUTH_FAILED",
                  "FLR_PAYLOAD_INVALID_JSON",
                  "FLR_PAYLOAD_TOO_LARGE",
                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                  "FLR_NO_ENABLED_WORKFLOW",
                  "FLR_DUPLICATE_SUPPRESSED",
                  "FLR_FLOW_HANDOFF_FAILED",
                  "FLR_PLAN_LIMIT_REACHED",
                  "FLR_REPLAY_NOT_AVAILABLE",
                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                  "FLR_DIAGNOSTICS_FAILED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "warningCopy": {
            "type": "string",
            "minLength": 1
          },
          "originalEndpointSnapshot": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointPublicId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceLabel": {
                    "type": "string",
                    "minLength": 1
                  },
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "hmac_sha256_header",
                          "static_header_secret"
                        ]
                      },
                      "headerName": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]+$"
                      },
                      "secretLast4": {
                        "type": "string",
                        "minLength": 4,
                        "maxLength": 4
                      }
                    },
                    "required": [
                      "mode",
                      "headerName",
                      "secretLast4"
                    ],
                    "additionalProperties": false
                  },
                  "mapping": {
                    "type": "object",
                    "properties": {
                      "defaultEventType": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventTypePath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAtPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summaryPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "requiredPayloadPaths": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "defaultEventType",
                      "eventTypePath",
                      "externalEventIdPath",
                      "occurredAtPath",
                      "summaryPath",
                      "resourceIdPath",
                      "relatedResourceIdPath",
                      "requiredPayloadPaths"
                    ],
                    "additionalProperties": false
                  },
                  "capturedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "schemaVersion",
                  "endpointId",
                  "endpointPublicId",
                  "endpointUrl",
                  "name",
                  "sourceLabel",
                  "triggerVariant",
                  "auth",
                  "mapping",
                  "capturedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "currentEndpointSnapshot": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointPublicId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "endpointUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sourceLabel": {
                    "type": "string",
                    "minLength": 1
                  },
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "hmac_sha256_header",
                          "static_header_secret"
                        ]
                      },
                      "headerName": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]+$"
                      },
                      "secretLast4": {
                        "type": "string",
                        "minLength": 4,
                        "maxLength": 4
                      }
                    },
                    "required": [
                      "mode",
                      "headerName",
                      "secretLast4"
                    ],
                    "additionalProperties": false
                  },
                  "mapping": {
                    "type": "object",
                    "properties": {
                      "defaultEventType": {
                        "type": "string",
                        "minLength": 1
                      },
                      "eventTypePath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalEventIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurredAtPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "summaryPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "relatedResourceIdPath": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "requiredPayloadPaths": {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "defaultEventType",
                      "eventTypePath",
                      "externalEventIdPath",
                      "occurredAtPath",
                      "summaryPath",
                      "resourceIdPath",
                      "relatedResourceIdPath",
                      "requiredPayloadPaths"
                    ],
                    "additionalProperties": false
                  },
                  "capturedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "schemaVersion",
                  "endpointId",
                  "endpointPublicId",
                  "endpointUrl",
                  "name",
                  "sourceLabel",
                  "triggerVariant",
                  "auth",
                  "mapping",
                  "capturedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "configDifferences": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "minLength": 1
                },
                "originalValue": {
                  "type": "string"
                },
                "currentValue": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "originalValue",
                "currentValue"
              ],
              "additionalProperties": false
            }
          },
          "currentTriggerAvailability": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "hasEnabledFlow": {
                    "type": "boolean"
                  },
                  "lastCallbackAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "triggerVariant",
                  "hasEnabledFlow",
                  "lastCallbackAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "mappingPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "ok": {
                    "type": "boolean"
                  },
                  "stableErrorCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "FLR_ENDPOINT_UNKNOWN",
                          "FLR_ENDPOINT_DELETED",
                          "FLR_AUTH_HEADER_MISSING",
                          "FLR_AUTH_FAILED",
                          "FLR_PAYLOAD_INVALID_JSON",
                          "FLR_PAYLOAD_TOO_LARGE",
                          "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                          "FLR_MAPPING_INVALID_RESOURCE_ID",
                          "FLR_NO_ENABLED_WORKFLOW",
                          "FLR_DUPLICATE_SUPPRESSED",
                          "FLR_FLOW_HANDOFF_FAILED",
                          "FLR_PLAN_LIMIT_REACHED",
                          "FLR_REPLAY_NOT_AVAILABLE",
                          "FLR_DIAGNOSTICS_UNAUTHORIZED",
                          "FLR_DIAGNOSTICS_FAILED"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "copy": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "ok",
                  "stableErrorCode",
                  "copy"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "duplicateSuppression": {
            "type": "object",
            "properties": {
              "bypassed": {
                "type": "boolean",
                "const": true
              },
              "copy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "bypassed",
              "copy"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schemaVersion",
          "actionIntentId",
          "idempotencyKey",
          "originalEventId",
          "receiptId",
          "available",
          "stableErrorCode",
          "reason",
          "warningCopy",
          "originalEndpointSnapshot",
          "currentEndpointSnapshot",
          "configDifferences",
          "currentTriggerAvailability",
          "mappingPreview",
          "duplicateSuppression"
        ],
        "additionalProperties": false
      },
      "SetupState": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "platform": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "platformKey": {
                "type": "string",
                "minLength": 1
              },
              "platformName": {
                "type": "string",
                "minLength": 1
              },
              "editionName": {
                "type": "string",
                "minLength": 1
              },
              "automationSystem": {
                "type": "string",
                "minLength": 1
              },
              "billingProvider": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "schemaVersion",
              "platformKey",
              "platformName",
              "editionName",
              "automationSystem",
              "billingProvider"
            ],
            "additionalProperties": false
          },
          "store": {
            "type": "object",
            "properties": {
              "installationId": {
                "type": "string",
                "minLength": 1
              },
              "shopDomain": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "installationId",
              "shopDomain"
            ],
            "additionalProperties": false
          },
          "genericTrigger": {
            "type": "object",
            "properties": {
              "triggerVariant": {
                "type": "string",
                "enum": [
                  "generic",
                  "order",
                  "customer",
                  "product",
                  "inventory",
                  "fulfillment",
                  "return_refund",
                  "company_b2b"
                ]
              },
              "label": {
                "type": "string",
                "minLength": 1
              },
              "handle": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "triggerVariant",
              "label",
              "handle"
            ],
            "additionalProperties": false
          },
          "defaultFlowSetupRecipe": {
            "type": "object",
            "properties": {
              "trigger": {
                "type": "object",
                "properties": {
                  "triggerVariant": {
                    "type": "string",
                    "enum": [
                      "generic",
                      "order",
                      "customer",
                      "product",
                      "inventory",
                      "fulfillment",
                      "return_refund",
                      "company_b2b"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1
                  },
                  "handle": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "triggerVariant",
                  "label",
                  "handle"
                ],
                "additionalProperties": false
              },
              "steps": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "conditionHints": {
                "type": "object",
                "properties": {
                  "sourceLabel": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "eventType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "sourceLabel",
                  "eventType"
                ],
                "additionalProperties": false
              },
              "operatorCopy": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "trigger",
              "steps",
              "conditionHints",
              "operatorCopy"
            ],
            "additionalProperties": false
          },
          "readiness": {
            "type": "object",
            "properties": {
              "lifecycleImplemented": {
                "type": "boolean"
              },
              "ingestImplemented": {
                "type": "boolean"
              },
              "state": {
                "type": "string",
                "enum": [
                  "setup_only",
                  "ready_for_test",
                  "blocked"
                ]
              },
              "summary": {
                "type": "string",
                "minLength": 1
              },
              "detail": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "lifecycleImplemented",
              "ingestImplemented",
              "state",
              "summary",
              "detail"
            ],
            "additionalProperties": false
          },
          "checklist": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "enum": [
                    "create_endpoint",
                    "enable_flow_trigger",
                    "send_test_request",
                    "observe_first_result"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "not_started",
                    "ready",
                    "blocked",
                    "complete"
                  ]
                },
                "summary": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "key",
                "state",
                "summary"
              ],
              "additionalProperties": false
            }
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "endpointId": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointPublicId": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "sourceLabel": {
                  "type": "string",
                  "minLength": 1
                },
                "triggerVariant": {
                  "type": "string",
                  "enum": [
                    "generic",
                    "order",
                    "customer",
                    "product",
                    "inventory",
                    "fulfillment",
                    "return_refund",
                    "company_b2b"
                  ]
                },
                "trigger": {
                  "type": "object",
                  "properties": {
                    "triggerVariant": {
                      "type": "string",
                      "enum": [
                        "generic",
                        "order",
                        "customer",
                        "product",
                        "inventory",
                        "fulfillment",
                        "return_refund",
                        "company_b2b"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "handle": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "triggerVariant",
                    "label",
                    "handle"
                  ],
                  "additionalProperties": false
                },
                "endpointUrl": {
                  "type": "string",
                  "format": "uri"
                },
                "authMode": {
                  "type": "string",
                  "enum": [
                    "hmac_sha256_header",
                    "static_header_secret"
                  ]
                },
                "headerName": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9-]+$"
                },
                "secret": {
                  "type": "object",
                  "properties": {
                    "last4": {
                      "type": "string",
                      "minLength": 4,
                      "maxLength": 4
                    },
                    "oneTimeSecret": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 24
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "last4",
                    "oneTimeSecret"
                  ],
                  "additionalProperties": false
                },
                "defaultEventType": {
                  "type": "string",
                  "minLength": 1
                },
                "latestResultState": {
                  "default": "none",
                  "type": "string",
                  "enum": [
                    "none",
                    "accepted",
                    "delivered",
                    "failed"
                  ]
                },
                "latestResult": {
                  "default": null,
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "eventId": {
                          "type": "string",
                          "minLength": 1
                        },
                        "receivedAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "terminalOutcome": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "accepted",
                                "delivered",
                                "failed",
                                "no_workflow",
                                "duplicate_suppressed",
                                "rejected"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "stableErrorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "FLR_ENDPOINT_UNKNOWN",
                                "FLR_ENDPOINT_DELETED",
                                "FLR_AUTH_HEADER_MISSING",
                                "FLR_AUTH_FAILED",
                                "FLR_PAYLOAD_INVALID_JSON",
                                "FLR_PAYLOAD_TOO_LARGE",
                                "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                                "FLR_MAPPING_INVALID_RESOURCE_ID",
                                "FLR_NO_ENABLED_WORKFLOW",
                                "FLR_DUPLICATE_SUPPRESSED",
                                "FLR_FLOW_HANDOFF_FAILED",
                                "FLR_PLAN_LIMIT_REACHED",
                                "FLR_REPLAY_NOT_AVAILABLE",
                                "FLR_DIAGNOSTICS_UNAUTHORIZED",
                                "FLR_DIAGNOSTICS_FAILED"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "eventId",
                        "receivedAt",
                        "completedAt",
                        "terminalOutcome",
                        "stableErrorCode"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "flowSetupRecipe": {
                  "type": "object",
                  "properties": {
                    "trigger": {
                      "type": "object",
                      "properties": {
                        "triggerVariant": {
                          "type": "string",
                          "enum": [
                            "generic",
                            "order",
                            "customer",
                            "product",
                            "inventory",
                            "fulfillment",
                            "return_refund",
                            "company_b2b"
                          ]
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1
                        },
                        "handle": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "triggerVariant",
                        "label",
                        "handle"
                      ],
                      "additionalProperties": false
                    },
                    "steps": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "conditionHints": {
                      "type": "object",
                      "properties": {
                        "sourceLabel": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "eventType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "sourceLabel",
                        "eventType"
                      ],
                      "additionalProperties": false
                    },
                    "operatorCopy": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "trigger",
                    "steps",
                    "conditionHints",
                    "operatorCopy"
                  ],
                  "additionalProperties": false
                },
                "senderSetupInstructions": {
                  "type": "object",
                  "properties": {
                    "endpointUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "method": {
                      "type": "string",
                      "const": "POST"
                    },
                    "contentType": {
                      "type": "string",
                      "const": "application/json"
                    },
                    "authMode": {
                      "type": "string",
                      "enum": [
                        "hmac_sha256_header",
                        "static_header_secret"
                      ]
                    },
                    "headerName": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9-]+$"
                    },
                    "signingInstructions": {
                      "type": "string",
                      "minLength": 1
                    },
                    "testInstructions": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "required": [
                    "endpointUrl",
                    "method",
                    "contentType",
                    "authMode",
                    "headerName",
                    "signingInstructions",
                    "testInstructions"
                  ],
                  "additionalProperties": false
                },
                "readiness": {
                  "type": "object",
                  "properties": {
                    "lifecycleImplemented": {
                      "type": "boolean"
                    },
                    "ingestImplemented": {
                      "type": "boolean"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "setup_only",
                        "ready_for_test",
                        "blocked"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "minLength": 1
                    },
                    "detail": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "lifecycleImplemented",
                    "ingestImplemented",
                    "state",
                    "summary",
                    "detail"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "endpointId",
                "endpointPublicId",
                "name",
                "sourceLabel",
                "triggerVariant",
                "trigger",
                "endpointUrl",
                "authMode",
                "headerName",
                "secret",
                "defaultEventType",
                "latestResultState",
                "latestResult",
                "flowSetupRecipe",
                "senderSetupInstructions",
                "readiness"
              ],
              "additionalProperties": false
            }
          },
          "triggerReadiness": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "triggerVariant": {
                  "type": "string",
                  "enum": [
                    "generic",
                    "order",
                    "customer",
                    "product",
                    "inventory",
                    "fulfillment",
                    "return_refund",
                    "company_b2b"
                  ]
                },
                "hasEnabledFlow": {
                  "type": "boolean"
                },
                "lastCallbackAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "triggerVariant",
                "hasEnabledFlow",
                "lastCallbackAt"
              ],
              "additionalProperties": false
            }
          },
          "nextRecommendedActions": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "schemaVersion",
          "platform",
          "store",
          "genericTrigger",
          "defaultFlowSetupRecipe",
          "readiness",
          "checklist",
          "endpoints",
          "triggerReadiness",
          "nextRecommendedActions"
        ],
        "additionalProperties": false
      },
      "SupportRequestRecord": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "supportRequestId": {
            "type": "string",
            "minLength": 1
          },
          "platform": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "platformKey": {
                "type": "string",
                "minLength": 1
              },
              "platformName": {
                "type": "string",
                "minLength": 1
              },
              "editionName": {
                "type": "string",
                "minLength": 1
              },
              "automationSystem": {
                "type": "string",
                "minLength": 1
              },
              "billingProvider": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "schemaVersion",
              "platformKey",
              "platformName",
              "editionName",
              "automationSystem",
              "billingProvider"
            ],
            "additionalProperties": false
          },
          "requesterType": {
            "type": "string",
            "enum": [
              "human",
              "agent",
              "email",
              "system"
            ]
          },
          "sourceChannel": {
            "type": "string",
            "enum": [
              "in_app",
              "agent_api",
              "email",
              "shopify_support_relay",
              "internal"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "setup",
              "incident",
              "billing",
              "security",
              "privacy",
              "compliance",
              "product_question",
              "partner_handoff"
            ]
          },
          "urgency": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "contactEmail": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "diagnosticsShareId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "eventId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "endpointId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "stableErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "FLR_ENDPOINT_UNKNOWN",
                  "FLR_ENDPOINT_DELETED",
                  "FLR_AUTH_HEADER_MISSING",
                  "FLR_AUTH_FAILED",
                  "FLR_PAYLOAD_INVALID_JSON",
                  "FLR_PAYLOAD_TOO_LARGE",
                  "FLR_MAPPING_REQUIRED_VALUE_MISSING",
                  "FLR_MAPPING_INVALID_RESOURCE_ID",
                  "FLR_NO_ENABLED_WORKFLOW",
                  "FLR_DUPLICATE_SUPPRESSED",
                  "FLR_FLOW_HANDOFF_FAILED",
                  "FLR_PLAN_LIMIT_REACHED",
                  "FLR_REPLAY_NOT_AVAILABLE",
                  "FLR_DIAGNOSTICS_UNAUTHORIZED",
                  "FLR_DIAGNOSTICS_FAILED"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "redactionPolicyVersion": {
            "type": "string",
            "minLength": 1
          },
          "supportConsent": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "triaged",
              "waiting_on_customer",
              "waiting_on_flowrelay",
              "resolved",
              "closed",
              "spam_or_invalid"
            ]
          },
          "externalProvider": {
            "type": "string",
            "enum": [
              "none",
              "manual",
              "helpscout",
              "cloudflare_email_service",
              "cloudflare_agentic_inbox"
            ]
          },
          "externalTicketId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "externalTicketUrl": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "schemaVersion",
          "supportRequestId",
          "platform",
          "requesterType",
          "sourceChannel",
          "category",
          "urgency",
          "summary",
          "contactEmail",
          "diagnosticsShareId",
          "eventId",
          "endpointId",
          "stableErrorCode",
          "redactionPolicyVersion",
          "supportConsent",
          "status",
          "externalProvider",
          "externalTicketId",
          "externalTicketUrl",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "SupportWorkspaceDelivery": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "none",
              "manual",
              "helpscout",
              "cloudflare_email_service",
              "cloudflare_agentic_inbox"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "not_configured",
              "skipped",
              "created",
              "failed"
            ]
          },
          "externalTicketId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "externalTicketUrl": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "provider",
          "status",
          "externalTicketId",
          "externalTicketUrl",
          "message"
        ],
        "additionalProperties": false
      },
      "ExpansionRequestRecord": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "expansionRequestId": {
            "type": "string",
            "minLength": 1
          },
          "platform": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "platformKey": {
                "type": "string",
                "minLength": 1
              },
              "platformName": {
                "type": "string",
                "minLength": 1
              },
              "editionName": {
                "type": "string",
                "minLength": 1
              },
              "automationSystem": {
                "type": "string",
                "minLength": 1
              },
              "billingProvider": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "schemaVersion",
              "platformKey",
              "platformName",
              "editionName",
              "automationSystem",
              "billingProvider"
            ],
            "additionalProperties": false
          },
          "requesterType": {
            "type": "string",
            "enum": [
              "human",
              "agent",
              "email",
              "system"
            ]
          },
          "sourceChannel": {
            "type": "string",
            "enum": [
              "in_app",
              "agent_api",
              "email",
              "shopify_support_relay",
              "internal"
            ]
          },
          "expansionType": {
            "type": "string",
            "enum": [
              "native_edition",
              "multi_platform_event_flow",
              "existing_edition_capability",
              "trigger_lane",
              "sender_source_guidance",
              "agency_multi_store",
              "agent_operations_capability",
              "operational_memory_capability",
              "automated_work_exception_handling",
              "billing_model",
              "other_flowrelay_adjacent"
            ]
          },
          "flowrelayFit": {
            "type": "string",
            "enum": [
              "native_event_reliability",
              "multi_platform_event_reliability",
              "event_handoff_recovery",
              "replay_diagnostics",
              "operational_memory",
              "exception_recovery",
              "agent_operability",
              "multi_install_governance",
              "billing_entitlement",
              "unclear"
            ]
          },
          "triggeringContext": {
            "type": "string",
            "enum": [
              "merchant_requested",
              "blocked_current_task",
              "flowrelay_refusal_suggested",
              "support_case_pattern"
            ]
          },
          "flowrelayReason": {
            "type": "string",
            "minLength": 1
          },
          "requestedPlatform": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80,
            "pattern": "^[a-z0-9][a-z0-9_-]*$"
          },
          "requestedCapability": {
            "type": "string",
            "minLength": 1
          },
          "useCase": {
            "type": "string",
            "minLength": 1
          },
          "businessImpact": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "urgency": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          },
          "estimatedEventVolume": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "operatingContext": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "willingnessToPay": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "linkedSupportRequestId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "linkedDiagnosticsShareId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "groupKey": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "grouped",
              "watchlist",
              "researching",
              "planned",
              "declined",
              "shipped"
            ]
          },
          "contactEmail": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "schemaVersion",
          "expansionRequestId",
          "platform",
          "requesterType",
          "sourceChannel",
          "expansionType",
          "flowrelayFit",
          "triggeringContext",
          "flowrelayReason",
          "requestedPlatform",
          "requestedCapability",
          "useCase",
          "businessImpact",
          "urgency",
          "estimatedEventVolume",
          "operatingContext",
          "willingnessToPay",
          "linkedSupportRequestId",
          "linkedDiagnosticsShareId",
          "groupKey",
          "status",
          "contactEmail",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ExpansionRequestSubmitResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "expansionRequest": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "const": 1
              },
              "expansionRequestId": {
                "type": "string",
                "minLength": 1
              },
              "platform": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "platformKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "platformName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "editionName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "automationSystem": {
                    "type": "string",
                    "minLength": 1
                  },
                  "billingProvider": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "schemaVersion",
                  "platformKey",
                  "platformName",
                  "editionName",
                  "automationSystem",
                  "billingProvider"
                ],
                "additionalProperties": false
              },
              "requesterType": {
                "type": "string",
                "enum": [
                  "human",
                  "agent",
                  "email",
                  "system"
                ]
              },
              "sourceChannel": {
                "type": "string",
                "enum": [
                  "in_app",
                  "agent_api",
                  "email",
                  "shopify_support_relay",
                  "internal"
                ]
              },
              "expansionType": {
                "type": "string",
                "enum": [
                  "native_edition",
                  "multi_platform_event_flow",
                  "existing_edition_capability",
                  "trigger_lane",
                  "sender_source_guidance",
                  "agency_multi_store",
                  "agent_operations_capability",
                  "operational_memory_capability",
                  "automated_work_exception_handling",
                  "billing_model",
                  "other_flowrelay_adjacent"
                ]
              },
              "flowrelayFit": {
                "type": "string",
                "enum": [
                  "native_event_reliability",
                  "multi_platform_event_reliability",
                  "event_handoff_recovery",
                  "replay_diagnostics",
                  "operational_memory",
                  "exception_recovery",
                  "agent_operability",
                  "multi_install_governance",
                  "billing_entitlement",
                  "unclear"
                ]
              },
              "triggeringContext": {
                "type": "string",
                "enum": [
                  "merchant_requested",
                  "blocked_current_task",
                  "flowrelay_refusal_suggested",
                  "support_case_pattern"
                ]
              },
              "flowrelayReason": {
                "type": "string",
                "minLength": 1
              },
              "requestedPlatform": {
                "type": "string",
                "minLength": 2,
                "maxLength": 80,
                "pattern": "^[a-z0-9][a-z0-9_-]*$"
              },
              "requestedCapability": {
                "type": "string",
                "minLength": 1
              },
              "useCase": {
                "type": "string",
                "minLength": 1
              },
              "businessImpact": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "urgency": {
                "type": "string",
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ]
              },
              "estimatedEventVolume": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "operatingContext": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "willingnessToPay": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "linkedSupportRequestId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "linkedDiagnosticsShareId": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "groupKey": {
                "type": "string",
                "minLength": 1
              },
              "status": {
                "type": "string",
                "enum": [
                  "new",
                  "grouped",
                  "watchlist",
                  "researching",
                  "planned",
                  "declined",
                  "shipped"
                ]
              },
              "contactEmail": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "schemaVersion",
              "expansionRequestId",
              "platform",
              "requesterType",
              "sourceChannel",
              "expansionType",
              "flowrelayFit",
              "triggeringContext",
              "flowrelayReason",
              "requestedPlatform",
              "requestedCapability",
              "useCase",
              "businessImpact",
              "urgency",
              "estimatedEventVolume",
              "operatingContext",
              "willingnessToPay",
              "linkedSupportRequestId",
              "linkedDiagnosticsShareId",
              "groupKey",
              "status",
              "contactEmail",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          },
          "commitment": {
            "type": "string",
            "const": "request_recorded_not_committed"
          }
        },
        "required": [
          "schemaVersion",
          "expansionRequest",
          "commitment"
        ],
        "additionalProperties": false
      }
    }
  }
}
