{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/2.2/api/fdc3UserInterfaceHandshake.schema.json",
  "title": "Fdc3 UserInterface Handshake",
  "description": "Handshake message sent back to a user interface from the DA proxy code (setup by `getAgent()`) over the `MessagePort` provided in the preceding Fdc3UserInterfaceHello message, confirming that it is listening to the `MessagePort` for further communication.",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/Fdc3UserInterfaceHandshakeBase"
    },
    {
      "$ref": "fdc3UserInterfaceMessage.schema.json"
    }
  ],
  "$defs": {
    "Fdc3UserInterfaceHandshakeBase": {
      "type": "object",
      "properties": {
        "type": {
          "title": "Fdc3 UserInterface Handshake Message Type",
          "const": "Fdc3UserInterfaceHandshake"
        },
        "payload": {
          "title": "Fdc3 UserInterface Handshake Payload",
          "type": "object",
          "properties": {
            "fdc3Version": {
              "title": "FDC3 version",
              "type": "string",
              "description": "The version of FDC3 API that the Desktop Agent will provide support for."
            }
          },
          "additionalProperties": false,
          "required": ["fdc3Version"]
        }
      },
      "required": [
        "type",
        "payload"
      ],
      "additionalProperties": false
    }
  }
}