{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "client_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "event": {
      "type": "string",
      "const": "user_survey"
    },
    "tracking_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "timestamp_ms": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "event_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "schema_version": {
      "type": "number",
      "const": 1
    },
    "user_agent": {
      "type": "string",
      "maxLength": 2048
    },
    "shop_country": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 8
        },
        {
          "type": "null"
        }
      ]
    },
    "channel": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "store_id": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "instance_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "product_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "brand_id": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "product_associated": {
      "type": "boolean"
    },
    "ab_data": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "testEvent": {
      "type": "boolean",
      "const": true
    },
    "extra": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "reco_id": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ]
    },
    "rating": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4
    },
    "feedback": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "size": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "physical_infos": {
      "type": "object",
      "properties": {
        "gender": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "male",
                "female",
                "unisex",
                "boys",
                "girls",
                "babies"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "foot_length": {
          "type": "number",
          "minimum": 10,
          "maximum": 34
        },
        "head_circumference": {
          "type": "number",
          "minimum": 40,
          "maximum": 65
        },
        "body_shape": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z][\\w-]{0,63}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "bra": {
          "type": "object",
          "properties": {
            "band": {
              "anyOf": [
                {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 200
                },
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 8
                }
              ]
            },
            "cup": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4
            },
            "region": {
              "type": "string",
              "minLength": 1,
              "maxLength": 8
            }
          },
          "additionalProperties": false
        },
        "usual_size": {
          "type": "object",
          "properties": {
            "body_part": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            },
            "usual_size_name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "fit_feeling": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32
                },
                {
                  "type": "null"
                }
              ]
            },
            "desired_fit": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32
                },
                {
                  "type": "null"
                }
              ]
            },
            "size_system_id": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "age": {
          "type": "number",
          "minimum": 4,
          "maximum": 100
        },
        "age_band": {
          "type": "string",
          "pattern": "^\\d{1,3}-\\d{1,3}$"
        },
        "height": {
          "type": "number",
          "minimum": 80,
          "maximum": 210
        },
        "weight": {
          "type": "number",
          "minimum": 15,
          "maximum": 200
        },
        "usualSize": {
          "type": "object",
          "properties": {
            "body_part": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            },
            "usual_size_name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "fit_feeling": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32
                },
                {
                  "type": "null"
                }
              ]
            },
            "desired_fit": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 32
                },
                {
                  "type": "null"
                }
              ]
            },
            "size_system_id": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "references": {
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "brand_id": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              }
            ]
          },
          "brand_type_id": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              }
            ]
          },
          "size_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "size_system": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 16
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "brand_id",
          "size_name"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "client_id",
    "event",
    "tracking_id",
    "timestamp_ms",
    "product_id",
    "rating"
  ],
  "additionalProperties": {},
  "x-fmt-schema-version": 1
}
