{
  "openapi": "3.1.0",
  "paths": {
    "/auth/context": {
      "get": {
        "summary": "Get auth context",
        "tags": [
          "Authentication"
        ],
        "parameters": [],
        "operationId": "auth.context",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthContextResponse"
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/events": {
      "post": {
        "summary": "Ingest a single event",
        "tags": [
          "Events"
        ],
        "parameters": [],
        "operationId": "events.ingest",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestEventRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "202",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestEventResponse"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/events/batch": {
      "post": {
        "summary": "Ingest a batch of events",
        "tags": [
          "Events"
        ],
        "parameters": [],
        "operationId": "events.batchIngest",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchIngestRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "202",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchIngestResponse"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/destinations": {
      "post": {
        "summary": "Create a destination",
        "tags": [
          "Destinations"
        ],
        "parameters": [],
        "operationId": "destinations.create",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CreateFromTemplateRequest"
                  },
                  {
                    "$ref": "#/components/schemas/CreateDestinationRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationItem"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List destinations",
        "tags": [
          "Destinations"
        ],
        "parameters": [
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PRODUCTION",
                "STAGING",
                "DEVELOPMENT"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "DISABLED",
                "ARCHIVED"
              ]
            }
          },
          {
            "name": "customerAccountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "destinations.list",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/destinations/{id}": {
      "get": {
        "summary": "Get a destination",
        "tags": [
          "Destinations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "destinations.get",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update a destination",
        "tags": [
          "Destinations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "destinations.update",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDestinationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationItemWithOneShotSecret"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a destination",
        "tags": [
          "Destinations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "destinations.archive",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/destinations/{id}/enable": {
      "post": {
        "summary": "Enable a destination",
        "tags": [
          "Destinations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "destinations.enable",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/destinations/{id}/disable": {
      "post": {
        "summary": "Disable a destination",
        "tags": [
          "Destinations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "destinations.disable",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/destinations/{id}/test": {
      "post": {
        "summary": "Test a destination connection",
        "tags": [
          "Destinations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "destinations.test",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestDestinationResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/deliveries": {
      "get": {
        "summary": "List deliveries",
        "tags": [
          "Deliveries"
        ],
        "parameters": [
          {
            "name": "eventId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "destinationId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PRODUCTION",
                "STAGING",
                "DEVELOPMENT"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "DELIVERING",
                "DELIVERED",
                "FAILED",
                "RETRYING",
                "DRY_RUN"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 20,
              "type": "number",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "isReplay",
            "in": "query",
            "schema": {
              "type": "boolean",
              "nullable": true
            }
          },
          {
            "name": "errorCategory",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "STANDARD",
                "HIGH",
                "CRITICAL"
              ]
            }
          },
          {
            "name": "dlqStatus",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "IN_DLQ",
                "RETRIED_FROM_DLQ",
                "DISCARDED"
              ]
            }
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "EVENT",
                "FILE"
              ]
            }
          },
          {
            "name": "originKind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "NORMAL",
                "REPLAY",
                "INSPECTION"
              ]
            }
          }
        ],
        "operationId": "deliveries.list",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/deliveries/{id}": {
      "get": {
        "summary": "Get a delivery",
        "tags": [
          "Deliveries"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "deliveries.get",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryDetail"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/events/{id}/deliveries": {
      "get": {
        "summary": "List deliveries for an event",
        "tags": [
          "Deliveries"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "deliveries.listByEvent",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/destinations/{id}/deliveries": {
      "get": {
        "summary": "List deliveries for a destination",
        "tags": [
          "Deliveries"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 20,
              "type": "number",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "operationId": "deliveries.listByDestination",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/audit-logs": {
      "get": {
        "summary": "List audit log entries",
        "tags": [
          "Audit"
        ],
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "objectType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "objectId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actorId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 20,
              "type": "number",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "operationId": "audit.list",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/audit-logs/{id}": {
      "get": {
        "summary": "Get an audit log entry",
        "tags": [
          "Audit"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "audit.get",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/schemas": {
      "post": {
        "summary": "Create an event schema",
        "tags": [
          "Event schemas"
        ],
        "parameters": [],
        "operationId": "eventSchemas.create",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEventSchemaRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSchemaItem"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List event schemas",
        "tags": [
          "Event schemas"
        ],
        "parameters": [
          {
            "name": "eventType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "ACTIVE",
                "DEPRECATED"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 20,
              "type": "number",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "operationId": "eventSchemas.list",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSchemaListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/schemas/types/{eventType}/versions": {
      "get": {
        "summary": "List versions of an event schema",
        "tags": [
          "Event schemas"
        ],
        "parameters": [
          {
            "name": "eventType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "eventSchemas.listVersions",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSchemaListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/schemas/types/{eventType}/active": {
      "get": {
        "summary": "Get the active version of an event schema",
        "tags": [
          "Event schemas"
        ],
        "parameters": [
          {
            "name": "eventType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "eventSchemas.getActive",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSchemaItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/schemas/{id}": {
      "get": {
        "summary": "Get an event schema version",
        "tags": [
          "Event schemas"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "eventSchemas.get",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSchemaItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/schemas/{id}/activate": {
      "post": {
        "summary": "Publish (activate) an event schema version",
        "tags": [
          "Event schemas"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "eventSchemas.activate",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateSchemaRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSchemaItem"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "409",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/routing-rules": {
      "post": {
        "summary": "Create a routing rule",
        "tags": [
          "Routing rules"
        ],
        "parameters": [],
        "operationId": "routingRules.create",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoutingRuleRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingRuleItem"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List routing rules",
        "tags": [
          "Routing rules"
        ],
        "parameters": [
          {
            "name": "destinationId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "operationId": "routingRules.list",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingRuleListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/routing-rules/{id}": {
      "get": {
        "summary": "Get a routing rule",
        "tags": [
          "Routing rules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "routingRules.get",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingRuleItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update a routing rule",
        "tags": [
          "Routing rules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "routingRules.update",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoutingRuleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingRuleItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a routing rule",
        "tags": [
          "Routing rules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "routingRules.delete",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/routing-rules/{id}/enable": {
      "post": {
        "summary": "Enable a routing rule",
        "tags": [
          "Routing rules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "routingRules.enable",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingRuleItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/routing-rules/{id}/disable": {
      "post": {
        "summary": "Disable a routing rule",
        "tags": [
          "Routing rules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "routingRules.disable",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingRuleItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/destinations/{destinationId}/transform-scripts": {
      "get": {
        "summary": "List transform scripts for a destination",
        "tags": [
          "Transforms"
        ],
        "parameters": [
          {
            "name": "destinationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "transformScripts.list",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransformScriptListResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transform-scripts": {
      "post": {
        "summary": "Create a transform script",
        "tags": [
          "Transforms"
        ],
        "parameters": [],
        "operationId": "transformScripts.create",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransformScriptRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransformScriptItem"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "402",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "413",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transform-scripts/{id}": {
      "get": {
        "summary": "Get a transform script",
        "tags": [
          "Transforms"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "transformScripts.get",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransformScriptItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transform-scripts/{id}/publish": {
      "post": {
        "summary": "Publish a transform script version",
        "tags": [
          "Transforms"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "transformScripts.publish",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransformScriptItem"
                }
              }
            }
          },
          "402": {
            "description": "402",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/replay-jobs": {
      "post": {
        "summary": "Create a replay job",
        "tags": [
          "Replay"
        ],
        "parameters": [],
        "operationId": "replayJobs.create",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReplayJobRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayJobItem"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List replay jobs",
        "tags": [
          "Replay"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "RUNNING",
                "PAUSED",
                "COMPLETED",
                "FAILED",
                "CANCELLED"
              ]
            }
          },
          {
            "name": "customerAccountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 20,
              "type": "number",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "operationId": "replayJobs.list",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayJobListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/replay-jobs/{id}": {
      "get": {
        "summary": "Get a replay job",
        "tags": [
          "Replay"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "replayJobs.get",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayJobItem"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/replay-jobs/{id}/cancel": {
      "post": {
        "summary": "Cancel a replay job",
        "tags": [
          "Replay"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "replayJobs.cancel",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayJobItem"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/replay-jobs/{id}/progress": {
      "get": {
        "summary": "Get replay job progress",
        "tags": [
          "Replay"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "replayJobs.progress",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayJobProgress"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/destinations/{id}/health": {
      "get": {
        "summary": "Get destination health",
        "tags": [
          "Observability"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "observability.getDestinationHealth",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationHealthResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/destinations/{id}/analytics": {
      "get": {
        "summary": "Get destination delivery metrics",
        "tags": [
          "Observability"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "default": "24h",
              "type": "string",
              "enum": [
                "1h",
                "6h",
                "24h",
                "7d",
                "30d"
              ]
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "minute",
                "hour",
                "day"
              ]
            }
          }
        ],
        "operationId": "observability.getDestinationAnalytics",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationAnalyticsResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/observability/throughput": {
      "get": {
        "summary": "Get delivery throughput metrics",
        "tags": [
          "Observability"
        ],
        "parameters": [
          {
            "name": "environment",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "PRODUCTION",
                "STAGING",
                "DEVELOPMENT"
              ]
            }
          }
        ],
        "operationId": "observability.getThroughput",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThroughputResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dlq": {
      "get": {
        "summary": "List dead-letter deliveries",
        "tags": [
          "DLQ"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 20,
              "type": "number",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "destinationId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "eventType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "errorCategory",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "dlq.list",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DlqListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dlq/{deliveryId}": {
      "get": {
        "summary": "Get a dead-letter delivery",
        "tags": [
          "DLQ"
        ],
        "parameters": [
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "dlq.get",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/dlq/{deliveryId}/retry": {
      "post": {
        "summary": "Requeue a dead-letter delivery",
        "tags": [
          "DLQ"
        ],
        "parameters": [
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "operationId": "dlq.retry",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/embed/sessions": {
      "post": {
        "summary": "Mint an embed session for a customer account",
        "tags": [
          "Embed"
        ],
        "parameters": [],
        "operationId": "embed.createSession",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmbedSessionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedSessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/files": {
      "post": {
        "summary": "Upload a file",
        "tags": [
          "Files"
        ],
        "parameters": [],
        "operationId": "files.ingest",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestFileRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "202",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestFileResponse"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "413",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List files",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "customerAccountId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PRODUCTION",
                "STAGING",
                "DEVELOPMENT"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "DELIVERING",
                "DELIVERED",
                "PARTIALLY_DELIVERED",
                "FAILED"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "operationId": "files.list",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListFilesResponse"
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/files/{id}": {
      "get": {
        "summary": "Get a file",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "files.get",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileResponse"
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/invitations/{token}": {
      "get": {
        "summary": "Preview an invitation",
        "tags": [
          "Invitations"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "operationId": "invitations.preview",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationPreview"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "410",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/invitations/{token}/accept": {
      "post": {
        "summary": "Accept an invitation",
        "tags": [
          "Invitations"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "operationId": "invitations.accept",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "410",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/register": {
      "post": {
        "summary": "Dynamic client registration",
        "tags": [
          "OAuth"
        ],
        "parameters": [],
        "operationId": "oauth.register",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthRegisterRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthRegisterResponse"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/token": {
      "post": {
        "summary": "Token endpoint",
        "tags": [
          "OAuth"
        ],
        "parameters": [],
        "operationId": "oauth.token",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthTokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/device_authorization": {
      "post": {
        "summary": "Device authorization endpoint",
        "tags": [
          "OAuth"
        ],
        "parameters": [],
        "operationId": "oauth.deviceAuthorization",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthDeviceAuthRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthDeviceAuthResponse"
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          }
        }
      }
    }
  },
  "info": {
    "title": "Pushrail API",
    "version": "1.0.0",
    "description": "Push-first event delivery platform — public API.",
    "contact": {
      "name": "Pushrail",
      "url": "https://pushrail.io"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://pushrail.io/terms"
    }
  },
  "servers": [
    {
      "url": "https://api.pushrail.io"
    }
  ],
  "components": {
    "schemas": {
      "AuthContextResponse": {
        "type": "object",
        "properties": {
          "authMethod": {
            "type": "string",
            "enum": [
              "session",
              "api-key",
              "oauth",
              "mcp-api-key"
            ]
          },
          "principal": {
            "$ref": "#/components/schemas/AuthContextPrincipal"
          },
          "tenant": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ],
            "nullable": true
          },
          "environmentMode": {
            "default": "fixed",
            "type": "string",
            "enum": [
              "fixed",
              "per-call"
            ]
          },
          "availableEnvironments": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "PRODUCTION",
                "STAGING",
                "DEVELOPMENT"
              ]
            }
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "authMethod",
          "principal",
          "tenant",
          "environment",
          "scopes",
          "permissions"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "details": {
                "nullable": true
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "IngestEventRequest": {
        "type": "object",
        "properties": {
          "eventType": {
            "type": "string",
            "minLength": 1
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "payload": {
            "type": "object",
            "additionalProperties": {}
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "source": {
            "type": "string",
            "minLength": 1
          },
          "customerExternalId": {
            "type": "string",
            "minLength": 1
          },
          "idempotencyKey": {
            "type": "string"
          },
          "correlationId": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            },
            "maxItems": 10
          }
        },
        "required": [
          "eventType",
          "occurredAt",
          "payload",
          "source",
          "customerExternalId"
        ]
      },
      "IngestEventResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "duplicate"
            ]
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "BatchIngestRequest": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestEventRequest"
            },
            "minItems": 1,
            "maxItems": 100
          }
        },
        "required": [
          "events"
        ]
      },
      "BatchIngestResponse": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "number"
          },
          "rejected": {
            "type": "number"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "number"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "accepted",
                    "duplicate",
                    "rejected"
                  ]
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "index",
                "status"
              ]
            }
          }
        },
        "required": [
          "accepted",
          "rejected",
          "events"
        ]
      },
      "CreateFromTemplateRequest": {
        "type": "object",
        "properties": {
          "fromTemplate": {
            "type": "object",
            "properties": {
              "templateId": {
                "type": "string",
                "minLength": 1
              },
              "templateInputs": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "required": [
              "templateId",
              "templateInputs"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "fromTemplate",
          "name",
          "environment",
          "customerAccountId"
        ]
      },
      "CreateDestinationRequest": {
        "discriminator": {
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/CreateWebhookDestination"
          },
          {
            "$ref": "#/components/schemas/CreateS3Destination"
          },
          {
            "$ref": "#/components/schemas/CreateGCSDestination"
          },
          {
            "$ref": "#/components/schemas/CreateBigQueryDestination"
          },
          {
            "$ref": "#/components/schemas/CreateSnowflakeDestination"
          },
          {
            "$ref": "#/components/schemas/CreatePosthogDestination"
          },
          {
            "$ref": "#/components/schemas/CreateKinesisDestination"
          },
          {
            "$ref": "#/components/schemas/CreateSnsDestination"
          },
          {
            "$ref": "#/components/schemas/CreateSqsDestination"
          },
          {
            "$ref": "#/components/schemas/CreatePubsubDestination"
          },
          {
            "$ref": "#/components/schemas/CreateKafkaDestination"
          },
          {
            "$ref": "#/components/schemas/CreatePostgresDestination"
          },
          {
            "$ref": "#/components/schemas/CreateMySqlDestination"
          },
          {
            "$ref": "#/components/schemas/CreateClickHouseDestination"
          },
          {
            "$ref": "#/components/schemas/CreateAzureBlobDestination"
          },
          {
            "$ref": "#/components/schemas/CreateAzureServiceBusDestination"
          },
          {
            "$ref": "#/components/schemas/CreateEventBridgeDestination"
          },
          {
            "$ref": "#/components/schemas/CreateRabbitMqDestination"
          }
        ]
      },
      "DestinationItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "WEBHOOK",
              "S3",
              "GCS",
              "BIGQUERY",
              "SNOWFLAKE",
              "KINESIS",
              "PUBSUB",
              "SNS",
              "SQS",
              "KAFKA",
              "POSTGRES",
              "MYSQL",
              "CLICKHOUSE",
              "POSTHOG",
              "AZURE_BLOB",
              "AZURE_SERVICE_BUS",
              "EVENTBRIDGE",
              "RABBITMQ"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "DISABLED",
              "ARCHIVED"
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "config": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebhookConfig"
              },
              {
                "$ref": "#/components/schemas/S3Config"
              },
              {
                "$ref": "#/components/schemas/GCSConfig"
              },
              {
                "$ref": "#/components/schemas/BigQueryConfig"
              },
              {
                "$ref": "#/components/schemas/SnowflakeConfig"
              },
              {
                "$ref": "#/components/schemas/PosthogConfig"
              },
              {
                "$ref": "#/components/schemas/KinesisConfig"
              },
              {
                "$ref": "#/components/schemas/SnsConfig"
              },
              {
                "$ref": "#/components/schemas/SqsConfig"
              },
              {
                "$ref": "#/components/schemas/PubsubConfig"
              },
              {
                "$ref": "#/components/schemas/KafkaConfig"
              },
              {
                "$ref": "#/components/schemas/PostgresConfig"
              },
              {
                "$ref": "#/components/schemas/MySqlConfig"
              },
              {
                "$ref": "#/components/schemas/ClickHouseConfig"
              },
              {
                "$ref": "#/components/schemas/AzureBlobConfig"
              },
              {
                "$ref": "#/components/schemas/AzureServiceBusConfig"
              },
              {
                "$ref": "#/components/schemas/EventBridgeConfig"
              },
              {
                "type": "object",
                "properties": {
                  "uri": {
                    "type": "string",
                    "pattern": "^amqps:\\/\\/"
                  },
                  "hosts": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "port": {
                    "default": 5671,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "vhost": {
                    "default": "/",
                    "type": "string"
                  },
                  "exchange": {
                    "default": "",
                    "type": "string"
                  },
                  "routingKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "routingKeyField": {
                    "type": "string"
                  },
                  "contentType": {
                    "default": "application/json",
                    "type": "string"
                  },
                  "persistent": {
                    "default": true,
                    "type": "boolean"
                  },
                  "messageIdField": {
                    "type": "string"
                  },
                  "headersField": {
                    "type": "string"
                  }
                },
                "required": [
                  "routingKey"
                ]
              }
            ]
          },
          "configVersion": {
            "type": "number"
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "deliveryMode": {
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          },
          "batchConfig": {
            "type": "object",
            "properties": {
              "flushIntervalSeconds": {
                "default": 300,
                "type": "number",
                "minimum": 10,
                "maximum": 3600
              },
              "maxBatchSize": {
                "default": 1000,
                "type": "number",
                "minimum": 1,
                "maximum": 100000
              },
              "maxBatchBytes": {
                "default": 10485760,
                "type": "number",
                "minimum": 1024,
                "maximum": 104857600
              }
            },
            "nullable": true
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "customerAccount": {
            "$ref": "#/components/schemas/CustomerAccountRef"
          },
          "hasSecret": {
            "type": "boolean"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "permissionAuditAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "permissionAuditResult": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "clean",
                  "over_privileged",
                  "error"
                ]
              },
              "checkedAt": {
                "type": "string",
                "format": "date-time"
              },
              "extraPermissions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "probeErrors": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "status",
              "checkedAt",
              "extraPermissions"
            ],
            "nullable": true
          },
          "preflightLastStatus": {
            "type": "string",
            "enum": [
              "ok",
              "warn",
              "fail",
              "not_run"
            ],
            "nullable": true
          },
          "preflightLastRanAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "preflightOverriddenAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "preflightOverrideReason": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "credential": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "type": {
                "type": "string"
              },
              "providerAccountEmail": {
                "type": "string",
                "nullable": true
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "oauthAuthorizationId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "status": {
                "type": "string"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              }
            },
            "required": [
              "id",
              "type"
            ],
            "nullable": true
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "status",
          "environment",
          "config",
          "configVersion",
          "transformConfig",
          "deliveryMode",
          "batchConfig",
          "customerAccountId",
          "customerAccount",
          "hasSecret",
          "authMode",
          "authConfig",
          "permissionAuditAt",
          "permissionAuditResult",
          "createdAt",
          "updatedAt"
        ]
      },
      "DestinationListResponse": {
        "type": "object",
        "properties": {
          "destinations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DestinationItem"
            }
          }
        },
        "required": [
          "destinations"
        ]
      },
      "UpdateDestinationRequest": {
        "discriminator": {
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/UpdateWebhookDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateS3Destination"
          },
          {
            "$ref": "#/components/schemas/UpdateGCSDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateBigQueryDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateSnowflakeDestination"
          },
          {
            "$ref": "#/components/schemas/UpdatePosthogDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateKinesisDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateSnsDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateSqsDestination"
          },
          {
            "$ref": "#/components/schemas/UpdatePubsubDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateKafkaDestination"
          },
          {
            "$ref": "#/components/schemas/UpdatePostgresDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateMySqlDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateClickHouseDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateAzureBlobDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateAzureServiceBusDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateEventBridgeDestination"
          },
          {
            "$ref": "#/components/schemas/UpdateRabbitMqDestination"
          }
        ]
      },
      "DestinationItemWithOneShotSecret": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "WEBHOOK",
              "S3",
              "GCS",
              "BIGQUERY",
              "SNOWFLAKE",
              "KINESIS",
              "PUBSUB",
              "SNS",
              "SQS",
              "KAFKA",
              "POSTGRES",
              "MYSQL",
              "CLICKHOUSE",
              "POSTHOG",
              "AZURE_BLOB",
              "AZURE_SERVICE_BUS",
              "EVENTBRIDGE",
              "RABBITMQ"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "DISABLED",
              "ARCHIVED"
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "config": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebhookConfig"
              },
              {
                "$ref": "#/components/schemas/S3Config"
              },
              {
                "$ref": "#/components/schemas/GCSConfig"
              },
              {
                "$ref": "#/components/schemas/BigQueryConfig"
              },
              {
                "$ref": "#/components/schemas/SnowflakeConfig"
              },
              {
                "$ref": "#/components/schemas/PosthogConfig"
              },
              {
                "$ref": "#/components/schemas/KinesisConfig"
              },
              {
                "$ref": "#/components/schemas/SnsConfig"
              },
              {
                "$ref": "#/components/schemas/SqsConfig"
              },
              {
                "$ref": "#/components/schemas/PubsubConfig"
              },
              {
                "$ref": "#/components/schemas/KafkaConfig"
              },
              {
                "$ref": "#/components/schemas/PostgresConfig"
              },
              {
                "$ref": "#/components/schemas/MySqlConfig"
              },
              {
                "$ref": "#/components/schemas/ClickHouseConfig"
              },
              {
                "$ref": "#/components/schemas/AzureBlobConfig"
              },
              {
                "$ref": "#/components/schemas/AzureServiceBusConfig"
              },
              {
                "$ref": "#/components/schemas/EventBridgeConfig"
              },
              {
                "type": "object",
                "properties": {
                  "uri": {
                    "type": "string",
                    "pattern": "^amqps:\\/\\/"
                  },
                  "hosts": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "port": {
                    "default": 5671,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "vhost": {
                    "default": "/",
                    "type": "string"
                  },
                  "exchange": {
                    "default": "",
                    "type": "string"
                  },
                  "routingKey": {
                    "type": "string",
                    "minLength": 1
                  },
                  "routingKeyField": {
                    "type": "string"
                  },
                  "contentType": {
                    "default": "application/json",
                    "type": "string"
                  },
                  "persistent": {
                    "default": true,
                    "type": "boolean"
                  },
                  "messageIdField": {
                    "type": "string"
                  },
                  "headersField": {
                    "type": "string"
                  }
                },
                "required": [
                  "routingKey"
                ]
              }
            ]
          },
          "configVersion": {
            "type": "number"
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "deliveryMode": {
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          },
          "batchConfig": {
            "type": "object",
            "properties": {
              "flushIntervalSeconds": {
                "default": 300,
                "type": "number",
                "minimum": 10,
                "maximum": 3600
              },
              "maxBatchSize": {
                "default": 1000,
                "type": "number",
                "minimum": 1,
                "maximum": 100000
              },
              "maxBatchBytes": {
                "default": 10485760,
                "type": "number",
                "minimum": 1024,
                "maximum": 104857600
              }
            },
            "nullable": true
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "customerAccount": {
            "$ref": "#/components/schemas/CustomerAccountRef"
          },
          "hasSecret": {
            "type": "boolean"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "permissionAuditAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "permissionAuditResult": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "clean",
                  "over_privileged",
                  "error"
                ]
              },
              "checkedAt": {
                "type": "string",
                "format": "date-time"
              },
              "extraPermissions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "probeErrors": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "status",
              "checkedAt",
              "extraPermissions"
            ],
            "nullable": true
          },
          "preflightLastStatus": {
            "type": "string",
            "enum": [
              "ok",
              "warn",
              "fail",
              "not_run"
            ],
            "nullable": true
          },
          "preflightLastRanAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "preflightOverriddenAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "preflightOverrideReason": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "credential": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "type": {
                "type": "string"
              },
              "providerAccountEmail": {
                "type": "string",
                "nullable": true
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "oauthAuthorizationId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "status": {
                "type": "string"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              }
            },
            "required": [
              "id",
              "type"
            ],
            "nullable": true
          },
          "createdSigningSecret": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "status",
          "environment",
          "config",
          "configVersion",
          "transformConfig",
          "deliveryMode",
          "batchConfig",
          "customerAccountId",
          "customerAccount",
          "hasSecret",
          "authMode",
          "authConfig",
          "permissionAuditAt",
          "permissionAuditResult",
          "createdAt",
          "updatedAt"
        ]
      },
      "TestDestinationResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "httpStatusCode": {
            "type": "number",
            "nullable": true
          },
          "responseExcerpt": {
            "type": "string",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "latencyMs": {
            "type": "number"
          }
        },
        "required": [
          "success",
          "httpStatusCode",
          "responseExcerpt",
          "errorMessage",
          "latencyMs"
        ]
      },
      "DeliveryListResponse": {
        "type": "object",
        "properties": {
          "deliveries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryItem"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "deliveries",
          "nextCursor"
        ]
      },
      "DeliveryDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "EVENT",
              "FILE"
            ]
          },
          "eventId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "fileId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "destinationId": {
            "type": "string",
            "format": "uuid"
          },
          "destinationName": {
            "type": "string"
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "eventType": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "DELIVERING",
              "DELIVERED",
              "FAILED",
              "RETRYING",
              "DRY_RUN"
            ]
          },
          "attemptCount": {
            "type": "number"
          },
          "lastErrorCode": {
            "type": "string",
            "nullable": true
          },
          "lastErrorMessage": {
            "type": "string",
            "nullable": true
          },
          "deliveredAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "latencyMs": {
            "type": "number",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "isReplay": {
            "type": "boolean"
          },
          "replayJobId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "errorCategory": {
            "type": "string",
            "nullable": true
          },
          "priority": {
            "type": "string"
          },
          "dlqStatus": {
            "type": "string",
            "nullable": true
          },
          "queuedDurationMs": {
            "type": "number",
            "nullable": true
          },
          "originKind": {
            "type": "string",
            "enum": [
              "NORMAL",
              "REPLAY",
              "INSPECTION"
            ]
          },
          "sourceDelivery": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "id"
            ],
            "nullable": true
          },
          "event": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "eventType": {
                "type": "string"
              },
              "occurredAt": {
                "type": "string",
                "format": "date-time"
              },
              "source": {
                "type": "string"
              },
              "payload": {
                "type": "object",
                "additionalProperties": {},
                "nullable": true
              },
              "metadata": {
                "type": "object",
                "additionalProperties": {},
                "nullable": true
              },
              "sealed": {
                "default": false,
                "type": "boolean"
              },
              "originKind": {
                "type": "string",
                "enum": [
                  "NORMAL",
                  "INSPECTION"
                ]
              },
              "sourceDeliveryId": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              }
            },
            "required": [
              "id",
              "eventType",
              "occurredAt",
              "source",
              "originKind",
              "sourceDeliveryId"
            ],
            "nullable": true
          },
          "destination": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "type"
            ]
          },
          "attempts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryAttempt"
            }
          }
        },
        "required": [
          "id",
          "kind",
          "eventId",
          "fileId",
          "destinationId",
          "destinationName",
          "environment",
          "eventType",
          "status",
          "attemptCount",
          "lastErrorCode",
          "lastErrorMessage",
          "deliveredAt",
          "latencyMs",
          "createdAt",
          "isReplay",
          "replayJobId",
          "errorCategory",
          "priority",
          "dlqStatus",
          "queuedDurationMs",
          "originKind",
          "event",
          "destination",
          "attempts"
        ]
      },
      "AuditLogListResponse": {
        "type": "object",
        "properties": {
          "logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLogItem"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "logs",
          "nextCursor"
        ]
      },
      "AuditLogItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "actorType": {
            "type": "string",
            "enum": [
              "USER",
              "SYSTEM",
              "API_KEY",
              "MCP_API_KEY",
              "EMBED_SESSION",
              "EMBED_DASHBOARD_LINK"
            ]
          },
          "actorId": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "objectType": {
            "type": "string"
          },
          "objectId": {
            "type": "string"
          },
          "metadata": {
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "actorType",
          "actorId",
          "action",
          "objectType",
          "objectId",
          "createdAt"
        ]
      },
      "CreateEventSchemaRequest": {
        "type": "object",
        "properties": {
          "eventType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "schemaDefinition": {
            "type": "object",
            "additionalProperties": {}
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "examplePayload": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "eventType",
          "schemaDefinition"
        ]
      },
      "EventSchemaItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventType": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "schemaDefinition": {
            "type": "object",
            "additionalProperties": {}
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "examplePayload": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "ACTIVE",
              "DEPRECATED"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "eventType",
          "version",
          "schemaDefinition",
          "description",
          "examplePayload",
          "status",
          "createdAt",
          "updatedAt"
        ]
      },
      "EventSchemaListResponse": {
        "type": "object",
        "properties": {
          "schemas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventSchemaItem"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "schemas",
          "nextCursor"
        ]
      },
      "ActivateSchemaRequest": {
        "type": "object",
        "properties": {
          "force": {
            "type": "boolean"
          }
        }
      },
      "CreateRoutingRuleRequest": {
        "type": "object",
        "properties": {
          "destinationId": {
            "type": "string",
            "format": "uuid"
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "eventTypeFilter": {
            "$ref": "#/components/schemas/EventTypeFilter"
          },
          "fieldFilters": {
            "$ref": "#/components/schemas/FieldFilters"
          },
          "enabled": {
            "default": true,
            "type": "boolean"
          },
          "priority": {
            "default": 0,
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "destinationId",
          "customerAccountId",
          "name"
        ]
      },
      "RoutingRuleItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "destinationId": {
            "type": "string",
            "format": "uuid"
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "eventTypeFilter": {
            "type": "object",
            "properties": {
              "include": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "include"
            ],
            "nullable": true
          },
          "fieldFilters": {
            "type": "object",
            "properties": {
              "conditions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldFilterCondition"
                },
                "minItems": 1
              },
              "logic": {
                "default": "AND",
                "type": "string",
                "enum": [
                  "AND",
                  "OR"
                ]
              }
            },
            "required": [
              "conditions"
            ],
            "nullable": true
          },
          "enabled": {
            "type": "boolean"
          },
          "priority": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "destinationId",
          "customerAccountId",
          "name",
          "description",
          "eventTypeFilter",
          "fieldFilters",
          "enabled",
          "priority",
          "createdAt",
          "updatedAt"
        ]
      },
      "RoutingRuleListResponse": {
        "type": "object",
        "properties": {
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoutingRuleItem"
            }
          }
        },
        "required": [
          "rules"
        ]
      },
      "UpdateRoutingRuleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 1000,
            "nullable": true
          },
          "eventTypeFilter": {
            "type": "object",
            "properties": {
              "include": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "include"
            ],
            "nullable": true
          },
          "fieldFilters": {
            "type": "object",
            "properties": {
              "conditions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldFilterCondition"
                },
                "minItems": 1
              },
              "logic": {
                "default": "AND",
                "type": "string",
                "enum": [
                  "AND",
                  "OR"
                ]
              }
            },
            "required": [
              "conditions"
            ],
            "nullable": true
          },
          "priority": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "TransformScriptListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransformScriptItem"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "CreateTransformScriptRequest": {
        "type": "object",
        "properties": {
          "destinationId": {
            "type": "string",
            "format": "uuid"
          },
          "sourceLanguage": {
            "type": "string",
            "enum": [
              "TYPESCRIPT",
              "JAVASCRIPT"
            ]
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 65536
          },
          "notes": {
            "default": "",
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "destinationId",
          "sourceLanguage",
          "source"
        ]
      },
      "TransformScriptItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "destinationId": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": 0
          },
          "sourceLanguage": {
            "type": "string",
            "enum": [
              "TYPESCRIPT",
              "JAVASCRIPT"
            ]
          },
          "source": {
            "type": "string"
          },
          "compiledJs": {
            "type": "string"
          },
          "sourceMap": {
            "type": "string"
          },
          "runtimeVersion": {
            "type": "string"
          },
          "inputSchemaHash": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdByUserId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "destinationId",
          "version",
          "sourceLanguage",
          "source",
          "compiledJs",
          "sourceMap",
          "runtimeVersion",
          "inputSchemaHash",
          "notes",
          "publishedAt",
          "createdAt",
          "createdByUserId"
        ]
      },
      "CreateReplayJobRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "scopeDefinition": {
            "$ref": "#/components/schemas/ScopeDefinition"
          },
          "rateLimit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          }
        },
        "required": [
          "scopeDefinition"
        ]
      },
      "ReplayJobItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "requestedBy": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "scopeType": {
            "type": "string",
            "enum": [
              "FAILED_DELIVERIES",
              "BY_DESTINATION",
              "BY_EVENT_TYPE",
              "BY_TIME_RANGE",
              "BACKFILL"
            ]
          },
          "scopeDefinition": {
            "$ref": "#/components/schemas/ScopeDefinition"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "RUNNING",
              "PAUSED",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ]
          },
          "totalCount": {
            "type": "number"
          },
          "succeededCount": {
            "type": "number"
          },
          "failedCount": {
            "type": "number"
          },
          "remainingCount": {
            "type": "number"
          },
          "rateLimit": {
            "type": "number"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "tenantId",
          "customerAccountId",
          "requestedBy",
          "name",
          "scopeType",
          "scopeDefinition",
          "status",
          "totalCount",
          "succeededCount",
          "failedCount",
          "remainingCount",
          "rateLimit",
          "startedAt",
          "completedAt",
          "cancelledAt",
          "createdAt"
        ]
      },
      "ReplayJobListResponse": {
        "type": "object",
        "properties": {
          "replayJobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReplayJobItem"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "replayJobs",
          "nextCursor"
        ]
      },
      "ReplayJobProgress": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "RUNNING",
              "PAUSED",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ]
          },
          "totalCount": {
            "type": "number"
          },
          "succeededCount": {
            "type": "number"
          },
          "failedCount": {
            "type": "number"
          },
          "remainingCount": {
            "type": "number"
          },
          "progressPercent": {
            "type": "number"
          },
          "estimatedCompletionAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deliveriesPerSecond": {
            "type": "number"
          }
        },
        "required": [
          "status",
          "totalCount",
          "succeededCount",
          "failedCount",
          "remainingCount",
          "progressPercent",
          "estimatedCompletionAt",
          "deliveriesPerSecond"
        ]
      },
      "DestinationHealthResponse": {
        "type": "object",
        "properties": {
          "destinationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "WEBHOOK",
              "S3",
              "GCS",
              "BIGQUERY",
              "SNOWFLAKE",
              "KINESIS",
              "PUBSUB",
              "SNS",
              "SQS",
              "KAFKA",
              "POSTGRES",
              "MYSQL",
              "CLICKHOUSE",
              "POSTHOG",
              "AZURE_BLOB",
              "AZURE_SERVICE_BUS",
              "EVENTBRIDGE",
              "RABBITMQ"
            ]
          },
          "healthStatus": {
            "type": "string",
            "enum": [
              "HEALTHY",
              "DEGRADED",
              "UNHEALTHY",
              "UNKNOWN"
            ]
          },
          "healthSuccessRate": {
            "type": "number",
            "nullable": true
          },
          "healthCheckedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DestinationHealthLog"
            }
          }
        },
        "required": [
          "destinationId",
          "name",
          "type",
          "healthStatus",
          "healthSuccessRate",
          "healthCheckedAt",
          "history"
        ]
      },
      "DestinationAnalyticsResponse": {
        "type": "object",
        "properties": {
          "destination": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "WEBHOOK",
                  "S3",
                  "GCS",
                  "BIGQUERY",
                  "SNOWFLAKE",
                  "KINESIS",
                  "PUBSUB",
                  "SNS",
                  "SQS",
                  "KAFKA",
                  "POSTGRES",
                  "MYSQL",
                  "CLICKHOUSE",
                  "POSTHOG",
                  "AZURE_BLOB",
                  "AZURE_SERVICE_BUS",
                  "EVENTBRIDGE",
                  "RABBITMQ"
                ]
              },
              "status": {
                "type": "string"
              },
              "environment": {
                "type": "string",
                "enum": [
                  "PRODUCTION",
                  "STAGING",
                  "DEVELOPMENT"
                ]
              },
              "healthStatus": {
                "type": "string",
                "enum": [
                  "HEALTHY",
                  "DEGRADED",
                  "UNHEALTHY",
                  "UNKNOWN"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "type",
              "status",
              "environment",
              "healthStatus"
            ]
          },
          "period": {
            "type": "object",
            "properties": {
              "start": {
                "type": "string",
                "format": "date-time"
              },
              "end": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "start",
              "end"
            ]
          },
          "summary": {
            "type": "object",
            "properties": {
              "totalDeliveries": {
                "type": "number"
              },
              "succeeded": {
                "type": "number"
              },
              "failed": {
                "type": "number"
              },
              "retrying": {
                "type": "number"
              },
              "successRate": {
                "type": "number"
              },
              "averageLatencyMs": {
                "type": "number"
              },
              "p95LatencyMs": {
                "type": "number"
              },
              "p99LatencyMs": {
                "type": "number"
              }
            },
            "required": [
              "totalDeliveries",
              "succeeded",
              "failed",
              "retrying",
              "successRate",
              "averageLatencyMs",
              "p95LatencyMs",
              "p99LatencyMs"
            ]
          },
          "errorBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorBreakdownItem"
            }
          },
          "volumeOverTime": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VolumeOverTimeItem"
            }
          },
          "latencyOverTime": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LatencyOverTimeItem"
            }
          }
        },
        "required": [
          "destination",
          "period",
          "summary",
          "errorBreakdown",
          "volumeOverTime",
          "latencyOverTime"
        ]
      },
      "ThroughputResponse": {
        "type": "object",
        "properties": {
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "windowSeconds": {
            "type": "integer"
          },
          "bucketSeconds": {
            "type": "integer"
          },
          "buckets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThroughputBucket"
            }
          },
          "currentRatePerSecond": {
            "type": "number"
          }
        },
        "required": [
          "environment",
          "windowSeconds",
          "bucketSeconds",
          "buckets",
          "currentRatePerSecond"
        ]
      },
      "DlqListResponse": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DlqEntry"
            }
          },
          "total": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "entries",
          "total",
          "nextCursor"
        ]
      },
      "CreateEmbedSessionRequest": {
        "type": "object",
        "properties": {
          "customerExternalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "customerName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          },
          "ttlSeconds": {
            "default": 3600,
            "type": "integer",
            "minimum": 60,
            "maximum": 86400
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "allowedTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "customerExternalId",
          "customerName",
          "permissions"
        ]
      },
      "EmbedSessionResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "token",
          "expiresAt",
          "customerAccountId"
        ]
      },
      "IngestFileRequest": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/FileSource"
          },
          "fileType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "customerExternalId": {
            "type": "string",
            "minLength": 1
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "string",
                "pattern": "^\\d+$"
              }
            ]
          },
          "fileName": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            }
          },
          "idempotencyKey": {
            "type": "string"
          },
          "correlationId": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          }
        },
        "required": [
          "source",
          "fileType",
          "customerExternalId"
        ]
      },
      "IngestFileResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "duplicate"
            ]
          },
          "matchedDestinations": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "status",
          "matchedDestinations"
        ]
      },
      "ListFilesResponse": {
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileResponse"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "files",
          "nextCursor"
        ]
      },
      "FileResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "fileType": {
            "type": "string"
          },
          "source": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "s3",
                  "gcs"
                ]
              },
              "uri": {
                "type": "string"
              },
              "bucket": {
                "type": "string"
              },
              "key": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "uri",
              "bucket",
              "key"
            ]
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "string",
            "nullable": true
          },
          "sha256": {
            "type": "string",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "DELIVERING",
              "DELIVERED",
              "PARTIALLY_DELIVERED",
              "FAILED"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "tenantId",
          "customerAccountId",
          "fileType",
          "source",
          "contentType",
          "sizeBytes",
          "sha256",
          "fileName",
          "metadata",
          "environment",
          "status",
          "createdAt",
          "updatedAt"
        ]
      },
      "InvitationPreview": {
        "type": "object",
        "properties": {
          "workspaceName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "OWNER",
              "ADMIN",
              "MEMBER",
              "VIEWER"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "workspaceName",
          "email",
          "role",
          "expiresAt"
        ]
      },
      "AcceptInvitationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "password": {
            "type": "string",
            "minLength": 8
          }
        }
      },
      "LoginResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          }
        },
        "required": [
          "token"
        ]
      },
      "OAuthRegisterRequest": {
        "type": "object",
        "properties": {
          "client_name": {
            "type": "string",
            "minLength": 1
          },
          "redirect_uris": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string",
                  "format": "uri"
                },
                {
                  "type": "string",
                  "pattern": "^http:\\/\\/(127\\.0\\.0\\.1|localhost)(:\\d+)?\\/"
                }
              ]
            },
            "minItems": 1
          },
          "token_endpoint_auth_method": {
            "type": "string",
            "enum": [
              "none"
            ]
          },
          "grant_types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "response_types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "client_name",
          "redirect_uris"
        ]
      },
      "OAuthRegisterResponse": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string"
          },
          "client_name": {
            "type": "string"
          },
          "redirect_uris": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "token_endpoint_auth_method": {
            "type": "string",
            "enum": [
              "none"
            ]
          }
        },
        "required": [
          "client_id",
          "client_name",
          "redirect_uris",
          "token_endpoint_auth_method"
        ]
      },
      "OAuthError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "error_description": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "OAuthTokenRequest": {
        "type": "object",
        "properties": {
          "grant_type": {
            "type": "string",
            "enum": [
              "authorization_code",
              "refresh_token",
              "urn:ietf:params:oauth:grant-type:device_code"
            ]
          },
          "code": {
            "type": "string"
          },
          "code_verifier": {
            "type": "string"
          },
          "redirect_uri": {
            "type": "string"
          },
          "refresh_token": {
            "type": "string"
          },
          "device_code": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          }
        },
        "required": [
          "grant_type",
          "client_id"
        ]
      },
      "OAuthTokenResponse": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "token_type": {
            "type": "string",
            "enum": [
              "Bearer"
            ]
          },
          "expires_in": {
            "type": "number"
          },
          "refresh_token": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "token_type",
          "expires_in",
          "scope"
        ]
      },
      "OAuthDeviceAuthRequest": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          }
        },
        "required": [
          "client_id"
        ]
      },
      "OAuthDeviceAuthResponse": {
        "type": "object",
        "properties": {
          "device_code": {
            "type": "string"
          },
          "user_code": {
            "type": "string"
          },
          "verification_uri": {
            "type": "string"
          },
          "verification_uri_complete": {
            "type": "string"
          },
          "expires_in": {
            "type": "number"
          },
          "interval": {
            "type": "number"
          }
        },
        "required": [
          "device_code",
          "user_code",
          "verification_uri",
          "verification_uri_complete",
          "expires_in",
          "interval"
        ]
      },
      "AuthContextPrincipal": {
        "discriminator": {
          "propertyName": "type"
        },
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "id",
              "email",
              "name"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "api-key"
                ]
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "id",
              "name"
            ]
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "mcp-api-key"
                ]
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "id",
              "name"
            ]
          }
        ]
      },
      "Attachment": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AttachmentInline"
          },
          {
            "$ref": "#/components/schemas/AttachmentRef"
          }
        ]
      },
      "CreateWebhookDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "WEBHOOK"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/WebhookConfig"
          },
          "secret": {
            "type": "string"
          },
          "deliveryMode": {
            "default": "REAL_TIME",
            "type": "string",
            "enum": [
              "REAL_TIME"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateS3Destination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "S3"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/S3Config"
          },
          "secret": {
            "$ref": "#/components/schemas/S3Secret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "BATCHED"
            ]
          },
          "batchConfig": {
            "$ref": "#/components/schemas/BatchConfig"
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateGCSDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "GCS"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/GCSConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/BigQuerySecret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "oauthAuthorizationId": {
            "type": "string",
            "format": "uuid"
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "BATCHED"
            ]
          },
          "batchConfig": {
            "$ref": "#/components/schemas/BatchConfig"
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateBigQueryDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "BIGQUERY"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/BigQueryConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/BigQuerySecret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "oauthAuthorizationId": {
            "type": "string",
            "format": "uuid"
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "BATCHED"
            ]
          },
          "batchConfig": {
            "$ref": "#/components/schemas/BatchConfig"
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateSnowflakeDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "SNOWFLAKE"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/SnowflakeConfig"
          },
          "secret": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string",
                "minLength": 1
              },
              "password": {
                "type": "string"
              },
              "privateKey": {
                "type": "string"
              },
              "privateKeyPassphrase": {
                "type": "string"
              }
            },
            "required": [
              "username"
            ]
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "oauthAuthorizationId": {
            "type": "string",
            "format": "uuid"
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "BATCHED"
            ]
          },
          "batchConfig": {
            "$ref": "#/components/schemas/BatchConfig"
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreatePosthogDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "POSTHOG"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/PosthogConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/PosthogSecret"
          },
          "authMode": {
            "default": "POSTHOG_PROJECT_API_KEY",
            "type": "string",
            "enum": [
              "POSTHOG_PROJECT_API_KEY"
            ]
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config",
          "secret"
        ]
      },
      "CreateKinesisDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "KINESIS"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/KinesisConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/AwsStreamSecret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateSnsDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "SNS"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/SnsConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/AwsStreamSecret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateSqsDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "SQS"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/SqsConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/AwsStreamSecret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreatePubsubDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "PUBSUB"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/PubsubConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/BigQuerySecret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateKafkaDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "KAFKA"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/KafkaConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/KafkaSecret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreatePostgresDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "POSTGRES"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/PostgresConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/ClickHouseSecret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateMySqlDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "MYSQL"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/MySqlConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/ClickHouseSecret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateClickHouseDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "CLICKHOUSE"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/ClickHouseConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/ClickHouseSecret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateAzureBlobDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "AZURE_BLOB"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/AzureBlobConfig"
          },
          "secret": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AzureConnectionStringSecret"
              },
              {
                "$ref": "#/components/schemas/AzureServicePrincipalSecret"
              }
            ]
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "BATCHED",
            "type": "string",
            "enum": [
              "BATCHED"
            ]
          },
          "batchConfig": {
            "$ref": "#/components/schemas/BatchConfig"
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateAzureServiceBusDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "AZURE_SERVICE_BUS"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/AzureServiceBusConfig"
          },
          "secret": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AzureConnectionStringSecret"
              },
              {
                "$ref": "#/components/schemas/AzureServicePrincipalSecret"
              }
            ]
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "REAL_TIME",
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateEventBridgeDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "EVENTBRIDGE"
            ]
          },
          "config": {
            "$ref": "#/components/schemas/EventBridgeConfig"
          },
          "secret": {
            "$ref": "#/components/schemas/S3Secret"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "REAL_TIME",
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "CreateRabbitMqDestination": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          },
          "type": {
            "type": "string",
            "enum": [
              "RABBITMQ"
            ]
          },
          "config": {
            "type": "object",
            "properties": {
              "uri": {
                "type": "string",
                "pattern": "^amqps:\\/\\/"
              },
              "hosts": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "port": {
                "default": 5671,
                "type": "integer",
                "minimum": 1,
                "maximum": 65535
              },
              "vhost": {
                "default": "/",
                "type": "string"
              },
              "exchange": {
                "default": "",
                "type": "string"
              },
              "routingKey": {
                "type": "string",
                "minLength": 1
              },
              "routingKeyField": {
                "type": "string"
              },
              "contentType": {
                "default": "application/json",
                "type": "string"
              },
              "persistent": {
                "default": true,
                "type": "boolean"
              },
              "messageIdField": {
                "type": "string"
              },
              "headersField": {
                "type": "string"
              }
            },
            "required": [
              "routingKey"
            ]
          },
          "secret": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RabbitMqPlainSecret"
              },
              {
                "$ref": "#/components/schemas/RabbitMqMtlsSecret"
              }
            ]
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "deliveryMode": {
            "default": "REAL_TIME",
            "type": "string",
            "enum": [
              "REAL_TIME",
              "BATCHED"
            ]
          }
        },
        "required": [
          "name",
          "environment",
          "customerAccountId",
          "type",
          "config"
        ]
      },
      "WebhookConfig": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "method": {
            "default": "POST",
            "type": "string",
            "enum": [
              "POST",
              "PUT"
            ]
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "timeout": {
            "default": 30000,
            "type": "number",
            "minimum": 1000,
            "maximum": 60000
          },
          "signatureMode": {
            "default": "HMAC_SHA256",
            "type": "string",
            "enum": [
              "HMAC_SHA256",
              "BEARER"
            ]
          },
          "signing": {
            "$ref": "#/components/schemas/WebhookSigningConfig"
          },
          "rateLimitPerSecond": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "required": [
          "url"
        ]
      },
      "S3Config": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "minLength": 1
          },
          "region": {
            "type": "string",
            "minLength": 1
          },
          "prefix": {
            "default": "",
            "type": "string"
          },
          "pathTemplate": {
            "default": "{{prefix}}{{year}}/{{month}}/{{day}}/{{hour}}/{{batchId}}.jsonl",
            "type": "string"
          },
          "fileFormat": {
            "default": "JSONL",
            "type": "string",
            "enum": [
              "JSONL",
              "JSON_ARRAY"
            ]
          },
          "compression": {
            "default": "NONE",
            "type": "string",
            "enum": [
              "NONE",
              "GZIP"
            ]
          },
          "rateLimitPerSecond": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "required": [
          "bucket",
          "region"
        ]
      },
      "GCSConfig": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "minLength": 1
          },
          "prefix": {
            "default": "",
            "type": "string"
          },
          "pathTemplate": {
            "default": "{{prefix}}{{year}}/{{month}}/{{day}}/{{hour}}/{{batchId}}.jsonl",
            "type": "string"
          },
          "fileFormat": {
            "default": "JSONL",
            "type": "string",
            "enum": [
              "JSONL",
              "JSON_ARRAY"
            ]
          },
          "compression": {
            "default": "NONE",
            "type": "string",
            "enum": [
              "NONE",
              "GZIP"
            ]
          },
          "rateLimitPerSecond": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "required": [
          "bucket"
        ]
      },
      "BigQueryConfig": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "datasetId": {
            "type": "string",
            "minLength": 1
          },
          "tableId": {
            "type": "string",
            "minLength": 1
          },
          "schemaMapping": {
            "type": "object",
            "properties": {
              "columns": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaMappingColumn"
                },
                "minItems": 1
              },
              "includeMetadata": {
                "default": true,
                "type": "boolean"
              },
              "unmappedFieldBehavior": {
                "default": "IGNORE",
                "type": "string",
                "enum": [
                  "IGNORE",
                  "STORE_AS_JSON"
                ]
              }
            },
            "required": [
              "columns"
            ]
          },
          "insertMethod": {
            "default": "STREAMING",
            "type": "string",
            "enum": [
              "STREAMING",
              "LOAD_JOB"
            ]
          },
          "createTableIfNotExists": {
            "default": false,
            "type": "boolean"
          },
          "partitionField": {
            "type": "string"
          },
          "rateLimitPerSecond": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "required": [
          "projectId",
          "datasetId",
          "tableId",
          "schemaMapping"
        ]
      },
      "SnowflakeConfig": {
        "type": "object",
        "properties": {
          "account": {
            "type": "string",
            "minLength": 1
          },
          "warehouse": {
            "type": "string",
            "minLength": 1
          },
          "database": {
            "type": "string",
            "minLength": 1
          },
          "schema": {
            "type": "string",
            "minLength": 1
          },
          "table": {
            "type": "string",
            "minLength": 1
          },
          "schemaMapping": {
            "type": "object",
            "properties": {
              "columns": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SchemaMappingColumn"
                },
                "minItems": 1
              },
              "includeMetadata": {
                "default": true,
                "type": "boolean"
              },
              "unmappedFieldBehavior": {
                "default": "IGNORE",
                "type": "string",
                "enum": [
                  "IGNORE",
                  "STORE_AS_JSON"
                ]
              }
            },
            "required": [
              "columns"
            ]
          },
          "loadMethod": {
            "default": "STAGE_COPY",
            "type": "string",
            "enum": [
              "STAGE_COPY",
              "SNOWPIPE"
            ]
          },
          "stageName": {
            "type": "string",
            "minLength": 1
          },
          "rateLimitPerSecond": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "required": [
          "account",
          "warehouse",
          "database",
          "schema",
          "table",
          "schemaMapping",
          "stageName"
        ]
      },
      "PosthogConfig": {
        "type": "object",
        "properties": {
          "host": {
            "default": "https://us.i.posthog.com",
            "type": "string",
            "format": "uri"
          },
          "distinctIdField": {
            "default": "$.metadata.userId",
            "type": "string"
          },
          "eventNameField": {
            "default": "$.eventType",
            "type": "string"
          },
          "timestampField": {
            "default": "$.occurredAt",
            "type": "string"
          },
          "propertiesField": {
            "default": "$.payload",
            "type": "string"
          },
          "groupsMapping": {
            "default": {},
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "batchConfig": {
            "default": {
              "maxRecords": 100,
              "flushIntervalMs": 2000
            },
            "type": "object",
            "properties": {
              "maxRecords": {
                "default": 100,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "flushIntervalMs": {
                "default": 2000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              }
            }
          }
        }
      },
      "KinesisConfig": {
        "type": "object",
        "properties": {
          "region": {
            "type": "string",
            "minLength": 1
          },
          "streamName": {
            "type": "string",
            "minLength": 1
          },
          "partitionKeyField": {
            "default": "$.id",
            "type": "string"
          },
          "batchConfig": {
            "default": {
              "maxRecords": 500,
              "flushIntervalMs": 2000,
              "maxBatchBytes": 4718592
            },
            "type": "object",
            "properties": {
              "maxRecords": {
                "default": 500,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0,
                "maximum": 500
              },
              "flushIntervalMs": {
                "default": 2000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "maxBatchBytes": {
                "default": 4718592,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0,
                "maximum": 5242880
              }
            }
          }
        },
        "required": [
          "region",
          "streamName"
        ]
      },
      "SnsConfig": {
        "type": "object",
        "properties": {
          "region": {
            "type": "string",
            "minLength": 1
          },
          "topicArn": {
            "type": "string",
            "minLength": 1
          },
          "messageGroupIdField": {
            "default": "$.metadata.userId",
            "type": "string"
          },
          "messageDeduplicationIdField": {
            "default": "$.id",
            "type": "string"
          },
          "messageAttributes": {
            "default": {
              "eventType": "$.eventType"
            },
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "batchConfig": {
            "default": {
              "maxRecords": 10,
              "flushIntervalMs": 2000
            },
            "type": "object",
            "properties": {
              "maxRecords": {
                "default": 10,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0,
                "maximum": 10
              },
              "flushIntervalMs": {
                "default": 2000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              }
            }
          }
        },
        "required": [
          "region",
          "topicArn"
        ]
      },
      "SqsConfig": {
        "type": "object",
        "properties": {
          "region": {
            "type": "string",
            "minLength": 1
          },
          "queueUrl": {
            "type": "string",
            "format": "uri"
          },
          "messageGroupIdField": {
            "default": "$.metadata.userId",
            "type": "string"
          },
          "messageDeduplicationIdField": {
            "default": "$.id",
            "type": "string"
          },
          "delaySeconds": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 900
          },
          "batchConfig": {
            "default": {
              "maxRecords": 10,
              "flushIntervalMs": 2000
            },
            "type": "object",
            "properties": {
              "maxRecords": {
                "default": 10,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0,
                "maximum": 10
              },
              "flushIntervalMs": {
                "default": 2000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              }
            }
          }
        },
        "required": [
          "region",
          "queueUrl"
        ]
      },
      "PubsubConfig": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "topic": {
            "type": "string",
            "minLength": 1
          },
          "orderingKeyField": {
            "default": "$.metadata.userId",
            "type": "string"
          },
          "attributesMapping": {
            "default": {
              "eventType": "$.eventType",
              "tenantId": "$.tenantId"
            },
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "batchConfig": {
            "default": {
              "maxRecords": 1000,
              "flushIntervalMs": 2000,
              "maxBatchBytes": 9437184
            },
            "type": "object",
            "properties": {
              "maxRecords": {
                "default": 1000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0,
                "maximum": 1000
              },
              "flushIntervalMs": {
                "default": 2000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "maxBatchBytes": {
                "default": 9437184,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0,
                "maximum": 9437184
              }
            }
          }
        },
        "required": [
          "projectId",
          "topic"
        ]
      },
      "KafkaConfig": {
        "type": "object",
        "properties": {
          "brokers": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1
          },
          "topic": {
            "type": "string",
            "minLength": 1
          },
          "messageKeyField": {
            "default": "$.id",
            "type": "string"
          },
          "compression": {
            "default": "snappy",
            "type": "string",
            "enum": [
              "none",
              "gzip",
              "snappy",
              "lz4",
              "zstd"
            ]
          },
          "acks": {
            "default": "all",
            "type": "string",
            "enum": [
              "all",
              "leader",
              "none"
            ]
          },
          "clientId": {
            "default": "pushrail-delivery",
            "type": "string"
          },
          "customHeaders": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "batchConfig": {
            "default": {
              "maxRecords": 500,
              "flushIntervalMs": 1000,
              "maxBatchBytes": 1048576
            },
            "type": "object",
            "properties": {
              "maxRecords": {
                "default": 500,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "flushIntervalMs": {
                "default": 1000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "maxBatchBytes": {
                "default": 1048576,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              }
            }
          }
        },
        "required": [
          "brokers",
          "topic"
        ]
      },
      "PostgresConfig": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "minLength": 1
          },
          "port": {
            "default": 5432,
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "database": {
            "type": "string",
            "minLength": 1
          },
          "schema": {
            "default": "public",
            "type": "string",
            "minLength": 1
          },
          "table": {
            "type": "string",
            "minLength": 1
          },
          "sslMode": {
            "default": "require",
            "type": "string",
            "enum": [
              "disable",
              "require",
              "verify-ca",
              "verify-full"
            ]
          },
          "columnMapping": {
            "default": {},
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ClickHouseColumnMappingEntry"
            }
          },
          "batchConfig": {
            "default": {
              "maxRecords": 1000,
              "flushIntervalMs": 2000,
              "maxBatchBytes": 5242880
            },
            "type": "object",
            "properties": {
              "maxRecords": {
                "default": 1000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "flushIntervalMs": {
                "default": 2000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "maxBatchBytes": {
                "default": 5242880,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              }
            }
          }
        },
        "required": [
          "host",
          "database",
          "table"
        ]
      },
      "MySqlConfig": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "minLength": 1
          },
          "port": {
            "default": 3306,
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "database": {
            "type": "string",
            "minLength": 1
          },
          "schema": {
            "type": "string",
            "minLength": 1
          },
          "table": {
            "type": "string",
            "minLength": 1
          },
          "sslMode": {
            "default": "require",
            "type": "string",
            "enum": [
              "disable",
              "require",
              "verify-ca",
              "verify-full"
            ]
          },
          "columnMapping": {
            "default": {},
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ClickHouseColumnMappingEntry"
            }
          },
          "batchConfig": {
            "default": {
              "maxRecords": 1000,
              "flushIntervalMs": 2000,
              "maxBatchBytes": 5242880
            },
            "type": "object",
            "properties": {
              "maxRecords": {
                "default": 1000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "flushIntervalMs": {
                "default": 2000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "maxBatchBytes": {
                "default": 5242880,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              }
            }
          }
        },
        "required": [
          "host",
          "database",
          "schema",
          "table"
        ]
      },
      "ClickHouseConfig": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "minLength": 1
          },
          "port": {
            "default": 8443,
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "database": {
            "type": "string",
            "minLength": 1
          },
          "table": {
            "type": "string",
            "minLength": 1
          },
          "sslMode": {
            "default": "require",
            "type": "string",
            "enum": [
              "disable",
              "require",
              "verify-ca",
              "verify-full"
            ]
          },
          "format": {
            "default": "JSONEachRow",
            "type": "string",
            "enum": [
              "JSONEachRow",
              "JSONCompactEachRow"
            ]
          },
          "async_insert": {
            "default": false,
            "type": "boolean"
          },
          "columnMapping": {
            "default": {},
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ClickHouseColumnMappingEntry"
            }
          },
          "batchConfig": {
            "default": {
              "maxRecords": 10000,
              "flushIntervalMs": 2000,
              "maxBatchBytes": 10485760
            },
            "type": "object",
            "properties": {
              "maxRecords": {
                "default": 10000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "flushIntervalMs": {
                "default": 2000,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              },
              "maxBatchBytes": {
                "default": 10485760,
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": 0
              }
            }
          }
        },
        "required": [
          "host",
          "database",
          "table"
        ]
      },
      "AzureBlobConfig": {
        "type": "object",
        "properties": {
          "accountName": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9]{3,24}$"
          },
          "containerName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 63,
            "pattern": "^[a-z0-9-]+$"
          },
          "prefix": {
            "default": "",
            "type": "string"
          },
          "pathTemplate": {
            "default": "{{prefix}}{{year}}/{{month}}/{{day}}/{{hour}}/{{batchId}}.jsonl",
            "type": "string"
          },
          "fileFormat": {
            "default": "JSONL",
            "type": "string",
            "enum": [
              "JSONL",
              "JSON_ARRAY"
            ]
          },
          "compression": {
            "default": "NONE",
            "type": "string",
            "enum": [
              "NONE",
              "GZIP"
            ]
          },
          "rateLimitPerSecond": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "required": [
          "accountName",
          "containerName"
        ]
      },
      "AzureServiceBusConfig": {
        "type": "object",
        "properties": {
          "fullyQualifiedNamespace": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-z0-9-]+\\.servicebus\\.windows\\.net$"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "queue",
              "topic"
            ]
          },
          "entityName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 260
          },
          "messageIdField": {
            "type": "string"
          },
          "sessionIdField": {
            "type": "string"
          },
          "partitionKeyField": {
            "type": "string"
          }
        },
        "required": [
          "fullyQualifiedNamespace",
          "entityType",
          "entityName"
        ]
      },
      "EventBridgeConfig": {
        "type": "object",
        "properties": {
          "region": {
            "type": "string",
            "minLength": 1
          },
          "eventBusName": {
            "type": "string",
            "minLength": 1
          },
          "defaultSource": {
            "type": "string",
            "minLength": 1
          },
          "defaultDetailType": {
            "type": "string",
            "minLength": 1
          },
          "sourceField": {
            "type": "string"
          },
          "detailTypeField": {
            "type": "string"
          },
          "resourcesField": {
            "type": "string"
          },
          "traceHeaderField": {
            "type": "string"
          }
        },
        "required": [
          "region",
          "eventBusName",
          "defaultSource",
          "defaultDetailType"
        ]
      },
      "TransformStep": {
        "discriminator": {
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/RenameTransform"
          },
          {
            "$ref": "#/components/schemas/DropTransform"
          },
          {
            "$ref": "#/components/schemas/AddStaticTransform"
          },
          {
            "$ref": "#/components/schemas/MapPathTransform"
          },
          {
            "$ref": "#/components/schemas/SelectFieldsTransform"
          },
          {
            "$ref": "#/components/schemas/WrapTransform"
          }
        ]
      },
      "CustomerAccountRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "externalId",
          "name"
        ]
      },
      "AwsAssumeRoleAuthConfig": {
        "type": "object",
        "properties": {
          "roleArn": {
            "type": "string",
            "pattern": "^arn:aws:iam::\\d{12}:role\\/[\\w+=,.@\\-/]+$"
          }
        },
        "required": [
          "roleArn"
        ]
      },
      "AwsAssumeRoleAutomatedAuthConfig": {
        "type": "object",
        "properties": {
          "awsAccountId": {
            "type": "string",
            "pattern": "^\\d{12}$"
          }
        },
        "required": [
          "awsAccountId"
        ]
      },
      "UpdateWebhookDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "WEBHOOK"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/WebhookConfig"
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config"
        ]
      },
      "UpdateS3Destination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "S3"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/S3Config"
          },
          "batchConfig": {
            "$ref": "#/components/schemas/BatchConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/S3Secret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "batchConfig",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateGCSDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "GCS"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/GCSConfig"
          },
          "batchConfig": {
            "$ref": "#/components/schemas/BatchConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "oauthAuthorizationId": {
            "type": "string",
            "format": "uuid"
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/BigQuerySecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "batchConfig",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateBigQueryDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "BIGQUERY"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/BigQueryConfig"
          },
          "batchConfig": {
            "$ref": "#/components/schemas/BatchConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "oauthAuthorizationId": {
            "type": "string",
            "format": "uuid"
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/BigQuerySecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "batchConfig",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateSnowflakeDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "SNOWFLAKE"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/SnowflakeConfig"
          },
          "batchConfig": {
            "$ref": "#/components/schemas/BatchConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "oauthAuthorizationId": {
            "type": "string",
            "format": "uuid"
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string",
                "minLength": 1
              },
              "password": {
                "type": "string"
              },
              "privateKey": {
                "type": "string"
              },
              "privateKeyPassphrase": {
                "type": "string"
              }
            },
            "required": [
              "username"
            ]
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "batchConfig"
        ]
      },
      "UpdatePosthogDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "POSTHOG"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/PosthogConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "POSTHOG_PROJECT_API_KEY"
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/PosthogSecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode"
        ]
      },
      "UpdateKinesisDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "KINESIS"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/KinesisConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/AwsStreamSecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateSnsDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "SNS"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/SnsConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/AwsStreamSecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateSqsDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "SQS"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/SqsConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/AwsStreamSecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "UpdatePubsubDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "PUBSUB"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/PubsubConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/BigQuerySecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateKafkaDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "KAFKA"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/KafkaConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/KafkaSecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "UpdatePostgresDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "POSTGRES"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/PostgresConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/ClickHouseSecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateMySqlDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "MYSQL"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/MySqlConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/ClickHouseSecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateClickHouseDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "CLICKHOUSE"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/ClickHouseConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/ClickHouseSecret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateAzureBlobDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "AZURE_BLOB"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/AzureBlobConfig"
          },
          "batchConfig": {
            "$ref": "#/components/schemas/BatchConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AzureConnectionStringSecret"
              },
              {
                "$ref": "#/components/schemas/AzureServicePrincipalSecret"
              }
            ]
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "batchConfig",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateAzureServiceBusDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "AZURE_SERVICE_BUS"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/AzureServiceBusConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AzureConnectionStringSecret"
              },
              {
                "$ref": "#/components/schemas/AzureServicePrincipalSecret"
              }
            ]
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateEventBridgeDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "EVENTBRIDGE"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "$ref": "#/components/schemas/EventBridgeConfig"
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "$ref": "#/components/schemas/S3Secret"
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "UpdateRabbitMqDestination": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "RABBITMQ"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "config": {
            "type": "object",
            "properties": {
              "uri": {
                "type": "string",
                "pattern": "^amqps:\\/\\/"
              },
              "hosts": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "port": {
                "default": 5671,
                "type": "integer",
                "minimum": 1,
                "maximum": 65535
              },
              "vhost": {
                "default": "/",
                "type": "string"
              },
              "exchange": {
                "default": "",
                "type": "string"
              },
              "routingKey": {
                "type": "string",
                "minLength": 1
              },
              "routingKeyField": {
                "type": "string"
              },
              "contentType": {
                "default": "application/json",
                "type": "string"
              },
              "persistent": {
                "default": true,
                "type": "boolean"
              },
              "messageIdField": {
                "type": "string"
              },
              "headersField": {
                "type": "string"
              }
            },
            "required": [
              "routingKey"
            ]
          },
          "authMode": {
            "type": "string",
            "enum": [
              "AWS_ACCESS_KEYS",
              "AWS_PLATFORM_PRINCIPAL",
              "AWS_ASSUME_ROLE",
              "GCP_SERVICE_ACCOUNT_KEY",
              "GCP_PLATFORM_PRINCIPAL",
              "SNOWFLAKE_OAUTH",
              "SNOWFLAKE_PASSWORD",
              "KAFKA_SASL_SCRAM",
              "KAFKA_SASL_PLAIN",
              "KAFKA_MTLS",
              "KAFKA_API_KEY",
              "POSTGRES_PASSWORD",
              "POSTGRES_MTLS",
              "MYSQL_PASSWORD",
              "MYSQL_MTLS",
              "CLICKHOUSE_PASSWORD",
              "CLICKHOUSE_MTLS",
              "POSTHOG_PROJECT_API_KEY",
              "GOOGLE_OAUTH",
              "AWS_ASSUME_ROLE_AUTOMATED",
              "SNOWFLAKE_OAUTH_CLIENT_CREDENTIALS",
              "AZURE_CONNECTION_STRING",
              "AZURE_SERVICE_PRINCIPAL",
              "RABBITMQ_PLAIN",
              "RABBITMQ_MTLS"
            ],
            "nullable": true
          },
          "authConfig": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAuthConfig"
              },
              {
                "$ref": "#/components/schemas/AwsAssumeRoleAutomatedAuthConfig"
              }
            ],
            "nullable": true
          },
          "transformConfig": {
            "type": "object",
            "properties": {
              "transforms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TransformStep"
                }
              }
            },
            "required": [
              "transforms"
            ],
            "nullable": true
          },
          "transformMode": {
            "type": "string",
            "enum": [
              "NONE",
              "DECLARATIVE",
              "SCRIPT"
            ]
          },
          "activeTransformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "secret": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RabbitMqPlainSecret"
              },
              {
                "$ref": "#/components/schemas/RabbitMqMtlsSecret"
              }
            ]
          },
          "preflightOverride": {
            "$ref": "#/components/schemas/PreflightOverride"
          }
        },
        "required": [
          "type",
          "name",
          "config",
          "authMode",
          "authConfig"
        ]
      },
      "DeliveryItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "EVENT",
              "FILE"
            ]
          },
          "eventId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "fileId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "destinationId": {
            "type": "string",
            "format": "uuid"
          },
          "destinationName": {
            "type": "string"
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          },
          "eventType": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "DELIVERING",
              "DELIVERED",
              "FAILED",
              "RETRYING",
              "DRY_RUN"
            ]
          },
          "attemptCount": {
            "type": "number"
          },
          "lastErrorCode": {
            "type": "string",
            "nullable": true
          },
          "lastErrorMessage": {
            "type": "string",
            "nullable": true
          },
          "deliveredAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "latencyMs": {
            "type": "number",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "isReplay": {
            "type": "boolean"
          },
          "replayJobId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "errorCategory": {
            "type": "string",
            "nullable": true
          },
          "priority": {
            "type": "string"
          },
          "dlqStatus": {
            "type": "string",
            "nullable": true
          },
          "queuedDurationMs": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "id",
          "kind",
          "eventId",
          "fileId",
          "destinationId",
          "destinationName",
          "environment",
          "eventType",
          "status",
          "attemptCount",
          "lastErrorCode",
          "lastErrorMessage",
          "deliveredAt",
          "latencyMs",
          "createdAt",
          "isReplay",
          "replayJobId",
          "errorCategory",
          "priority",
          "dlqStatus",
          "queuedDurationMs"
        ]
      },
      "DeliveryAttempt": {
        "type": "object",
        "properties": {
          "attemptNumber": {
            "type": "number"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "resultStatus": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "TRANSIENT_FAILURE",
              "PERMANENT_FAILURE",
              "TIMEOUT"
            ]
          },
          "httpStatusCode": {
            "type": "number",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "responseExcerpt": {
            "type": "string",
            "nullable": true
          },
          "latencyMs": {
            "type": "number",
            "nullable": true
          },
          "requestPayload": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          },
          "transformedPayload": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          },
          "transformScriptId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "transformMs": {
            "type": "number",
            "nullable": true
          },
          "sealed": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "attemptNumber",
          "requestedAt",
          "completedAt",
          "resultStatus",
          "httpStatusCode",
          "errorMessage",
          "responseExcerpt",
          "latencyMs",
          "requestPayload",
          "transformedPayload",
          "transformScriptId",
          "transformMs"
        ]
      },
      "EventTypeFilter": {
        "type": "object",
        "properties": {
          "include": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "exclude": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "include"
        ]
      },
      "FieldFilters": {
        "type": "object",
        "properties": {
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldFilterCondition"
            },
            "minItems": 1
          },
          "logic": {
            "default": "AND",
            "type": "string",
            "enum": [
              "AND",
              "OR"
            ]
          }
        },
        "required": [
          "conditions"
        ]
      },
      "FieldFilterCondition": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "minLength": 1
          },
          "operator": {
            "type": "string",
            "enum": [
              "eq",
              "neq",
              "gt",
              "gte",
              "lt",
              "lte",
              "contains",
              "startsWith",
              "endsWith",
              "in",
              "notIn",
              "exists",
              "notExists"
            ]
          },
          "value": {
            "nullable": true
          }
        },
        "required": [
          "field",
          "operator"
        ]
      },
      "ScopeDefinition": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "FAILED_DELIVERIES",
              "BY_DESTINATION",
              "BY_EVENT_TYPE",
              "BY_TIME_RANGE",
              "BACKFILL"
            ]
          },
          "filters": {
            "$ref": "#/components/schemas/ScopeFilters"
          }
        },
        "required": [
          "type",
          "filters"
        ]
      },
      "DestinationHealthLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "HEALTHY",
              "DEGRADED",
              "UNHEALTHY",
              "UNKNOWN"
            ]
          },
          "successRate": {
            "type": "number"
          },
          "totalDeliveries": {
            "type": "number"
          },
          "failedDeliveries": {
            "type": "number"
          },
          "evaluatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "status",
          "successRate",
          "totalDeliveries",
          "failedDeliveries",
          "evaluatedAt"
        ]
      },
      "ErrorBreakdownItem": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string"
          },
          "count": {
            "type": "number"
          },
          "percentage": {
            "type": "number"
          }
        },
        "required": [
          "errorCode",
          "count",
          "percentage"
        ]
      },
      "VolumeOverTimeItem": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "succeeded": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "timestamp",
          "succeeded",
          "failed",
          "total"
        ]
      },
      "LatencyOverTimeItem": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "avgMs": {
            "type": "number"
          },
          "p95Ms": {
            "type": "number"
          }
        },
        "required": [
          "timestamp",
          "avgMs",
          "p95Ms"
        ]
      },
      "ThroughputBucket": {
        "type": "object",
        "properties": {
          "bucketStart": {
            "type": "string",
            "format": "date-time"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "bucketStart",
          "count"
        ]
      },
      "DlqEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "eventType": {
            "type": "string"
          },
          "destinationId": {
            "type": "string",
            "format": "uuid"
          },
          "destinationName": {
            "type": "string"
          },
          "errorCategory": {
            "type": "string",
            "nullable": true
          },
          "lastErrorCode": {
            "type": "string",
            "nullable": true
          },
          "lastErrorMessage": {
            "type": "string",
            "nullable": true
          },
          "attemptCount": {
            "type": "number"
          },
          "dlqEnteredAt": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "eventId",
          "eventType",
          "destinationId",
          "destinationName",
          "errorCategory",
          "lastErrorCode",
          "lastErrorMessage",
          "attemptCount",
          "dlqEnteredAt",
          "createdAt"
        ]
      },
      "FileSource": {
        "discriminator": {
          "propertyName": "kind"
        },
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "s3"
                ]
              },
              "uri": {
                "type": "string",
                "pattern": "^s3:\\/\\/[^/]+\\/.+"
              }
            },
            "required": [
              "kind",
              "uri"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "gcs"
                ]
              },
              "uri": {
                "type": "string",
                "pattern": "^gs:\\/\\/[^/]+\\/.+"
              }
            },
            "required": [
              "kind",
              "uri"
            ]
          }
        ]
      },
      "AttachmentInline": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/FileSource"
          },
          "fileType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "string",
                "pattern": "^\\d+$"
              }
            ]
          },
          "fileName": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            }
          }
        },
        "required": [
          "source",
          "fileType"
        ]
      },
      "AttachmentRef": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "fileId"
        ]
      },
      "PreflightOverride": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "warn",
              "fail"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 10,
            "maxLength": 500
          },
          "probes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          }
        },
        "required": [
          "status",
          "reason",
          "probes"
        ]
      },
      "S3Secret": {
        "type": "object",
        "properties": {
          "accessKeyId": {
            "type": "string",
            "minLength": 1
          },
          "secretAccessKey": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "accessKeyId",
          "secretAccessKey"
        ]
      },
      "BatchConfig": {
        "type": "object",
        "properties": {
          "flushIntervalSeconds": {
            "default": 300,
            "type": "number",
            "minimum": 10,
            "maximum": 3600
          },
          "maxBatchSize": {
            "default": 1000,
            "type": "number",
            "minimum": 1,
            "maximum": 100000
          },
          "maxBatchBytes": {
            "default": 10485760,
            "type": "number",
            "minimum": 1024,
            "maximum": 104857600
          }
        }
      },
      "BigQuerySecret": {
        "type": "object",
        "properties": {
          "serviceAccountKey": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "serviceAccountKey"
        ]
      },
      "PosthogSecret": {
        "type": "object",
        "properties": {
          "projectApiKey": {
            "type": "string",
            "minLength": 20
          }
        },
        "required": [
          "projectApiKey"
        ]
      },
      "AwsStreamSecret": {
        "type": "object",
        "properties": {
          "accessKeyId": {
            "type": "string",
            "minLength": 1
          },
          "secretAccessKey": {
            "type": "string",
            "minLength": 1
          },
          "sessionToken": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "accessKeyId",
          "secretAccessKey"
        ]
      },
      "KafkaSecret": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ClickHousePasswordSecret"
          },
          {
            "$ref": "#/components/schemas/KafkaMtlsSecret"
          }
        ]
      },
      "ClickHouseSecret": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ClickHousePasswordSecret"
          },
          {
            "$ref": "#/components/schemas/ClickHouseMtlsSecret"
          }
        ]
      },
      "AzureConnectionStringSecret": {
        "type": "object",
        "properties": {
          "connectionString": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "connectionString"
        ]
      },
      "AzureServicePrincipalSecret": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "format": "uuid"
          },
          "clientId": {
            "type": "string",
            "format": "uuid"
          },
          "clientSecret": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "tenantId",
          "clientId",
          "clientSecret"
        ]
      },
      "RabbitMqPlainSecret": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "minLength": 1
          },
          "password": {
            "type": "string",
            "minLength": 1
          },
          "caCertPem": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "username",
          "password"
        ]
      },
      "RabbitMqMtlsSecret": {
        "type": "object",
        "properties": {
          "clientCertPem": {
            "type": "string",
            "minLength": 1
          },
          "clientKeyPem": {
            "type": "string",
            "minLength": 1
          },
          "caCertPem": {
            "type": "string"
          }
        },
        "required": [
          "clientCertPem",
          "clientKeyPem"
        ]
      },
      "WebhookSigningConfig": {
        "type": "object",
        "properties": {
          "enabled": {
            "default": false,
            "type": "boolean"
          },
          "scheme": {
            "default": "pushrail_v1",
            "type": "string",
            "enum": [
              "pushrail_v1",
              "github_v1"
            ]
          },
          "header": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        }
      },
      "SchemaMappingColumn": {
        "type": "object",
        "properties": {
          "sourceField": {
            "type": "string",
            "minLength": 1
          },
          "columnName": {
            "type": "string",
            "minLength": 1
          },
          "columnType": {
            "type": "string",
            "enum": [
              "STRING",
              "INTEGER",
              "FLOAT",
              "BOOLEAN",
              "TIMESTAMP",
              "JSON"
            ]
          },
          "required": {
            "default": false,
            "type": "boolean"
          },
          "defaultValue": {
            "nullable": true
          }
        },
        "required": [
          "sourceField",
          "columnName",
          "columnType"
        ]
      },
      "ClickHouseColumnMappingEntry": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "source",
          "type"
        ]
      },
      "RenameTransform": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "rename"
            ]
          },
          "from": {
            "type": "string",
            "minLength": 1
          },
          "to": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "type",
          "from",
          "to"
        ]
      },
      "DropTransform": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "drop"
            ]
          },
          "field": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "type",
          "field"
        ]
      },
      "AddStaticTransform": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "addStatic"
            ]
          },
          "field": {
            "type": "string",
            "minLength": 1
          },
          "value": {
            "nullable": true
          }
        },
        "required": [
          "type",
          "field"
        ]
      },
      "MapPathTransform": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mapPath"
            ]
          },
          "from": {
            "type": "string",
            "minLength": 1
          },
          "to": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "type",
          "from",
          "to"
        ]
      },
      "SelectFieldsTransform": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "selectFields"
            ]
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1
          }
        },
        "required": [
          "type",
          "fields"
        ]
      },
      "WrapTransform": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "wrap"
            ]
          },
          "wrapper": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "type",
          "wrapper"
        ]
      },
      "ScopeFilters": {
        "type": "object",
        "properties": {
          "destinationIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "startTime": {
            "type": "string",
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryStatuses": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "PENDING",
                "DELIVERING",
                "DELIVERED",
                "FAILED",
                "RETRYING",
                "DRY_RUN"
              ]
            }
          },
          "environment": {
            "type": "string",
            "enum": [
              "PRODUCTION",
              "STAGING",
              "DEVELOPMENT"
            ]
          }
        }
      },
      "ClickHousePasswordSecret": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "minLength": 1
          },
          "password": {
            "type": "string",
            "minLength": 1
          },
          "caBundlePem": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "username",
          "password"
        ]
      },
      "KafkaMtlsSecret": {
        "type": "object",
        "properties": {
          "clientCertPem": {
            "type": "string",
            "minLength": 1
          },
          "clientKeyPem": {
            "type": "string",
            "minLength": 1
          },
          "caBundlePem": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "clientCertPem",
          "clientKeyPem"
        ]
      },
      "ClickHouseMtlsSecret": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "minLength": 1
          },
          "clientCertPem": {
            "type": "string",
            "minLength": 1
          },
          "clientKeyPem": {
            "type": "string",
            "minLength": 1
          },
          "caBundlePem": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "username",
          "clientCertPem",
          "clientKeyPem",
          "caBundlePem"
        ]
      }
    }
  }
}