{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "const": "update"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
    },
    "base": {
      "type": "object",
      "properties": {
        "revision": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "revision_op": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
        }
      },
      "required": ["revision", "revision_op"],
      "additionalProperties": false
    },
    "body": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema0"
      },
      "opaque": true
    },
    "state": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema0"
      },
      "opaque": true,
      "description": "Per-account state. A supplied map replaces caller-owned keys and preserves omitted server-owned keys. Omission leaves existing state untouched."
    },
    "external_ids": {
      "maxItems": 32,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ns": {
            "type": "string",
            "pattern": "^cnx:cnx_.+"
          },
          "value": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["ns", "value"],
        "additionalProperties": false
      }
    },
    "conflict": {
      "type": "string",
      "const": "strict"
    }
  },
  "required": ["action", "id", "base", "body"],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  },
  "$id": "https://docs.sendtopigeon.com/schemas/record-update@1.schema.json"
}
