{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "The EQL plaintext JSON payload sent by a client (such as an application) to CipherStash Proxy.",
  "type": "object",
  "properties": {
    "v": {
      "title": "Schema version",
      "type": "integer"
    },
    "k": {
      "title": "kind",
      "type": "string",
      "const": "pt"
    },
    "i": {
      "title": "ident",
      "type": "object",
      "properties": {
        "t": {
          "title": "table",
          "type": "string",
          "pattern": "^[a-zA-Z_]{1}[0-9a-zA-Z_]*$"
        },
        "c": {
          "title": "column",
          "type": "string",
          "pattern": "^[a-zA-Z_]{1}[0-9a-zA-Z_]*$"
        }
      },
      "required": [
        "t",
        "c"
      ]
    },
    "p": {
      "title": "plaintext",
      "type": "string"
    },
    "q": {
      "title": "for query",
      "description": "Specifies that the plaintext should be encrypted for a specific query operation. If null, source encryption and encryption for all indexes will be performed.",
      "type": "string",
      "enum": [
        "match",
        "ore",
        "unique",
        "ste_vec",
        "ejson_path"
      ]
    }
  },
  "required": [
    "v",
    "k",
    "i",
    "p"
  ]
}