{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Future Ordering Events Schema",
  "description": "Combined schema for event payloads.",
  "type": "object",
  "oneOf": [
    {
      "$ref": "#/$defs/configuration_value_updated_event"
    },
    {
      "$ref": "#/$defs/order_closed_event"
    },
    {
      "$ref": "#/$defs/order_collection_details_set_event"
    },
    {
      "$ref": "#/$defs/order_created_event"
    },
    {
      "$ref": "#/$defs/order_deal_annulled_event"
    },
    {
      "$ref": "#/$defs/order_deal_annulment_requested_event"
    },
    {
      "$ref": "#/$defs/order_deal_capture_requested_event"
    },
    {
      "$ref": "#/$defs/order_deal_captured_event"
    },
    {
      "$ref": "#/$defs/order_deal_created_event"
    },
    {
      "$ref": "#/$defs/order_deal_fulfilled_event"
    },
    {
      "$ref": "#/$defs/order_deal_fulfillment_required_event"
    },
    {
      "$ref": "#/$defs/order_deal_reservation_required_event"
    },
    {
      "$ref": "#/$defs/order_deal_reserved_event"
    },
    {
      "$ref": "#/$defs/order_discounts_set_event"
    },
    {
      "$ref": "#/$defs/order_items_modified_event"
    },
    {
      "$ref": "#/$defs/order_place_in_pos_failed_event"
    },
    {
      "$ref": "#/$defs/order_place_order_session_started_event"
    },
    {
      "$ref": "#/$defs/order_placed_in_pos_event"
    },
    {
      "$ref": "#/$defs/order_ready_to_be_placed_in_pos_event"
    },
    {
      "$ref": "#/$defs/order_user_id_set_event"
    },
    {
      "$ref": "#/$defs/order_workflow_finalized_event"
    },
    {
      "$ref": "#/$defs/order_workflow_started_event"
    },
    {
      "$ref": "#/$defs/order_workflow_step_completed_event"
    },
    {
      "$ref": "#/$defs/user_communication_preferences_updated_event"
    },
    {
      "$ref": "#/$defs/user_created_event"
    },
    {
      "$ref": "#/$defs/user_deletion_requested_event"
    },
    {
      "$ref": "#/$defs/user_logged_in_event"
    },
    {
      "$ref": "#/$defs/user_updated_event"
    },
    {
      "$ref": "#/$defs/user_users_merged_event"
    }
  ],
  "$defs": {
    "configuration_value_updated_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string"
        },
        "entity": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "publisher": {
              "type": "string"
            },
            "version": {
              "type": "integer"
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "publisher",
            "version",
            "url"
          ]
        },
        "entityBase": {
          "type": "string"
        }
      },
      "required": [
        "tenantId",
        "entity",
        "entityBase"
      ]
    },
    "configuration_value_updated_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.configuration.value.updated"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/configuration_value_updated_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenant",
          "entity": {
            "id": "VE1GniHP9dM",
            "publisher": "tenant",
            "version": 4,
            "url": "https://api.futureordering.com/configurations/VE1GniHP9dM"
          },
          "entityBase": "configuration"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.configuration.value.updated"
      }
    },
    "order_closed_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        },
        "versionId": {
          "type": "string"
        },
        "storeId": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "transactionIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "orderTypeId": {
          "type": "string"
        },
        "salesChannelType": {
          "type": "string"
        },
        "collectionDetailType": {
          "type": "string"
        },
        "deviceId": {
          "type": "string"
        }
      },
      "required": [
        "tenantId",
        "orderId",
        "versionId",
        "storeId",
        "userId",
        "transactionIds",
        "orderTypeId",
        "salesChannelType",
        "collectionDetailType",
        "deviceId"
      ]
    },
    "order_closed_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.closed"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_closed_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenant",
          "orderId": "1mDFVJR45lH",
          "versionId": "10",
          "storeId": "21",
          "userId": "763037f6-6e9e-4743-9fbd-f2a5fcc2f6d2",
          "transactionIds": [
            "xz4xsk5xa7zwzxyfp7af9brdfe-1234567"
          ],
          "orderTypeId": "takeaway",
          "salesChannelType": "kiosk",
          "collectionDetailType": "pickup",
          "deviceId": "utG6H7v4Y"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.closed"
      }
    },
    "order_collection_details_set_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        },
        "versionId": {
          "type": "string"
        },
        "storeId": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "transactionIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "orderTypeId": {
          "type": "string"
        },
        "salesChannelType": {
          "type": "string"
        },
        "collectionDetailType": {
          "type": "string"
        }
      },
      "required": [
        "tenantId",
        "orderId",
        "versionId",
        "storeId",
        "userId",
        "transactionIds",
        "orderTypeId",
        "salesChannelType",
        "collectionDetailType"
      ]
    },
    "order_collection_details_set_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.collection_details_set"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_collection_details_set_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenant",
          "orderId": "zohVJR46cx",
          "versionId": "3",
          "storeId": "21",
          "userId": "91fe3bdb-ff80-457d-9f01-fed236022656",
          "transactionIds": [],
          "orderTypeId": "eatin",
          "salesChannelType": "browser",
          "collectionDetailType": "pickup"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.collection_details_set"
      }
    },
    "order_created_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the order."
        },
        "orderId": {
          "type": "string",
          "description": "The unique identifier of the order that was created."
        },
        "versionId": {
          "type": "string",
          "description": "The version identifier of the order."
        },
        "storeId": {
          "type": "string",
          "description": "The ID of the store on which the order was created."
        },
        "transactionIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of transaction IDs associated with the order."
        },
        "orderTypeId": {
          "type": "string",
          "description": "The identifier for the type of order that was created."
        },
        "salesChannelType": {
          "type": "string",
          "description": "The type of sales channel through which the order was created."
        }
      },
      "required": [
        "tenantId",
        "orderId",
        "versionId",
        "storeId",
        "transactionIds",
        "orderTypeId",
        "salesChannelType"
      ]
    },
    "order_created_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.created"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_created_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenant",
          "orderId": "zohVJR46cx",
          "versionId": "1",
          "storeId": "21",
          "transactionIds": [],
          "orderTypeId": "eatin",
          "salesChannelType": "browser"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.created"
      }
    },
    "order_deal_annulled_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "dealId": {
          "type": "string"
        },
        "dealIds": {
          "type": [
            "string",
            "null"
          ]
        },
        "tenantId": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "orderVersionId": {
          "type": [
            "string",
            "null"
          ]
        },
        "orderId": {
          "type": "string"
        }
      },
      "required": [
        "dealId",
        "tenantId",
        "key",
        "orderId"
      ]
    },
    "order_deal_annulled_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.deal.annulled"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_deal_annulled_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "dealId": "f5d1d0a0-986a-4342-b1e2-183a3b06e058",
          "tenantId": "tenant",
          "key": "integration-key",
          "orderId": "zohVJR46cx"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.deal.annulled"
      }
    },
    "order_deal_annulment_requested_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "dealId": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        }
      },
      "required": [
        "dealId",
        "tenantId",
        "key",
        "orderId"
      ]
    },
    "order_deal_annulment_requested_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.deal.annulment_requested"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_deal_annulment_requested_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "dealId": "a1fbebb9-5d2f-49c3-b332-43299317c4b3",
          "tenantId": "tenant",
          "key": "integration-key",
          "orderId": "1mDFVJR45lH"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.deal.annulment_requested"
      }
    },
    "order_deal_capture_requested_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "dealId": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        }
      },
      "required": [
        "dealId",
        "tenantId",
        "key",
        "orderId"
      ]
    },
    "order_deal_capture_requested_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.deal.capture_requested"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_deal_capture_requested_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "dealId": "968390e8-3c6b-4c6e-a96a-0c2e40b8ee9b",
          "tenantId": "tenant",
          "key": "integration-key",
          "orderId": "Z3mrVJR1mdB"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.deal.capture_requested"
      }
    },
    "order_deal_captured_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "dealId": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        }
      },
      "required": [
        "dealId",
        "tenantId",
        "key",
        "orderId"
      ]
    },
    "order_deal_captured_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.deal.captured"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_deal_captured_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "dealId": "21462206-fef8-44b8-8212-a8293f6c27c5",
          "tenantId": "tenant",
          "key": "fo-integrations-como",
          "orderId": "5RrsVJR1RSK"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.deal.captured"
      }
    },
    "order_deal_created_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "dealId": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "orderVersionId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        }
      },
      "required": [
        "dealId",
        "tenantId",
        "key",
        "orderVersionId",
        "orderId"
      ]
    },
    "order_deal_created_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.deal.created"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_deal_created_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "dealId": "f5d1d0a0-986a-4342-b1e2-183a3b06e058",
          "tenantId": "tenant",
          "key": "integration-key",
          "orderVersionId": "1",
          "orderId": "zohVJR46cx"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.deal.created"
      }
    },
    "order_deal_fulfilled_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "dealId": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "orderVersionId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        }
      },
      "required": [
        "dealId",
        "tenantId",
        "key",
        "orderVersionId",
        "orderId"
      ]
    },
    "order_deal_fulfilled_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.deal.fulfilled"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_deal_fulfilled_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "dealId": "f0d19976-cb63-4b8b-919b-92e798e303cc",
          "tenantId": "tenant",
          "key": "integration-key",
          "orderVersionId": "32",
          "orderId": "zohVJR46cx"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.deal.fulfilled"
      }
    },
    "order_deal_fulfillment_required_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "dealId": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "orderVersionId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        }
      },
      "required": [
        "dealId",
        "tenantId",
        "key",
        "orderVersionId",
        "orderId"
      ]
    },
    "order_deal_fulfillment_required_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.deal.fulfillment_required"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_deal_fulfillment_required_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "dealId": "f0d19976-cb63-4b8b-919b-92e798e303cc",
          "tenantId": "tenant",
          "key": "integration-key",
          "orderVersionId": "32",
          "orderId": "zohVJR46cx"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.deal.fulfillment_required"
      }
    },
    "order_deal_reservation_required_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "orderVersionId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        }
      },
      "required": [
        "tenantId",
        "key",
        "orderVersionId",
        "orderId"
      ]
    },
    "order_deal_reservation_required_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.deal.reservation_required"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_deal_reservation_required_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenant",
          "key": "integration-key",
          "orderVersionId": "1",
          "orderId": "zohVJR46cx"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.deal.reservation_required"
      }
    },
    "order_deal_reserved_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "dealId": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "orderVersionId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        }
      },
      "required": [
        "dealId",
        "tenantId",
        "key",
        "orderVersionId",
        "orderId"
      ]
    },
    "order_deal_reserved_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.deal.reserved"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_deal_reserved_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "dealId": "f5d1d0a0-986a-4342-b1e2-183a3b06e058",
          "tenantId": "tenant",
          "key": "integration-key",
          "orderVersionId": "27",
          "orderId": "zohVJR46cx"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.deal.reserved"
      }
    },
    "order_discounts_set_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        },
        "versionId": {
          "type": "string"
        },
        "storeId": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "transactionIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "orderTypeId": {
          "type": "string"
        },
        "salesChannelType": {
          "type": "string"
        },
        "collectionDetailType": {
          "type": "string"
        }
      },
      "required": [
        "tenantId",
        "orderId",
        "versionId",
        "storeId",
        "userId",
        "transactionIds",
        "orderTypeId",
        "salesChannelType",
        "collectionDetailType"
      ]
    },
    "order_discounts_set_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.discounts_set"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_discounts_set_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenant",
          "orderId": "zohVJR46cx",
          "versionId": "33",
          "storeId": "21",
          "userId": "b63e1ea1-129d-4f33-a2e0-a4b45a5398e7",
          "transactionIds": [],
          "orderTypeId": "eatin",
          "salesChannelType": "browser",
          "collectionDetailType": "pickup"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.discounts_set"
      }
    },
    "order_items_modified_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        },
        "versionId": {
          "type": "string"
        },
        "storeId": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "transactionIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "orderTypeId": {
          "type": "string"
        },
        "salesChannelType": {
          "type": "string"
        },
        "collectionDetailType": {
          "type": "string"
        },
        "deviceId": {
          "type": "string"
        }
      },
      "required": [
        "tenantId",
        "orderId",
        "versionId",
        "storeId",
        "userId",
        "transactionIds",
        "orderTypeId",
        "salesChannelType",
        "collectionDetailType",
        "deviceId"
      ]
    },
    "order_items_modified_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.items_modified"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_items_modified_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenant",
          "orderId": "1mDFVJR45lH",
          "versionId": "4",
          "storeId": "21",
          "userId": "763037f6-6e9e-4743-9fbd-f2a5fcc2f6d2",
          "transactionIds": [],
          "orderTypeId": "takeaway",
          "salesChannelType": "kiosk",
          "collectionDetailType": "pickup",
          "deviceId": "utG6H7v4Y"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.items_modified"
      }
    },
    "order_place_in_pos_failed_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the order."
        },
        "orderId": {
          "type": "string",
          "description": "The unique identifier of the order that was created."
        },
        "versionId": {
          "type": "string",
          "description": "The version identifier of the order."
        },
        "storeId": {
          "type": "string",
          "description": "The ID of the store on which the order was created."
        },
        "transactionIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of transaction IDs associated with the order."
        },
        "orderTypeId": {
          "type": "string",
          "description": "The identifier for the type of order that was created."
        },
        "salesChannelType": {
          "type": "string",
          "description": "The type of sales channel through which the order was created."
        },
        "collectionDetailType": {
          "type": "string",
          "description": "The type of collection detail for the order, such as pickup or curbside."
        },
        "userId": {
          "type": "string",
          "description": "The ID of the user who created the order."
        },
        "errorInfo": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "description": "A machine-readable error code representing the type of error that occurred during order placement."
            },
            "message": {
              "type": "string",
              "description": "A human-readable message providing more details about the error that occurred during order placement."
            },
            "data": {
              "type": "object",
              "description": "An optional opaque object containing additional data relevant to the error, which can include any extra information that may be helpful for debugging or understanding the context of the error."
            }
          },
          "required": [
            "code",
            "message"
          ],
          "description": "An object containing details about the error that occurred during order placement in the POS."
        }
      },
      "required": [
        "tenantId",
        "orderId",
        "versionId",
        "storeId",
        "transactionIds",
        "orderTypeId",
        "salesChannelType",
        "collectionDetailType",
        "userId",
        "errorInfo"
      ]
    },
    "order_place_in_pos_failed_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.place_in_pos_failed"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_place_in_pos_failed_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "my-tenant",
          "orderId": "D8aiVH8uEO8",
          "versionId": "13",
          "storeId": "22",
          "userId": "12345678-ffc4-4f3a-b5c7-9630ee0e7017",
          "transactionIds": [
            "uykgjbj4tzew7bit9mgkdkz97y-r9u6y4e"
          ],
          "orderTypeId": "eatin",
          "salesChannelType": "browser",
          "collectionDetailType": "pickup",
          "errorInfo": {
            "code": "order.pos.error",
            "message": "HTTP communication with POS failed. (Endpoint=/pos). (HttpStatusCode=503)",
            "data": {
              "foo": "bar",
              "baz": 123,
              "qux": {
                "quux": "quuz"
              }
            }
          }
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.place_in_pos_failed"
      }
    },
    "order_place_order_session_started_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the order."
        },
        "orderId": {
          "type": "string",
          "description": "The unique identifier of the order that was created."
        },
        "versionId": {
          "type": "string",
          "description": "The version identifier of the order."
        },
        "storeId": {
          "type": "string",
          "description": "The ID of the store on which the order was created."
        },
        "transactionIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of transaction IDs associated with the order."
        },
        "orderTypeId": {
          "type": "string",
          "description": "The identifier for the type of order that was created."
        },
        "salesChannelType": {
          "type": "string",
          "description": "The type of sales channel through which the order was created."
        },
        "collectionDetailType": {
          "type": "string",
          "description": "The type of collection detail for the order, such as pickup or curbside."
        },
        "userId": {
          "type": "string",
          "description": "The ID of the user who created the order."
        }
      },
      "required": [
        "tenantId",
        "orderId",
        "versionId",
        "storeId",
        "transactionIds",
        "orderTypeId",
        "salesChannelType",
        "collectionDetailType",
        "userId"
      ]
    },
    "order_place_order_session_started_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.place_order_session.started"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_place_order_session_started_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "my-tenant",
          "orderId": "D8aiVH8uEO8",
          "versionId": "9",
          "storeId": "22",
          "userId": "12345678-ffc4-4f3a-b5c7-9630ee0e7017",
          "transactionIds": [
            "uykgjbj4tzew7bit9mgkdkz97y-r9u6y4e"
          ],
          "orderTypeId": "eatIn",
          "salesChannelType": "browser",
          "collectionDetailType": "pickup"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.place_order_session.started"
      }
    },
    "order_placed_in_pos_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the order."
        },
        "orderId": {
          "type": "string",
          "description": "The unique identifier of the order that was created."
        },
        "versionId": {
          "type": "string",
          "description": "The version identifier of the order."
        },
        "storeId": {
          "type": "string",
          "description": "The ID of the store on which the order was created."
        },
        "transactionIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of transaction IDs associated with the order."
        },
        "orderTypeId": {
          "type": "string",
          "description": "The identifier for the type of order that was created."
        },
        "salesChannelType": {
          "type": "string",
          "description": "The type of sales channel through which the order was created."
        },
        "collectionDetailType": {
          "type": "string",
          "description": "The type of collection detail for the order, such as pickup or curbside."
        },
        "userId": {
          "type": "string",
          "description": "The ID of the user who created the order."
        }
      },
      "required": [
        "tenantId",
        "orderId",
        "versionId",
        "storeId",
        "transactionIds",
        "orderTypeId",
        "salesChannelType",
        "collectionDetailType",
        "userId"
      ]
    },
    "order_placed_in_pos_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.placed_in_pos"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_placed_in_pos_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "my-tenant",
          "orderId": "D8aiVH8uEO8",
          "versionId": "9",
          "storeId": "22",
          "userId": "12345678-ffc4-4f3a-b5c7-9630ee0e7017",
          "transactionIds": [
            "uykgjbj4tzew7bit9mgkdkz97y-r9u6y4e"
          ],
          "orderTypeId": "eatIn",
          "salesChannelType": "browser",
          "collectionDetailType": "pickup"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.placed_in_pos"
      }
    },
    "order_ready_to_be_placed_in_pos_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the order."
        },
        "orderId": {
          "type": "string",
          "description": "The unique identifier of the order that was created."
        },
        "versionId": {
          "type": "string",
          "description": "The version identifier of the order."
        },
        "storeId": {
          "type": "string",
          "description": "The ID of the store on which the order was created."
        },
        "transactionIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of transaction IDs associated with the order."
        },
        "orderTypeId": {
          "type": "string",
          "description": "The identifier for the type of order that was created."
        },
        "salesChannelType": {
          "type": "string",
          "description": "The type of sales channel through which the order was created."
        },
        "collectionDetailType": {
          "type": "string",
          "description": "The type of collection detail for the order, such as pickup or curbside."
        },
        "userId": {
          "type": "string",
          "description": "The ID of the user who created the order."
        }
      },
      "required": [
        "tenantId",
        "orderId",
        "versionId",
        "storeId",
        "transactionIds",
        "orderTypeId",
        "salesChannelType",
        "collectionDetailType",
        "userId"
      ]
    },
    "order_ready_to_be_placed_in_pos_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.ready_to_be_placed_in_pos"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_ready_to_be_placed_in_pos_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "my-tenant",
          "orderId": "D8aiVH8uEO8",
          "versionId": "9",
          "storeId": "22",
          "userId": "12345678-ffc4-4f3a-b5c7-9630ee0e7017",
          "transactionIds": [
            "uykgjbj4tzew7bit9mgkdkz97y-r9u6y4e"
          ],
          "orderTypeId": "eatIn",
          "salesChannelType": "browser",
          "collectionDetailType": "pickup"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.ready_to_be_placed_in_pos"
      }
    },
    "order_user_id_set_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        },
        "versionId": {
          "type": "string"
        },
        "storeId": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "transactionIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "orderTypeId": {
          "type": "string"
        },
        "salesChannelType": {
          "type": "string"
        },
        "collectionDetailType": {
          "type": "string"
        }
      },
      "required": [
        "tenantId",
        "orderId",
        "versionId",
        "storeId",
        "userId",
        "transactionIds",
        "orderTypeId",
        "salesChannelType",
        "collectionDetailType"
      ]
    },
    "order_user_id_set_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.user_id_set"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_user_id_set_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenant",
          "orderId": "zohVJR46cx",
          "versionId": "6",
          "storeId": "21",
          "userId": "b63e1ea1-129d-4f33-a2e0-a4b45a5398e7",
          "transactionIds": [],
          "orderTypeId": "eatin",
          "salesChannelType": "browser",
          "collectionDetailType": "pickup"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.user_id_set"
      }
    },
    "order_workflow_finalized_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        },
        "completedSteps": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "workflowId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        },
        "storeId": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        }
      },
      "required": [
        "reason",
        "completedSteps",
        "workflowId",
        "orderId",
        "storeId",
        "tenantId"
      ]
    },
    "order_workflow_finalized_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.workflow.finalized"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_workflow_finalized_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "reason": "completed",
          "completedSteps": [],
          "workflowId": "production",
          "orderId": "1mDFVJR45lH",
          "storeId": "21",
          "tenantId": "tenant"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.workflow.finalized"
      }
    },
    "order_workflow_started_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "workflowId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        },
        "storeId": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        }
      },
      "required": [
        "workflowId",
        "orderId",
        "storeId",
        "tenantId"
      ]
    },
    "order_workflow_started_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.workflow.started"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_workflow_started_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "workflowId": "production",
          "orderId": "1mDFVJR45lH",
          "storeId": "21",
          "tenantId": "tenant"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.workflow.started"
      }
    },
    "order_workflow_step_completed_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "step": {
          "type": "string"
        },
        "completedSteps": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "workflowId": {
          "type": "string"
        },
        "orderId": {
          "type": "string"
        },
        "storeId": {
          "type": "string"
        },
        "additionalData": {
          "type": "object",
          "properties": {
            "salesChannelType": {
              "type": "string"
            },
            "posData": {
              "type": "object",
              "properties": {
                "orderName": {
                  "type": "string"
                },
                "estimatedReadyTime": {
                  "type": "string"
                },
                "datePlaced": {
                  "type": "string"
                }
              },
              "required": [
                "orderName",
                "estimatedReadyTime",
                "datePlaced"
              ]
            },
            "salesChannel": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "moduleName": {
                      "type": "string"
                    },
                    "moduleVersion": {
                      "type": "string"
                    },
                    "deviceId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "moduleName",
                    "moduleVersion",
                    "deviceId"
                  ]
                },
                "webClientVersion": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "additionalProperties",
                "webClientVersion",
                "type"
              ]
            },
            "collectionDetails": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ]
            },
            "orderTypeId": {
              "type": "string"
            }
          },
          "required": [
            "salesChannelType",
            "posData",
            "salesChannel",
            "collectionDetails",
            "orderTypeId"
          ]
        },
        "tenantId": {
          "type": "string"
        }
      },
      "required": [
        "step",
        "completedSteps",
        "workflowId",
        "orderId",
        "storeId",
        "additionalData",
        "tenantId"
      ]
    },
    "order_workflow_step_completed_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.order.workflow.step.completed"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/order_workflow_step_completed_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "step": "production-completed",
          "completedSteps": [
            "production-started",
            "production-completed"
          ],
          "workflowId": "production",
          "orderId": "IeHdVJR044l",
          "storeId": "21",
          "additionalData": {
            "salesChannelType": "external",
            "posData": {
              "orderName": "1234",
              "estimatedReadyTime": "2026-05-12T19:11:42.568491+00:00",
              "datePlaced": "2026-05-12T19:06:42.5684952+00:00"
            },
            "salesChannel": {
              "id": "foop:apiproductionstatus:1.0.0.43",
              "name": "FOOP",
              "additionalProperties": {
                "moduleName": "apiproductionstatus",
                "moduleVersion": "1.0.0.43",
                "deviceId": "3d956eb1-56cd-4028-a689-7d71c320bbd0"
              },
              "webClientVersion": "",
              "type": "external"
            },
            "collectionDetails": {
              "type": "pickup"
            },
            "orderTypeId": "unknown"
          },
          "tenantId": "tenant"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.order.workflow.step.completed"
      }
    },
    "user_communication_preferences_updated_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the user"
        },
        "userId": {
          "type": "string",
          "description": "The ID of the user account"
        }
      },
      "required": [
        "tenantId",
        "userId"
      ]
    },
    "user_communication_preferences_updated_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.user.communication-preferences.updated"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/user_communication_preferences_updated_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "userId": "f29fa239-868f-4537-8990-097451ac1e4b",
          "tenantId": "tenant"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.user.communication-preferences.updated"
      }
    },
    "user_created_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the user"
        },
        "userId": {
          "type": "string",
          "description": "The ID of the user account"
        },
        "legacyAccountType": {
          "type": "string",
          "description": "The type of the user account"
        }
      },
      "required": [
        "tenantId",
        "userId",
        "legacyAccountType"
      ]
    },
    "user_created_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.user.created"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/user_created_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenantId",
          "userId": "2855f81d-c1f2-4757-be43-ea37e5243e53",
          "legacyAccountType": "user"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.user.created"
      }
    },
    "user_deletion_requested_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the user"
        },
        "userId": {
          "type": "string",
          "description": "The ID of the user account"
        },
        "legacyAccountType": {
          "type": "string",
          "description": "The type of the user account"
        }
      },
      "required": [
        "tenantId",
        "userId",
        "legacyAccountType"
      ]
    },
    "user_deletion_requested_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.user.deletion_requested"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/user_deletion_requested_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenantId",
          "userId": "2855f81d-c1f2-4757-be43-ea37e5243e53",
          "legacyAccountType": "user"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.user.deletion_requested"
      }
    },
    "user_logged_in_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the user"
        },
        "userId": {
          "type": "string",
          "description": "The ID of the user account"
        },
        "legacyAccountType": {
          "type": "string",
          "description": "The type of the user account"
        }
      },
      "required": [
        "tenantId",
        "userId",
        "legacyAccountType"
      ]
    },
    "user_logged_in_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.user.logged_in"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/user_logged_in_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenantId",
          "userId": "2855f81d-c1f2-4757-be43-ea37e5243e53",
          "legacyAccountType": "user"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.user.logged_in"
      }
    },
    "user_updated_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the user"
        },
        "userId": {
          "type": "string",
          "description": "The ID of the user account"
        },
        "legacyAccountType": {
          "type": "string",
          "description": "The type of the user account"
        }
      },
      "required": [
        "tenantId",
        "userId",
        "legacyAccountType"
      ]
    },
    "user_updated_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.user.updated"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/user_updated_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenantId",
          "userId": "2855f81d-c1f2-4757-be43-ea37e5243e53",
          "legacyAccountType": "user"
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.user.updated"
      }
    },
    "user_users_merged_data": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The tenant ID associated with the users"
        },
        "userFrom": {
          "type": "object",
          "description": "The data associated with the source account",
          "properties": {
            "userId": {
              "type": "string",
              "description": "The ID of the source user account"
            },
            "legacyAccountType": {
              "type": "string",
              "description": "The type of the source user account"
            }
          }
        },
        "userTo": {
          "type": "object",
          "description": "The data associated with the target account",
          "properties": {
            "userId": {
              "type": "string",
              "description": "The ID of the target user account"
            },
            "legacyAccountType": {
              "type": "string",
              "description": "The type of the target user account"
            }
          }
        }
      },
      "required": [
        "tenantId",
        "userFrom",
        "userTo"
      ]
    },
    "user_users_merged_event": {
      "type": "object",
      "properties": {
        "specversion": {
          "type": "string",
          "const": "1.0"
        },
        "id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "const": "com.futureordering.user.users_merged"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "datacontenttype": {
          "type": "string"
        },
        "data": {
          "$ref": "#/$defs/user_users_merged_data"
        }
      },
      "required": [
        "specversion",
        "id",
        "source",
        "type",
        "time",
        "data"
      ],
      "additionalProperties": true,
      "example": {
        "specversion": "1.0",
        "data": {
          "tenantId": "tenantId",
          "userFrom": {
            "userId": "fd3b035e-9c4d-48be-a4c2-7320caa9cbb8",
            "legacyAccountType": "guest"
          },
          "userTo": {
            "userId": "2855f81d-c1f2-4757-be43-ea37e5243e53",
            "legacyAccountType": "user"
          }
        },
        "dataContentType": "application/json",
        "id": "c3db8281-5e03-4608-a597-8afb3c8d7bde",
        "source": "https://api.futureordering.com",
        "time": "2026-02-26T14:32:02.9140538+00:00",
        "type": "com.futureordering.user.users_merged"
      }
    }
  }
}